diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index f3472d3..19a09b8 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 81b65c50-f2e3-40a3-bd65-346524007b3d management: - docChecksum: 87f5a2bcfbc64bec79241e2b0de25b9f + docChecksum: d066d98bdd0ef905d4126e0e69940946 docVersion: 0.0.2 speakeasyVersion: 1.438.1 generationVersion: 2.457.2 - releaseVersion: 1.3.1 - configChecksum: 592c371e12e0bb88cff133b730e6b426 + releaseVersion: 1.3.4 + configChecksum: 4cee1a313f733ed74b7e454a4b175e31 repoURL: https://github.com/mistralai/client-ts.git installationURL: https://github.com/mistralai/client-ts published: true @@ -150,6 +150,8 @@ generatedFiles: - docs/models/components/modellist.md - docs/models/components/objectt.md - docs/models/components/one.md + - docs/models/components/referencechunk.md + - docs/models/components/referencechunktype.md - docs/models/components/repositories.md - docs/models/components/responseformat.md - docs/models/components/responseformats.md @@ -169,6 +171,7 @@ generatedFiles: - docs/models/components/toolchoice.md - docs/models/components/toolchoiceenum.md - docs/models/components/toolmessage.md + - docs/models/components/toolmessagecontent.md - docs/models/components/toolmessagerole.md - docs/models/components/tooltypes.md - docs/models/components/trainingfile.md @@ -334,6 +337,7 @@ generatedFiles: - src/models/components/metricout.ts - src/models/components/modelcapabilities.ts - src/models/components/modellist.ts + - src/models/components/referencechunk.ts - src/models/components/responseformat.ts - src/models/components/responseformats.ts - src/models/components/retrievefileout.ts @@ -569,7 +573,7 @@ examples: moderations_chat_v1_chat_moderations_post: speakeasy-default-moderations-chat-v1-chat-moderations-post: requestBody: - application/json: {"input": [[{"content": ""}, {"content": []}, {"content": ""}], []], "model": "V90"} + application/json: {"input": [[{"content": ""}, {"content": ""}, {"content": ""}], [{"content": ""}]], "model": "V90"} responses: "200": application/json: {"id": "mod-e5cc70bb28c444948073e77776eb30ef"} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 7e03a61..d591412 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -16,7 +16,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false typescript: - version: 1.3.1 + version: 1.3.4 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c24bff7..8737324 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - main mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:e44702b93f6a8ac450f1d85b4197f6640f8efb3d5e06be98418ea79acd8f70be - sourceBlobDigest: sha256:94a9891a3bdf3fafea5c41cee226c5e366c206e91e39e734cd2d1163af74f688 + sourceRevisionDigest: sha256:9b6ad47076b570f4e23494bf744a7822547d0003e4b10985f26f1c3b5128e631 + sourceBlobDigest: sha256:150e3da2a6bfb74e86e2ce864e9a094fc796f3a08df91f6a6e8745b54b3e16bc tags: - latest - main @@ -39,10 +39,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:e44702b93f6a8ac450f1d85b4197f6640f8efb3d5e06be98418ea79acd8f70be - sourceBlobDigest: sha256:94a9891a3bdf3fafea5c41cee226c5e366c206e91e39e734cd2d1163af74f688 + sourceRevisionDigest: sha256:9b6ad47076b570f4e23494bf744a7822547d0003e4b10985f26f1c3b5128e631 + sourceBlobDigest: sha256:150e3da2a6bfb74e86e2ce864e9a094fc796f3a08df91f6a6e8745b54b3e16bc codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:e11c906b44a1097fb47e0ced237d00da922a4a69c0a86283f18d391814915d42 + codeSamplesRevisionDigest: sha256:261925abf2036898c032e021086d2a1d6cb2241c9063bf5202adb256144836b2 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/RELEASES.md b/RELEASES.md index bd467ef..8e4c315 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -88,4 +88,14 @@ Based on: ### Generated - [typescript v1.3.1] . ### Releases -- [NPM v1.3.1] https://www.npmjs.com/package/@mistralai/mistralai/v/1.3.1 - . \ No newline at end of file +- [NPM v1.3.1] https://www.npmjs.com/package/@mistralai/mistralai/v/1.3.1 - . + +## 2024-11-15 18:37:02 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.438.1 (2.457.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v1.3.4] . +### Releases +- [NPM v1.3.4] https://www.npmjs.com/package/@mistralai/mistralai/v/1.3.4 - . \ No newline at end of file diff --git a/docs/models/components/agentscompletionrequestmessages.md b/docs/models/components/agentscompletionrequestmessages.md index 56d01a3..b910e1c 100644 --- a/docs/models/components/agentscompletionrequestmessages.md +++ b/docs/models/components/agentscompletionrequestmessages.md @@ -13,7 +13,11 @@ const value: components.AssistantMessage = {}; ```typescript const value: components.SystemMessage = { - content: "", + content: [ + { + text: "", + }, + ], }; ``` @@ -21,7 +25,13 @@ const value: components.SystemMessage = { ```typescript const value: components.ToolMessage = { - content: "", + content: [ + { + imageUrl: { + url: "https://whimsical-impostor.name", + }, + }, + ], }; ``` diff --git a/docs/models/components/agentscompletionrequesttoolchoice.md b/docs/models/components/agentscompletionrequesttoolchoice.md index 5a2e54e..e5cd4b9 100644 --- a/docs/models/components/agentscompletionrequesttoolchoice.md +++ b/docs/models/components/agentscompletionrequesttoolchoice.md @@ -16,6 +16,6 @@ const value: components.ToolChoice = { ### `components.ToolChoiceEnum` ```typescript -const value: components.ToolChoiceEnum = "none"; +const value: components.ToolChoiceEnum = "required"; ``` diff --git a/docs/models/components/agentscompletionstreamrequestmessages.md b/docs/models/components/agentscompletionstreamrequestmessages.md index b7471e8..471e449 100644 --- a/docs/models/components/agentscompletionstreamrequestmessages.md +++ b/docs/models/components/agentscompletionstreamrequestmessages.md @@ -25,7 +25,13 @@ const value: components.SystemMessage = { ```typescript const value: components.ToolMessage = { - content: "", + content: [ + { + referenceIds: [ + 815524, + ], + }, + ], }; ``` diff --git a/docs/models/components/chatclassificationrequest.md b/docs/models/components/chatclassificationrequest.md index 511cbe9..0c6b425 100644 --- a/docs/models/components/chatclassificationrequest.md +++ b/docs/models/components/chatclassificationrequest.md @@ -7,13 +7,11 @@ import { ChatClassificationRequest } from "@mistralai/mistralai/models/component let value: ChatClassificationRequest = { inputs: [ - [ - { - content: "", - }, - ], + { + content: "", + }, ], - model: "Impala", + model: "Volt", }; ``` diff --git a/docs/models/components/chatclassificationrequestinputs.md b/docs/models/components/chatclassificationrequestinputs.md index 526df9f..5822597 100644 --- a/docs/models/components/chatclassificationrequestinputs.md +++ b/docs/models/components/chatclassificationrequestinputs.md @@ -9,7 +9,9 @@ Chat to classify ```typescript const value: components.One[] = [ - {}, + { + content: "", + }, ]; ``` diff --git a/docs/models/components/chatcompletionstreamrequestmessages.md b/docs/models/components/chatcompletionstreamrequestmessages.md index 467c336..16001dc 100644 --- a/docs/models/components/chatcompletionstreamrequestmessages.md +++ b/docs/models/components/chatcompletionstreamrequestmessages.md @@ -13,7 +13,11 @@ const value: components.AssistantMessage = {}; ```typescript const value: components.SystemMessage = { - content: "", + content: [ + { + text: "", + }, + ], }; ``` @@ -29,7 +33,13 @@ const value: components.ToolMessage = { ```typescript const value: components.UserMessage = { - content: "", + content: [ + { + referenceIds: [ + 699622, + ], + }, + ], }; ``` diff --git a/docs/models/components/chatcompletionstreamrequesttoolchoice.md b/docs/models/components/chatcompletionstreamrequesttoolchoice.md index 9f19e8c..4d4a29f 100644 --- a/docs/models/components/chatcompletionstreamrequesttoolchoice.md +++ b/docs/models/components/chatcompletionstreamrequesttoolchoice.md @@ -16,6 +16,6 @@ const value: components.ToolChoice = { ### `components.ToolChoiceEnum` ```typescript -const value: components.ToolChoiceEnum = "required"; +const value: components.ToolChoiceEnum = "none"; ``` diff --git a/docs/models/components/completionchunk.md b/docs/models/components/completionchunk.md index 1b339ee..4001bbb 100644 --- a/docs/models/components/completionchunk.md +++ b/docs/models/components/completionchunk.md @@ -7,7 +7,7 @@ import { CompletionChunk } from "@mistralai/mistralai/models/components"; let value: CompletionChunk = { id: "", - model: "A8", + model: "El Camino", usage: { promptTokens: 16, completionTokens: 34, @@ -15,9 +15,9 @@ let value: CompletionChunk = { }, choices: [ { - index: 518835, + index: 956406, delta: {}, - finishReason: "length", + finishReason: "stop", }, ], }; diff --git a/docs/models/components/completionevent.md b/docs/models/components/completionevent.md index b1ed970..e25da52 100644 --- a/docs/models/components/completionevent.md +++ b/docs/models/components/completionevent.md @@ -8,7 +8,7 @@ import { CompletionEvent } from "@mistralai/mistralai/models/components"; let value: CompletionEvent = { data: { id: "", - model: "Explorer", + model: "Mercielago", usage: { promptTokens: 16, completionTokens: 34, @@ -16,9 +16,9 @@ let value: CompletionEvent = { }, choices: [ { - index: 44612, + index: 277596, delta: {}, - finishReason: "tool_calls", + finishReason: "stop", }, ], }, diff --git a/docs/models/components/completionresponsestreamchoice.md b/docs/models/components/completionresponsestreamchoice.md index 6a83774..4b780e5 100644 --- a/docs/models/components/completionresponsestreamchoice.md +++ b/docs/models/components/completionresponsestreamchoice.md @@ -6,9 +6,9 @@ import { CompletionResponseStreamChoice } from "@mistralai/mistralai/models/components"; let value: CompletionResponseStreamChoice = { - index: 959434, + index: 543806, delta: {}, - finishReason: "error", + finishReason: "length", }; ``` diff --git a/docs/models/components/completionresponsestreamchoicefinishreason.md b/docs/models/components/completionresponsestreamchoicefinishreason.md index c724d59..151f373 100644 --- a/docs/models/components/completionresponsestreamchoicefinishreason.md +++ b/docs/models/components/completionresponsestreamchoicefinishreason.md @@ -5,7 +5,7 @@ ```typescript import { CompletionResponseStreamChoiceFinishReason } from "@mistralai/mistralai/models/components"; -let value: CompletionResponseStreamChoiceFinishReason = "error"; +let value: CompletionResponseStreamChoiceFinishReason = "tool_calls"; ``` ## Values diff --git a/docs/models/components/content.md b/docs/models/components/content.md index 381e8f3..3377958 100644 --- a/docs/models/components/content.md +++ b/docs/models/components/content.md @@ -14,9 +14,9 @@ const value: string = ""; ```typescript const value: components.ContentChunk[] = [ { - imageUrl: { - url: "https://muted-pleasure.biz", - }, + referenceIds: [ + 458604, + ], }, ]; ``` diff --git a/docs/models/components/contentchunk.md b/docs/models/components/contentchunk.md index 8a0214d..8fede7c 100644 --- a/docs/models/components/contentchunk.md +++ b/docs/models/components/contentchunk.md @@ -19,3 +19,13 @@ const value: components.TextChunk = { }; ``` +### `components.ReferenceChunk` + +```typescript +const value: components.ReferenceChunk = { + referenceIds: [ + 245367, + ], +}; +``` + diff --git a/docs/models/components/imageurl.md b/docs/models/components/imageurl.md index 80f96d3..96abe40 100644 --- a/docs/models/components/imageurl.md +++ b/docs/models/components/imageurl.md @@ -6,7 +6,7 @@ import { ImageURL } from "@mistralai/mistralai/models/components"; let value: ImageURL = { - url: "https://lasting-plugin.net/", + url: "https://rich-porter.biz/", }; ``` diff --git a/docs/models/components/imageurlchunk.md b/docs/models/components/imageurlchunk.md index 039ae6b..7eabd7e 100644 --- a/docs/models/components/imageurlchunk.md +++ b/docs/models/components/imageurlchunk.md @@ -8,7 +8,9 @@ import { ImageURLChunk } from "@mistralai/mistralai/models/components"; let value: ImageURLChunk = { - imageUrl: "https://competent-awareness.biz/", + imageUrl: { + url: "https://babyish-ethyl.biz/", + }, }; ``` diff --git a/docs/models/components/imageurlchunkimageurl.md b/docs/models/components/imageurlchunkimageurl.md index 9ce9b41..7eba080 100644 --- a/docs/models/components/imageurlchunkimageurl.md +++ b/docs/models/components/imageurlchunkimageurl.md @@ -7,7 +7,7 @@ ```typescript const value: components.ImageURL = { - url: "https://innocent-masterpiece.org/", + url: "https://nocturnal-strategy.net/", }; ``` diff --git a/docs/models/components/messages.md b/docs/models/components/messages.md index 020761e..3dfcfcb 100644 --- a/docs/models/components/messages.md +++ b/docs/models/components/messages.md @@ -21,7 +21,11 @@ const value: components.SystemMessage = { ```typescript const value: components.ToolMessage = { - content: "", + content: [ + { + imageUrl: "https://sour-disposer.info", + }, + ], }; ``` @@ -29,7 +33,13 @@ const value: components.ToolMessage = { ```typescript const value: components.UserMessage = { - content: "", + content: [ + { + imageUrl: { + url: "https://lawful-apricot.net/", + }, + }, + ], }; ``` diff --git a/docs/models/components/one.md b/docs/models/components/one.md index 5dea8ce..b36872b 100644 --- a/docs/models/components/one.md +++ b/docs/models/components/one.md @@ -13,7 +13,11 @@ const value: components.AssistantMessage = {}; ```typescript const value: components.SystemMessage = { - content: "", + content: [ + { + text: "", + }, + ], }; ``` diff --git a/docs/models/components/referencechunk.md b/docs/models/components/referencechunk.md new file mode 100644 index 0000000..975b04f --- /dev/null +++ b/docs/models/components/referencechunk.md @@ -0,0 +1,20 @@ +# ReferenceChunk + +## Example Usage + +```typescript +import { ReferenceChunk } from "@mistralai/mistralai/models/components"; + +let value: ReferenceChunk = { + referenceIds: [ + 379927, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `type` | [components.ReferenceChunkType](../../models/components/referencechunktype.md) | :heavy_minus_sign: | N/A | +| `referenceIds` | *number*[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/referencechunktype.md b/docs/models/components/referencechunktype.md new file mode 100644 index 0000000..76bb0ac --- /dev/null +++ b/docs/models/components/referencechunktype.md @@ -0,0 +1,15 @@ +# ReferenceChunkType + +## Example Usage + +```typescript +import { ReferenceChunkType } from "@mistralai/mistralai/models/components"; + +let value: ReferenceChunkType = "reference"; +``` + +## Values + +```typescript +"reference" +``` \ No newline at end of file diff --git a/docs/models/components/toolchoiceenum.md b/docs/models/components/toolchoiceenum.md index 1255a95..e17498e 100644 --- a/docs/models/components/toolchoiceenum.md +++ b/docs/models/components/toolchoiceenum.md @@ -5,7 +5,7 @@ ```typescript import { ToolChoiceEnum } from "@mistralai/mistralai/models/components"; -let value: ToolChoiceEnum = "required"; +let value: ToolChoiceEnum = "any"; ``` ## Values diff --git a/docs/models/components/toolmessage.md b/docs/models/components/toolmessage.md index c3ed1ca..cf0cb47 100644 --- a/docs/models/components/toolmessage.md +++ b/docs/models/components/toolmessage.md @@ -6,7 +6,11 @@ import { ToolMessage } from "@mistralai/mistralai/models/components"; let value: ToolMessage = { - content: "", + content: [ + { + text: "", + }, + ], }; ``` @@ -14,7 +18,7 @@ let value: ToolMessage = { | Field | Type | Required | Description | | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `content` | *string* | :heavy_check_mark: | N/A | +| `content` | *components.ToolMessageContent* | :heavy_check_mark: | N/A | | `toolCallId` | *string* | :heavy_minus_sign: | N/A | | `name` | *string* | :heavy_minus_sign: | N/A | | `role` | [components.ToolMessageRole](../../models/components/toolmessagerole.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/toolmessagecontent.md b/docs/models/components/toolmessagecontent.md new file mode 100644 index 0000000..19f5086 --- /dev/null +++ b/docs/models/components/toolmessagecontent.md @@ -0,0 +1,21 @@ +# ToolMessageContent + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `components.ContentChunk[]` + +```typescript +const value: components.ContentChunk[] = [ + { + text: "", + }, +]; +``` + diff --git a/docs/models/components/two.md b/docs/models/components/two.md index 6150aa9..80ce0ec 100644 --- a/docs/models/components/two.md +++ b/docs/models/components/two.md @@ -13,11 +13,7 @@ const value: components.AssistantMessage = {}; ```typescript const value: components.SystemMessage = { - content: [ - { - text: "", - }, - ], + content: "", }; ``` @@ -33,11 +29,7 @@ const value: components.ToolMessage = { ```typescript const value: components.UserMessage = { - content: [ - { - text: "", - }, - ], + content: "", }; ``` diff --git a/docs/models/components/usermessage.md b/docs/models/components/usermessage.md index 4fc0859..f139966 100644 --- a/docs/models/components/usermessage.md +++ b/docs/models/components/usermessage.md @@ -6,13 +6,7 @@ import { UserMessage } from "@mistralai/mistralai/models/components"; let value: UserMessage = { - content: [ - { - imageUrl: { - url: "https://first-gallery.biz", - }, - }, - ], + content: "", }; ``` diff --git a/docs/models/components/usermessagecontent.md b/docs/models/components/usermessagecontent.md index f949165..9d70a19 100644 --- a/docs/models/components/usermessagecontent.md +++ b/docs/models/components/usermessagecontent.md @@ -14,7 +14,9 @@ const value: string = ""; ```typescript const value: components.ContentChunk[] = [ { - text: "", + referenceIds: [ + 645570, + ], }, ]; ``` diff --git a/docs/models/operations/jobsapiroutesbatchcancelbatchjobrequest.md b/docs/models/operations/jobsapiroutesbatchcancelbatchjobrequest.md index 1a062cc..29f7c2a 100644 --- a/docs/models/operations/jobsapiroutesbatchcancelbatchjobrequest.md +++ b/docs/models/operations/jobsapiroutesbatchcancelbatchjobrequest.md @@ -6,7 +6,7 @@ import { JobsApiRoutesBatchCancelBatchJobRequest } from "@mistralai/mistralai/models/operations"; let value: JobsApiRoutesBatchCancelBatchJobRequest = { - jobId: "f42e7e2a-71b3-4000-aebe-a84f576f25a1", + jobId: "6f25a197-4385-475f-9215-9a6f5badfecb", }; ``` diff --git a/docs/models/operations/jobsapiroutesbatchgetbatchjobrequest.md b/docs/models/operations/jobsapiroutesbatchgetbatchjobrequest.md index 43c99a6..6e5b52e 100644 --- a/docs/models/operations/jobsapiroutesbatchgetbatchjobrequest.md +++ b/docs/models/operations/jobsapiroutesbatchgetbatchjobrequest.md @@ -6,7 +6,7 @@ import { JobsApiRoutesBatchGetBatchJobRequest } from "@mistralai/mistralai/models/operations"; let value: JobsApiRoutesBatchGetBatchJobRequest = { - jobId: "9f0bd85c-178b-4136-99e9-2fd8e8edfe02", + jobId: "edfe026f-42e7-4e2a-971b-3000ebea84f5", }; ``` diff --git a/docs/models/operations/jobsapiroutesfinetuningcancelfinetuningjobrequest.md b/docs/models/operations/jobsapiroutesfinetuningcancelfinetuningjobrequest.md index 669bc59..f5ba0cd 100644 --- a/docs/models/operations/jobsapiroutesfinetuningcancelfinetuningjobrequest.md +++ b/docs/models/operations/jobsapiroutesfinetuningcancelfinetuningjobrequest.md @@ -6,7 +6,7 @@ import { JobsApiRoutesFineTuningCancelFineTuningJobRequest } from "@mistralai/mistralai/models/operations"; let value: JobsApiRoutesFineTuningCancelFineTuningJobRequest = { - jobId: "426296ef-849e-4684-9763-8458c5ed0471", + jobId: "ed04715b-a9b3-45ae-8840-b058e1605943", }; ``` diff --git a/docs/models/operations/jobsapiroutesfinetuningcreatefinetuningjobresponse.md b/docs/models/operations/jobsapiroutesfinetuningcreatefinetuningjobresponse.md index 6762031..3bd4151 100644 --- a/docs/models/operations/jobsapiroutesfinetuningcreatefinetuningjobresponse.md +++ b/docs/models/operations/jobsapiroutesfinetuningcreatefinetuningjobresponse.md @@ -9,16 +9,16 @@ OK ```typescript const value: components.JobOut = { - id: "ded2a616-4d0f-4550-826e-1fd753900614", + id: "90061434-2019-4ff6-a2a7-f1c43a3a8684", autoStart: false, hyperparameters: {}, - model: "mistral-small-latest", - status: "STARTED", + model: "codestral-latest", + status: "VALIDATED", jobType: "", - createdAt: 12036, - modifiedAt: 115484, + createdAt: 828657, + modifiedAt: 924967, trainingFiles: [ - "9ff62a7f-1c43-4a3a-b868-4b65de035dff", + "035dffe4-f31f-43b0-bbe4-65b3274d38fa", ], }; ``` diff --git a/docs/models/operations/jobsapiroutesfinetuninggetfinetuningjobrequest.md b/docs/models/operations/jobsapiroutesfinetuninggetfinetuningjobrequest.md index 916c028..535c7d0 100644 --- a/docs/models/operations/jobsapiroutesfinetuninggetfinetuningjobrequest.md +++ b/docs/models/operations/jobsapiroutesfinetuninggetfinetuningjobrequest.md @@ -6,7 +6,7 @@ import { JobsApiRoutesFineTuningGetFineTuningJobRequest } from "@mistralai/mistralai/models/operations"; let value: JobsApiRoutesFineTuningGetFineTuningJobRequest = { - jobId: "4f31f3b0-be46-45b3-8274-d38fadfcbff7", + jobId: "fcbff714-2629-46ef-9849-e6847638458c", }; ``` diff --git a/docs/models/operations/jobsapiroutesfinetuningstartfinetuningjobrequest.md b/docs/models/operations/jobsapiroutesfinetuningstartfinetuningjobrequest.md index 38bddf6..136410c 100644 --- a/docs/models/operations/jobsapiroutesfinetuningstartfinetuningjobrequest.md +++ b/docs/models/operations/jobsapiroutesfinetuningstartfinetuningjobrequest.md @@ -6,7 +6,7 @@ import { JobsApiRoutesFineTuningStartFineTuningJobRequest } from "@mistralai/mistralai/models/operations"; let value: JobsApiRoutesFineTuningStartFineTuningJobRequest = { - jobId: "ba9b35ae-840b-4058-ae16-0594319baf0a", + jobId: "9baf0a99-f0bd-485c-a178-b1369e92fd8e", }; ``` diff --git a/docs/models/operations/retrievemodelv1modelsmodelidgetresponseretrievemodelv1modelsmodelidget.md b/docs/models/operations/retrievemodelv1modelsmodelidgetresponseretrievemodelv1modelsmodelidget.md index d6fdb3d..29716d6 100644 --- a/docs/models/operations/retrievemodelv1modelsmodelidgetresponseretrievemodelv1modelsmodelidget.md +++ b/docs/models/operations/retrievemodelv1modelsmodelidgetresponseretrievemodelv1modelsmodelidget.md @@ -20,7 +20,7 @@ const value: components.BaseModelCard = { const value: components.FTModelCard = { id: "", capabilities: {}, - job: "Human Division Representative", + job: "Human Division Director", root: "", }; ``` diff --git a/docs/models/operations/status.md b/docs/models/operations/status.md index ff534f8..f093dd7 100644 --- a/docs/models/operations/status.md +++ b/docs/models/operations/status.md @@ -7,7 +7,7 @@ The current job state to filter on. When set, the other results are not displaye ```typescript import { Status } from "@mistralai/mistralai/models/operations"; -let value: Status = "FAILED_VALIDATION"; +let value: Status = "VALIDATING"; ``` ## Values diff --git a/docs/sdks/classifiers/README.md b/docs/sdks/classifiers/README.md index 84bdcca..440f080 100644 --- a/docs/sdks/classifiers/README.md +++ b/docs/sdks/classifiers/README.md @@ -109,7 +109,11 @@ async function run() { inputs: [ [ { - content: "", + content: [ + { + text: "", + }, + ], }, ], ], @@ -140,9 +144,9 @@ const mistral = new MistralCore({ async function run() { const res = await classifiersModerateChat(mistral, { inputs: [ - { - content: "", - }, + [ + {}, + ], ], model: "V90", }); diff --git a/jsr.json b/jsr.json index 8e1aa83..ef10cab 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@mistralai/mistralai", - "version": "1.3.1", + "version": "1.3.4", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 26750f5..cf94c96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@mistralai/mistralai", - "version": "1.3.1", + "version": "1.3.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@mistralai/mistralai", - "version": "1.3.1", + "version": "1.3.4", "devDependencies": { "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", diff --git a/package.json b/package.json index 309bb4c..e0107b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mistralai/mistralai", - "version": "1.3.1", + "version": "1.3.4", "author": "Speakeasy", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index 9783ac3..d963353 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -55,8 +55,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.0.2", - sdkVersion: "1.3.1", + sdkVersion: "1.3.4", genVersion: "2.457.2", userAgent: - "speakeasy-sdk/typescript 1.3.1 2.457.2 0.0.2 @mistralai/mistralai", + "speakeasy-sdk/typescript 1.3.4 2.457.2 0.0.2 @mistralai/mistralai", } as const; diff --git a/src/models/components/contentchunk.ts b/src/models/components/contentchunk.ts index 14d46b3..7825e9d 100644 --- a/src/models/components/contentchunk.ts +++ b/src/models/components/contentchunk.ts @@ -9,6 +9,12 @@ import { ImageURLChunk$Outbound, ImageURLChunk$outboundSchema, } from "./imageurlchunk.js"; +import { + ReferenceChunk, + ReferenceChunk$inboundSchema, + ReferenceChunk$Outbound, + ReferenceChunk$outboundSchema, +} from "./referencechunk.js"; import { TextChunk, TextChunk$inboundSchema, @@ -18,7 +24,8 @@ import { export type ContentChunk = | (ImageURLChunk & { type: "image_url" }) - | (TextChunk & { type: "text" }); + | (TextChunk & { type: "text" }) + | (ReferenceChunk & { type: "reference" }); /** @internal */ export const ContentChunk$inboundSchema: z.ZodType< @@ -34,12 +41,18 @@ export const ContentChunk$inboundSchema: z.ZodType< TextChunk$inboundSchema.and( z.object({ type: z.literal("text") }).transform((v) => ({ type: v.type })), ), + ReferenceChunk$inboundSchema.and( + z.object({ type: z.literal("reference") }).transform((v) => ({ + type: v.type, + })), + ), ]); /** @internal */ export type ContentChunk$Outbound = | (ImageURLChunk$Outbound & { type: "image_url" }) - | (TextChunk$Outbound & { type: "text" }); + | (TextChunk$Outbound & { type: "text" }) + | (ReferenceChunk$Outbound & { type: "reference" }); /** @internal */ export const ContentChunk$outboundSchema: z.ZodType< @@ -55,6 +68,11 @@ export const ContentChunk$outboundSchema: z.ZodType< TextChunk$outboundSchema.and( z.object({ type: z.literal("text") }).transform((v) => ({ type: v.type })), ), + ReferenceChunk$outboundSchema.and( + z.object({ type: z.literal("reference") }).transform((v) => ({ + type: v.type, + })), + ), ]); /** diff --git a/src/models/components/index.ts b/src/models/components/index.ts index 3b4180b..d8506f8 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -59,6 +59,7 @@ export * from "./listfilesout.js"; export * from "./metricout.js"; export * from "./modelcapabilities.js"; export * from "./modellist.js"; +export * from "./referencechunk.js"; export * from "./responseformat.js"; export * from "./responseformats.js"; export * from "./retrievefileout.js"; diff --git a/src/models/components/referencechunk.ts b/src/models/components/referencechunk.ts new file mode 100644 index 0000000..d245ce3 --- /dev/null +++ b/src/models/components/referencechunk.ts @@ -0,0 +1,85 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; + +export const ReferenceChunkType = { + Reference: "reference", +} as const; +export type ReferenceChunkType = ClosedEnum; + +export type ReferenceChunk = { + type?: "reference" | undefined; + referenceIds: Array; +}; + +/** @internal */ +export const ReferenceChunkType$inboundSchema: z.ZodNativeEnum< + typeof ReferenceChunkType +> = z.nativeEnum(ReferenceChunkType); + +/** @internal */ +export const ReferenceChunkType$outboundSchema: z.ZodNativeEnum< + typeof ReferenceChunkType +> = ReferenceChunkType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ReferenceChunkType$ { + /** @deprecated use `ReferenceChunkType$inboundSchema` instead. */ + export const inboundSchema = ReferenceChunkType$inboundSchema; + /** @deprecated use `ReferenceChunkType$outboundSchema` instead. */ + export const outboundSchema = ReferenceChunkType$outboundSchema; +} + +/** @internal */ +export const ReferenceChunk$inboundSchema: z.ZodType< + ReferenceChunk, + z.ZodTypeDef, + unknown +> = z.object({ + type: z.literal("reference").default("reference"), + reference_ids: z.array(z.number().int()), +}).transform((v) => { + return remap$(v, { + "reference_ids": "referenceIds", + }); +}); + +/** @internal */ +export type ReferenceChunk$Outbound = { + type: "reference"; + reference_ids: Array; +}; + +/** @internal */ +export const ReferenceChunk$outboundSchema: z.ZodType< + ReferenceChunk$Outbound, + z.ZodTypeDef, + ReferenceChunk +> = z.object({ + type: z.literal("reference").default("reference"), + referenceIds: z.array(z.number().int()), +}).transform((v) => { + return remap$(v, { + referenceIds: "reference_ids", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ReferenceChunk$ { + /** @deprecated use `ReferenceChunk$inboundSchema` instead. */ + export const inboundSchema = ReferenceChunk$inboundSchema; + /** @deprecated use `ReferenceChunk$outboundSchema` instead. */ + export const outboundSchema = ReferenceChunk$outboundSchema; + /** @deprecated use `ReferenceChunk$Outbound` instead. */ + export type Outbound = ReferenceChunk$Outbound; +} diff --git a/src/models/components/toolmessage.ts b/src/models/components/toolmessage.ts index 566ea41..fd923fe 100644 --- a/src/models/components/toolmessage.ts +++ b/src/models/components/toolmessage.ts @@ -5,6 +5,14 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; +import { + ContentChunk, + ContentChunk$inboundSchema, + ContentChunk$Outbound, + ContentChunk$outboundSchema, +} from "./contentchunk.js"; + +export type ToolMessageContent = string | Array; export const ToolMessageRole = { Tool: "tool", @@ -12,12 +20,42 @@ export const ToolMessageRole = { export type ToolMessageRole = ClosedEnum; export type ToolMessage = { - content: string; + content: string | Array | null; toolCallId?: string | null | undefined; name?: string | null | undefined; role?: ToolMessageRole | undefined; }; +/** @internal */ +export const ToolMessageContent$inboundSchema: z.ZodType< + ToolMessageContent, + z.ZodTypeDef, + unknown +> = z.union([z.string(), z.array(ContentChunk$inboundSchema)]); + +/** @internal */ +export type ToolMessageContent$Outbound = string | Array; + +/** @internal */ +export const ToolMessageContent$outboundSchema: z.ZodType< + ToolMessageContent$Outbound, + z.ZodTypeDef, + ToolMessageContent +> = z.union([z.string(), z.array(ContentChunk$outboundSchema)]); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ToolMessageContent$ { + /** @deprecated use `ToolMessageContent$inboundSchema` instead. */ + export const inboundSchema = ToolMessageContent$inboundSchema; + /** @deprecated use `ToolMessageContent$outboundSchema` instead. */ + export const outboundSchema = ToolMessageContent$outboundSchema; + /** @deprecated use `ToolMessageContent$Outbound` instead. */ + export type Outbound = ToolMessageContent$Outbound; +} + /** @internal */ export const ToolMessageRole$inboundSchema: z.ZodNativeEnum< typeof ToolMessageRole @@ -45,7 +83,9 @@ export const ToolMessage$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - content: z.string(), + content: z.nullable( + z.union([z.string(), z.array(ContentChunk$inboundSchema)]), + ), tool_call_id: z.nullable(z.string()).optional(), name: z.nullable(z.string()).optional(), role: ToolMessageRole$inboundSchema.default("tool"), @@ -57,7 +97,7 @@ export const ToolMessage$inboundSchema: z.ZodType< /** @internal */ export type ToolMessage$Outbound = { - content: string; + content: string | Array | null; tool_call_id?: string | null | undefined; name?: string | null | undefined; role: string; @@ -69,7 +109,9 @@ export const ToolMessage$outboundSchema: z.ZodType< z.ZodTypeDef, ToolMessage > = z.object({ - content: z.string(), + content: z.nullable( + z.union([z.string(), z.array(ContentChunk$outboundSchema)]), + ), toolCallId: z.nullable(z.string()).optional(), name: z.nullable(z.string()).optional(), role: ToolMessageRole$outboundSchema.default("tool"),