diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 80ef7b5..2c23d15 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,17 +3,17 @@ id: 81b65c50-f2e3-40a3-bd65-346524007b3d management: docChecksum: ad1a7d6946828a089ca3831e257d307d docVersion: 0.0.2 - speakeasyVersion: 1.376.0 - generationVersion: 2.402.5 - releaseVersion: 1.0.3 - configChecksum: 29f53c823f9a93ba50ba681063a0f8e8 + speakeasyVersion: 1.378.0 + generationVersion: 2.404.3 + releaseVersion: 1.0.4 + configChecksum: fed25c0901d68ea1f724aabbc1e3e84f repoURL: https://github.com/mistralai/client-ts.git installationURL: https://github.com/mistralai/client-ts published: true features: typescript: additionalDependencies: 0.1.0 - constsAndDefaults: 0.1.10 + constsAndDefaults: 0.1.11 core: 3.14.1 defaultEnabledRetries: 0.1.0 devContainers: 2.90.0 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index a60ce30..198e14d 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -15,7 +15,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true typescript: - version: 1.0.3 + version: 1.0.4 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/RELEASES.md b/RELEASES.md index c31b0ae..3755084 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -38,4 +38,14 @@ Based on: ### Generated - [typescript v1.0.3] . ### Releases -- [NPM v1.0.3] https://www.npmjs.com/package/@mistralai/mistralai/v/1.0.3 - . \ No newline at end of file +- [NPM v1.0.3] https://www.npmjs.com/package/@mistralai/mistralai/v/1.0.3 - . + +## 2024-08-23 13:33:36 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.378.0 (2.404.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v1.0.4] . +### Releases +- [NPM v1.0.4] https://www.npmjs.com/package/@mistralai/mistralai/v/1.0.4 - . \ No newline at end of file diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index 5426c4c..48c9e3e 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -26,10 +26,10 @@ const mistral = new Mistral({ async function run() { const result = await mistral.agents.complete({ messages: [ - { + { content: "Who is the best French painter? Answer in one short sentence.", - role: "user", - }, + role: "user", + }, ], agentId: "", }); @@ -41,7 +41,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -59,10 +58,10 @@ const mistral = new MistralCore({ async function run() { const res = await agentsComplete(mistral, { messages: [ - { + { content: "Who is the best French painter? Answer in one short sentence.", - role: "user", - }, + role: "user", + }, ], agentId: "", }); @@ -89,10 +88,10 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.ChatCompletionResponse](../../models/components/chatcompletionresponse.md)\>** + ### Errors | Error Object | Status Code | Content Type | @@ -100,6 +99,7 @@ run(); | errors.HTTPValidationError | 422 | application/json | | errors.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. @@ -116,10 +116,10 @@ const mistral = new Mistral({ async function run() { const result = await mistral.agents.stream({ messages: [ - { + { content: "Who is the best French painter? Answer in one short sentence.", - role: "user", - }, + role: "user", + }, ], agentId: "", }); @@ -132,7 +132,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -150,10 +149,10 @@ const mistral = new MistralCore({ async function run() { const res = await agentsStream(mistral, { messages: [ - { + { content: "Who is the best French painter? Answer in one short sentence.", - role: "user", - }, + role: "user", + }, ], agentId: "", }); @@ -181,10 +180,10 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[EventStream](../../models/.md)\>** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index fa56aa0..1d1f143 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -27,10 +27,10 @@ async function run() { const result = await mistral.chat.complete({ model: "mistral-small-latest", messages: [ - { + { content: "Who is the best French painter? Answer in one short sentence.", - role: "user", - }, + role: "user", + }, ], }); @@ -41,7 +41,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -60,10 +59,10 @@ async function run() { const res = await chatComplete(mistral, { model: "mistral-small-latest", messages: [ - { + { content: "Who is the best French painter? Answer in one short sentence.", - role: "user", - }, + role: "user", + }, ], }); @@ -89,10 +88,10 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.ChatCompletionResponse](../../models/components/chatcompletionresponse.md)\>** + ### Errors | Error Object | Status Code | Content Type | @@ -100,6 +99,7 @@ run(); | errors.HTTPValidationError | 422 | application/json | | errors.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. @@ -117,10 +117,10 @@ async function run() { const result = await mistral.chat.stream({ model: "mistral-small-latest", messages: [ - { + { content: "Who is the best French painter? Answer in one short sentence.", - role: "user", - }, + role: "user", + }, ], }); @@ -132,7 +132,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -151,10 +150,10 @@ async function run() { const res = await chatStream(mistral, { model: "mistral-small-latest", messages: [ - { + { content: "Who is the best French painter? Answer in one short sentence.", - role: "user", - }, + role: "user", + }, ], }); @@ -181,10 +180,10 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[EventStream](../../models/.md)\>** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/embeddings/README.md b/docs/sdks/embeddings/README.md index f311604..be9e34a 100644 --- a/docs/sdks/embeddings/README.md +++ b/docs/sdks/embeddings/README.md @@ -24,7 +24,7 @@ const mistral = new Mistral({ async function run() { const result = await mistral.embeddings.create({ - inputs: "", + inputs: "", model: "Wrangler", }); @@ -35,7 +35,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -52,7 +51,7 @@ const mistral = new MistralCore({ async function run() { const res = await embeddingsCreate(mistral, { - inputs: "", + inputs: "", model: "El Camino", }); @@ -78,10 +77,10 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.EmbeddingResponse](../../models/components/embeddingresponse.md)\>** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/files/README.md b/docs/sdks/files/README.md index 9662cfc..a59c692 100644 --- a/docs/sdks/files/README.md +++ b/docs/sdks/files/README.md @@ -42,7 +42,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -85,16 +84,17 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.UploadFileOut](../../models/components/uploadfileout.md)\>** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4xx-5xx | */* | + ## list Returns a list of files that belong to the user's organization. @@ -118,7 +118,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -157,16 +156,17 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.ListFilesOut](../../models/components/listfilesout.md)\>** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4xx-5xx | */* | + ## retrieve Returns information about a specific file. @@ -192,7 +192,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -234,16 +233,17 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.RetrieveFileOut](../../models/components/retrievefileout.md)\>** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4xx-5xx | */* | + ## delete Delete a file. @@ -269,7 +269,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -311,10 +310,10 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.DeleteFileOut](../../models/components/deletefileout.md)\>** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/fim/README.md b/docs/sdks/fim/README.md index 41d2b65..87a3c9d 100644 --- a/docs/sdks/fim/README.md +++ b/docs/sdks/fim/README.md @@ -37,7 +37,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -81,10 +80,10 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.FIMCompletionResponse](../../models/components/fimcompletionresponse.md)\>** + ### Errors | Error Object | Status Code | Content Type | @@ -92,6 +91,7 @@ run(); | errors.HTTPValidationError | 422 | application/json | | errors.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. @@ -120,7 +120,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -165,10 +164,10 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[EventStream](../../models/.md)\>** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/finetuning/README.md b/docs/sdks/finetuning/README.md index d893ef8..f3d0196 100644 --- a/docs/sdks/finetuning/README.md +++ b/docs/sdks/finetuning/README.md @@ -1,5 +1,2 @@ # FineTuning -(*fineTuning*) - -### Available Operations - +(*fineTuning*) \ No newline at end of file diff --git a/docs/sdks/jobs/README.md b/docs/sdks/jobs/README.md index 8fae358..1c53bcb 100644 --- a/docs/sdks/jobs/README.md +++ b/docs/sdks/jobs/README.md @@ -1,6 +1,8 @@ # Jobs (*fineTuning.jobs*) +## Overview + ### Available Operations * [list](#list) - Get Fine Tuning Jobs @@ -32,7 +34,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -72,16 +73,17 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.JobsOut](../../models/components/jobsout.md)\>** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4xx-5xx | */* | + ## create Create a new fine-tuning job, it will be queued for processing. @@ -108,7 +110,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -151,16 +152,17 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[operations.JobsApiRoutesFineTuningCreateFineTuningJobResponse](../../models/operations/jobsapiroutesfinetuningcreatefinetuningjobresponse.md)\>** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4xx-5xx | */* | + ## get Get a fine-tuned job details by its UUID. @@ -186,7 +188,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -228,16 +229,17 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.DetailedJobOut](../../models/components/detailedjobout.md)\>** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4xx-5xx | */* | + ## cancel Request the cancellation of a fine tuning job. @@ -263,7 +265,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -305,16 +306,17 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.DetailedJobOut](../../models/components/detailedjobout.md)\>** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4xx-5xx | */* | + ## start Request the start of a validated fine tuning job. @@ -340,7 +342,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -382,10 +383,10 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.DetailedJobOut](../../models/components/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 6ddb547..7bdbac6 100644 --- a/docs/sdks/models/README.md +++ b/docs/sdks/models/README.md @@ -37,7 +37,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -76,10 +75,10 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.ModelList](../../models/components/modellist.md)\>** + ### Errors | Error Object | Status Code | Content Type | @@ -87,6 +86,7 @@ run(); | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4xx-5xx | */* | + ## retrieve Retrieve a model information. @@ -112,7 +112,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -154,10 +153,10 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.ModelCard](../../models/components/modelcard.md)\>** + ### Errors | Error Object | Status Code | Content Type | @@ -165,6 +164,7 @@ run(); | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4xx-5xx | */* | + ## delete Delete a fine-tuned model. @@ -190,7 +190,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -232,10 +231,10 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.DeleteModelOut](../../models/components/deletemodelout.md)\>** + ### Errors | Error Object | Status Code | Content Type | @@ -243,6 +242,7 @@ run(); | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4xx-5xx | */* | + ## update Update a model name or description. @@ -269,7 +269,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -312,16 +311,17 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.FTModelOut](../../models/components/ftmodelout.md)\>** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4xx-5xx | */* | + ## archive Archive a fine-tuned model. @@ -347,7 +347,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -389,16 +388,17 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.ArchiveFTModelOut](../../models/components/archiveftmodelout.md)\>** + ### Errors | Error Object | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4xx-5xx | */* | + ## unarchive Un-archive a fine-tuned model. @@ -424,7 +424,6 @@ async function run() { run(); ``` - ### Standalone function The standalone function version of this method: @@ -466,10 +465,10 @@ run(); | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - ### Response **Promise\<[components.UnarchiveFTModelOut](../../models/components/unarchiveftmodelout.md)\>** + ### Errors | Error Object | Status Code | Content Type | diff --git a/jsr.json b/jsr.json index 9b3a807..51b171a 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@mistralai/mistralai", - "version": "1.0.3", + "version": "1.0.4", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index a757375..87b57b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@mistralai/mistralai", - "version": "1.0.3", + "version": "1.0.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@mistralai/mistralai", - "version": "1.0.3", + "version": "1.0.4", "devDependencies": { "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", diff --git a/package.json b/package.json index d34482c..5fb04e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mistralai/mistralai", - "version": "1.0.3", + "version": "1.0.4", "author": "Speakeasy", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index a213fa0..36e9f51 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -55,7 +55,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.0.2", - sdkVersion: "1.0.3", - genVersion: "2.402.5", - userAgent: "speakeasy-sdk/typescript 1.0.3 2.402.5 0.0.2 @mistralai/mistralai", + sdkVersion: "1.0.4", + genVersion: "2.404.3", + userAgent: "speakeasy-sdk/typescript 1.0.4 2.404.3 0.0.2 @mistralai/mistralai", } as const; diff --git a/src/models/components/agentscompletionrequest.ts b/src/models/components/agentscompletionrequest.ts index 88a7a4f..1f90347 100644 --- a/src/models/components/agentscompletionrequest.ts +++ b/src/models/components/agentscompletionrequest.ts @@ -201,7 +201,7 @@ export const AgentsCompletionRequest$inboundSchema: z.ZodType< .object({ max_tokens: z.nullable(z.number().int()).optional(), min_tokens: z.nullable(z.number().int()).optional(), - stream: z.boolean(), + stream: z.boolean().default(false), stop: z.union([z.string(), z.array(z.string())]).optional(), random_seed: z.nullable(z.number().int()).optional(), messages: z.array( diff --git a/src/models/components/assistantmessage.ts b/src/models/components/assistantmessage.ts index c03cadd..f3329c5 100644 --- a/src/models/components/assistantmessage.ts +++ b/src/models/components/assistantmessage.ts @@ -51,7 +51,7 @@ export const AssistantMessage$inboundSchema: z.ZodType { diff --git a/src/models/components/chatcompletionrequest.ts b/src/models/components/chatcompletionrequest.ts index 356a09f..3132d71 100644 --- a/src/models/components/chatcompletionrequest.ts +++ b/src/models/components/chatcompletionrequest.ts @@ -218,7 +218,7 @@ export const ChatCompletionRequest$inboundSchema: z.ZodType< top_p: z.number().default(1), max_tokens: z.nullable(z.number().int()).optional(), min_tokens: z.nullable(z.number().int()).optional(), - stream: z.boolean(), + stream: z.boolean().default(false), stop: z.union([z.string(), z.array(z.string())]).optional(), random_seed: z.nullable(z.number().int()).optional(), messages: z.array( @@ -240,7 +240,7 @@ export const ChatCompletionRequest$inboundSchema: z.ZodType< response_format: ResponseFormat$inboundSchema.optional(), tools: z.nullable(z.array(Tool$inboundSchema)).optional(), tool_choice: ToolChoice$inboundSchema.default("auto"), - safe_prompt: z.boolean(), + safe_prompt: z.boolean().default(false), }) .transform((v) => { return remap$(v, { diff --git a/src/models/components/chatcompletionstreamrequest.ts b/src/models/components/chatcompletionstreamrequest.ts index 70d9c24..b38fd96 100644 --- a/src/models/components/chatcompletionstreamrequest.ts +++ b/src/models/components/chatcompletionstreamrequest.ts @@ -250,7 +250,7 @@ export const ChatCompletionStreamRequest$inboundSchema: z.ZodType< response_format: ResponseFormat$inboundSchema.optional(), tools: z.nullable(z.array(Tool$inboundSchema)).optional(), tool_choice: ChatCompletionStreamRequestToolChoice$inboundSchema.default("auto"), - safe_prompt: z.boolean(), + safe_prompt: z.boolean().default(false), }) .transform((v) => { return remap$(v, { diff --git a/src/models/components/fimcompletionrequest.ts b/src/models/components/fimcompletionrequest.ts index ab34645..d9ec6b4 100644 --- a/src/models/components/fimcompletionrequest.ts +++ b/src/models/components/fimcompletionrequest.ts @@ -99,7 +99,7 @@ export const FIMCompletionRequest$inboundSchema: z.ZodType< top_p: z.number().default(1), max_tokens: z.nullable(z.number().int()).optional(), min_tokens: z.nullable(z.number().int()).optional(), - stream: z.boolean(), + stream: z.boolean().default(false), stop: z.union([z.string(), z.array(z.string())]).optional(), random_seed: z.nullable(z.number().int()).optional(), prompt: z.string(), diff --git a/src/models/components/ftmodelcapabilitiesout.ts b/src/models/components/ftmodelcapabilitiesout.ts index b91096f..4e79f12 100644 --- a/src/models/components/ftmodelcapabilitiesout.ts +++ b/src/models/components/ftmodelcapabilitiesout.ts @@ -20,9 +20,9 @@ export const FTModelCapabilitiesOut$inboundSchema: z.ZodType< > = z .object({ completion_chat: z.boolean().default(true), - completion_fim: z.boolean(), - function_calling: z.boolean(), - fine_tuning: z.boolean(), + completion_fim: z.boolean().default(false), + function_calling: z.boolean().default(false), + fine_tuning: z.boolean().default(false), }) .transform((v) => { return remap$(v, { diff --git a/src/models/components/modelcapabilities.ts b/src/models/components/modelcapabilities.ts index 33f528c..5b85b0a 100644 --- a/src/models/components/modelcapabilities.ts +++ b/src/models/components/modelcapabilities.ts @@ -17,9 +17,9 @@ export const ModelCapabilities$inboundSchema: z.ZodType { return remap$(v, { diff --git a/src/models/components/modelcard.ts b/src/models/components/modelcard.ts index 83a92da..3037f51 100644 --- a/src/models/components/modelcard.ts +++ b/src/models/components/modelcard.ts @@ -34,7 +34,7 @@ export const ModelCard$inboundSchema: z.ZodType = z.object({ id: z.string(), object: z.literal("model").default("model"), - archived: z.boolean(), + archived: z.boolean().default(false), }); /** @internal */ diff --git a/src/models/operations/jobsapiroutesfinetuninggetfinetuningjobs.ts b/src/models/operations/jobsapiroutesfinetuninggetfinetuningjobs.ts index 63af58d..061ddca 100644 --- a/src/models/operations/jobsapiroutesfinetuninggetfinetuningjobs.ts +++ b/src/models/operations/jobsapiroutesfinetuninggetfinetuningjobs.ts @@ -100,7 +100,7 @@ export const JobsApiRoutesFineTuningGetFineTuningJobsRequest$inboundSchema: z.Zo .transform((v) => new Date(v)) ) .optional(), - created_by_me: z.boolean(), + created_by_me: z.boolean().default(false), status: z.nullable(Status$inboundSchema).optional(), wandb_project: z.nullable(z.string()).optional(), wandb_name: z.nullable(z.string()).optional(),