diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index f4e26ba..d568dc7 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,8 +3,8 @@ id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: docChecksum: 7ad277ed0527b2949ed9d503ce742fab docVersion: 0.0.2 - speakeasyVersion: 1.468.5 - generationVersion: 2.493.11 + speakeasyVersion: 1.462.2 + generationVersion: 2.486.1 releaseVersion: 1.3.0 configChecksum: e3b0a94e8a244b9061b81373ae58d4ed repoURL: https://github.com/mistralai/client-python.git @@ -14,12 +14,12 @@ features: python: additionalDependencies: 1.0.0 constsAndDefaults: 1.0.5 - core: 5.10.1 + core: 5.7.4 defaultEnabledRetries: 0.2.0 downloadStreams: 1.0.1 enumUnions: 0.1.0 envVarSecurityUsage: 0.3.2 - examples: 3.0.1 + examples: 3.0.0 flatRequests: 1.0.1 flattening: 3.1.0 globalSecurity: 3.0.2 @@ -386,7 +386,7 @@ examples: model_id: "ft:open-mistral-7b:587a6b29:20240514:7e773925" responses: "200": - application/json: {"id": "", "capabilities": {}} + application/json: {"id": ""} "422": {} delete_model_v1_models__model_id__delete: "": @@ -462,7 +462,7 @@ examples: application/json: {"model": "codestral-latest", "hyperparameters": {}} responses: "200": - application/json: {"id": "a621cf02-1cd9-4cf5-8403-315211a509a3", "auto_start": false, "hyperparameters": {}, "model": "2", "status": "FAILED", "job_type": "", "created_at": 550483, "modified_at": 906537, "training_files": ["74c2becc-3769-4177-b5e0-24985613de0e"]} + application/json: {"id": "a621cf02-1cd9-4cf5-8403-315211a509a3", "auto_start": false, "model": "2", "status": "FAILED", "job_type": "", "created_at": 550483, "modified_at": 906537, "training_files": ["74c2becc-3769-4177-b5e0-24985613de0e"]} jobs_api_routes_fine_tuning_get_fine_tuning_job: speakeasy-default-jobs-api-routes-fine-tuning-get-fine-tuning-job: parameters: @@ -595,7 +595,7 @@ examples: moderations_chat_v1_chat_moderations_post: speakeasy-default-moderations-chat-v1-chat-moderations-post: requestBody: - application/json: {"input": [[{"content": ""}, {"content": ""}, {"content": ""}], [{}, {"content": ""}, {}]], "model": "V90"} + application/json: {"input": [[{"content": ""}, {"content": ""}, {"content": ""}], [{"content": ""}]], "model": "V90"} responses: "200": application/json: {"id": "mod-e5cc70bb28c444948073e77776eb30ef"} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 1a9102f..2a24622 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.468.5 +speakeasyVersion: 1.462.2 sources: mistral-azure-source: sourceNamespace: mistral-azure-source @@ -18,7 +18,6 @@ sources: sourceBlobDigest: sha256:ebc7c1bb20aa87873a255cebea1e451099d8949ea1bbff81ec5fd45a107e3a32 tags: - latest - - speakeasy-sdk-regen-1736792274 targets: mistralai-azure-sdk: source: mistral-azure-source @@ -40,10 +39,10 @@ targets: sourceRevisionDigest: sha256:84bbc6f6011a31e21c8a674b01104446f986c7b5a6b002357800be8ef939b8da sourceBlobDigest: sha256:ebc7c1bb20aa87873a255cebea1e451099d8949ea1bbff81ec5fd45a107e3a32 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:aa33062fb0c6e4cc8e1af83c6a45dd0092514d1c4b0fac669335bae3f803252c + codeSamplesRevisionDigest: sha256:3868602e7de978e42d8372711d9711af5338a2f2bbf7671a5998c6176f74f58f workflow: workflowVersion: 1.0.0 - speakeasyVersion: latest + speakeasyVersion: 1.462.2 sources: mistral-azure-source: inputs: diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index 3b3c6d5..4dc7445 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -1,5 +1,5 @@ workflowVersion: 1.0.0 -speakeasyVersion: latest +speakeasyVersion: 1.462.2 # # Pinned to unblock https://github.com/mistralai/client-python/pull/173 sources: mistral-azure-source: inputs: diff --git a/docs/models/fileschema.md b/docs/models/fileschema.md index 30a5335..47fa486 100644 --- a/docs/models/fileschema.md +++ b/docs/models/fileschema.md @@ -7,7 +7,7 @@ | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | | `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 | -| `bytes_` | *int* | :heavy_check_mark: | The size of the file, in bytes. | 13000 | +| `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 | | diff --git a/docs/models/retrievefileout.md b/docs/models/retrievefileout.md index b801801..93aa502 100644 --- a/docs/models/retrievefileout.md +++ b/docs/models/retrievefileout.md @@ -7,7 +7,7 @@ | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | | `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 | -| `bytes_` | *int* | :heavy_check_mark: | The size of the file, in bytes. | 13000 | +| `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 | | diff --git a/docs/models/uploadfileout.md b/docs/models/uploadfileout.md index d8d50a2..c997443 100644 --- a/docs/models/uploadfileout.md +++ b/docs/models/uploadfileout.md @@ -7,7 +7,7 @@ | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | | `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 | -| `bytes_` | *int* | :heavy_check_mark: | The size of the file, in bytes. | 13000 | +| `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 | | diff --git a/pylintrc b/pylintrc index 9d193c4..393d0f7 100644 --- a/pylintrc +++ b/pylintrc @@ -89,7 +89,7 @@ persistent=yes # Minimum Python version to use for version dependent checks. Will default to # the version used to run pylint. -py-version=3.9 +py-version=3.8 # Discover python modules and packages in the file system subtree. recursive=no diff --git a/src/mistralai/__init__.py b/src/mistralai/__init__.py index dd02e42..a1b7f62 100644 --- a/src/mistralai/__init__.py +++ b/src/mistralai/__init__.py @@ -1,18 +1,9 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from ._version import ( - __title__, - __version__, - __openapi_doc_version__, - __gen_version__, - __user_agent__, -) +from ._version import __title__, __version__ from .sdk import * from .sdkconfiguration import * from .models import * VERSION: str = __version__ -OPENAPI_DOC_VERSION = __openapi_doc_version__ -SPEAKEASY_GENERATOR_VERSION = __gen_version__ -USER_AGENT = __user_agent__ diff --git a/src/mistralai/_version.py b/src/mistralai/_version.py index eb88cad..dc0cc3b 100644 --- a/src/mistralai/_version.py +++ b/src/mistralai/_version.py @@ -4,9 +4,6 @@ __title__: str = "mistralai" __version__: str = "1.3.0" -__openapi_doc_version__: str = "0.0.2" -__gen_version__: str = "2.493.11" -__user_agent__: str = "speakeasy-sdk/python 1.3.0 2.493.11 0.0.2 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/models/__init__.py b/src/mistralai/models/__init__.py index 0d2afe8..4e7e4d1 100644 --- a/src/mistralai/models/__init__.py +++ b/src/mistralai/models/__init__.py @@ -342,7 +342,6 @@ WandbIntegrationOutTypedDict, ) - __all__ = [ "APIEndpoint", "AgentsCompletionRequest", diff --git a/src/mistralai/models/fileschema.py b/src/mistralai/models/fileschema.py index 24d6977..952d23a 100644 --- a/src/mistralai/models/fileschema.py +++ b/src/mistralai/models/fileschema.py @@ -6,7 +6,6 @@ from .source import Source from mistralai.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL from mistralai.utils import validate_open_enum -import pydantic from pydantic import model_serializer from pydantic.functional_validators import PlainValidator from typing_extensions import Annotated, NotRequired, TypedDict @@ -17,7 +16,7 @@ class FileSchemaTypedDict(TypedDict): r"""The unique identifier of the file.""" object: str r"""The object type, which is always \"file\".""" - bytes_: int + bytes: int r"""The size of the file, in bytes.""" created_at: int r"""The UNIX timestamp (in seconds) of the event.""" @@ -36,7 +35,7 @@ class FileSchema(BaseModel): object: str r"""The object type, which is always \"file\".""" - bytes_: Annotated[int, pydantic.Field(alias="bytes")] + bytes: int r"""The size of the file, in bytes.""" created_at: int diff --git a/src/mistralai/models/retrievefileout.py b/src/mistralai/models/retrievefileout.py index e3a8c66..6bf4a5b 100644 --- a/src/mistralai/models/retrievefileout.py +++ b/src/mistralai/models/retrievefileout.py @@ -6,7 +6,6 @@ from .source import Source from mistralai.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL from mistralai.utils import validate_open_enum -import pydantic from pydantic import model_serializer from pydantic.functional_validators import PlainValidator from typing_extensions import Annotated, NotRequired, TypedDict @@ -17,7 +16,7 @@ class RetrieveFileOutTypedDict(TypedDict): r"""The unique identifier of the file.""" object: str r"""The object type, which is always \"file\".""" - bytes_: int + bytes: int r"""The size of the file, in bytes.""" created_at: int r"""The UNIX timestamp (in seconds) of the event.""" @@ -37,7 +36,7 @@ class RetrieveFileOut(BaseModel): object: str r"""The object type, which is always \"file\".""" - bytes_: Annotated[int, pydantic.Field(alias="bytes")] + bytes: int r"""The size of the file, in bytes.""" created_at: int diff --git a/src/mistralai/models/uploadfileout.py b/src/mistralai/models/uploadfileout.py index a3cf785..23e25d5 100644 --- a/src/mistralai/models/uploadfileout.py +++ b/src/mistralai/models/uploadfileout.py @@ -6,7 +6,6 @@ from .source import Source from mistralai.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL from mistralai.utils import validate_open_enum -import pydantic from pydantic import model_serializer from pydantic.functional_validators import PlainValidator from typing_extensions import Annotated, NotRequired, TypedDict @@ -17,7 +16,7 @@ class UploadFileOutTypedDict(TypedDict): r"""The unique identifier of the file.""" object: str r"""The object type, which is always \"file\".""" - bytes_: int + bytes: int r"""The size of the file, in bytes.""" created_at: int r"""The UNIX timestamp (in seconds) of the event.""" @@ -36,7 +35,7 @@ class UploadFileOut(BaseModel): object: str r"""The object type, which is always \"file\".""" - bytes_: Annotated[int, pydantic.Field(alias="bytes")] + bytes: int r"""The size of the file, in bytes.""" created_at: int diff --git a/src/mistralai/sdk.py b/src/mistralai/sdk.py index e0ff7ac..7778560 100644 --- a/src/mistralai/sdk.py +++ b/src/mistralai/sdk.py @@ -83,8 +83,7 @@ def __init__( security: Any = None if callable(api_key): - # pylint: disable=unnecessary-lambda-assignment - security = lambda: models.Security(api_key=api_key()) + security = lambda: models.Security(api_key=api_key()) # pylint: disable=unnecessary-lambda-assignment else: security = models.Security(api_key=api_key) diff --git a/src/mistralai/sdkconfiguration.py b/src/mistralai/sdkconfiguration.py index 2ccbcbe..398725e 100644 --- a/src/mistralai/sdkconfiguration.py +++ b/src/mistralai/sdkconfiguration.py @@ -1,12 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from ._hooks import SDKHooks -from ._version import ( - __gen_version__, - __openapi_doc_version__, - __user_agent__, - __version__, -) from .httpclient import AsyncHttpClient, HttpClient from .utils import Logger, RetryConfig, remove_suffix from dataclasses import dataclass @@ -33,10 +27,10 @@ class SDKConfiguration: server_url: Optional[str] = "" server: Optional[str] = "" language: str = "python" - openapi_doc_version: str = __openapi_doc_version__ - sdk_version: str = __version__ - gen_version: str = __gen_version__ - user_agent: str = __user_agent__ + openapi_doc_version: str = "0.0.2" + sdk_version: str = "1.3.0" + gen_version: str = "2.486.1" + user_agent: str = "speakeasy-sdk/python 1.3.0 2.486.1 0.0.2 mistralai" retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None