Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.438.1
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Nov 12, 2024
1 parent 9a64ab6 commit e7a2860
Show file tree
Hide file tree
Showing 14 changed files with 63 additions and 59 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
18 changes: 6 additions & 12 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
speakeasyVersion: 1.434.7
speakeasyVersion: 1.438.1
sources:
mistral-azure-source:
sourceNamespace: mistral-openapi-azure
Expand All @@ -14,8 +14,8 @@ sources:
- latest
mistral-openapi:
sourceNamespace: mistral-openapi
sourceRevisionDigest: sha256:e658442ebfc83351cbb7873fb17b03f07ff9edebd8eddfce5577e2c5c7bfafce
sourceBlobDigest: sha256:559403eaaa97c021eaf0022adddb1066694d879a946c87057e942806d5a2a2a2
sourceRevisionDigest: sha256:e44702b93f6a8ac450f1d85b4197f6640f8efb3d5e06be98418ea79acd8f70be
sourceBlobDigest: sha256:94a9891a3bdf3fafea5c41cee226c5e366c206e91e39e734cd2d1163af74f688
tags:
- latest
- main
Expand All @@ -33,29 +33,23 @@ targets:
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 - .
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/mistralai/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 8 additions & 8 deletions src/mistralai/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
16 changes: 8 additions & 8 deletions src/mistralai/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/mistralai/models/agentscompletionrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/mistralai/models/agentscompletionstreamrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/mistralai/models/chatcompletionrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/mistralai/models/chatcompletionstreamrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/mistralai/sdkconfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e7a2860

Please sign in to comment.