From 951f0bb2b9d2d70cb0c161b8f772c8bf088da812 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 29 Aug 2024 09:09:47 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.382.0 --- .speakeasy/gen.lock | 8 ++++---- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 2 +- RELEASES.md | 12 +++++++++++- docs/sdks/agents/README.md | 9 +++------ docs/sdks/chat/README.md | 9 +++------ docs/sdks/embeddings/README.md | 4 +--- docs/sdks/files/README.md | 19 +++++++------------ docs/sdks/fim/README.md | 9 +++------ docs/sdks/finetuning/README.md | 5 +---- docs/sdks/jobs/README.md | 26 +++++++++++--------------- docs/sdks/mistral/README.md | 6 +----- docs/sdks/models/README.md | 29 +++++++++++------------------ pyproject.toml | 2 +- src/mistralai/sdkconfiguration.py | 6 +++--- 15 files changed, 62 insertions(+), 86 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index bdf53d4..6b52768 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,10 +3,10 @@ id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: docChecksum: ad1a7d6946828a089ca3831e257d307d docVersion: 0.0.2 - speakeasyVersion: 1.376.0 - generationVersion: 2.402.5 - releaseVersion: 1.0.2 - configChecksum: ed07f7fc253047a5a4dd2c0f813b8ea4 + speakeasyVersion: 1.382.0 + generationVersion: 2.404.11 + releaseVersion: 1.0.3 + configChecksum: 818970b881ec69b05f6660ca354f26f5 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 c613fdb..289fb16 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true python: - version: 1.0.2 + version: 1.0.3 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c32ba6c..d16a518 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.376.0 +speakeasyVersion: 1.382.0 sources: mistral-azure-source: sourceNamespace: mistral-openapi-azure diff --git a/RELEASES.md b/RELEASES.md index 319cce5..b92e67a 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -28,4 +28,14 @@ Based on: ### Generated - [python v1.0.2] . ### Releases -- [PyPI v1.0.2] https://pypi.org/project/mistralai/1.0.2 - . \ No newline at end of file +- [PyPI v1.0.2] https://pypi.org/project/mistralai/1.0.2 - . + +## 2024-08-29 09:09:05 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.382.0 (2.404.11) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.0.3] . +### Releases +- [PyPI v1.0.3] https://pypi.org/project/mistralai/1.0.3 - . \ No newline at end of file diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index 167f041..744fc17 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -38,8 +38,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | Example | @@ -56,10 +54,10 @@ if res is not None: | `tool_choice` | [Optional[models.AgentsCompletionRequestToolChoice]](../../models/agentscompletionrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | - ### Response **[models.ChatCompletionResponse](../../models/chatcompletionresponse.md)** + ### Errors | Error Object | Status Code | Content Type | @@ -67,6 +65,7 @@ if res is not None: | models.HTTPValidationError | 422 | application/json | | models.SDKError | 4xx-5xx | */* | + ## stream Mistral AI provides the ability to stream responses back to a client in order to allow partial results for certain requests. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. @@ -96,8 +95,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | Example | @@ -114,10 +111,10 @@ if res is not None: | `tool_choice` | [Optional[models.AgentsCompletionStreamRequestToolChoice]](../../models/agentscompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | - ### Response **[Union[Generator[models.CompletionEvent, None, None], AsyncGenerator[models.CompletionEvent, None]]](../../models/.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index aaa828e..2cfba98 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -38,8 +38,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | Example | @@ -59,10 +57,10 @@ if res is not None: | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | - ### Response **[models.ChatCompletionResponse](../../models/chatcompletionresponse.md)** + ### Errors | Error Object | Status Code | Content Type | @@ -70,6 +68,7 @@ if res is not None: | models.HTTPValidationError | 422 | application/json | | models.SDKError | 4xx-5xx | */* | + ## stream Mistral AI provides the ability to stream responses back to a client in order to allow partial results for certain requests. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. @@ -99,8 +98,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | Example | @@ -120,10 +117,10 @@ if res is not None: | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | - ### Response **[Union[Generator[models.CompletionEvent, None, None], AsyncGenerator[models.CompletionEvent, None]]](../../models/.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/embeddings/README.md b/docs/sdks/embeddings/README.md index 2f9f2c7..38b8b53 100644 --- a/docs/sdks/embeddings/README.md +++ b/docs/sdks/embeddings/README.md @@ -32,8 +32,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -43,10 +41,10 @@ if res is not None: | `encoding_format` | *OptionalNullable[str]* | :heavy_minus_sign: | The format to return the embeddings in. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - ### Response **[models.EmbeddingResponse](../../models/embeddingresponse.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/files/README.md b/docs/sdks/files/README.md index ec90fd3..c931f17 100644 --- a/docs/sdks/files/README.md +++ b/docs/sdks/files/README.md @@ -42,8 +42,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -51,16 +49,17 @@ if res is not None: | `file` | [models.File](../../models/file.md) | :heavy_check_mark: | The File object (not file name) to be uploaded.
To upload a file and specify a custom file name you should format your request as such:
```bash
file=@path/to/your/file.jsonl;filename=custom_name.jsonl
```
Otherwise, you can just keep the original file name:
```bash
file=@path/to/your/file.jsonl
``` | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - ### Response **[models.UploadFileOut](../../models/uploadfileout.md)** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | models.SDKError | 4xx-5xx | */* | + ## list Returns a list of files that belong to the user's organization. @@ -84,24 +83,23 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - ### Response **[models.ListFilesOut](../../models/listfilesout.md)** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | models.SDKError | 4xx-5xx | */* | + ## retrieve Returns information about a specific file. @@ -125,8 +123,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -134,16 +130,17 @@ if res is not None: | `file_id` | *str* | :heavy_check_mark: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - ### Response **[models.RetrieveFileOut](../../models/retrievefileout.md)** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | models.SDKError | 4xx-5xx | */* | + ## delete Delete a file. @@ -167,8 +164,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -176,10 +171,10 @@ if res is not None: | `file_id` | *str* | :heavy_check_mark: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - ### Response **[models.DeleteFileOut](../../models/deletefileout.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/fim/README.md b/docs/sdks/fim/README.md index ef8b1dc..2f3d8fe 100644 --- a/docs/sdks/fim/README.md +++ b/docs/sdks/fim/README.md @@ -33,8 +33,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | Example | @@ -51,10 +49,10 @@ if res is not None: | `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. | return a+b | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | - ### Response **[models.FIMCompletionResponse](../../models/fimcompletionresponse.md)** + ### Errors | Error Object | Status Code | Content Type | @@ -62,6 +60,7 @@ if res is not None: | models.HTTPValidationError | 422 | application/json | | models.SDKError | 4xx-5xx | */* | + ## stream Mistral AI provides the ability to stream responses back to a client in order to allow partial results for certain requests. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. @@ -86,8 +85,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | Example | @@ -104,10 +101,10 @@ if res is not None: | `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. | return a+b | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | - ### Response **[Union[Generator[models.CompletionEvent, None, None], AsyncGenerator[models.CompletionEvent, None]]](../../models/.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/finetuning/README.md b/docs/sdks/finetuning/README.md index 2b357f2..fdcbd62 100644 --- a/docs/sdks/finetuning/README.md +++ b/docs/sdks/finetuning/README.md @@ -1,5 +1,2 @@ # FineTuning -(*fine_tuning*) - -### Available Operations - +(*fine_tuning*) \ No newline at end of file diff --git a/docs/sdks/jobs/README.md b/docs/sdks/jobs/README.md index 36d452e..cecff0e 100644 --- a/docs/sdks/jobs/README.md +++ b/docs/sdks/jobs/README.md @@ -1,6 +1,8 @@ # Jobs (*fine_tuning.jobs*) +## Overview + ### Available Operations * [list](#list) - Get Fine Tuning Jobs @@ -32,8 +34,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -49,16 +49,17 @@ if res is not None: | `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | The model suffix to filter on. When set, the other results are not displayed. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - ### Response **[models.JobsOut](../../models/jobsout.md)** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | models.SDKError | 4xx-5xx | */* | + ## create Create a new fine-tuning job, it will be queued for processing. @@ -82,8 +83,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -98,16 +97,17 @@ if res is not None: | `auto_start` | *Optional[bool]* | :heavy_minus_sign: | This field will be required in a future release. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - ### Response **[models.JobsAPIRoutesFineTuningCreateFineTuningJobResponse](../../models/jobsapiroutesfinetuningcreatefinetuningjobresponse.md)** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | models.SDKError | 4xx-5xx | */* | + ## get Get a fine-tuned job details by its UUID. @@ -131,8 +131,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -140,16 +138,17 @@ if res is not None: | `job_id` | *str* | :heavy_check_mark: | The ID of the job to analyse. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - ### Response **[models.DetailedJobOut](../../models/detailedjobout.md)** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | models.SDKError | 4xx-5xx | */* | + ## cancel Request the cancellation of a fine tuning job. @@ -173,8 +172,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -182,16 +179,17 @@ if res is not None: | `job_id` | *str* | :heavy_check_mark: | The ID of the job to cancel. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - ### Response **[models.DetailedJobOut](../../models/detailedjobout.md)** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | models.SDKError | 4xx-5xx | */* | + ## start Request the start of a validated fine tuning job. @@ -215,8 +213,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -224,10 +220,10 @@ if res is not None: | `job_id` | *str* | :heavy_check_mark: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - ### Response **[models.DetailedJobOut](../../models/detailedjobout.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/mistral/README.md b/docs/sdks/mistral/README.md index d4e985e..0189a6c 100644 --- a/docs/sdks/mistral/README.md +++ b/docs/sdks/mistral/README.md @@ -1,9 +1,5 @@ # Mistral SDK - ## Overview -Mistral AI API: Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it. - -### Available Operations - +Mistral AI API: Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it. \ No newline at end of file diff --git a/docs/sdks/models/README.md b/docs/sdks/models/README.md index 00fca08..a5d05eb 100644 --- a/docs/sdks/models/README.md +++ b/docs/sdks/models/README.md @@ -37,18 +37,16 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - ### Response **[models.ModelList](../../models/modellist.md)** + ### Errors | Error Object | Status Code | Content Type | @@ -56,6 +54,7 @@ if res is not None: | models.HTTPValidationError | 422 | application/json | | models.SDKError | 4xx-5xx | */* | + ## retrieve Retrieve a model information. @@ -79,8 +78,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | Example | @@ -88,10 +85,10 @@ if res is not None: | `model_id` | *str* | :heavy_check_mark: | The ID of the model to retrieve. | ft:open-mistral-7b:587a6b29:20240514:7e773925 | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | - ### Response **[models.ModelCard](../../models/modelcard.md)** + ### Errors | Error Object | Status Code | Content Type | @@ -99,6 +96,7 @@ if res is not None: | models.HTTPValidationError | 422 | application/json | | models.SDKError | 4xx-5xx | */* | + ## delete Delete a fine-tuned model. @@ -122,8 +120,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | Example | @@ -131,10 +127,10 @@ if res is not None: | `model_id` | *str* | :heavy_check_mark: | The ID of the model to delete. | ft:open-mistral-7b:587a6b29:20240514:7e773925 | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | - ### Response **[models.DeleteModelOut](../../models/deletemodelout.md)** + ### Errors | Error Object | Status Code | Content Type | @@ -142,6 +138,7 @@ if res is not None: | models.HTTPValidationError | 422 | application/json | | models.SDKError | 4xx-5xx | */* | + ## update Update a model name or description. @@ -165,8 +162,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | Example | @@ -176,16 +171,17 @@ if res is not None: | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | - ### Response **[models.FTModelOut](../../models/ftmodelout.md)** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | models.SDKError | 4xx-5xx | */* | + ## archive Archive a fine-tuned model. @@ -209,8 +205,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | Example | @@ -218,16 +212,17 @@ if res is not None: | `model_id` | *str* | :heavy_check_mark: | The ID of the model to archive. | ft:open-mistral-7b:587a6b29:20240514:7e773925 | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | - ### Response **[models.ArchiveFTModelOut](../../models/archiveftmodelout.md)** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | models.SDKError | 4xx-5xx | */* | + ## unarchive Un-archive a fine-tuned model. @@ -251,8 +246,6 @@ if res is not None: ``` - - ### Parameters | Parameter | Type | Required | Description | Example | @@ -260,10 +253,10 @@ if res is not None: | `model_id` | *str* | :heavy_check_mark: | The ID of the model to unarchive. | ft:open-mistral-7b:587a6b29:20240514:7e773925 | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | - ### Response **[models.UnarchiveFTModelOut](../../models/unarchiveftmodelout.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/pyproject.toml b/pyproject.toml index 02570db..35bcf5e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "mistralai" -version = "1.0.2" +version = "1.0.3" description = "Python Client SDK for the Mistral AI API." authors = ["Mistral"] readme = "README.md" diff --git a/src/mistralai/sdkconfiguration.py b/src/mistralai/sdkconfiguration.py index e0821a7..a869913 100644 --- a/src/mistralai/sdkconfiguration.py +++ b/src/mistralai/sdkconfiguration.py @@ -29,9 +29,9 @@ class SDKConfiguration: server: Optional[str] = "" language: str = "python" openapi_doc_version: str = "0.0.2" - sdk_version: str = "1.0.2" - gen_version: str = "2.402.5" - user_agent: str = "speakeasy-sdk/python 1.0.2 2.402.5 0.0.2 mistralai" + sdk_version: str = "1.0.3" + gen_version: str = "2.404.11" + user_agent: str = "speakeasy-sdk/python 1.0.3 2.404.11 0.0.2 mistralai" retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None