From ab110099c955c8b78670149fde7a57b2d61edaa4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 19:27:39 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-=20Gene?= =?UTF-8?q?rate=20MISTRALAI=20MISTRALAI-SDK=201.2.2=20(#155)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.438.1 * gen gcp * regen azure --------- Co-authored-by: speakeasybot Co-authored-by: gaspardBT --- .speakeasy/gen.lock | 10 ++-- .speakeasy/gen.yaml | 3 +- .speakeasy/workflow.lock | 46 +++++++++---------- README.md | 21 ++++----- RELEASES.md | 12 ++++- packages/mistralai_azure/.speakeasy/gen.lock | 8 ++-- packages/mistralai_azure/.speakeasy/gen.yaml | 1 + .../src/mistralai_azure/chat.py | 16 +++---- .../models/chatcompletionrequest.py | 4 +- .../models/chatcompletionstreamrequest.py | 4 +- .../src/mistralai_azure/sdkconfiguration.py | 4 +- packages/mistralai_gcp/.speakeasy/gen.lock | 8 ++-- packages/mistralai_gcp/.speakeasy/gen.yaml | 1 + .../mistralai_gcp/src/mistralai_gcp/chat.py | 16 +++---- .../models/chatcompletionrequest.py | 4 +- .../models/chatcompletionstreamrequest.py | 4 +- .../src/mistralai_gcp/sdkconfiguration.py | 4 +- pyproject.toml | 2 +- src/mistralai/_version.py | 2 +- src/mistralai/agents.py | 16 +++---- src/mistralai/chat.py | 16 +++---- .../models/agentscompletionrequest.py | 4 +- .../models/agentscompletionstreamrequest.py | 4 +- src/mistralai/models/chatcompletionrequest.py | 4 +- .../models/chatcompletionstreamrequest.py | 4 +- src/mistralai/sdkconfiguration.py | 6 +-- 26 files changed, 117 insertions(+), 107 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 6ad8a4b..26d49c2 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: ee15d853ecc28d415d6b33191893a6ff + docChecksum: 87f5a2bcfbc64bec79241e2b0de25b9f docVersion: 0.0.2 - speakeasyVersion: 1.434.7 - generationVersion: 2.452.0 - releaseVersion: 1.2.1 - configChecksum: 5d659f51b118508e47958545e6b539d2 + speakeasyVersion: 1.438.1 + generationVersion: 2.457.2 + releaseVersion: 1.2.2 + configChecksum: bfa571f32b68bdb4917b69135c2eb818 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 501ac53..2419fdb 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false python: - version: 1.2.1 + version: 1.2.2 additionalDependencies: dev: pytest: ^8.2.2 @@ -21,6 +21,7 @@ python: authors: - Mistral clientServerStatusCodesAsErrors: true + defaultErrorName: SDKError description: Python Client SDK for the Mistral AI API. enumFormat: union envVarPrefix: MISTRAL diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 5e498aa..734e61c 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,42 +1,46 @@ -speakeasyVersion: 1.434.7 +speakeasyVersion: 1.438.1 sources: mistral-azure-source: - sourceNamespace: mistral-openapi-azure - sourceRevisionDigest: sha256:8fda8235e30128cc8e1c4e1b828316551d03b584568789f262dc287b81d584ee - sourceBlobDigest: sha256:3c039e1f8a2230a86b0e1acec6224f6b8d6f181fb222b6b3b39d38b52075a8ec + sourceNamespace: mistral-azure-source + sourceRevisionDigest: sha256:2e3e3792ec63f3d59dd2a4de2f97ea6a80bd46f8905576069c54810feb930c12 + sourceBlobDigest: sha256:da059f78d331ea36f2ec69dfc6c5aa65be0bf0eda011597281cea6499b7ebac8 tags: - latest mistral-google-cloud-source: - sourceNamespace: mistral-openapi-google-cloud - sourceRevisionDigest: sha256:b2ce8e0e63674ea7ccfa3a75ff231bb97a39748331bcc0a3629f29c158f5b31e - sourceBlobDigest: sha256:a895adbf903776492b28daa3dd8c624f509decbbfe9ca6cda6510a33226604be + sourceNamespace: mistral-google-cloud-source + sourceRevisionDigest: sha256:22da209c58cb1591b3fde77467a9affce33c874724b220dd68f11a8f5fe92fbe + sourceBlobDigest: sha256:79c11900db52030ed8d8fff8066f9fe716670f4eadca41936f2cbc1a270fb087 tags: - latest mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:e658442ebfc83351cbb7873fb17b03f07ff9edebd8eddfce5577e2c5c7bfafce - sourceBlobDigest: sha256:559403eaaa97c021eaf0022adddb1066694d879a946c87057e942806d5a2a2a2 + sourceRevisionDigest: sha256:e44702b93f6a8ac450f1d85b4197f6640f8efb3d5e06be98418ea79acd8f70be + sourceBlobDigest: sha256:94a9891a3bdf3fafea5c41cee226c5e366c206e91e39e734cd2d1163af74f688 tags: - latest - main targets: mistralai-azure-sdk: source: mistral-azure-source - sourceNamespace: mistral-openapi-azure - sourceRevisionDigest: sha256:8fda8235e30128cc8e1c4e1b828316551d03b584568789f262dc287b81d584ee - sourceBlobDigest: sha256:3c039e1f8a2230a86b0e1acec6224f6b8d6f181fb222b6b3b39d38b52075a8ec + sourceNamespace: mistral-azure-source + sourceRevisionDigest: sha256:2e3e3792ec63f3d59dd2a4de2f97ea6a80bd46f8905576069c54810feb930c12 + sourceBlobDigest: sha256:da059f78d331ea36f2ec69dfc6c5aa65be0bf0eda011597281cea6499b7ebac8 + codeSamplesNamespace: mistral-openapi-azure-code-samples + codeSamplesRevisionDigest: sha256:e90c3293cb23081fed599d4528b168335a2ac58deb76ecc3afd7140d49b68816 mistralai-gcp-sdk: source: mistral-google-cloud-source - sourceNamespace: mistral-openapi-google-cloud - sourceRevisionDigest: sha256:b2ce8e0e63674ea7ccfa3a75ff231bb97a39748331bcc0a3629f29c158f5b31e - sourceBlobDigest: sha256:a895adbf903776492b28daa3dd8c624f509decbbfe9ca6cda6510a33226604be + sourceNamespace: mistral-google-cloud-source + sourceRevisionDigest: sha256:22da209c58cb1591b3fde77467a9affce33c874724b220dd68f11a8f5fe92fbe + sourceBlobDigest: sha256:79c11900db52030ed8d8fff8066f9fe716670f4eadca41936f2cbc1a270fb087 + codeSamplesNamespace: mistral-openapi-google-cloud-code-samples + codeSamplesRevisionDigest: sha256:8539ff0f99be949906dad55250e1d230dfebf062e8f7c38398713e11c6bb48ec mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:e658442ebfc83351cbb7873fb17b03f07ff9edebd8eddfce5577e2c5c7bfafce - sourceBlobDigest: sha256:559403eaaa97c021eaf0022adddb1066694d879a946c87057e942806d5a2a2a2 + sourceRevisionDigest: sha256:e44702b93f6a8ac450f1d85b4197f6640f8efb3d5e06be98418ea79acd8f70be + sourceBlobDigest: sha256:94a9891a3bdf3fafea5c41cee226c5e366c206e91e39e734cd2d1163af74f688 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:f48900efe513aa95888e4035452ba1d54a2b1f8e872454ccb5bdca24d4fc7b09 + codeSamplesRevisionDigest: sha256:9e9f8f0da360280a8d42e2ccbee423871b74abd07e872e10892636ba4be4e3a5 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest @@ -44,18 +48,12 @@ workflow: mistral-azure-source: inputs: - location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-azure:main - registry: - location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-azure:main mistral-google-cloud-source: inputs: - location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-google-cloud:main - registry: - location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-google-cloud:main mistral-openapi: inputs: - location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi:main - registry: - location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi:main targets: mistralai-azure-sdk: target: python diff --git a/README.md b/README.md index a73c133..24c744a 100644 --- a/README.md +++ b/README.md @@ -556,10 +556,10 @@ By default, an API error will raise a models.SDKError exception, which has the f When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `list_async` method may raise the following exceptions: -| Error Type | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| models.HTTPValidationError | 422 | application/json | -| models.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------------- | ----------- | ---------------- | +| models.HTTPValidationError | 422 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | ### Example @@ -595,9 +595,9 @@ except models.SDKError as e: 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 | Variables | -| ----- | ------ | --------- | -| `eu` | `https://api.mistral.ai` | None | +| Name | Server | +| ---- | ------------------------ | +| `eu` | `https://api.mistral.ai` | #### Example @@ -618,7 +618,6 @@ if res is not None: ``` - ### 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: @@ -728,9 +727,9 @@ s = Mistral(async_client=CustomClient(httpx.AsyncClient())) This SDK supports the following security scheme globally: -| Name | Type | Scheme | Environment Variable | -| -------------------- | -------------------- | -------------------- | -------------------- | -| `api_key` | http | HTTP Bearer | `MISTRAL_API_KEY` | +| 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 diff --git a/RELEASES.md b/RELEASES.md index 6ffcd17..19d5c3b 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -68,4 +68,14 @@ Based on: ### Generated - [python v1.2.1] . ### Releases -- [PyPI v1.2.1] https://pypi.org/project/mistralai/1.2.1 - . \ No newline at end of file +- [PyPI v1.2.1] https://pypi.org/project/mistralai/1.2.1 - . + +## 2024-11-12 18:04:16 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.438.1 (2.457.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.2.2] . +### Releases +- [PyPI v1.2.2] https://pypi.org/project/mistralai/1.2.2 - . \ No newline at end of file diff --git a/packages/mistralai_azure/.speakeasy/gen.lock b/packages/mistralai_azure/.speakeasy/gen.lock index bc550ff..cc18655 100644 --- a/packages/mistralai_azure/.speakeasy/gen.lock +++ b/packages/mistralai_azure/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: dc40fa48-2c4d-46ad-ac8b-270749770f34 management: - docChecksum: 0f195020b1080b5c3b1fc5834d30a929 + docChecksum: 1eac78d7698423fcd3bc58124f860d30 docVersion: 0.0.2 - speakeasyVersion: 1.434.4 - generationVersion: 2.452.0 + speakeasyVersion: 1.438.1 + generationVersion: 2.457.2 releaseVersion: 1.2.0 - configChecksum: 0600a305e49d44a5fcb3a5a33dc00999 + configChecksum: f69f129b40abc60e88685a36201ebb87 published: true features: python: diff --git a/packages/mistralai_azure/.speakeasy/gen.yaml b/packages/mistralai_azure/.speakeasy/gen.yaml index 7280691..dcf160a 100644 --- a/packages/mistralai_azure/.speakeasy/gen.yaml +++ b/packages/mistralai_azure/.speakeasy/gen.yaml @@ -21,6 +21,7 @@ python: authors: - Mistral clientServerStatusCodesAsErrors: true + defaultErrorName: SDKError description: Python Client SDK for the Mistral AI API in Azure. enumFormat: union fixFlags: diff --git a/packages/mistralai_azure/src/mistralai_azure/chat.py b/packages/mistralai_azure/src/mistralai_azure/chat.py index e1d3390..fb443e5 100644 --- a/packages/mistralai_azure/src/mistralai_azure/chat.py +++ b/packages/mistralai_azure/src/mistralai_azure/chat.py @@ -34,8 +34,8 @@ def stream( models.ChatCompletionStreamRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = 0, - frequency_penalty: Optional[float] = 0, + presence_penalty: Optional[float] = None, + frequency_penalty: Optional[float] = None, n: OptionalNullable[int] = UNSET, safe_prompt: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -182,8 +182,8 @@ async def stream_async( models.ChatCompletionStreamRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = 0, - frequency_penalty: Optional[float] = 0, + presence_penalty: Optional[float] = None, + frequency_penalty: Optional[float] = None, n: OptionalNullable[int] = UNSET, safe_prompt: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -338,8 +338,8 @@ def complete( models.ChatCompletionRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = 0, - frequency_penalty: Optional[float] = 0, + presence_penalty: Optional[float] = None, + frequency_penalty: Optional[float] = None, n: OptionalNullable[int] = UNSET, safe_prompt: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -490,8 +490,8 @@ async def complete_async( models.ChatCompletionRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = 0, - frequency_penalty: Optional[float] = 0, + presence_penalty: Optional[float] = None, + frequency_penalty: Optional[float] = None, n: OptionalNullable[int] = UNSET, safe_prompt: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, diff --git a/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionrequest.py b/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionrequest.py index fd3cb7b..beedf52 100644 --- a/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionrequest.py +++ b/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionrequest.py @@ -116,10 +116,10 @@ class ChatCompletionRequest(BaseModel): tool_choice: Optional[ChatCompletionRequestToolChoice] = None - presence_penalty: Optional[float] = 0 + presence_penalty: Optional[float] = None r"""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] = 0 + frequency_penalty: Optional[float] = None r"""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 diff --git a/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionstreamrequest.py b/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionstreamrequest.py index 8f71f89..9d78371 100644 --- a/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionstreamrequest.py +++ b/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionstreamrequest.py @@ -116,10 +116,10 @@ class ChatCompletionStreamRequest(BaseModel): tool_choice: Optional[ChatCompletionStreamRequestToolChoice] = None - presence_penalty: Optional[float] = 0 + presence_penalty: Optional[float] = None r"""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] = 0 + frequency_penalty: Optional[float] = None r"""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 diff --git a/packages/mistralai_azure/src/mistralai_azure/sdkconfiguration.py b/packages/mistralai_azure/src/mistralai_azure/sdkconfiguration.py index 1a31944..75216e1 100644 --- a/packages/mistralai_azure/src/mistralai_azure/sdkconfiguration.py +++ b/packages/mistralai_azure/src/mistralai_azure/sdkconfiguration.py @@ -29,8 +29,8 @@ class SDKConfiguration: language: str = "python" openapi_doc_version: str = "0.0.2" sdk_version: str = "1.2.0" - gen_version: str = "2.452.0" - user_agent: str = "speakeasy-sdk/python 1.2.0 2.452.0 0.0.2 mistralai_azure" + gen_version: str = "2.457.2" + user_agent: str = "speakeasy-sdk/python 1.2.0 2.457.2 0.0.2 mistralai_azure" retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None diff --git a/packages/mistralai_gcp/.speakeasy/gen.lock b/packages/mistralai_gcp/.speakeasy/gen.lock index 6add360..e177824 100644 --- a/packages/mistralai_gcp/.speakeasy/gen.lock +++ b/packages/mistralai_gcp/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: ec60f2d8-7869-45c1-918e-773d41a8cf74 management: - docChecksum: 46baf8da7636ea1bf44557571d011045 + docChecksum: a4b0284a2171be4279ac869462fc2ba5 docVersion: 0.0.2 - speakeasyVersion: 1.434.4 - generationVersion: 2.452.0 + speakeasyVersion: 1.438.1 + generationVersion: 2.457.2 releaseVersion: 1.2.0 - configChecksum: 6036ab871ca1cf21d35bfc75dc25089b + configChecksum: 5a6e207048dd06f191872088627d9018 published: true features: python: diff --git a/packages/mistralai_gcp/.speakeasy/gen.yaml b/packages/mistralai_gcp/.speakeasy/gen.yaml index 97e9faf..360352e 100644 --- a/packages/mistralai_gcp/.speakeasy/gen.yaml +++ b/packages/mistralai_gcp/.speakeasy/gen.yaml @@ -24,6 +24,7 @@ python: authors: - Mistral clientServerStatusCodesAsErrors: true + defaultErrorName: SDKError description: Python Client SDK for the Mistral AI API in GCP. enumFormat: union fixFlags: diff --git a/packages/mistralai_gcp/src/mistralai_gcp/chat.py b/packages/mistralai_gcp/src/mistralai_gcp/chat.py index 19c7435..1791366 100644 --- a/packages/mistralai_gcp/src/mistralai_gcp/chat.py +++ b/packages/mistralai_gcp/src/mistralai_gcp/chat.py @@ -34,8 +34,8 @@ def stream( models.ChatCompletionStreamRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = 0, - frequency_penalty: Optional[float] = 0, + presence_penalty: Optional[float] = None, + frequency_penalty: Optional[float] = None, n: OptionalNullable[int] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -179,8 +179,8 @@ async def stream_async( models.ChatCompletionStreamRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = 0, - frequency_penalty: Optional[float] = 0, + presence_penalty: Optional[float] = None, + frequency_penalty: Optional[float] = None, n: OptionalNullable[int] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -332,8 +332,8 @@ def complete( models.ChatCompletionRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = 0, - frequency_penalty: Optional[float] = 0, + presence_penalty: Optional[float] = None, + frequency_penalty: Optional[float] = None, n: OptionalNullable[int] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -481,8 +481,8 @@ async def complete_async( models.ChatCompletionRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = 0, - frequency_penalty: Optional[float] = 0, + presence_penalty: Optional[float] = None, + frequency_penalty: Optional[float] = None, n: OptionalNullable[int] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, diff --git a/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionrequest.py b/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionrequest.py index e1c263b..1f956d0 100644 --- a/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionrequest.py +++ b/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionrequest.py @@ -114,10 +114,10 @@ class ChatCompletionRequest(BaseModel): tool_choice: Optional[ChatCompletionRequestToolChoice] = None - presence_penalty: Optional[float] = 0 + presence_penalty: Optional[float] = None r"""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] = 0 + frequency_penalty: Optional[float] = None r"""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 diff --git a/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionstreamrequest.py b/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionstreamrequest.py index 5fc4085..f12a547 100644 --- a/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionstreamrequest.py +++ b/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionstreamrequest.py @@ -114,10 +114,10 @@ class ChatCompletionStreamRequest(BaseModel): tool_choice: Optional[ChatCompletionStreamRequestToolChoice] = None - presence_penalty: Optional[float] = 0 + presence_penalty: Optional[float] = None r"""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] = 0 + frequency_penalty: Optional[float] = None r"""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 diff --git a/packages/mistralai_gcp/src/mistralai_gcp/sdkconfiguration.py b/packages/mistralai_gcp/src/mistralai_gcp/sdkconfiguration.py index fdb296c..d94a4e4 100644 --- a/packages/mistralai_gcp/src/mistralai_gcp/sdkconfiguration.py +++ b/packages/mistralai_gcp/src/mistralai_gcp/sdkconfiguration.py @@ -29,8 +29,8 @@ class SDKConfiguration: language: str = "python" openapi_doc_version: str = "0.0.2" sdk_version: str = "1.2.0" - gen_version: str = "2.452.0" - user_agent: str = "speakeasy-sdk/python 1.2.0 2.452.0 0.0.2 mistralai-gcp" + gen_version: str = "2.457.2" + user_agent: str = "speakeasy-sdk/python 1.2.0 2.457.2 0.0.2 mistralai-gcp" retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None diff --git a/pyproject.toml b/pyproject.toml index a239400..95ac305 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "mistralai" -version = "1.2.1" +version = "1.2.2" description = "Python Client SDK for the Mistral AI API." authors = ["Mistral"] readme = "README-PYPI.md" diff --git a/src/mistralai/_version.py b/src/mistralai/_version.py index b7e6d2f..c6e29cc 100644 --- a/src/mistralai/_version.py +++ b/src/mistralai/_version.py @@ -3,7 +3,7 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "1.2.1" +__version__: str = "1.2.2" try: if __package__ is not None: diff --git a/src/mistralai/agents.py b/src/mistralai/agents.py index 1b5c6a1..a45bcec 100644 --- a/src/mistralai/agents.py +++ b/src/mistralai/agents.py @@ -40,8 +40,8 @@ def complete( models.AgentsCompletionRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = 0, - frequency_penalty: Optional[float] = 0, + presence_penalty: Optional[float] = None, + frequency_penalty: Optional[float] = None, n: OptionalNullable[int] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -185,8 +185,8 @@ async def complete_async( models.AgentsCompletionRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = 0, - frequency_penalty: Optional[float] = 0, + presence_penalty: Optional[float] = None, + frequency_penalty: Optional[float] = None, n: OptionalNullable[int] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -330,8 +330,8 @@ def stream( models.AgentsCompletionStreamRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = 0, - frequency_penalty: Optional[float] = 0, + presence_penalty: Optional[float] = None, + frequency_penalty: Optional[float] = None, n: OptionalNullable[int] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -481,8 +481,8 @@ async def stream_async( models.AgentsCompletionStreamRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = 0, - frequency_penalty: Optional[float] = 0, + presence_penalty: Optional[float] = None, + frequency_penalty: Optional[float] = None, n: OptionalNullable[int] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, diff --git a/src/mistralai/chat.py b/src/mistralai/chat.py index dd5ca69..53313ca 100644 --- a/src/mistralai/chat.py +++ b/src/mistralai/chat.py @@ -34,8 +34,8 @@ def complete( models.ChatCompletionRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = 0, - frequency_penalty: Optional[float] = 0, + presence_penalty: Optional[float] = None, + frequency_penalty: Optional[float] = None, n: OptionalNullable[int] = UNSET, safe_prompt: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -178,8 +178,8 @@ async def complete_async( models.ChatCompletionRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = 0, - frequency_penalty: Optional[float] = 0, + presence_penalty: Optional[float] = None, + frequency_penalty: Optional[float] = None, n: OptionalNullable[int] = UNSET, safe_prompt: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -330,8 +330,8 @@ def stream( models.ChatCompletionStreamRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = 0, - frequency_penalty: Optional[float] = 0, + presence_penalty: Optional[float] = None, + frequency_penalty: Optional[float] = None, n: OptionalNullable[int] = UNSET, safe_prompt: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -490,8 +490,8 @@ async def stream_async( models.ChatCompletionStreamRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = 0, - frequency_penalty: Optional[float] = 0, + presence_penalty: Optional[float] = None, + frequency_penalty: Optional[float] = None, n: OptionalNullable[int] = UNSET, safe_prompt: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, diff --git a/src/mistralai/models/agentscompletionrequest.py b/src/mistralai/models/agentscompletionrequest.py index 99d074d..bce326a 100644 --- a/src/mistralai/models/agentscompletionrequest.py +++ b/src/mistralai/models/agentscompletionrequest.py @@ -98,10 +98,10 @@ class AgentsCompletionRequest(BaseModel): tool_choice: Optional[AgentsCompletionRequestToolChoice] = None - presence_penalty: Optional[float] = 0 + presence_penalty: Optional[float] = None r"""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] = 0 + frequency_penalty: Optional[float] = None r"""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 diff --git a/src/mistralai/models/agentscompletionstreamrequest.py b/src/mistralai/models/agentscompletionstreamrequest.py index 4e1757a..94cc983 100644 --- a/src/mistralai/models/agentscompletionstreamrequest.py +++ b/src/mistralai/models/agentscompletionstreamrequest.py @@ -98,10 +98,10 @@ class AgentsCompletionStreamRequest(BaseModel): tool_choice: Optional[AgentsCompletionStreamRequestToolChoice] = None - presence_penalty: Optional[float] = 0 + presence_penalty: Optional[float] = None r"""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] = 0 + frequency_penalty: Optional[float] = None r"""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 diff --git a/src/mistralai/models/chatcompletionrequest.py b/src/mistralai/models/chatcompletionrequest.py index 6cdf97b..b3435d5 100644 --- a/src/mistralai/models/chatcompletionrequest.py +++ b/src/mistralai/models/chatcompletionrequest.py @@ -110,10 +110,10 @@ class ChatCompletionRequest(BaseModel): tool_choice: Optional[ChatCompletionRequestToolChoice] = None - presence_penalty: Optional[float] = 0 + presence_penalty: Optional[float] = None r"""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] = 0 + frequency_penalty: Optional[float] = None r"""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 diff --git a/src/mistralai/models/chatcompletionstreamrequest.py b/src/mistralai/models/chatcompletionstreamrequest.py index c56f523..a98eb33 100644 --- a/src/mistralai/models/chatcompletionstreamrequest.py +++ b/src/mistralai/models/chatcompletionstreamrequest.py @@ -110,10 +110,10 @@ class ChatCompletionStreamRequest(BaseModel): tool_choice: Optional[ChatCompletionStreamRequestToolChoice] = None - presence_penalty: Optional[float] = 0 + presence_penalty: Optional[float] = None r"""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] = 0 + frequency_penalty: Optional[float] = None r"""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 diff --git a/src/mistralai/sdkconfiguration.py b/src/mistralai/sdkconfiguration.py index cc20551..72d59f5 100644 --- a/src/mistralai/sdkconfiguration.py +++ b/src/mistralai/sdkconfiguration.py @@ -28,9 +28,9 @@ class SDKConfiguration: server: Optional[str] = "" language: str = "python" openapi_doc_version: str = "0.0.2" - sdk_version: str = "1.2.1" - gen_version: str = "2.452.0" - user_agent: str = "speakeasy-sdk/python 1.2.1 2.452.0 0.0.2 mistralai" + sdk_version: str = "1.2.2" + gen_version: str = "2.457.2" + user_agent: str = "speakeasy-sdk/python 1.2.2 2.457.2 0.0.2 mistralai" retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None