Skip to content

Commit

Permalink
chore: 🐝 Update SDK - Generate MISTRALAI MISTRALAI-SDK 1.2.2 (#155)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored Nov 12, 2024
1 parent 9a64ab6 commit ab11009
Show file tree
Hide file tree
Showing 26 changed files with 117 additions and 107 deletions.
10 changes: 5 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
python:
version: 1.2.1
version: 1.2.2
additionalDependencies:
dev:
pytest: ^8.2.2
pytest-asyncio: ^0.23.7
authors:
- Mistral
clientServerStatusCodesAsErrors: true
defaultErrorName: SDKError
description: Python Client SDK for the Mistral AI API.
enumFormat: union
envVarPrefix: MISTRAL
Expand Down
46 changes: 22 additions & 24 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,61 +1,59 @@
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
sources:
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
Expand Down
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,14 @@ Based on:
### Generated
- [python v1.2.1] .
### Releases
- [PyPI v1.2.1] https://pypi.org/project/mistralai/1.2.1 - .
- [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 - .
8 changes: 4 additions & 4 deletions packages/mistralai_azure/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
1 change: 1 addition & 0 deletions packages/mistralai_azure/.speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 8 additions & 8 deletions packages/mistralai_azure/src/mistralai_azure/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions packages/mistralai_gcp/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
1 change: 1 addition & 0 deletions packages/mistralai_gcp/.speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 8 additions & 8 deletions packages/mistralai_gcp/src/mistralai_gcp/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/mistralai_gcp/src/mistralai_gcp/sdkconfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading

0 comments on commit ab11009

Please sign in to comment.