Skip to content

Commit ab11009

Browse files
github-actions[bot]speakeasybotGaspardBT
authored
chore: 🐝 Update SDK - Generate MISTRALAI MISTRALAI-SDK 1.2.2 (#155)
* ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.438.1 * gen gcp * regen azure --------- Co-authored-by: speakeasybot <[email protected]> Co-authored-by: gaspardBT <[email protected]>
1 parent 9a64ab6 commit ab11009

26 files changed

+117
-107
lines changed

.speakeasy/gen.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: 2d045ec7-2ebb-4f4d-ad25-40953b132161
33
management:
4-
docChecksum: ee15d853ecc28d415d6b33191893a6ff
4+
docChecksum: 87f5a2bcfbc64bec79241e2b0de25b9f
55
docVersion: 0.0.2
6-
speakeasyVersion: 1.434.7
7-
generationVersion: 2.452.0
8-
releaseVersion: 1.2.1
9-
configChecksum: 5d659f51b118508e47958545e6b539d2
6+
speakeasyVersion: 1.438.1
7+
generationVersion: 2.457.2
8+
releaseVersion: 1.2.2
9+
configChecksum: bfa571f32b68bdb4917b69135c2eb818
1010
repoURL: https://github.com/mistralai/client-python.git
1111
installationURL: https://github.com/mistralai/client-python.git
1212
published: true

.speakeasy/gen.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ generation:
1313
oAuth2ClientCredentialsEnabled: true
1414
oAuth2PasswordEnabled: false
1515
python:
16-
version: 1.2.1
16+
version: 1.2.2
1717
additionalDependencies:
1818
dev:
1919
pytest: ^8.2.2
2020
pytest-asyncio: ^0.23.7
2121
authors:
2222
- Mistral
2323
clientServerStatusCodesAsErrors: true
24+
defaultErrorName: SDKError
2425
description: Python Client SDK for the Mistral AI API.
2526
enumFormat: union
2627
envVarPrefix: MISTRAL

.speakeasy/workflow.lock

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,59 @@
1-
speakeasyVersion: 1.434.7
1+
speakeasyVersion: 1.438.1
22
sources:
33
mistral-azure-source:
4-
sourceNamespace: mistral-openapi-azure
5-
sourceRevisionDigest: sha256:8fda8235e30128cc8e1c4e1b828316551d03b584568789f262dc287b81d584ee
6-
sourceBlobDigest: sha256:3c039e1f8a2230a86b0e1acec6224f6b8d6f181fb222b6b3b39d38b52075a8ec
4+
sourceNamespace: mistral-azure-source
5+
sourceRevisionDigest: sha256:2e3e3792ec63f3d59dd2a4de2f97ea6a80bd46f8905576069c54810feb930c12
6+
sourceBlobDigest: sha256:da059f78d331ea36f2ec69dfc6c5aa65be0bf0eda011597281cea6499b7ebac8
77
tags:
88
- latest
99
mistral-google-cloud-source:
10-
sourceNamespace: mistral-openapi-google-cloud
11-
sourceRevisionDigest: sha256:b2ce8e0e63674ea7ccfa3a75ff231bb97a39748331bcc0a3629f29c158f5b31e
12-
sourceBlobDigest: sha256:a895adbf903776492b28daa3dd8c624f509decbbfe9ca6cda6510a33226604be
10+
sourceNamespace: mistral-google-cloud-source
11+
sourceRevisionDigest: sha256:22da209c58cb1591b3fde77467a9affce33c874724b220dd68f11a8f5fe92fbe
12+
sourceBlobDigest: sha256:79c11900db52030ed8d8fff8066f9fe716670f4eadca41936f2cbc1a270fb087
1313
tags:
1414
- latest
1515
mistral-openapi:
1616
sourceNamespace: mistral-openapi
17-
sourceRevisionDigest: sha256:e658442ebfc83351cbb7873fb17b03f07ff9edebd8eddfce5577e2c5c7bfafce
18-
sourceBlobDigest: sha256:559403eaaa97c021eaf0022adddb1066694d879a946c87057e942806d5a2a2a2
17+
sourceRevisionDigest: sha256:e44702b93f6a8ac450f1d85b4197f6640f8efb3d5e06be98418ea79acd8f70be
18+
sourceBlobDigest: sha256:94a9891a3bdf3fafea5c41cee226c5e366c206e91e39e734cd2d1163af74f688
1919
tags:
2020
- latest
2121
- main
2222
targets:
2323
mistralai-azure-sdk:
2424
source: mistral-azure-source
25-
sourceNamespace: mistral-openapi-azure
26-
sourceRevisionDigest: sha256:8fda8235e30128cc8e1c4e1b828316551d03b584568789f262dc287b81d584ee
27-
sourceBlobDigest: sha256:3c039e1f8a2230a86b0e1acec6224f6b8d6f181fb222b6b3b39d38b52075a8ec
25+
sourceNamespace: mistral-azure-source
26+
sourceRevisionDigest: sha256:2e3e3792ec63f3d59dd2a4de2f97ea6a80bd46f8905576069c54810feb930c12
27+
sourceBlobDigest: sha256:da059f78d331ea36f2ec69dfc6c5aa65be0bf0eda011597281cea6499b7ebac8
28+
codeSamplesNamespace: mistral-openapi-azure-code-samples
29+
codeSamplesRevisionDigest: sha256:e90c3293cb23081fed599d4528b168335a2ac58deb76ecc3afd7140d49b68816
2830
mistralai-gcp-sdk:
2931
source: mistral-google-cloud-source
30-
sourceNamespace: mistral-openapi-google-cloud
31-
sourceRevisionDigest: sha256:b2ce8e0e63674ea7ccfa3a75ff231bb97a39748331bcc0a3629f29c158f5b31e
32-
sourceBlobDigest: sha256:a895adbf903776492b28daa3dd8c624f509decbbfe9ca6cda6510a33226604be
32+
sourceNamespace: mistral-google-cloud-source
33+
sourceRevisionDigest: sha256:22da209c58cb1591b3fde77467a9affce33c874724b220dd68f11a8f5fe92fbe
34+
sourceBlobDigest: sha256:79c11900db52030ed8d8fff8066f9fe716670f4eadca41936f2cbc1a270fb087
35+
codeSamplesNamespace: mistral-openapi-google-cloud-code-samples
36+
codeSamplesRevisionDigest: sha256:8539ff0f99be949906dad55250e1d230dfebf062e8f7c38398713e11c6bb48ec
3337
mistralai-sdk:
3438
source: mistral-openapi
3539
sourceNamespace: mistral-openapi
36-
sourceRevisionDigest: sha256:e658442ebfc83351cbb7873fb17b03f07ff9edebd8eddfce5577e2c5c7bfafce
37-
sourceBlobDigest: sha256:559403eaaa97c021eaf0022adddb1066694d879a946c87057e942806d5a2a2a2
40+
sourceRevisionDigest: sha256:e44702b93f6a8ac450f1d85b4197f6640f8efb3d5e06be98418ea79acd8f70be
41+
sourceBlobDigest: sha256:94a9891a3bdf3fafea5c41cee226c5e366c206e91e39e734cd2d1163af74f688
3842
codeSamplesNamespace: mistral-openapi-code-samples
39-
codeSamplesRevisionDigest: sha256:f48900efe513aa95888e4035452ba1d54a2b1f8e872454ccb5bdca24d4fc7b09
43+
codeSamplesRevisionDigest: sha256:9e9f8f0da360280a8d42e2ccbee423871b74abd07e872e10892636ba4be4e3a5
4044
workflow:
4145
workflowVersion: 1.0.0
4246
speakeasyVersion: latest
4347
sources:
4448
mistral-azure-source:
4549
inputs:
4650
- location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-azure:main
47-
registry:
48-
location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-azure:main
4951
mistral-google-cloud-source:
5052
inputs:
5153
- location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-google-cloud:main
52-
registry:
53-
location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-google-cloud:main
5454
mistral-openapi:
5555
inputs:
5656
- location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi:main
57-
registry:
58-
location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi:main
5957
targets:
6058
mistralai-azure-sdk:
6159
target: python

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -556,10 +556,10 @@ By default, an API error will raise a models.SDKError exception, which has the f
556556

557557
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:
558558

559-
| Error Type | Status Code | Content Type |
560-
| -------------------------- | -------------------------- | -------------------------- |
561-
| models.HTTPValidationError | 422 | application/json |
562-
| models.SDKError | 4XX, 5XX | \*/\* |
559+
| Error Type | Status Code | Content Type |
560+
| -------------------------- | ----------- | ---------------- |
561+
| models.HTTPValidationError | 422 | application/json |
562+
| models.SDKError | 4XX, 5XX | \*/\* |
563563

564564
### Example
565565

@@ -595,9 +595,9 @@ except models.SDKError as e:
595595

596596
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:
597597

598-
| Name | Server | Variables |
599-
| ----- | ------ | --------- |
600-
| `eu` | `https://api.mistral.ai` | None |
598+
| Name | Server |
599+
| ---- | ------------------------ |
600+
| `eu` | `https://api.mistral.ai` |
601601

602602
#### Example
603603

@@ -618,7 +618,6 @@ if res is not None:
618618

619619
```
620620

621-
622621
### Override Server URL Per-Client
623622

624623
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()))
728727

729728
This SDK supports the following security scheme globally:
730729

731-
| Name | Type | Scheme | Environment Variable |
732-
| -------------------- | -------------------- | -------------------- | -------------------- |
733-
| `api_key` | http | HTTP Bearer | `MISTRAL_API_KEY` |
730+
| Name | Type | Scheme | Environment Variable |
731+
| --------- | ---- | ----------- | -------------------- |
732+
| `api_key` | http | HTTP Bearer | `MISTRAL_API_KEY` |
734733

735734
To authenticate with the API the `api_key` parameter must be set when initializing the SDK client instance. For example:
736735
```python

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,14 @@ Based on:
6868
### Generated
6969
- [python v1.2.1] .
7070
### Releases
71-
- [PyPI v1.2.1] https://pypi.org/project/mistralai/1.2.1 - .
71+
- [PyPI v1.2.1] https://pypi.org/project/mistralai/1.2.1 - .
72+
73+
## 2024-11-12 18:04:16
74+
### Changes
75+
Based on:
76+
- OpenAPI Doc
77+
- Speakeasy CLI 1.438.1 (2.457.2) https://github.com/speakeasy-api/speakeasy
78+
### Generated
79+
- [python v1.2.2] .
80+
### Releases
81+
- [PyPI v1.2.2] https://pypi.org/project/mistralai/1.2.2 - .

packages/mistralai_azure/.speakeasy/gen.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: dc40fa48-2c4d-46ad-ac8b-270749770f34
33
management:
4-
docChecksum: 0f195020b1080b5c3b1fc5834d30a929
4+
docChecksum: 1eac78d7698423fcd3bc58124f860d30
55
docVersion: 0.0.2
6-
speakeasyVersion: 1.434.4
7-
generationVersion: 2.452.0
6+
speakeasyVersion: 1.438.1
7+
generationVersion: 2.457.2
88
releaseVersion: 1.2.0
9-
configChecksum: 0600a305e49d44a5fcb3a5a33dc00999
9+
configChecksum: f69f129b40abc60e88685a36201ebb87
1010
published: true
1111
features:
1212
python:

packages/mistralai_azure/.speakeasy/gen.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ python:
2121
authors:
2222
- Mistral
2323
clientServerStatusCodesAsErrors: true
24+
defaultErrorName: SDKError
2425
description: Python Client SDK for the Mistral AI API in Azure.
2526
enumFormat: union
2627
fixFlags:

packages/mistralai_azure/src/mistralai_azure/chat.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ def stream(
3434
models.ChatCompletionStreamRequestToolChoiceTypedDict,
3535
]
3636
] = None,
37-
presence_penalty: Optional[float] = 0,
38-
frequency_penalty: Optional[float] = 0,
37+
presence_penalty: Optional[float] = None,
38+
frequency_penalty: Optional[float] = None,
3939
n: OptionalNullable[int] = UNSET,
4040
safe_prompt: Optional[bool] = False,
4141
retries: OptionalNullable[utils.RetryConfig] = UNSET,
@@ -182,8 +182,8 @@ async def stream_async(
182182
models.ChatCompletionStreamRequestToolChoiceTypedDict,
183183
]
184184
] = None,
185-
presence_penalty: Optional[float] = 0,
186-
frequency_penalty: Optional[float] = 0,
185+
presence_penalty: Optional[float] = None,
186+
frequency_penalty: Optional[float] = None,
187187
n: OptionalNullable[int] = UNSET,
188188
safe_prompt: Optional[bool] = False,
189189
retries: OptionalNullable[utils.RetryConfig] = UNSET,
@@ -338,8 +338,8 @@ def complete(
338338
models.ChatCompletionRequestToolChoiceTypedDict,
339339
]
340340
] = None,
341-
presence_penalty: Optional[float] = 0,
342-
frequency_penalty: Optional[float] = 0,
341+
presence_penalty: Optional[float] = None,
342+
frequency_penalty: Optional[float] = None,
343343
n: OptionalNullable[int] = UNSET,
344344
safe_prompt: Optional[bool] = False,
345345
retries: OptionalNullable[utils.RetryConfig] = UNSET,
@@ -490,8 +490,8 @@ async def complete_async(
490490
models.ChatCompletionRequestToolChoiceTypedDict,
491491
]
492492
] = None,
493-
presence_penalty: Optional[float] = 0,
494-
frequency_penalty: Optional[float] = 0,
493+
presence_penalty: Optional[float] = None,
494+
frequency_penalty: Optional[float] = None,
495495
n: OptionalNullable[int] = UNSET,
496496
safe_prompt: Optional[bool] = False,
497497
retries: OptionalNullable[utils.RetryConfig] = UNSET,

packages/mistralai_azure/src/mistralai_azure/models/chatcompletionrequest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ class ChatCompletionRequest(BaseModel):
116116

117117
tool_choice: Optional[ChatCompletionRequestToolChoice] = None
118118

119-
presence_penalty: Optional[float] = 0
119+
presence_penalty: Optional[float] = None
120120
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."""
121121

122-
frequency_penalty: Optional[float] = 0
122+
frequency_penalty: Optional[float] = None
123123
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."""
124124

125125
n: OptionalNullable[int] = UNSET

packages/mistralai_azure/src/mistralai_azure/models/chatcompletionstreamrequest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ class ChatCompletionStreamRequest(BaseModel):
116116

117117
tool_choice: Optional[ChatCompletionStreamRequestToolChoice] = None
118118

119-
presence_penalty: Optional[float] = 0
119+
presence_penalty: Optional[float] = None
120120
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."""
121121

122-
frequency_penalty: Optional[float] = 0
122+
frequency_penalty: Optional[float] = None
123123
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."""
124124

125125
n: OptionalNullable[int] = UNSET

0 commit comments

Comments
 (0)