diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 08bd6e19..bae5b129 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: 9c8bd4d6bf675b159a80173b97c1265c + docChecksum: e0186c33d0269977e1790dfcc7d11aac docVersion: 1.0.0 speakeasyVersion: 1.517.3 generationVersion: 2.548.6 - releaseVersion: 1.7.2 - configChecksum: 2231634947960f9c67d18ecb5c141174 + releaseVersion: 1.7.3 + configChecksum: 56ba7c9a01b61f8ad043acd00caf7380 repoURL: https://github.com/mistralai/client-ts.git installationURL: https://github.com/mistralai/client-ts published: true @@ -181,6 +181,7 @@ generatedFiles: - docs/models/components/embeddingresponsedata.md - docs/models/components/entries.md - docs/models/components/eventout.md + - docs/models/components/filechunk.md - docs/models/components/filepurpose.md - docs/models/components/fileschema.md - docs/models/components/filesignedurl.md @@ -194,7 +195,6 @@ generatedFiles: - docs/models/components/ftclassifierlossfunction.md - docs/models/components/ftmodelcapabilitiesout.md - docs/models/components/ftmodelcard.md - - docs/models/components/ftmodelcardtype.md - docs/models/components/functioncall.md - docs/models/components/functioncallentry.md - docs/models/components/functioncallentryarguments.md @@ -246,7 +246,6 @@ generatedFiles: - docs/models/components/messageinputentry.md - docs/models/components/messageinputentrycontent.md - docs/models/components/messageinputentryrole.md - - docs/models/components/messageinputentrytype.md - docs/models/components/messageoutputcontentchunks.md - docs/models/components/messageoutputentry.md - docs/models/components/messageoutputentrycontent.md @@ -543,6 +542,7 @@ generatedFiles: - src/models/components/embeddingresponse.ts - src/models/components/embeddingresponsedata.ts - src/models/components/eventout.ts + - src/models/components/filechunk.ts - src/models/components/filepurpose.ts - src/models/components/fileschema.ts - src/models/components/filesignedurl.ts @@ -711,7 +711,7 @@ examples: model_id: "ft:open-mistral-7b:587a6b29:20240514:7e773925" responses: "200": - application/json: {"id": "", "object": "model", "owned_by": "mistralai", "capabilities": {"completion_chat": true, "completion_fim": false, "function_calling": true, "fine_tuning": false, "vision": false}, "max_context_length": 32768} + application/json: {"id": "", "object": "model", "owned_by": "mistralai", "capabilities": {"completion_chat": true, "completion_fim": false, "function_calling": true, "fine_tuning": false, "vision": false, "classification": false}, "max_context_length": 32768} "422": {} delete_model_v1_models__model_id__delete: "": diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 2c4f48a5..43e1c34e 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -18,7 +18,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false typescript: - version: 1.7.2 + version: 1.7.3 additionalDependencies: dependencies: zod-to-json-schema: ^3.24.1 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 7a38d819..6fa211d5 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,11 +16,11 @@ sources: - speakeasy-sdk-regen-1742480568 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:21244d618cafcc163c3aa4acbc443ca16c63b8614632b65b87fbb2c4066987f3 - sourceBlobDigest: sha256:74aeb6a2e0d466c206f983ce79581cc72d205cc7866826282c181207ebe841a2 + sourceRevisionDigest: sha256:e9fd379cd22f75a10ccc5b866f4de98f973c3c0f77cb15a7bebcb94bf10c82f2 + sourceBlobDigest: sha256:4bb656d10d1cfbe09f9b1b7734c79f1855eb27184590362d3747116f6abf69d1 tags: - latest - - speakeasy-sdk-regen-1749573772 + - speakeasy-sdk-regen-1751356549 targets: mistralai-azure-sdk: source: mistral-azure-source @@ -39,10 +39,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:21244d618cafcc163c3aa4acbc443ca16c63b8614632b65b87fbb2c4066987f3 - sourceBlobDigest: sha256:74aeb6a2e0d466c206f983ce79581cc72d205cc7866826282c181207ebe841a2 + sourceRevisionDigest: sha256:e9fd379cd22f75a10ccc5b866f4de98f973c3c0f77cb15a7bebcb94bf10c82f2 + sourceBlobDigest: sha256:4bb656d10d1cfbe09f9b1b7734c79f1855eb27184590362d3747116f6abf69d1 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:d3f8bd04c44b92ad34ab2a1a93e0cf9a8cda5b2eecfcb6dbddfff8f44e91fc93 + codeSamplesRevisionDigest: sha256:8391050c18eb637f3eacdb33c98bb07c202c217f6a939b5aea9d49fd636cc553 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.517.3 diff --git a/RELEASES.md b/RELEASES.md index 70625971..d6c5b908 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -208,4 +208,14 @@ Based on: ### Generated - [typescript v1.7.2] . ### Releases -- [NPM v1.7.2] https://www.npmjs.com/package/@mistralai/mistralai/v/1.7.2 - . \ No newline at end of file +- [NPM v1.7.2] https://www.npmjs.com/package/@mistralai/mistralai/v/1.7.2 - . + +## 2025-07-01 07:55:31 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.517.3 (2.548.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v1.7.3] . +### Releases +- [NPM v1.7.3] https://www.npmjs.com/package/@mistralai/mistralai/v/1.7.3 - . \ No newline at end of file diff --git a/docs/models/components/agent.md b/docs/models/components/agent.md index 7a096cd3..d8a61712 100644 --- a/docs/models/components/agent.md +++ b/docs/models/components/agent.md @@ -6,12 +6,12 @@ import { Agent } from "@mistralai/mistralai/models/components"; let value: Agent = { - model: "Wrangler", + model: "Cruze", name: "", id: "", - version: 7, - createdAt: new Date("2023-08-25T04:42:50.179Z"), - updatedAt: new Date("2025-11-04T07:38:09.644Z"), + version: 10, + createdAt: new Date("2025-04-18T19:06:55.714Z"), + updatedAt: new Date("2025-03-31T12:50:52.284Z"), }; ``` diff --git a/docs/models/components/agentconversation.md b/docs/models/components/agentconversation.md index 6d6e0051..6a97fc70 100644 --- a/docs/models/components/agentconversation.md +++ b/docs/models/components/agentconversation.md @@ -7,8 +7,8 @@ import { AgentConversation } from "@mistralai/mistralai/models/components"; let value: AgentConversation = { id: "", - createdAt: new Date("2024-01-30T12:51:46.829Z"), - updatedAt: new Date("2025-03-11T01:40:18.315Z"), + createdAt: new Date("2024-11-12T03:22:04.343Z"), + updatedAt: new Date("2024-09-24T15:25:14.861Z"), agentId: "", }; ``` diff --git a/docs/models/components/agentcreationrequest.md b/docs/models/components/agentcreationrequest.md index 05b1fbe9..548da857 100644 --- a/docs/models/components/agentcreationrequest.md +++ b/docs/models/components/agentcreationrequest.md @@ -6,7 +6,7 @@ import { AgentCreationRequest } from "@mistralai/mistralai/models/components"; let value: AgentCreationRequest = { - model: "Model T", + model: "Taurus", name: "", }; ``` diff --git a/docs/models/components/agentscompletionrequest.md b/docs/models/components/agentscompletionrequest.md index 112cc3f7..1215d647 100644 --- a/docs/models/components/agentscompletionrequest.md +++ b/docs/models/components/agentscompletionrequest.md @@ -33,5 +33,5 @@ let value: AgentsCompletionRequest = { | `n` | *number* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [components.Prediction](../../models/components/prediction.md) | :heavy_minus_sign: | N/A | | | `parallelToolCalls` | *boolean* | :heavy_minus_sign: | N/A | | -| `promptMode` | [components.MistralPromptMode](../../models/components/mistralpromptmode.md) | :heavy_minus_sign: | N/A | | +| `promptMode` | [components.MistralPromptMode](../../models/components/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `agentId` | *string* | :heavy_check_mark: | The ID of the agent to use for this completion. | | \ No newline at end of file diff --git a/docs/models/components/agentscompletionrequestmessages.md b/docs/models/components/agentscompletionrequestmessages.md index 319b727a..7b0e1b93 100644 --- a/docs/models/components/agentscompletionrequestmessages.md +++ b/docs/models/components/agentscompletionrequestmessages.md @@ -13,7 +13,12 @@ const value: components.AssistantMessage = {}; ```typescript const value: components.SystemMessage = { - content: "", + content: [ + { + text: "", + type: "text", + }, + ], }; ``` @@ -21,12 +26,7 @@ const value: components.SystemMessage = { ```typescript const value: components.ToolMessage = { - content: [ - { - text: "", - type: "text", - }, - ], + content: "", }; ``` diff --git a/docs/models/components/agentscompletionstreamrequest.md b/docs/models/components/agentscompletionstreamrequest.md index 4d13e163..a3b300ae 100644 --- a/docs/models/components/agentscompletionstreamrequest.md +++ b/docs/models/components/agentscompletionstreamrequest.md @@ -33,5 +33,5 @@ let value: AgentsCompletionStreamRequest = { | `n` | *number* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [components.Prediction](../../models/components/prediction.md) | :heavy_minus_sign: | N/A | | | `parallelToolCalls` | *boolean* | :heavy_minus_sign: | N/A | | -| `promptMode` | [components.MistralPromptMode](../../models/components/mistralpromptmode.md) | :heavy_minus_sign: | N/A | | +| `promptMode` | [components.MistralPromptMode](../../models/components/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `agentId` | *string* | :heavy_check_mark: | The ID of the agent to use for this completion. | | \ No newline at end of file diff --git a/docs/models/components/agentscompletionstreamrequestmessages.md b/docs/models/components/agentscompletionstreamrequestmessages.md index db42e9d9..02d10bd7 100644 --- a/docs/models/components/agentscompletionstreamrequestmessages.md +++ b/docs/models/components/agentscompletionstreamrequestmessages.md @@ -13,7 +13,12 @@ const value: components.AssistantMessage = {}; ```typescript const value: components.SystemMessage = { - content: "", + content: [ + { + text: "", + type: "text", + }, + ], }; ``` @@ -21,7 +26,14 @@ const value: components.SystemMessage = { ```typescript const value: components.ToolMessage = { - content: "", + content: [ + { + imageUrl: { + url: "https://clean-tenant.com/", + }, + type: "image_url", + }, + ], }; ``` @@ -29,7 +41,12 @@ const value: components.ToolMessage = { ```typescript const value: components.UserMessage = { - content: "", + content: [ + { + imageUrl: "https://hidden-flint.net", + type: "image_url", + }, + ], }; ``` diff --git a/docs/models/components/agentscompletionstreamrequesttoolchoice.md b/docs/models/components/agentscompletionstreamrequesttoolchoice.md index bc66a7a5..eca7adf6 100644 --- a/docs/models/components/agentscompletionstreamrequesttoolchoice.md +++ b/docs/models/components/agentscompletionstreamrequesttoolchoice.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/apiendpoint.md b/docs/models/components/apiendpoint.md index c226b77b..23073d7c 100644 --- a/docs/models/components/apiendpoint.md +++ b/docs/models/components/apiendpoint.md @@ -5,7 +5,7 @@ ```typescript import { ApiEndpoint } from "@mistralai/mistralai/models/components"; -let value: ApiEndpoint = "/v1/chat/moderations"; +let value: ApiEndpoint = "/v1/chat/completions"; ``` ## Values diff --git a/docs/models/components/assistantmessagecontent.md b/docs/models/components/assistantmessagecontent.md index cf149620..9f844356 100644 --- a/docs/models/components/assistantmessagecontent.md +++ b/docs/models/components/assistantmessagecontent.md @@ -14,10 +14,8 @@ const value: string = ""; ```typescript const value: components.ContentChunk[] = [ { - referenceIds: [ - 991891, - ], - type: "reference", + text: "", + type: "text", }, ]; ``` diff --git a/docs/models/components/basemodelcard.md b/docs/models/components/basemodelcard.md index 5d0933f8..b9aeda39 100644 --- a/docs/models/components/basemodelcard.md +++ b/docs/models/components/basemodelcard.md @@ -25,5 +25,6 @@ let value: BaseModelCard = { | `maxContextLength` | *number* | :heavy_minus_sign: | N/A | | `aliases` | *string*[] | :heavy_minus_sign: | N/A | | `deprecation` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `deprecationReplacementModel` | *string* | :heavy_minus_sign: | N/A | | `defaultModelTemperature` | *number* | :heavy_minus_sign: | N/A | -| `type` | [components.Type](../../models/components/type.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `type` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/batchjobin.md b/docs/models/components/batchjobin.md index 95631443..3930fb65 100644 --- a/docs/models/components/batchjobin.md +++ b/docs/models/components/batchjobin.md @@ -7,10 +7,10 @@ import { BatchJobIn } from "@mistralai/mistralai/models/components"; let value: BatchJobIn = { inputFiles: [ - "6547a481-20f0-4291-9ebf-848e84e5035d", + "5035d775-eff6-4fca-9332-e477cd26dd12", ], - endpoint: "/v1/fim/completions", - model: "Countach", + endpoint: "/v1/chat/completions", + model: "Escalade", }; ``` diff --git a/docs/models/components/batchjobout.md b/docs/models/components/batchjobout.md index 55f44d3a..5eca385d 100644 --- a/docs/models/components/batchjobout.md +++ b/docs/models/components/batchjobout.md @@ -8,21 +8,21 @@ import { BatchJobOut } from "@mistralai/mistralai/models/components"; let value: BatchJobOut = { id: "", inputFiles: [ - "8685308d-5311-4314-811d-28c723685cce", + "85cce0e6-ebfc-4586-a547-a48120f0291e", ], endpoint: "", - model: "Spyder", + model: "Wrangler", errors: [ { message: "", }, ], - status: "SUCCESS", - createdAt: 878373, - totalRequests: 690785, - completedRequests: 987349, - succeededRequests: 759283, - failedRequests: 364544, + status: "FAILED", + createdAt: 300403, + totalRequests: 549501, + completedRequests: 930819, + succeededRequests: 520761, + failedRequests: 267207, }; ``` diff --git a/docs/models/components/batchjobsout.md b/docs/models/components/batchjobsout.md index f303a864..a5a98678 100644 --- a/docs/models/components/batchjobsout.md +++ b/docs/models/components/batchjobsout.md @@ -6,7 +6,7 @@ import { BatchJobsOut } from "@mistralai/mistralai/models/components"; let value: BatchJobsOut = { - total: 29190, + total: 432984, }; ``` diff --git a/docs/models/components/batchjobstatus.md b/docs/models/components/batchjobstatus.md index 0f1b08d4..3640c8bb 100644 --- a/docs/models/components/batchjobstatus.md +++ b/docs/models/components/batchjobstatus.md @@ -5,7 +5,7 @@ ```typescript import { BatchJobStatus } from "@mistralai/mistralai/models/components"; -let value: BatchJobStatus = "FAILED"; +let value: BatchJobStatus = "CANCELLED"; ``` ## Values diff --git a/docs/models/components/chatclassificationrequest.md b/docs/models/components/chatclassificationrequest.md index 56594c8a..09e52250 100644 --- a/docs/models/components/chatclassificationrequest.md +++ b/docs/models/components/chatclassificationrequest.md @@ -6,17 +6,15 @@ import { ChatClassificationRequest } from "@mistralai/mistralai/models/components"; let value: ChatClassificationRequest = { - model: "Volt", - inputs: [ - { - messages: [ - { - content: "", - role: "system", - }, - ], - }, - ], + model: "Aventador", + inputs: { + messages: [ + { + prefix: false, + role: "assistant", + }, + ], + }, }; ``` diff --git a/docs/models/components/chatcompletionrequest.md b/docs/models/components/chatcompletionrequest.md index 38cc97cb..5f03c77f 100644 --- a/docs/models/components/chatcompletionrequest.md +++ b/docs/models/components/chatcompletionrequest.md @@ -36,5 +36,5 @@ let value: ChatCompletionRequest = { | `n` | *number* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [components.Prediction](../../models/components/prediction.md) | :heavy_minus_sign: | N/A | | | `parallelToolCalls` | *boolean* | :heavy_minus_sign: | N/A | | -| `promptMode` | [components.MistralPromptMode](../../models/components/mistralpromptmode.md) | :heavy_minus_sign: | N/A | | +| `promptMode` | [components.MistralPromptMode](../../models/components/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `safePrompt` | *boolean* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file diff --git a/docs/models/components/chatcompletionrequesttoolchoice.md b/docs/models/components/chatcompletionrequesttoolchoice.md index 7914b53c..8750103b 100644 --- a/docs/models/components/chatcompletionrequesttoolchoice.md +++ b/docs/models/components/chatcompletionrequesttoolchoice.md @@ -16,6 +16,6 @@ const value: components.ToolChoice = { ### `components.ToolChoiceEnum` ```typescript -const value: components.ToolChoiceEnum = "auto"; +const value: components.ToolChoiceEnum = "required"; ``` diff --git a/docs/models/components/chatcompletionstreamrequest.md b/docs/models/components/chatcompletionstreamrequest.md index 7ac2bab3..c395e323 100644 --- a/docs/models/components/chatcompletionstreamrequest.md +++ b/docs/models/components/chatcompletionstreamrequest.md @@ -36,5 +36,5 @@ let value: ChatCompletionStreamRequest = { | `n` | *number* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [components.Prediction](../../models/components/prediction.md) | :heavy_minus_sign: | N/A | | | `parallelToolCalls` | *boolean* | :heavy_minus_sign: | N/A | | -| `promptMode` | [components.MistralPromptMode](../../models/components/mistralpromptmode.md) | :heavy_minus_sign: | N/A | | +| `promptMode` | [components.MistralPromptMode](../../models/components/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `safePrompt` | *boolean* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file diff --git a/docs/models/components/chatcompletionstreamrequestmessages.md b/docs/models/components/chatcompletionstreamrequestmessages.md index 698d317b..b7f52fb9 100644 --- a/docs/models/components/chatcompletionstreamrequestmessages.md +++ b/docs/models/components/chatcompletionstreamrequestmessages.md @@ -13,12 +13,7 @@ const value: components.AssistantMessage = {}; ```typescript const value: components.SystemMessage = { - content: [ - { - text: "", - type: "text", - }, - ], + content: "", }; ``` @@ -28,8 +23,10 @@ const value: components.SystemMessage = { const value: components.ToolMessage = { content: [ { - documentUrl: "https://formal-sushi.com", - type: "document_url", + referenceIds: [ + 498180, + ], + type: "reference", }, ], }; @@ -39,7 +36,14 @@ const value: components.ToolMessage = { ```typescript const value: components.UserMessage = { - content: "", + content: [ + { + referenceIds: [ + 401428, + ], + type: "reference", + }, + ], }; ``` diff --git a/docs/models/components/chatcompletionstreamrequesttoolchoice.md b/docs/models/components/chatcompletionstreamrequesttoolchoice.md index d61fd6c6..4d4a29f2 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 = "auto"; +const value: components.ToolChoiceEnum = "none"; ``` diff --git a/docs/models/components/chatmoderationrequest.md b/docs/models/components/chatmoderationrequest.md index 38013e64..a869a145 100644 --- a/docs/models/components/chatmoderationrequest.md +++ b/docs/models/components/chatmoderationrequest.md @@ -8,16 +8,11 @@ import { ChatModerationRequest } from "@mistralai/mistralai/models/components"; let value: ChatModerationRequest = { inputs: [ { - content: [ - { - text: "", - type: "text", - }, - ], + content: "", role: "tool", }, ], - model: "Beetle", + model: "Model T", }; ``` diff --git a/docs/models/components/chatmoderationrequestinputs.md b/docs/models/components/chatmoderationrequestinputs.md index e4a9ce37..dd98d55b 100644 --- a/docs/models/components/chatmoderationrequestinputs.md +++ b/docs/models/components/chatmoderationrequestinputs.md @@ -10,8 +10,8 @@ Chat to classify ```typescript const value: components.One[] = [ { - content: "", - role: "system", + prefix: false, + role: "assistant", }, ]; ``` @@ -22,12 +22,7 @@ const value: components.One[] = [ const value: components.Two[][] = [ [ { - content: [ - { - text: "", - type: "text", - }, - ], + content: "", role: "tool", }, ], diff --git a/docs/models/components/checkpointout.md b/docs/models/components/checkpointout.md index 826ba68f..c4a1cf4f 100644 --- a/docs/models/components/checkpointout.md +++ b/docs/models/components/checkpointout.md @@ -7,7 +7,7 @@ import { CheckpointOut } from "@mistralai/mistralai/models/components"; let value: CheckpointOut = { metrics: {}, - stepNumber: 999278, + stepNumber: 380335, createdAt: 1716963433, }; ``` diff --git a/docs/models/components/classificationrequest.md b/docs/models/components/classificationrequest.md index 4999d4e5..b47b226e 100644 --- a/docs/models/components/classificationrequest.md +++ b/docs/models/components/classificationrequest.md @@ -6,8 +6,10 @@ import { ClassificationRequest } from "@mistralai/mistralai/models/components"; let value: ClassificationRequest = { - model: "Jetta", - inputs: "", + model: "Grand Caravan", + inputs: [ + "", + ], }; ``` diff --git a/docs/models/components/classificationresponse.md b/docs/models/components/classificationresponse.md index 05b3ecd9..6c3998ed 100644 --- a/docs/models/components/classificationresponse.md +++ b/docs/models/components/classificationresponse.md @@ -7,12 +7,12 @@ import { ClassificationResponse } from "@mistralai/mistralai/models/components"; let value: ClassificationResponse = { id: "mod-e5cc70bb28c444948073e77776eb30ef", - model: "Fiesta", + model: "Prius", results: [ { "key": { scores: { - "key": 1403.16, + "key": 2176.63, }, }, }, diff --git a/docs/models/components/classificationtargetresult.md b/docs/models/components/classificationtargetresult.md index c7b080e6..36c8ce6f 100644 --- a/docs/models/components/classificationtargetresult.md +++ b/docs/models/components/classificationtargetresult.md @@ -7,7 +7,7 @@ import { ClassificationTargetResult } from "@mistralai/mistralai/models/componen let value: ClassificationTargetResult = { scores: { - "key": 3589.95, + "key": 9738.19, }, }; ``` diff --git a/docs/models/components/classifierdetailedjobout.md b/docs/models/components/classifierdetailedjobout.md index 10a25e41..8a4ac682 100644 --- a/docs/models/components/classifierdetailedjobout.md +++ b/docs/models/components/classifierdetailedjobout.md @@ -6,20 +6,20 @@ import { ClassifierDetailedJobOut } from "@mistralai/mistralai/models/components"; let value: ClassifierDetailedJobOut = { - id: "adfecb52-1368-4cf1-819b-def662aad179", + id: "ad17932d-0717-4f6d-a146-6a5ba6691dab", autoStart: false, - model: "Beetle", - status: "CANCELLED", - createdAt: 58534, - modifiedAt: 470621, + model: "Accord", + status: "RUNNING", + createdAt: 405373, + modifiedAt: 321043, trainingFiles: [ - "17f6d146-6a5b-4a66-a91d-ab816650b19b", + "0b19baf1-d086-4853-b08d-531131411d28", ], hyperparameters: {}, checkpoints: [ { metrics: {}, - stepNumber: 959143, + stepNumber: 456410, createdAt: 1716963433, }, ], @@ -29,8 +29,8 @@ let value: ClassifierDetailedJobOut = { labels: [ "", ], - weight: 1032.98, - lossFunction: "multi_class", + weight: 1533.69, + lossFunction: "single_class", }, ], }; diff --git a/docs/models/components/classifierdetailedjoboutstatus.md b/docs/models/components/classifierdetailedjoboutstatus.md index be4112d1..df4d0460 100644 --- a/docs/models/components/classifierdetailedjoboutstatus.md +++ b/docs/models/components/classifierdetailedjoboutstatus.md @@ -5,7 +5,7 @@ ```typescript import { ClassifierDetailedJobOutStatus } from "@mistralai/mistralai/models/components"; -let value: ClassifierDetailedJobOutStatus = "SUCCESS"; +let value: ClassifierDetailedJobOutStatus = "FAILED"; ``` ## Values diff --git a/docs/models/components/classifierjobout.md b/docs/models/components/classifierjobout.md index 0a861ee3..3cd26322 100644 --- a/docs/models/components/classifierjobout.md +++ b/docs/models/components/classifierjobout.md @@ -6,14 +6,14 @@ import { ClassifierJobOut } from "@mistralai/mistralai/models/components"; let value: ClassifierJobOut = { - id: "f31f3b0b-e465-4b32-974d-38fadfcbff71", + id: "bff71426-296e-4f84-b9e6-847638458c5e", autoStart: false, - model: "Aventador", - status: "RUNNING", - createdAt: 131289, - modifiedAt: 604118, + model: "911", + status: "VALIDATING", + createdAt: 446135, + modifiedAt: 104627, trainingFiles: [ - "6ef849e6-8476-4384-858c-5ed04715ba9b", + "5ba9b35a-e840-4b05-a8e1-60594319baf0", ], hyperparameters: {}, }; diff --git a/docs/models/components/classifierjoboutstatus.md b/docs/models/components/classifierjoboutstatus.md index 9f866f24..7fd820b4 100644 --- a/docs/models/components/classifierjoboutstatus.md +++ b/docs/models/components/classifierjoboutstatus.md @@ -7,7 +7,7 @@ The current status of the fine-tuning job. ```typescript import { ClassifierJobOutStatus } from "@mistralai/mistralai/models/components"; -let value: ClassifierJobOutStatus = "VALIDATING"; +let value: ClassifierJobOutStatus = "SUCCESS"; ``` ## Values diff --git a/docs/models/components/completionchunk.md b/docs/models/components/completionchunk.md index bc809bbf..c373fbe4 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: "911", + model: "Countach", usage: { promptTokens: 16, completionTokens: 34, @@ -15,9 +15,9 @@ let value: CompletionChunk = { }, choices: [ { - index: 639705, + index: 770873, delta: {}, - finishReason: "length", + finishReason: "error", }, ], }; diff --git a/docs/models/components/completiondetailedjobout.md b/docs/models/components/completiondetailedjobout.md index 938c7a4d..fcf0dfc3 100644 --- a/docs/models/components/completiondetailedjobout.md +++ b/docs/models/components/completiondetailedjobout.md @@ -6,20 +6,20 @@ import { CompletionDetailedJobOut } from "@mistralai/mistralai/models/components"; let value: CompletionDetailedJobOut = { - id: "78b1369e-92fd-48e8-9edf-e026f42e7e2a", + id: "e7e2a71b-3000-4ebe-8a84-f576f25a1974", autoStart: false, - model: "A8", - status: "FAILED", - createdAt: 247399, - modifiedAt: 39615, + model: "Focus", + status: "VALIDATED", + createdAt: 456520, + modifiedAt: 337477, trainingFiles: [ - "00ebea84-f576-4f25-aa19-7438575f2159", + "f2159a6f-5bad-4fec-bb52-1368cf119bde", ], hyperparameters: {}, checkpoints: [ { metrics: {}, - stepNumber: 397257, + stepNumber: 399802, createdAt: 1716963433, }, ], diff --git a/docs/models/components/completiondetailedjoboutstatus.md b/docs/models/components/completiondetailedjoboutstatus.md index 3e8777b8..1b4dda95 100644 --- a/docs/models/components/completiondetailedjoboutstatus.md +++ b/docs/models/components/completiondetailedjoboutstatus.md @@ -5,7 +5,7 @@ ```typescript import { CompletionDetailedJobOutStatus } from "@mistralai/mistralai/models/components"; -let value: CompletionDetailedJobOutStatus = "QUEUED"; +let value: CompletionDetailedJobOutStatus = "STARTED"; ``` ## Values diff --git a/docs/models/components/completionevent.md b/docs/models/components/completionevent.md index d868f894..87332988 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: "Camry", + model: "Grand Cherokee", usage: { promptTokens: 16, completionTokens: 34, @@ -16,9 +16,9 @@ let value: CompletionEvent = { }, choices: [ { - index: 250398, + index: 779180, delta: {}, - finishReason: "length", + finishReason: "tool_calls", }, ], }, diff --git a/docs/models/components/completionjobout.md b/docs/models/components/completionjobout.md index 99a061d5..5961aee9 100644 --- a/docs/models/components/completionjobout.md +++ b/docs/models/components/completionjobout.md @@ -6,14 +6,14 @@ import { CompletionJobOut } from "@mistralai/mistralai/models/components"; let value: CompletionJobOut = { - id: "ded2a616-4d0f-4550-826e-1fd753900614", + id: "00614342-019f-4f62-9a7f-1c43a3a8684b", autoStart: false, - model: "Challenger", - status: "STARTED", - createdAt: 12036, - modifiedAt: 115484, + model: "Cruze", + status: "CANCELLED", + createdAt: 924967, + modifiedAt: 46007, trainingFiles: [ - "9ff62a7f-1c43-4a3a-b868-4b65de035dff", + "35dffe4f-31f3-4b0b-be46-5b3274d38fad", ], hyperparameters: {}, }; diff --git a/docs/models/components/completionresponsestreamchoice.md b/docs/models/components/completionresponsestreamchoice.md index c5a65db8..c238d8d1 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: 809365, + index: 865946, delta: {}, - finishReason: "error", + finishReason: "length", }; ``` diff --git a/docs/models/components/completionresponsestreamchoicefinishreason.md b/docs/models/components/completionresponsestreamchoicefinishreason.md index 213276df..a6042ab1 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 = "length"; +let value: CompletionResponseStreamChoiceFinishReason = "stop"; ``` ## Values diff --git a/docs/models/components/content.md b/docs/models/components/content.md index 06767cc2..b05000a3 100644 --- a/docs/models/components/content.md +++ b/docs/models/components/content.md @@ -14,10 +14,8 @@ const value: string = ""; ```typescript const value: components.ContentChunk[] = [ { - referenceIds: [ - 351936, - ], - type: "reference", + text: "", + type: "text", }, ]; ``` diff --git a/docs/models/components/contentchunk.md b/docs/models/components/contentchunk.md index 1546321b..e37dc871 100644 --- a/docs/models/components/contentchunk.md +++ b/docs/models/components/contentchunk.md @@ -7,7 +7,9 @@ ```typescript const value: components.ImageURLChunk = { - imageUrl: "https://exhausted-cycle.com", + imageUrl: { + url: "https://violent-grandpa.biz", + }, }; ``` @@ -15,7 +17,7 @@ const value: components.ImageURLChunk = { ```typescript const value: components.DocumentURLChunk = { - documentUrl: "https://free-ignorance.info", + documentUrl: "https://lost-antelope.name/", }; ``` @@ -32,8 +34,16 @@ const value: components.TextChunk = { ```typescript const value: components.ReferenceChunk = { referenceIds: [ - 778172, + 408303, ], }; ``` +### `components.FileChunk` + +```typescript +const value: components.FileChunk = { + fileId: "6cbf5ec5-94d1-4326-ab87-0613e3dc291b", +}; +``` + diff --git a/docs/models/components/conversationappendrequest.md b/docs/models/components/conversationappendrequest.md index 1a469a8e..f392ee15 100644 --- a/docs/models/components/conversationappendrequest.md +++ b/docs/models/components/conversationappendrequest.md @@ -9,9 +9,10 @@ let value: ConversationAppendRequest = { inputs: [ { object: "entry", - type: "message.input", - role: "assistant", - content: "", + type: "function.call", + toolCallId: "", + name: "", + arguments: "", }, ], }; diff --git a/docs/models/components/conversationevents.md b/docs/models/components/conversationevents.md index 4bef9e0a..dabbe236 100644 --- a/docs/models/components/conversationevents.md +++ b/docs/models/components/conversationevents.md @@ -6,14 +6,14 @@ import { ConversationEvents } from "@mistralai/mistralai/models/components"; let value: ConversationEvents = { - event: "message.output.delta", + event: "conversation.response.started", data: { - type: "conversation.response.done", - usage: { - promptTokens: 0, - completionTokens: 0, - totalTokens: 0, - }, + type: "message.output.delta", + outputIndex: 0, + id: "", + contentIndex: 0, + role: "assistant", + content: "", }, }; ``` diff --git a/docs/models/components/conversationeventsdata.md b/docs/models/components/conversationeventsdata.md index e7dbe287..d66b59f6 100644 --- a/docs/models/components/conversationeventsdata.md +++ b/docs/models/components/conversationeventsdata.md @@ -36,7 +36,7 @@ const value: components.ResponseDoneEvent = { ```typescript const value: components.ResponseErrorEvent = { message: "", - code: 944373, + code: 536579, }; ``` @@ -65,9 +65,9 @@ const value: components.FunctionCallEvent = { const value: components.MessageOutputEvent = { id: "", content: { - type: "tool_file", + type: "tool_reference", tool: "web_search_premium", - fileId: "", + title: "", }, }; ``` @@ -77,7 +77,7 @@ const value: components.MessageOutputEvent = { ```typescript const value: components.ToolExecutionDoneEvent = { id: "", - name: "web_search_premium", + name: "image_generation", }; ``` @@ -86,7 +86,7 @@ const value: components.ToolExecutionDoneEvent = { ```typescript const value: components.ToolExecutionStartedEvent = { id: "", - name: "web_search", + name: "web_search_premium", }; ``` diff --git a/docs/models/components/conversationhistory.md b/docs/models/components/conversationhistory.md index 355e2894..1aa390b6 100644 --- a/docs/models/components/conversationhistory.md +++ b/docs/models/components/conversationhistory.md @@ -14,13 +14,7 @@ let value: ConversationHistory = { object: "entry", type: "message.input", role: "assistant", - content: [ - { - type: "tool_file", - tool: "web_search_premium", - fileId: "", - }, - ], + content: "", }, ], }; diff --git a/docs/models/components/conversationinputs.md b/docs/models/components/conversationinputs.md index 81c42834..677ff965 100644 --- a/docs/models/components/conversationinputs.md +++ b/docs/models/components/conversationinputs.md @@ -15,9 +15,10 @@ const value: string = ""; const value: components.InputEntries[] = [ { object: "entry", - type: "function.result", + type: "function.call", toolCallId: "", - result: "", + name: "", + arguments: "", }, ]; ``` diff --git a/docs/models/components/conversationmessages.md b/docs/models/components/conversationmessages.md index ebfecbe1..61ead43c 100644 --- a/docs/models/components/conversationmessages.md +++ b/docs/models/components/conversationmessages.md @@ -14,13 +14,7 @@ let value: ConversationMessages = { object: "entry", type: "message.output", role: "assistant", - content: [ - { - type: "tool_file", - tool: "code_interpreter", - fileId: "", - }, - ], + content: "", }, ], }; diff --git a/docs/models/components/conversationrestartrequest.md b/docs/models/components/conversationrestartrequest.md index 7caca1ca..0b341734 100644 --- a/docs/models/components/conversationrestartrequest.md +++ b/docs/models/components/conversationrestartrequest.md @@ -21,5 +21,5 @@ let value: ConversationRestartRequest = { | `stream` | *boolean* | :heavy_minus_sign: | N/A | | `store` | *boolean* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoffExecution` | [components.ConversationRestartRequestHandoffExecution](../../models/components/conversationrestartrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | -| `fromEntryId` | *string* | :heavy_check_mark: | N/A | -| `completionArgs` | [components.CompletionArgs](../../models/components/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | \ No newline at end of file +| `completionArgs` | [components.CompletionArgs](../../models/components/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | +| `fromEntryId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/conversationrestartrequesthandoffexecution.md b/docs/models/components/conversationrestartrequesthandoffexecution.md index 91998434..4a414676 100644 --- a/docs/models/components/conversationrestartrequesthandoffexecution.md +++ b/docs/models/components/conversationrestartrequesthandoffexecution.md @@ -5,7 +5,7 @@ ```typescript import { ConversationRestartRequestHandoffExecution } from "@mistralai/mistralai/models/components"; -let value: ConversationRestartRequestHandoffExecution = "client"; +let value: ConversationRestartRequestHandoffExecution = "server"; ``` ## Values diff --git a/docs/models/components/conversationrestartstreamrequest.md b/docs/models/components/conversationrestartstreamrequest.md index e72af425..4d71255c 100644 --- a/docs/models/components/conversationrestartstreamrequest.md +++ b/docs/models/components/conversationrestartstreamrequest.md @@ -21,5 +21,5 @@ let value: ConversationRestartStreamRequest = { | `stream` | *boolean* | :heavy_minus_sign: | N/A | | `store` | *boolean* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoffExecution` | [components.ConversationRestartStreamRequestHandoffExecution](../../models/components/conversationrestartstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | -| `fromEntryId` | *string* | :heavy_check_mark: | N/A | -| `completionArgs` | [components.CompletionArgs](../../models/components/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | \ No newline at end of file +| `completionArgs` | [components.CompletionArgs](../../models/components/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | +| `fromEntryId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/conversationrestartstreamrequesthandoffexecution.md b/docs/models/components/conversationrestartstreamrequesthandoffexecution.md index 13dd15bc..f7f49145 100644 --- a/docs/models/components/conversationrestartstreamrequesthandoffexecution.md +++ b/docs/models/components/conversationrestartstreamrequesthandoffexecution.md @@ -5,7 +5,7 @@ ```typescript import { ConversationRestartStreamRequestHandoffExecution } from "@mistralai/mistralai/models/components"; -let value: ConversationRestartStreamRequestHandoffExecution = "server"; +let value: ConversationRestartStreamRequestHandoffExecution = "client"; ``` ## Values diff --git a/docs/models/components/conversationstreamrequesthandoffexecution.md b/docs/models/components/conversationstreamrequesthandoffexecution.md index 4830a48c..b115cc28 100644 --- a/docs/models/components/conversationstreamrequesthandoffexecution.md +++ b/docs/models/components/conversationstreamrequesthandoffexecution.md @@ -5,7 +5,7 @@ ```typescript import { ConversationStreamRequestHandoffExecution } from "@mistralai/mistralai/models/components"; -let value: ConversationStreamRequestHandoffExecution = "server"; +let value: ConversationStreamRequestHandoffExecution = "client"; ``` ## Values diff --git a/docs/models/components/document.md b/docs/models/components/document.md index dd3a468f..4c846665 100644 --- a/docs/models/components/document.md +++ b/docs/models/components/document.md @@ -5,11 +5,19 @@ Document to run OCR on ## Supported Types +### `components.FileChunk` + +```typescript +const value: components.FileChunk = { + fileId: "2825ab06-ad7f-4407-b4d3-4cb8b600810f", +}; +``` + ### `components.DocumentURLChunk` ```typescript const value: components.DocumentURLChunk = { - documentUrl: "https://apprehensive-saloon.biz", + documentUrl: "https://abandoned-tuxedo.biz/", }; ``` @@ -17,7 +25,9 @@ const value: components.DocumentURLChunk = { ```typescript const value: components.ImageURLChunk = { - imageUrl: "https://grave-bran.info/", + imageUrl: { + url: "https://charming-divine.org", + }, }; ``` diff --git a/docs/models/components/embeddingdtype.md b/docs/models/components/embeddingdtype.md index f82713a2..ce2214f4 100644 --- a/docs/models/components/embeddingdtype.md +++ b/docs/models/components/embeddingdtype.md @@ -5,7 +5,7 @@ ```typescript import { EmbeddingDtype } from "@mistralai/mistralai/models/components"; -let value: EmbeddingDtype = "ubinary"; +let value: EmbeddingDtype = "uint8"; ``` ## Values diff --git a/docs/models/components/embeddingresponse.md b/docs/models/components/embeddingresponse.md index d937e220..3fcefc68 100644 --- a/docs/models/components/embeddingresponse.md +++ b/docs/models/components/embeddingresponse.md @@ -18,11 +18,11 @@ let value: EmbeddingResponse = { { object: "embedding", embedding: [ - 0.1, - 0.2, - 0.3, + 0.4, + 0.5, + 0.6, ], - index: 0, + index: 1, }, ], }; diff --git a/docs/models/components/entries.md b/docs/models/components/entries.md index 9249bedf..d31152e2 100644 --- a/docs/models/components/entries.md +++ b/docs/models/components/entries.md @@ -8,7 +8,14 @@ ```typescript const value: components.MessageInputEntry = { role: "user", - content: "", + content: [ + { + imageUrl: { + url: "https://descriptive-unblinking.net/", + }, + type: "image_url", + }, + ], }; ``` @@ -35,7 +42,9 @@ const value: components.FunctionResultEntry = { const value: components.FunctionCallEntry = { toolCallId: "", name: "", - arguments: "", + arguments: { + "key": "", + }, }; ``` @@ -43,7 +52,7 @@ const value: components.FunctionCallEntry = { ```typescript const value: components.ToolExecutionEntry = { - name: "image_generation", + name: "web_search_premium", }; ``` diff --git a/docs/models/components/eventout.md b/docs/models/components/eventout.md index c3b79677..a7e83251 100644 --- a/docs/models/components/eventout.md +++ b/docs/models/components/eventout.md @@ -7,7 +7,7 @@ import { EventOut } from "@mistralai/mistralai/models/components"; let value: EventOut = { name: "", - createdAt: 351893, + createdAt: 147808, }; ``` diff --git a/docs/models/components/filechunk.md b/docs/models/components/filechunk.md new file mode 100644 index 00000000..b1217e77 --- /dev/null +++ b/docs/models/components/filechunk.md @@ -0,0 +1,18 @@ +# FileChunk + +## Example Usage + +```typescript +import { FileChunk } from "@mistralai/mistralai/models/components"; + +let value: FileChunk = { + fileId: "7e04b621-d7eb-4658-beb0-beb2725ee459", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `fileId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/filepurpose.md b/docs/models/components/filepurpose.md index 03d66718..6d4841cf 100644 --- a/docs/models/components/filepurpose.md +++ b/docs/models/components/filepurpose.md @@ -5,7 +5,7 @@ ```typescript import { FilePurpose } from "@mistralai/mistralai/models/components"; -let value: FilePurpose = "batch"; +let value: FilePurpose = "fine-tune"; ``` ## Values diff --git a/docs/models/components/fileschema.md b/docs/models/components/fileschema.md index 2d4fd403..3f22effb 100644 --- a/docs/models/components/fileschema.md +++ b/docs/models/components/fileschema.md @@ -12,7 +12,7 @@ let value: FileSchema = { createdAt: 1716963433, filename: "files_upload.jsonl", purpose: "ocr", - sampleType: "pretrain", + sampleType: "instruct", source: "repository", }; ``` diff --git a/docs/models/components/filesignedurl.md b/docs/models/components/filesignedurl.md index 01136cec..7864a406 100644 --- a/docs/models/components/filesignedurl.md +++ b/docs/models/components/filesignedurl.md @@ -6,7 +6,7 @@ import { FileSignedURL } from "@mistralai/mistralai/models/components"; let value: FileSignedURL = { - url: "https://dental-chasuble.info", + url: "https://grimy-verve.biz", }; ``` diff --git a/docs/models/components/ftmodelcard.md b/docs/models/components/ftmodelcard.md index ef423595..b8ebaed3 100644 --- a/docs/models/components/ftmodelcard.md +++ b/docs/models/components/ftmodelcard.md @@ -29,8 +29,9 @@ let value: FTModelCard = { | `maxContextLength` | *number* | :heavy_minus_sign: | N/A | | `aliases` | *string*[] | :heavy_minus_sign: | N/A | | `deprecation` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `deprecationReplacementModel` | *string* | :heavy_minus_sign: | N/A | | `defaultModelTemperature` | *number* | :heavy_minus_sign: | N/A | -| `type` | [components.FTModelCardType](../../models/components/ftmodelcardtype.md) | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | | `job` | *string* | :heavy_check_mark: | N/A | | `root` | *string* | :heavy_check_mark: | N/A | | `archived` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/ftmodelcardtype.md b/docs/models/components/ftmodelcardtype.md deleted file mode 100644 index 22c80431..00000000 --- a/docs/models/components/ftmodelcardtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# FTModelCardType - -## Example Usage - -```typescript -import { FTModelCardType } from "@mistralai/mistralai/models/components"; - -let value: FTModelCardType = "fine-tuned"; -``` - -## Values - -```typescript -"fine-tuned" -``` \ No newline at end of file diff --git a/docs/models/components/inputentries.md b/docs/models/components/inputentries.md index 6b724afe..367aeb2b 100644 --- a/docs/models/components/inputentries.md +++ b/docs/models/components/inputentries.md @@ -7,8 +7,28 @@ ```typescript const value: components.MessageInputEntry = { - role: "user", - content: "", + role: "assistant", + content: [ + { + imageUrl: { + url: "https://strict-pressure.com", + }, + type: "image_url", + }, + ], +}; +``` + +### `components.MessageOutputEntry` + +```typescript +const value: components.MessageOutputEntry = { + content: [ + { + documentUrl: "https://creative-summary.com", + type: "document_url", + }, + ], }; ``` @@ -21,3 +41,32 @@ const value: components.FunctionResultEntry = { }; ``` +### `components.FunctionCallEntry` + +```typescript +const value: components.FunctionCallEntry = { + toolCallId: "", + name: "", + arguments: "", +}; +``` + +### `components.ToolExecutionEntry` + +```typescript +const value: components.ToolExecutionEntry = { + name: "web_search", +}; +``` + +### `components.AgentHandoffEntry` + +```typescript +const value: components.AgentHandoffEntry = { + previousAgentId: "", + previousAgentName: "", + nextAgentId: "", + nextAgentName: "", +}; +``` + diff --git a/docs/models/components/inputs.md b/docs/models/components/inputs.md index 6a05d30c..59b462d1 100644 --- a/docs/models/components/inputs.md +++ b/docs/models/components/inputs.md @@ -11,12 +11,7 @@ Chat to classify const value: components.InstructRequestInputs = { messages: [ { - content: [ - { - text: "", - type: "text", - }, - ], + content: "", role: "system", }, ], @@ -32,11 +27,11 @@ const value: components.InstructRequest[] = [ { content: [ { - documentUrl: "https://shocked-characterization.org", - type: "document_url", + imageUrl: "https://enchanting-planula.name", + type: "image_url", }, ], - role: "user", + role: "tool", }, ], }, diff --git a/docs/models/components/instructrequest.md b/docs/models/components/instructrequest.md index d0769330..ea1a63f0 100644 --- a/docs/models/components/instructrequest.md +++ b/docs/models/components/instructrequest.md @@ -8,12 +8,7 @@ import { InstructRequest } from "@mistralai/mistralai/models/components"; let value: InstructRequest = { messages: [ { - content: [ - { - documentUrl: "https://powerless-guide.info", - type: "document_url", - }, - ], + content: "", role: "tool", }, ], diff --git a/docs/models/components/instructrequestinputs.md b/docs/models/components/instructrequestinputs.md index 3d3c4763..12211a5d 100644 --- a/docs/models/components/instructrequestinputs.md +++ b/docs/models/components/instructrequestinputs.md @@ -8,13 +8,8 @@ import { InstructRequestInputs } from "@mistralai/mistralai/models/components"; let value: InstructRequestInputs = { messages: [ { - content: [ - { - text: "", - type: "text", - }, - ], - role: "user", + prefix: false, + role: "assistant", }, ], }; diff --git a/docs/models/components/instructrequestinputsmessages.md b/docs/models/components/instructrequestinputsmessages.md index 7beb523c..a31d9425 100644 --- a/docs/models/components/instructrequestinputsmessages.md +++ b/docs/models/components/instructrequestinputsmessages.md @@ -13,12 +13,7 @@ const value: components.AssistantMessage = {}; ```typescript const value: components.SystemMessage = { - content: [ - { - text: "", - type: "text", - }, - ], + content: "", }; ``` @@ -26,14 +21,7 @@ const value: components.SystemMessage = { ```typescript const value: components.ToolMessage = { - content: [ - { - imageUrl: { - url: "https://mad-tectonics.biz", - }, - type: "image_url", - }, - ], + content: "", }; ``` @@ -43,8 +31,7 @@ const value: components.ToolMessage = { const value: components.UserMessage = { content: [ { - documentUrl: "https://juvenile-hovel.info/", - type: "document_url", + fileId: "e3917557-b1eb-42f8-bf38-449ecb8e7dd3", }, ], }; diff --git a/docs/models/components/instructrequestmessages.md b/docs/models/components/instructrequestmessages.md index 1c5c9e00..8c595a64 100644 --- a/docs/models/components/instructrequestmessages.md +++ b/docs/models/components/instructrequestmessages.md @@ -29,7 +29,12 @@ const value: components.ToolMessage = { ```typescript const value: components.UserMessage = { - content: "", + content: [ + { + imageUrl: "https://amused-declaration.org", + type: "image_url", + }, + ], }; ``` diff --git a/docs/models/components/jobin.md b/docs/models/components/jobin.md index decb3b24..9b206630 100644 --- a/docs/models/components/jobin.md +++ b/docs/models/components/jobin.md @@ -6,7 +6,7 @@ import { JobIn } from "@mistralai/mistralai/models/components"; let value: JobIn = { - model: "Countach", + model: "Jetta", hyperparameters: { learningRate: 0.0001, }, diff --git a/docs/models/components/jobsout.md b/docs/models/components/jobsout.md index 8c207b2f..fa01a17e 100644 --- a/docs/models/components/jobsout.md +++ b/docs/models/components/jobsout.md @@ -6,7 +6,7 @@ import { JobsOut } from "@mistralai/mistralai/models/components"; let value: JobsOut = { - total: 951875, + total: 232744, }; ``` diff --git a/docs/models/components/jobsoutdata.md b/docs/models/components/jobsoutdata.md index 29bbc682..397d5565 100644 --- a/docs/models/components/jobsoutdata.md +++ b/docs/models/components/jobsoutdata.md @@ -7,14 +7,14 @@ ```typescript const value: components.ClassifierJobOut = { - id: "5fcbe189-f431-40ea-9c49-17fe5f3ffcad", + id: "ffcad4d9-052f-477a-852d-3831dffec516", autoStart: false, - model: "Roadster", - status: "FAILED", - createdAt: 13236, - modifiedAt: 347233, + model: "Alpine", + status: "QUEUED", + createdAt: 725595, + modifiedAt: 11427, trainingFiles: [ - "2f77a52d-3831-4dff-8ec5-16320b0c211a", + "c211a368-db42-4044-97ab-462c0bcc4594", ], hyperparameters: {}, }; @@ -24,14 +24,14 @@ const value: components.ClassifierJobOut = { ```typescript const value: components.CompletionJobOut = { - id: "68db4204-47ab-4462-ac0b-cc45945370c1", + id: "370c1849-fa06-488a-9426-f2e87e7b6ebb", autoStart: false, - model: "Colorado", - status: "FAILED_VALIDATION", - createdAt: 959434, - modifiedAt: 645570, + model: "Model Y", + status: "FAILED", + createdAt: 240020, + modifiedAt: 160538, trainingFiles: [ - "0688a426-f2e8-47e7-9b6e-bb5ca32cf79d", + "cf79d7f9-ded2-4a61-964d-0f55026e1fd7", ], hyperparameters: {}, }; diff --git a/docs/models/components/listfilesout.md b/docs/models/components/listfilesout.md index 30faa50b..e8aa4407 100644 --- a/docs/models/components/listfilesout.md +++ b/docs/models/components/listfilesout.md @@ -13,13 +13,13 @@ let value: ListFilesOut = { sizeBytes: 13000, createdAt: 1716963433, filename: "files_upload.jsonl", - purpose: "batch", - sampleType: "batch_request", - source: "upload", + purpose: "fine-tune", + sampleType: "pretrain", + source: "mistral", }, ], object: "", - total: 586784, + total: 669917, }; ``` diff --git a/docs/models/components/messageentries.md b/docs/models/components/messageentries.md index fd7c9a08..3c0c9aa2 100644 --- a/docs/models/components/messageentries.md +++ b/docs/models/components/messageentries.md @@ -7,7 +7,7 @@ ```typescript const value: components.MessageInputEntry = { - role: "user", + role: "assistant", content: "", }; ``` diff --git a/docs/models/components/messageinputcontentchunks.md b/docs/models/components/messageinputcontentchunks.md index f3a2aa25..9bc33df7 100644 --- a/docs/models/components/messageinputcontentchunks.md +++ b/docs/models/components/messageinputcontentchunks.md @@ -15,9 +15,7 @@ const value: components.TextChunk = { ```typescript const value: components.ImageURLChunk = { - imageUrl: { - url: "https://strident-metal.info", - }, + imageUrl: "https://misguided-avalanche.biz/", }; ``` @@ -34,7 +32,7 @@ const value: components.ToolFileChunk = { ```typescript const value: components.DocumentURLChunk = { - documentUrl: "https://kosher-puppet.org", + documentUrl: "https://elliptical-fog.org", }; ``` diff --git a/docs/models/components/messageinputentry.md b/docs/models/components/messageinputentry.md index 192fd65f..2881a559 100644 --- a/docs/models/components/messageinputentry.md +++ b/docs/models/components/messageinputentry.md @@ -8,10 +8,10 @@ Representation of an input message inside the conversation. import { MessageInputEntry } from "@mistralai/mistralai/models/components"; let value: MessageInputEntry = { - role: "user", + role: "assistant", content: [ { - documentUrl: "https://trivial-coil.name/", + documentUrl: "https://tight-address.info", type: "document_url", }, ], @@ -23,7 +23,7 @@ let value: MessageInputEntry = { | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | | `object` | [components.ObjectT](../../models/components/objectt.md) | :heavy_minus_sign: | N/A | -| `type` | [components.MessageInputEntryType](../../models/components/messageinputentrytype.md) | :heavy_minus_sign: | N/A | +| `type` | [components.Type](../../models/components/type.md) | :heavy_minus_sign: | N/A | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `completedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `id` | *string* | :heavy_minus_sign: | N/A | diff --git a/docs/models/components/messageinputentrycontent.md b/docs/models/components/messageinputentrycontent.md index a3d6515f..d5f89b9b 100644 --- a/docs/models/components/messageinputentrycontent.md +++ b/docs/models/components/messageinputentrycontent.md @@ -14,10 +14,8 @@ const value: string = ""; ```typescript const value: components.MessageInputContentChunks[] = [ { - imageUrl: { - url: "https://strict-pressure.com", - }, - type: "image_url", + documentUrl: "https://impure-battle.net", + type: "document_url", }, ]; ``` diff --git a/docs/models/components/messageinputentrytype.md b/docs/models/components/messageinputentrytype.md deleted file mode 100644 index 1d42fddd..00000000 --- a/docs/models/components/messageinputentrytype.md +++ /dev/null @@ -1,15 +0,0 @@ -# MessageInputEntryType - -## Example Usage - -```typescript -import { MessageInputEntryType } from "@mistralai/mistralai/models/components"; - -let value: MessageInputEntryType = "message.input"; -``` - -## Values - -```typescript -"message.input" -``` \ No newline at end of file diff --git a/docs/models/components/messageoutputevent.md b/docs/models/components/messageoutputevent.md index 7cefa724..604bd124 100644 --- a/docs/models/components/messageoutputevent.md +++ b/docs/models/components/messageoutputevent.md @@ -7,7 +7,10 @@ import { MessageOutputEvent } from "@mistralai/mistralai/models/components"; let value: MessageOutputEvent = { id: "", - content: "", + content: { + documentUrl: "https://wee-ravioli.biz/", + type: "document_url", + }, }; ``` diff --git a/docs/models/components/messageoutputeventcontent.md b/docs/models/components/messageoutputeventcontent.md index 98cb91da..3b07b88a 100644 --- a/docs/models/components/messageoutputeventcontent.md +++ b/docs/models/components/messageoutputeventcontent.md @@ -13,8 +13,8 @@ const value: string = ""; ```typescript const value: components.OutputContentChunks = { - text: "", - type: "text", + documentUrl: "https://firsthand-section.biz", + type: "document_url", }; ``` diff --git a/docs/models/components/messages.md b/docs/models/components/messages.md index 8ceb20fd..a235b784 100644 --- a/docs/models/components/messages.md +++ b/docs/models/components/messages.md @@ -31,10 +31,8 @@ const value: components.ToolMessage = { const value: components.UserMessage = { content: [ { - referenceIds: [ - 102413, - ], - type: "reference", + text: "", + type: "text", }, ], }; diff --git a/docs/models/components/modelcapabilities.md b/docs/models/components/modelcapabilities.md index 8e5b2dac..e5c82518 100644 --- a/docs/models/components/modelcapabilities.md +++ b/docs/models/components/modelcapabilities.md @@ -16,4 +16,5 @@ let value: ModelCapabilities = {}; | `completionFim` | *boolean* | :heavy_minus_sign: | N/A | | `functionCalling` | *boolean* | :heavy_minus_sign: | N/A | | `fineTuning` | *boolean* | :heavy_minus_sign: | N/A | -| `vision` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `vision` | *boolean* | :heavy_minus_sign: | N/A | +| `classification` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/modelconversation.md b/docs/models/components/modelconversation.md index 2a3294b3..a4367e2b 100644 --- a/docs/models/components/modelconversation.md +++ b/docs/models/components/modelconversation.md @@ -7,9 +7,9 @@ import { ModelConversation } from "@mistralai/mistralai/models/components"; let value: ModelConversation = { id: "", - createdAt: new Date("2025-12-05T04:07:03.604Z"), - updatedAt: new Date("2025-07-26T23:03:04.026Z"), - model: "1", + createdAt: new Date("2025-02-11T00:54:59.142Z"), + updatedAt: new Date("2023-02-04T21:29:28.328Z"), + model: "Aventador", }; ``` diff --git a/docs/models/components/moderationresponse.md b/docs/models/components/moderationresponse.md index fe23d090..77904f38 100644 --- a/docs/models/components/moderationresponse.md +++ b/docs/models/components/moderationresponse.md @@ -7,7 +7,7 @@ import { ModerationResponse } from "@mistralai/mistralai/models/components"; let value: ModerationResponse = { id: "mod-e5cc70bb28c444948073e77776eb30ef", - model: "Aventador", + model: "Taurus", results: [ {}, ], diff --git a/docs/models/components/ocrimageobject.md b/docs/models/components/ocrimageobject.md index aa508391..ea29f3ec 100644 --- a/docs/models/components/ocrimageobject.md +++ b/docs/models/components/ocrimageobject.md @@ -7,10 +7,10 @@ import { OCRImageObject } from "@mistralai/mistralai/models/components"; let value: OCRImageObject = { id: "", - topLeftX: 484966, - topLeftY: 901163, - bottomRightX: 554645, - bottomRightY: 826862, + topLeftX: 719389, + topLeftY: 349993, + bottomRightX: 254382, + bottomRightY: 265303, }; ``` diff --git a/docs/models/components/ocrpagedimensions.md b/docs/models/components/ocrpagedimensions.md index 480122c9..92629004 100644 --- a/docs/models/components/ocrpagedimensions.md +++ b/docs/models/components/ocrpagedimensions.md @@ -6,9 +6,9 @@ import { OCRPageDimensions } from "@mistralai/mistralai/models/components"; let value: OCRPageDimensions = { - dpi: 314573, - height: 657319, - width: 517326, + dpi: 68093, + height: 943851, + width: 964925, }; ``` diff --git a/docs/models/components/ocrpageobject.md b/docs/models/components/ocrpageobject.md index 5d9cd2b5..b5150b61 100644 --- a/docs/models/components/ocrpageobject.md +++ b/docs/models/components/ocrpageobject.md @@ -6,21 +6,21 @@ import { OCRPageObject } from "@mistralai/mistralai/models/components"; let value: OCRPageObject = { - index: 56877, + index: 948541, markdown: "", images: [ { id: "", - topLeftX: 980486, - topLeftY: 96450, - bottomRightX: 863471, - bottomRightY: 566506, + topLeftX: 778276, + topLeftY: 848346, + bottomRightX: 490420, + bottomRightY: 185348, }, ], dimensions: { - dpi: 367917, - height: 342342, - width: 757364, + dpi: 995816, + height: 129355, + width: 471457, }, }; ``` diff --git a/docs/models/components/ocrrequest.md b/docs/models/components/ocrrequest.md index 908ac2de..648f6b43 100644 --- a/docs/models/components/ocrrequest.md +++ b/docs/models/components/ocrrequest.md @@ -6,9 +6,9 @@ import { OCRRequest } from "@mistralai/mistralai/models/components"; let value: OCRRequest = { - model: "Ranchero", + model: "LeBaron", document: { - documentUrl: "https://gracious-silk.com/", + documentUrl: "https://sorrowful-character.org/", type: "document_url", }, }; diff --git a/docs/models/components/ocrresponse.md b/docs/models/components/ocrresponse.md index 43c63e57..02b94507 100644 --- a/docs/models/components/ocrresponse.md +++ b/docs/models/components/ocrresponse.md @@ -8,27 +8,27 @@ import { OCRResponse } from "@mistralai/mistralai/models/components"; let value: OCRResponse = { pages: [ { - index: 810839, + index: 287544, markdown: "", images: [ { id: "", - topLeftX: 348192, - topLeftY: 211455, - bottomRightX: 59383, - bottomRightY: 876027, + topLeftX: 456704, + topLeftY: 20950, + bottomRightX: 411615, + bottomRightY: 489459, }, ], dimensions: { - dpi: 918547, - height: 120120, - width: 334474, + dpi: 243678, + height: 588639, + width: 753240, }, }, ], - model: "Beetle", + model: "Camry", usageInfo: { - pagesProcessed: 115898, + pagesProcessed: 620500, }, }; ``` diff --git a/docs/models/components/ocrusageinfo.md b/docs/models/components/ocrusageinfo.md index 1d584bf0..92ea048a 100644 --- a/docs/models/components/ocrusageinfo.md +++ b/docs/models/components/ocrusageinfo.md @@ -6,7 +6,7 @@ import { OCRUsageInfo } from "@mistralai/mistralai/models/components"; let value: OCRUsageInfo = { - pagesProcessed: 899867, + pagesProcessed: 639622, }; ``` diff --git a/docs/models/components/one.md b/docs/models/components/one.md index ca8be7dd..d4b41cc0 100644 --- a/docs/models/components/one.md +++ b/docs/models/components/one.md @@ -13,12 +13,7 @@ const value: components.AssistantMessage = {}; ```typescript const value: components.SystemMessage = { - content: [ - { - text: "", - type: "text", - }, - ], + content: "", }; ``` @@ -26,7 +21,12 @@ const value: components.SystemMessage = { ```typescript const value: components.ToolMessage = { - content: "", + content: [ + { + documentUrl: "https://gracious-silk.com/", + type: "document_url", + }, + ], }; ``` @@ -34,12 +34,7 @@ const value: components.ToolMessage = { ```typescript const value: components.UserMessage = { - content: [ - { - text: "", - type: "text", - }, - ], + content: "", }; ``` diff --git a/docs/models/components/outputcontentchunks.md b/docs/models/components/outputcontentchunks.md index bb5fc0e1..a690b637 100644 --- a/docs/models/components/outputcontentchunks.md +++ b/docs/models/components/outputcontentchunks.md @@ -15,7 +15,9 @@ const value: components.TextChunk = { ```typescript const value: components.ImageURLChunk = { - imageUrl: "https://muted-technician.org/", + imageUrl: { + url: "https://all-crocodile.info", + }, }; ``` @@ -32,7 +34,7 @@ const value: components.ToolFileChunk = { ```typescript const value: components.DocumentURLChunk = { - documentUrl: "https://fatherly-agreement.net", + documentUrl: "https://flawless-morbidity.org/", }; ``` @@ -40,7 +42,7 @@ const value: components.DocumentURLChunk = { ```typescript const value: components.ToolReferenceChunk = { - tool: "web_search_premium", + tool: "web_search", title: "", }; ``` diff --git a/docs/models/components/referencechunk.md b/docs/models/components/referencechunk.md index cf49f680..f8ab8fd1 100644 --- a/docs/models/components/referencechunk.md +++ b/docs/models/components/referencechunk.md @@ -7,7 +7,7 @@ import { ReferenceChunk } from "@mistralai/mistralai/models/components"; let value: ReferenceChunk = { referenceIds: [ - 844235, + 811939, ], }; ``` diff --git a/docs/models/components/responseerrorevent.md b/docs/models/components/responseerrorevent.md index a3ebdf4a..66dfb3ce 100644 --- a/docs/models/components/responseerrorevent.md +++ b/docs/models/components/responseerrorevent.md @@ -7,7 +7,7 @@ import { ResponseErrorEvent } from "@mistralai/mistralai/models/components"; let value: ResponseErrorEvent = { message: "", - code: 696344, + code: 383464, }; ``` diff --git a/docs/models/components/retrievefileout.md b/docs/models/components/retrievefileout.md index dda84d6b..d25dc60a 100644 --- a/docs/models/components/retrievefileout.md +++ b/docs/models/components/retrievefileout.md @@ -12,8 +12,8 @@ let value: RetrieveFileOut = { createdAt: 1716963433, filename: "files_upload.jsonl", purpose: "fine-tune", - sampleType: "batch_result", - source: "repository", + sampleType: "batch_request", + source: "mistral", deleted: false, }; ``` diff --git a/docs/models/components/source.md b/docs/models/components/source.md index 7bfd66c4..588f51d8 100644 --- a/docs/models/components/source.md +++ b/docs/models/components/source.md @@ -5,7 +5,7 @@ ```typescript import { Source } from "@mistralai/mistralai/models/components"; -let value: Source = "upload"; +let value: Source = "mistral"; ``` ## Values diff --git a/docs/models/components/ssetypes.md b/docs/models/components/ssetypes.md index c7f8a4c2..1bcb7922 100644 --- a/docs/models/components/ssetypes.md +++ b/docs/models/components/ssetypes.md @@ -7,7 +7,7 @@ Server side events sent when streaming a conversation response. ```typescript import { SSETypes } from "@mistralai/mistralai/models/components"; -let value: SSETypes = "message.output.delta"; +let value: SSETypes = "tool.execution.started"; ``` ## Values diff --git a/docs/models/components/status.md b/docs/models/components/status.md index 53854d6b..d4aa1bb1 100644 --- a/docs/models/components/status.md +++ b/docs/models/components/status.md @@ -7,7 +7,7 @@ The current status of the fine-tuning job. ```typescript import { Status } from "@mistralai/mistralai/models/components"; -let value: Status = "FAILED_VALIDATION"; +let value: Status = "FAILED"; ``` ## Values diff --git a/docs/models/components/toolexecutiondoneevent.md b/docs/models/components/toolexecutiondoneevent.md index d6eb9b0f..3f214a41 100644 --- a/docs/models/components/toolexecutiondoneevent.md +++ b/docs/models/components/toolexecutiondoneevent.md @@ -7,7 +7,7 @@ import { ToolExecutionDoneEvent } from "@mistralai/mistralai/models/components"; let value: ToolExecutionDoneEvent = { id: "", - name: "web_search", + name: "document_library", }; ``` diff --git a/docs/models/components/toolexecutionstartedevent.md b/docs/models/components/toolexecutionstartedevent.md index 654d404f..70146ed3 100644 --- a/docs/models/components/toolexecutionstartedevent.md +++ b/docs/models/components/toolexecutionstartedevent.md @@ -7,7 +7,7 @@ import { ToolExecutionStartedEvent } from "@mistralai/mistralai/models/component let value: ToolExecutionStartedEvent = { id: "", - name: "web_search_premium", + name: "code_interpreter", }; ``` diff --git a/docs/models/components/toolmessage.md b/docs/models/components/toolmessage.md index eb25ed46..05d09e59 100644 --- a/docs/models/components/toolmessage.md +++ b/docs/models/components/toolmessage.md @@ -6,7 +6,14 @@ import { ToolMessage } from "@mistralai/mistralai/models/components"; let value: ToolMessage = { - content: "", + content: [ + { + referenceIds: [ + 289913, + ], + type: "reference", + }, + ], }; ``` diff --git a/docs/models/components/toolmessagecontent.md b/docs/models/components/toolmessagecontent.md index e1bb4b95..5e09896b 100644 --- a/docs/models/components/toolmessagecontent.md +++ b/docs/models/components/toolmessagecontent.md @@ -14,10 +14,8 @@ const value: string = ""; ```typescript const value: components.ContentChunk[] = [ { - referenceIds: [ - 932562, - ], - type: "reference", + documentUrl: "https://irresponsible-formation.org/", + type: "document_url", }, ]; ``` diff --git a/docs/models/components/trainingfile.md b/docs/models/components/trainingfile.md index 33d63f67..55ae70a5 100644 --- a/docs/models/components/trainingfile.md +++ b/docs/models/components/trainingfile.md @@ -6,7 +6,7 @@ import { TrainingFile } from "@mistralai/mistralai/models/components"; let value: TrainingFile = { - fileId: "840b058e-1605-4943-b19b-af0a99f0bd85", + fileId: "0bd85c17-8b13-469e-992f-d8e8edfe026f", }; ``` diff --git a/docs/models/components/two.md b/docs/models/components/two.md index 1e4a3bb5..3d77ebbe 100644 --- a/docs/models/components/two.md +++ b/docs/models/components/two.md @@ -26,14 +26,7 @@ const value: components.SystemMessage = { ```typescript const value: components.ToolMessage = { - content: [ - { - referenceIds: [ - 479385, - ], - type: "reference", - }, - ], + content: "", }; ``` @@ -43,10 +36,8 @@ const value: components.ToolMessage = { const value: components.UserMessage = { content: [ { - imageUrl: { - url: "https://infinite-community.com", - }, - type: "image_url", + documentUrl: "https://artistic-finger.com", + type: "document_url", }, ], }; diff --git a/docs/models/components/type.md b/docs/models/components/type.md index a7f71b89..b5c82bd0 100644 --- a/docs/models/components/type.md +++ b/docs/models/components/type.md @@ -5,11 +5,11 @@ ```typescript import { Type } from "@mistralai/mistralai/models/components"; -let value: Type = "base"; +let value: Type = "message.input"; ``` ## Values ```typescript -"base" +"message.input" ``` \ No newline at end of file diff --git a/docs/models/components/uploadfileout.md b/docs/models/components/uploadfileout.md index 9cf65cea..183697bb 100644 --- a/docs/models/components/uploadfileout.md +++ b/docs/models/components/uploadfileout.md @@ -12,7 +12,7 @@ let value: UploadFileOut = { createdAt: 1716963433, filename: "files_upload.jsonl", purpose: "fine-tune", - sampleType: "instruct", + sampleType: "batch_request", source: "repository", }; ``` diff --git a/docs/models/components/usermessagecontent.md b/docs/models/components/usermessagecontent.md index 324147c1..5066622e 100644 --- a/docs/models/components/usermessagecontent.md +++ b/docs/models/components/usermessagecontent.md @@ -14,10 +14,8 @@ const value: string = ""; ```typescript const value: components.ContentChunk[] = [ { - imageUrl: { - url: "https://oddball-devil.name/", - }, - type: "image_url", + text: "", + type: "text", }, ]; ``` diff --git a/docs/models/operations/agentsapiv1agentsupdateversionrequest.md b/docs/models/operations/agentsapiv1agentsupdateversionrequest.md index 5fcefbc3..7c98d52d 100644 --- a/docs/models/operations/agentsapiv1agentsupdateversionrequest.md +++ b/docs/models/operations/agentsapiv1agentsupdateversionrequest.md @@ -7,7 +7,7 @@ import { AgentsApiV1AgentsUpdateVersionRequest } from "@mistralai/mistralai/mode let value: AgentsApiV1AgentsUpdateVersionRequest = { agentId: "", - version: 5, + version: 10, }; ``` diff --git a/docs/models/operations/agentsapiv1conversationsappendrequest.md b/docs/models/operations/agentsapiv1conversationsappendrequest.md index 0c0a4dce..860fefb3 100644 --- a/docs/models/operations/agentsapiv1conversationsappendrequest.md +++ b/docs/models/operations/agentsapiv1conversationsappendrequest.md @@ -8,7 +8,19 @@ import { AgentsApiV1ConversationsAppendRequest } from "@mistralai/mistralai/mode let value: AgentsApiV1ConversationsAppendRequest = { conversationId: "", conversationAppendRequest: { - inputs: "", + inputs: [ + { + object: "entry", + type: "message.input", + role: "assistant", + content: [ + { + imageUrl: "https://frilly-gown.info", + type: "image_url", + }, + ], + }, + ], }, }; ``` diff --git a/docs/models/operations/agentsapiv1conversationsgetrequest.md b/docs/models/operations/agentsapiv1conversationsgetrequest.md index 3650afc7..c2db2d99 100644 --- a/docs/models/operations/agentsapiv1conversationsgetrequest.md +++ b/docs/models/operations/agentsapiv1conversationsgetrequest.md @@ -12,6 +12,6 @@ let value: AgentsApiV1ConversationsGetRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `conversationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `conversationId` | *string* | :heavy_check_mark: | ID of the conversation from which we are fetching metadata. | \ No newline at end of file diff --git a/docs/models/operations/agentsapiv1conversationsgetresponsev1conversationsget.md b/docs/models/operations/agentsapiv1conversationsgetresponsev1conversationsget.md index 60cec426..e0477fb4 100644 --- a/docs/models/operations/agentsapiv1conversationsgetresponsev1conversationsget.md +++ b/docs/models/operations/agentsapiv1conversationsgetresponsev1conversationsget.md @@ -10,9 +10,9 @@ Successful Response ```typescript const value: components.ModelConversation = { id: "", - createdAt: new Date("2024-03-27T03:08:04.092Z"), - updatedAt: new Date("2024-06-20T10:43:11.807Z"), - model: "Camry", + createdAt: new Date("2023-04-24T23:22:30.007Z"), + updatedAt: new Date("2024-11-25T20:15:12.243Z"), + model: "Model Y", }; ``` @@ -21,8 +21,8 @@ const value: components.ModelConversation = { ```typescript const value: components.AgentConversation = { id: "", - createdAt: new Date("2024-10-07T03:33:36.949Z"), - updatedAt: new Date("2025-04-05T13:13:41.181Z"), + createdAt: new Date("2023-06-20T22:50:36.308Z"), + updatedAt: new Date("2024-04-11T21:34:00.499Z"), agentId: "", }; ``` diff --git a/docs/models/operations/agentsapiv1conversationshistoryrequest.md b/docs/models/operations/agentsapiv1conversationshistoryrequest.md index b5d4d415..227cce2f 100644 --- a/docs/models/operations/agentsapiv1conversationshistoryrequest.md +++ b/docs/models/operations/agentsapiv1conversationshistoryrequest.md @@ -12,6 +12,6 @@ let value: AgentsApiV1ConversationsHistoryRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `conversationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `conversationId` | *string* | :heavy_check_mark: | ID of the conversation from which we are fetching entries. | \ No newline at end of file diff --git a/docs/models/operations/agentsapiv1conversationsmessagesrequest.md b/docs/models/operations/agentsapiv1conversationsmessagesrequest.md index 786e46dd..130c998d 100644 --- a/docs/models/operations/agentsapiv1conversationsmessagesrequest.md +++ b/docs/models/operations/agentsapiv1conversationsmessagesrequest.md @@ -12,6 +12,6 @@ let value: AgentsApiV1ConversationsMessagesRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `conversationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `conversationId` | *string* | :heavy_check_mark: | ID of the conversation from which we are fetching messages. | \ No newline at end of file diff --git a/docs/models/operations/agentsapiv1conversationsrestartrequest.md b/docs/models/operations/agentsapiv1conversationsrestartrequest.md index 324cf5b2..da6988a5 100644 --- a/docs/models/operations/agentsapiv1conversationsrestartrequest.md +++ b/docs/models/operations/agentsapiv1conversationsrestartrequest.md @@ -11,9 +11,11 @@ let value: AgentsApiV1ConversationsRestartRequest = { inputs: [ { object: "entry", - type: "function.result", - toolCallId: "", - result: "", + type: "agent.handoff", + previousAgentId: "", + previousAgentName: "", + nextAgentId: "", + nextAgentName: "", }, ], fromEntryId: "", @@ -25,5 +27,5 @@ let value: AgentsApiV1ConversationsRestartRequest = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `conversationId` | *string* | :heavy_check_mark: | N/A | +| `conversationId` | *string* | :heavy_check_mark: | ID of the original conversation which is being restarted. | | `conversationRestartRequest` | [components.ConversationRestartRequest](../../models/components/conversationrestartrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/agentsapiv1conversationsrestartstreamrequest.md b/docs/models/operations/agentsapiv1conversationsrestartstreamrequest.md index cc99a353..3efdb9b4 100644 --- a/docs/models/operations/agentsapiv1conversationsrestartstreamrequest.md +++ b/docs/models/operations/agentsapiv1conversationsrestartstreamrequest.md @@ -8,19 +8,7 @@ import { AgentsApiV1ConversationsRestartStreamRequest } from "@mistralai/mistral let value: AgentsApiV1ConversationsRestartStreamRequest = { conversationId: "", conversationRestartStreamRequest: { - inputs: [ - { - object: "entry", - type: "message.input", - role: "assistant", - content: [ - { - text: "", - type: "text", - }, - ], - }, - ], + inputs: "", fromEntryId: "", }, }; @@ -30,5 +18,5 @@ let value: AgentsApiV1ConversationsRestartStreamRequest = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `conversationId` | *string* | :heavy_check_mark: | N/A | +| `conversationId` | *string* | :heavy_check_mark: | ID of the original conversation which is being restarted. | | `conversationRestartStreamRequest` | [components.ConversationRestartStreamRequest](../../models/components/conversationrestartstreamrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/filesapiroutesdeletefilerequest.md b/docs/models/operations/filesapiroutesdeletefilerequest.md index 001a8dc5..4fd0b99e 100644 --- a/docs/models/operations/filesapiroutesdeletefilerequest.md +++ b/docs/models/operations/filesapiroutesdeletefilerequest.md @@ -6,7 +6,7 @@ import { FilesApiRoutesDeleteFileRequest } from "@mistralai/mistralai/models/operations"; let value: FilesApiRoutesDeleteFileRequest = { - fileId: "00810fd2-0f42-4b14-bfa8-6c2fd90be851", + fileId: "0dc0a822-c9ff-4f1f-937c-39211506a611", }; ``` diff --git a/docs/models/operations/filesapiroutesdownloadfilerequest.md b/docs/models/operations/filesapiroutesdownloadfilerequest.md index ad78525d..f89c4911 100644 --- a/docs/models/operations/filesapiroutesdownloadfilerequest.md +++ b/docs/models/operations/filesapiroutesdownloadfilerequest.md @@ -6,7 +6,7 @@ import { FilesApiRoutesDownloadFileRequest } from "@mistralai/mistralai/models/operations"; let value: FilesApiRoutesDownloadFileRequest = { - fileId: "e1c0f984-e4df-4c81-8773-6527480ed8df", + fileId: "2f2c998f-5c86-4f91-86cb-e4c79ffd5ea6", }; ``` diff --git a/docs/models/operations/filesapiroutesgetsignedurlrequest.md b/docs/models/operations/filesapiroutesgetsignedurlrequest.md index c40df269..7286718f 100644 --- a/docs/models/operations/filesapiroutesgetsignedurlrequest.md +++ b/docs/models/operations/filesapiroutesgetsignedurlrequest.md @@ -6,7 +6,7 @@ import { FilesApiRoutesGetSignedUrlRequest } from "@mistralai/mistralai/models/operations"; let value: FilesApiRoutesGetSignedUrlRequest = { - fileId: "aff92903-f5a4-4fb5-bc16-3a16485b0a34", + fileId: "c8cbc4c8-7a01-44f2-9505-5fd60da2f1d4", }; ``` diff --git a/docs/models/operations/filesapiroutesretrievefilerequest.md b/docs/models/operations/filesapiroutesretrievefilerequest.md index e330a797..a1664d03 100644 --- a/docs/models/operations/filesapiroutesretrievefilerequest.md +++ b/docs/models/operations/filesapiroutesretrievefilerequest.md @@ -6,7 +6,7 @@ import { FilesApiRoutesRetrieveFileRequest } from "@mistralai/mistralai/models/operations"; let value: FilesApiRoutesRetrieveFileRequest = { - fileId: "1ffb5442-825a-4b06-9ad7-f4074d34cb8b", + fileId: "2bea635b-aedd-4e45-b68a-4064feda58d1", }; ``` diff --git a/docs/models/operations/jobsapiroutesbatchcancelbatchjobrequest.md b/docs/models/operations/jobsapiroutesbatchcancelbatchjobrequest.md index 2c32589e..57431ac4 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: "d4ad9fb1-8bc0-4bdb-a878-be9eb1844559", + jobId: "cc8f6916-b3fa-44c1-9f0e-4c04b81669ad", }; ``` diff --git a/docs/models/operations/jobsapiroutesbatchgetbatchjobrequest.md b/docs/models/operations/jobsapiroutesbatchgetbatchjobrequest.md index cf31c8ca..6f4d51ec 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: "69f2e177-357d-4f8d-8953-680293d511e1", + jobId: "94922664-2004-47b7-be02-59d540d69f02", }; ``` diff --git a/docs/models/operations/jobsapiroutesfinetuningcancelfinetuningjobrequest.md b/docs/models/operations/jobsapiroutesfinetuningcancelfinetuningjobrequest.md index 4da729c2..fb9b73ad 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: "8bce286e-1fe1-47bb-bec4-7b2374d95dcf", + jobId: "dc46ed93-06ad-4d03-b53c-c8f2e12b196b", }; ``` diff --git a/docs/models/operations/jobsapiroutesfinetuningcancelfinetuningjobresponse.md b/docs/models/operations/jobsapiroutesfinetuningcancelfinetuningjobresponse.md index c35d0f71..ac0d5e16 100644 --- a/docs/models/operations/jobsapiroutesfinetuningcancelfinetuningjobresponse.md +++ b/docs/models/operations/jobsapiroutesfinetuningcancelfinetuningjobresponse.md @@ -9,20 +9,20 @@ OK ```typescript const value: components.ClassifierDetailedJobOut = { - id: "62d05efa-b088-4513-b569-b55004baccdb", + id: "cd048634-f450-4d23-94e3-cce13b342271", autoStart: false, - model: "Spyder", - status: "FAILED_VALIDATION", - createdAt: 588158, - modifiedAt: 34267, + model: "Escalade", + status: "QUEUED", + createdAt: 388333, + modifiedAt: 94122, trainingFiles: [ - "f2bd531b-7be2-4e64-8ff3-a1ada6669ee0", + "7dd19d3c-ec10-4349-a6b5-25ef3c4e2a1f", ], hyperparameters: {}, checkpoints: [ { metrics: {}, - stepNumber: 112224, + stepNumber: 841816, createdAt: 1716963433, }, ], @@ -32,7 +32,7 @@ const value: components.ClassifierDetailedJobOut = { labels: [ "", ], - weight: 1933.34, + weight: 5666.69, lossFunction: "single_class", }, ], @@ -43,20 +43,20 @@ const value: components.ClassifierDetailedJobOut = { ```typescript const value: components.CompletionDetailedJobOut = { - id: "8abefadc-4e00-447a-81ac-2687cfc1c132", + id: "987c2265-1dc8-4f1c-a453-c2da0caeb8d4", autoStart: false, - model: "Fortwo", - status: "FAILED", - createdAt: 470321, - modifiedAt: 959696, + model: "Civic", + status: "CANCELLATION_REQUESTED", + createdAt: 226196, + modifiedAt: 15738, trainingFiles: [ - "3cd87968-66b1-42dc-b46e-d9306add0353", + "5808db9f-fd97-409f-9d52-cbfd817584dd", ], hyperparameters: {}, checkpoints: [ { metrics: {}, - stepNumber: 767466, + stepNumber: 599581, createdAt: 1716963433, }, ], diff --git a/docs/models/operations/jobsapiroutesfinetuningcreatefinetuningjobresponse.md b/docs/models/operations/jobsapiroutesfinetuningcreatefinetuningjobresponse.md index 83b8427c..e2c6e76a 100644 --- a/docs/models/operations/jobsapiroutesfinetuningcreatefinetuningjobresponse.md +++ b/docs/models/operations/jobsapiroutesfinetuningcreatefinetuningjobresponse.md @@ -9,14 +9,14 @@ OK ```typescript const value: operations.One = { - id: "55fd60da-2f1d-446c-baf9-1ecb062dbefc", + id: "eeb726b4-1eb9-4cd7-8ee4-988f4fe7dca5", autoStart: false, - model: "Jetta", - status: "QUEUED", - createdAt: 14251, - modifiedAt: 342104, + model: "Mercielago", + status: "CANCELLED", + createdAt: 16252, + modifiedAt: 642804, trainingFiles: [ - "ddf10e48-f6a6-4c83-a448-bfbc256a445c", + "7e5782bd-040f-4af8-8c55-6a5ef031037d", ], object: "job", jobType: "classifier", diff --git a/docs/models/operations/jobsapiroutesfinetuninggetfinetuningjobrequest.md b/docs/models/operations/jobsapiroutesfinetuninggetfinetuningjobrequest.md index 235945a4..cb1c2546 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: "115cbbc4-88bf-44ca-a9cf-02c1834b0d78", + jobId: "7eac8f90-369c-46bc-85fa-e8bce286e1fe", }; ``` diff --git a/docs/models/operations/jobsapiroutesfinetuninggetfinetuningjobresponse.md b/docs/models/operations/jobsapiroutesfinetuninggetfinetuningjobresponse.md index f2e564c0..8551d35e 100644 --- a/docs/models/operations/jobsapiroutesfinetuninggetfinetuningjobresponse.md +++ b/docs/models/operations/jobsapiroutesfinetuninggetfinetuningjobresponse.md @@ -9,20 +9,20 @@ OK ```typescript const value: components.ClassifierDetailedJobOut = { - id: "a515285f-f99f-4ec5-8537-fe10e83aa140", + id: "7bbec47b-2374-4d95-adcf-d62d05efab08", autoStart: false, - model: "Alpine", - status: "STARTED", - createdAt: 685467, - modifiedAt: 49499, + model: "Countach", + status: "QUEUED", + createdAt: 228907, + modifiedAt: 357984, trainingFiles: [ - "12544cf8-f616-447a-97ee-b726b41eb9cd", + "69b55004-bacc-4dbf-8e99-0f2bd531b7be", ], hyperparameters: {}, checkpoints: [ { metrics: {}, - stepNumber: 881189, + stepNumber: 919171, createdAt: 1716963433, }, ], @@ -32,7 +32,7 @@ const value: components.ClassifierDetailedJobOut = { labels: [ "", ], - weight: 9164.19, + weight: 4116.26, lossFunction: "single_class", }, ], @@ -43,20 +43,20 @@ const value: components.ClassifierDetailedJobOut = { ```typescript const value: components.CompletionDetailedJobOut = { - id: "988f4fe7-dca5-43ad-b0a7-e5782bd040fa", + id: "ff3a1ada-6669-4ee0-8213-58abefadc4e0", autoStart: false, - model: "Fortwo", - status: "CANCELLED", - createdAt: 374414, - modifiedAt: 353819, + model: "Charger", + status: "RUNNING", + createdAt: 638363, + modifiedAt: 101770, trainingFiles: [ - "6a5ef031-037d-437e-aac8-f90369c6bc5f", + "ac2687cf-c1c1-4323-88a7-f3cd8796866b", ], hyperparameters: {}, checkpoints: [ { metrics: {}, - stepNumber: 880998, + stepNumber: 166542, createdAt: 1716963433, }, ], diff --git a/docs/models/operations/jobsapiroutesfinetuningstartfinetuningjobrequest.md b/docs/models/operations/jobsapiroutesfinetuningstartfinetuningjobrequest.md index 68b23d25..ba16dd23 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: "8f2e12b1-96be-4cd0-b486-34f450d234e3", + jobId: "6e2bf23b-c793-4715-b47e-269f2e177357", }; ``` diff --git a/docs/models/operations/jobsapiroutesfinetuningstartfinetuningjobresponse.md b/docs/models/operations/jobsapiroutesfinetuningstartfinetuningjobresponse.md index 30cb5cd6..63b1c961 100644 --- a/docs/models/operations/jobsapiroutesfinetuningstartfinetuningjobresponse.md +++ b/docs/models/operations/jobsapiroutesfinetuningstartfinetuningjobresponse.md @@ -9,20 +9,20 @@ OK ```typescript const value: components.ClassifierDetailedJobOut = { - id: "ce13b342-2715-4606-a17d-d19d3cec1034", + id: "f8d95368-0293-4d51-81e1-2d4ad9fb18bc", autoStart: false, - model: "El Camino", - status: "SUCCESS", - createdAt: 353075, - modifiedAt: 154425, + model: "Model T", + status: "CANCELLED", + createdAt: 746834, + modifiedAt: 512349, trainingFiles: [ - "5ef3c4e2-a1fb-4d97-9987-c22651dc8f1c", + "78be9eb1-8445-459a-b420-920e81df7016", ], hyperparameters: {}, checkpoints: [ { metrics: {}, - stepNumber: 368599, + stepNumber: 148038, createdAt: 1716963433, }, ], @@ -32,8 +32,8 @@ const value: components.ClassifierDetailedJobOut = { labels: [ "", ], - weight: 2192.79, - lossFunction: "multi_class", + weight: 8239.9, + lossFunction: "single_class", }, ], }; @@ -43,20 +43,20 @@ const value: components.ClassifierDetailedJobOut = { ```typescript const value: components.CompletionDetailedJobOut = { - id: "2da0caeb-8d48-44f3-b058-08db9ffd9709", + id: "7a09f2b9-2008-4fab-8792-ecf432fc2862", autoStart: false, - model: "Ranchero", + model: "Wrangler", status: "VALIDATED", - createdAt: 152047, - modifiedAt: 784059, + createdAt: 941440, + modifiedAt: 75610, trainingFiles: [ - "bfd81758-4dd5-496e-b2bf-23bc79371547", + "72081bb2-fb4b-4b56-a59e-2e0a6cb7a8c7", ], hyperparameters: {}, checkpoints: [ { metrics: {}, - stepNumber: 181267, + stepNumber: 250520, createdAt: 1716963433, }, ], diff --git a/docs/models/operations/jobsapiroutesfinetuningupdatefinetunedmodelresponse.md b/docs/models/operations/jobsapiroutesfinetuningupdatefinetunedmodelresponse.md index 9007e3e0..cea59c2f 100644 --- a/docs/models/operations/jobsapiroutesfinetuningupdatefinetunedmodelresponse.md +++ b/docs/models/operations/jobsapiroutesfinetuningupdatefinetunedmodelresponse.md @@ -10,20 +10,20 @@ OK ```typescript const value: components.ClassifierFTModelOut = { id: "", - created: 395233, + created: 700856, ownedBy: "", root: "", archived: false, capabilities: {}, - job: "4b5bd3f2-4257-48de-8391-7557b1eb2f8f", + job: "e851ce1c-0f98-44e4-bdfc-817736527480", classifierTargets: [ { name: "", labels: [ "", ], - weight: 5349.08, - lossFunction: "single_class", + weight: 8163.65, + lossFunction: "multi_class", }, ], }; @@ -34,12 +34,12 @@ const value: components.ClassifierFTModelOut = { ```typescript const value: components.CompletionFTModelOut = { id: "", - created: 304173, + created: 851809, ownedBy: "", root: "", archived: false, capabilities: {}, - job: "9ecb8e7d-d3c0-4538-bb18-f3a907b0e803", + job: "f1aff929-03f5-4a4f-8b5c-163a16485b0a", }; ``` diff --git a/docs/models/operations/one.md b/docs/models/operations/one.md index e57c0805..0daf0090 100644 --- a/docs/models/operations/one.md +++ b/docs/models/operations/one.md @@ -7,14 +7,14 @@ ```typescript const value: components.ClassifierJobOut = { - id: "5d1ac26e-1096-4ce4-a679-fb64f2bea635", + id: "af91ecb0-62db-4efc-af90-05ddf10e48f6", autoStart: false, - model: "LeBaron", - status: "CANCELLATION_REQUESTED", - createdAt: 866861, - modifiedAt: 816151, + model: "Element", + status: "SUCCESS", + createdAt: 527715, + modifiedAt: 237523, trainingFiles: [ - "e4568a40-64fe-4da5-b8d1-c0dc0a822c9f", + "448bfbc2-56a4-445c-a911-5cbbc488bf4c", ], hyperparameters: {}, }; @@ -24,14 +24,14 @@ const value: components.ClassifierJobOut = { ```typescript const value: components.CompletionJobOut = { - id: "f1f37c39-2115-406a-9611-42f2c998f5c8", + id: "9cf02c18-34b0-4d78-98a5-15285ff99fec", autoStart: false, - model: "Wrangler", - status: "FAILED_VALIDATION", - createdAt: 118917, - modifiedAt: 417539, + model: "Cruze", + status: "VALIDATING", + createdAt: 487148, + modifiedAt: 990369, trainingFiles: [ - "cbe4c79f-fd5e-4a60-9c8c-bc4c87a014f2", + "e10e83aa-1403-423a-a012-544cf8f61647", ], hyperparameters: {}, }; diff --git a/docs/models/operations/responsebody.md b/docs/models/operations/responsebody.md index 5fb33e54..81bfe952 100644 --- a/docs/models/operations/responsebody.md +++ b/docs/models/operations/responsebody.md @@ -8,9 +8,9 @@ ```typescript const value: components.ModelConversation = { id: "", - createdAt: new Date("2024-09-30T05:20:17.730Z"), - updatedAt: new Date("2023-04-28T18:57:30.321Z"), - model: "Civic", + createdAt: new Date("2023-10-22T12:07:20.252Z"), + updatedAt: new Date("2025-05-27T01:55:24.228Z"), + model: "Wrangler", }; ``` @@ -19,8 +19,8 @@ const value: components.ModelConversation = { ```typescript const value: components.AgentConversation = { id: "", - createdAt: new Date("2024-05-15T13:07:55.829Z"), - updatedAt: new Date("2023-01-23T23:04:14.239Z"), + createdAt: new Date("2023-12-13T22:32:12.208Z"), + updatedAt: new Date("2025-06-25T04:17:08.995Z"), agentId: "", }; ``` diff --git a/docs/models/operations/retrievemodelv1modelsmodelidgetresponseretrievemodelv1modelsmodelidget.md b/docs/models/operations/retrievemodelv1modelsmodelidgetresponseretrievemodelv1modelsmodelidget.md index 8b5572c9..06e7765a 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: "Dynamic Brand Developer", + job: "Human Communications Associate", root: "", }; ``` diff --git a/docs/models/operations/status.md b/docs/models/operations/status.md index eb80a56f..a46ddcfa 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 = "CANCELLATION_REQUESTED"; +let value: Status = "SUCCESS"; ``` ## Values diff --git a/docs/sdks/models/README.md b/docs/sdks/models/README.md index e0b151c9..bcbf5e4e 100644 --- a/docs/sdks/models/README.md +++ b/docs/sdks/models/README.md @@ -88,7 +88,7 @@ run(); ## retrieve -Retrieve a model information. +Retrieve information about a model. ### Example Usage diff --git a/examples/src/async_ocr_process_from_file.ts b/examples/src/async_ocr_process_from_file.ts index b1deca44..8bf81126 100644 --- a/examples/src/async_ocr_process_from_file.ts +++ b/examples/src/async_ocr_process_from_file.ts @@ -16,13 +16,11 @@ const uploaded_pdf = await client.files.upload({ purpose: "ocr" }); -client.files.retrieve({ fileId: uploaded_pdf.id }) - const ocrResponse = await client.ocr.process({ model: "mistral-ocr-latest", document: { - type: "document_url", - documentUrl: "https://arxiv.org/pdf/2201.04234" + type: "file", + fileId: uploaded_pdf.id }, includeImageBase64: true }); diff --git a/jsr.json b/jsr.json index 5946ad41..db6fb747 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@mistralai/mistralai", - "version": "1.7.2", + "version": "1.7.3", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 39bfb34c..8680b8bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@mistralai/mistralai", - "version": "1.7.2", + "version": "1.7.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@mistralai/mistralai", - "version": "1.7.2", + "version": "1.7.3", "dependencies": { "zod-to-json-schema": "^3.24.1" }, diff --git a/package.json b/package.json index b787e7b0..74c6613f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mistralai/mistralai", - "version": "1.7.2", + "version": "1.7.3", "author": "Speakeasy", "main": "./index.js", "sideEffects": false, diff --git a/src/funcs/modelsRetrieve.ts b/src/funcs/modelsRetrieve.ts index 2b71d640..2c1a8b8e 100644 --- a/src/funcs/modelsRetrieve.ts +++ b/src/funcs/modelsRetrieve.ts @@ -28,7 +28,7 @@ import { Result } from "../types/fp.js"; * Retrieve Model * * @remarks - * Retrieve a model information. + * Retrieve information about a model. */ export function modelsRetrieve( client: MistralCore, diff --git a/src/lib/config.ts b/src/lib/config.ts index a10325f4..70f7090f 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: "1.0.0", - sdkVersion: "1.7.2", + sdkVersion: "1.7.3", genVersion: "2.548.6", userAgent: - "speakeasy-sdk/typescript 1.7.2 2.548.6 1.0.0 @mistralai/mistralai", + "speakeasy-sdk/typescript 1.7.3 2.548.6 1.0.0 @mistralai/mistralai", } as const; diff --git a/src/models/components/agentscompletionrequest.ts b/src/models/components/agentscompletionrequest.ts index 83059528..f3c1823c 100644 --- a/src/models/components/agentscompletionrequest.ts +++ b/src/models/components/agentscompletionrequest.ts @@ -122,6 +122,9 @@ export type AgentsCompletionRequest = { n?: number | null | undefined; prediction?: Prediction | undefined; parallelToolCalls?: boolean | undefined; + /** + * Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + */ promptMode?: MistralPromptMode | null | undefined; /** * The ID of the agent to use for this completion. diff --git a/src/models/components/agentscompletionstreamrequest.ts b/src/models/components/agentscompletionstreamrequest.ts index 01985269..62d62fd1 100644 --- a/src/models/components/agentscompletionstreamrequest.ts +++ b/src/models/components/agentscompletionstreamrequest.ts @@ -121,6 +121,9 @@ export type AgentsCompletionStreamRequest = { n?: number | null | undefined; prediction?: Prediction | undefined; parallelToolCalls?: boolean | undefined; + /** + * Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + */ promptMode?: MistralPromptMode | null | undefined; /** * The ID of the agent to use for this completion. diff --git a/src/models/components/basemodelcard.ts b/src/models/components/basemodelcard.ts index f4a80ae5..756d1575 100644 --- a/src/models/components/basemodelcard.ts +++ b/src/models/components/basemodelcard.ts @@ -5,7 +5,6 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -15,11 +14,6 @@ import { ModelCapabilities$outboundSchema, } from "./modelcapabilities.js"; -export const Type = { - Base: "base", -} as const; -export type Type = ClosedEnum; - export type BaseModelCard = { id: string; object?: string | undefined; @@ -31,30 +25,11 @@ export type BaseModelCard = { maxContextLength?: number | undefined; aliases?: Array | undefined; deprecation?: Date | null | undefined; + deprecationReplacementModel?: string | null | undefined; defaultModelTemperature?: number | null | undefined; type?: "base" | undefined; }; -/** @internal */ -export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum( - Type, -); - -/** @internal */ -export const Type$outboundSchema: z.ZodNativeEnum = - Type$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Type$ { - /** @deprecated use `Type$inboundSchema` instead. */ - export const inboundSchema = Type$inboundSchema; - /** @deprecated use `Type$outboundSchema` instead. */ - export const outboundSchema = Type$outboundSchema; -} - /** @internal */ export const BaseModelCard$inboundSchema: z.ZodType< BaseModelCard, @@ -73,12 +48,14 @@ export const BaseModelCard$inboundSchema: z.ZodType< deprecation: z.nullable( z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), + deprecation_replacement_model: z.nullable(z.string()).optional(), default_model_temperature: z.nullable(z.number()).optional(), type: z.literal("base").default("base"), }).transform((v) => { return remap$(v, { "owned_by": "ownedBy", "max_context_length": "maxContextLength", + "deprecation_replacement_model": "deprecationReplacementModel", "default_model_temperature": "defaultModelTemperature", }); }); @@ -95,6 +72,7 @@ export type BaseModelCard$Outbound = { max_context_length: number; aliases?: Array | undefined; deprecation?: string | null | undefined; + deprecation_replacement_model?: string | null | undefined; default_model_temperature?: number | null | undefined; type: "base"; }; @@ -115,12 +93,14 @@ export const BaseModelCard$outboundSchema: z.ZodType< maxContextLength: z.number().int().default(32768), aliases: z.array(z.string()).optional(), deprecation: z.nullable(z.date().transform(v => v.toISOString())).optional(), + deprecationReplacementModel: z.nullable(z.string()).optional(), defaultModelTemperature: z.nullable(z.number()).optional(), - type: z.literal("base").default("base"), + type: z.literal("base").default("base" as const), }).transform((v) => { return remap$(v, { ownedBy: "owned_by", maxContextLength: "max_context_length", + deprecationReplacementModel: "deprecation_replacement_model", defaultModelTemperature: "default_model_temperature", }); }); diff --git a/src/models/components/chatcompletionrequest.ts b/src/models/components/chatcompletionrequest.ts index ae166125..8ef8de2f 100644 --- a/src/models/components/chatcompletionrequest.ts +++ b/src/models/components/chatcompletionrequest.ts @@ -134,6 +134,9 @@ export type ChatCompletionRequest = { n?: number | null | undefined; prediction?: Prediction | undefined; parallelToolCalls?: boolean | undefined; + /** + * Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + */ promptMode?: MistralPromptMode | null | undefined; /** * Whether to inject a safety prompt before all conversations. diff --git a/src/models/components/chatcompletionstreamrequest.ts b/src/models/components/chatcompletionstreamrequest.ts index 8f22a6c6..087d8b01 100644 --- a/src/models/components/chatcompletionstreamrequest.ts +++ b/src/models/components/chatcompletionstreamrequest.ts @@ -131,6 +131,9 @@ export type ChatCompletionStreamRequest = { n?: number | null | undefined; prediction?: Prediction | undefined; parallelToolCalls?: boolean | undefined; + /** + * Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + */ promptMode?: MistralPromptMode | null | undefined; /** * Whether to inject a safety prompt before all conversations. diff --git a/src/models/components/contentchunk.ts b/src/models/components/contentchunk.ts index ea96f841..465ec24d 100644 --- a/src/models/components/contentchunk.ts +++ b/src/models/components/contentchunk.ts @@ -12,6 +12,12 @@ import { DocumentURLChunk$Outbound, DocumentURLChunk$outboundSchema, } from "./documenturlchunk.js"; +import { + FileChunk, + FileChunk$inboundSchema, + FileChunk$Outbound, + FileChunk$outboundSchema, +} from "./filechunk.js"; import { ImageURLChunk, ImageURLChunk$inboundSchema, @@ -35,6 +41,7 @@ export type ContentChunk = | (ImageURLChunk & { type: "image_url" }) | (TextChunk & { type: "text" }) | (ReferenceChunk & { type: "reference" }) + | (FileChunk & { type: "file" }) | (DocumentURLChunk & { type: "document_url" }); /** @internal */ @@ -56,6 +63,9 @@ export const ContentChunk$inboundSchema: z.ZodType< type: v.type, })), ), + FileChunk$inboundSchema.and( + z.object({ type: z.literal("file") }).transform((v) => ({ type: v.type })), + ), DocumentURLChunk$inboundSchema.and( z.object({ type: z.literal("document_url") }).transform((v) => ({ type: v.type, @@ -68,6 +78,7 @@ export type ContentChunk$Outbound = | (ImageURLChunk$Outbound & { type: "image_url" }) | (TextChunk$Outbound & { type: "text" }) | (ReferenceChunk$Outbound & { type: "reference" }) + | (FileChunk$Outbound & { type: "file" }) | (DocumentURLChunk$Outbound & { type: "document_url" }); /** @internal */ @@ -89,6 +100,9 @@ export const ContentChunk$outboundSchema: z.ZodType< type: v.type, })), ), + FileChunk$outboundSchema.and( + z.object({ type: z.literal("file") }).transform((v) => ({ type: v.type })), + ), DocumentURLChunk$outboundSchema.and( z.object({ type: z.literal("document_url") }).transform((v) => ({ type: v.type, diff --git a/src/models/components/conversationrestartrequest.ts b/src/models/components/conversationrestartrequest.ts index 3e3d8b41..9bd197c0 100644 --- a/src/models/components/conversationrestartrequest.ts +++ b/src/models/components/conversationrestartrequest.ts @@ -40,11 +40,11 @@ export type ConversationRestartRequest = { */ store?: boolean | undefined; handoffExecution?: ConversationRestartRequestHandoffExecution | undefined; - fromEntryId: string; /** * White-listed arguments from the completion API */ completionArgs?: CompletionArgs | undefined; + fromEntryId: string; }; /** @internal */ @@ -81,13 +81,13 @@ export const ConversationRestartRequest$inboundSchema: z.ZodType< store: z.boolean().default(true), handoff_execution: ConversationRestartRequestHandoffExecution$inboundSchema .default("server"), - from_entry_id: z.string(), completion_args: CompletionArgs$inboundSchema.optional(), + from_entry_id: z.string(), }).transform((v) => { return remap$(v, { "handoff_execution": "handoffExecution", - "from_entry_id": "fromEntryId", "completion_args": "completionArgs", + "from_entry_id": "fromEntryId", }); }); @@ -97,8 +97,8 @@ export type ConversationRestartRequest$Outbound = { stream: boolean; store: boolean; handoff_execution: string; - from_entry_id: string; completion_args?: CompletionArgs$Outbound | undefined; + from_entry_id: string; }; /** @internal */ @@ -112,13 +112,13 @@ export const ConversationRestartRequest$outboundSchema: z.ZodType< store: z.boolean().default(true), handoffExecution: ConversationRestartRequestHandoffExecution$outboundSchema .default("server"), - fromEntryId: z.string(), completionArgs: CompletionArgs$outboundSchema.optional(), + fromEntryId: z.string(), }).transform((v) => { return remap$(v, { handoffExecution: "handoff_execution", - fromEntryId: "from_entry_id", completionArgs: "completion_args", + fromEntryId: "from_entry_id", }); }); diff --git a/src/models/components/conversationrestartstreamrequest.ts b/src/models/components/conversationrestartstreamrequest.ts index 75f66c8d..5912a171 100644 --- a/src/models/components/conversationrestartstreamrequest.ts +++ b/src/models/components/conversationrestartstreamrequest.ts @@ -42,11 +42,11 @@ export type ConversationRestartStreamRequest = { handoffExecution?: | ConversationRestartStreamRequestHandoffExecution | undefined; - fromEntryId: string; /** * White-listed arguments from the completion API */ completionArgs?: CompletionArgs | undefined; + fromEntryId: string; }; /** @internal */ @@ -85,13 +85,13 @@ export const ConversationRestartStreamRequest$inboundSchema: z.ZodType< ConversationRestartStreamRequestHandoffExecution$inboundSchema.default( "server", ), - from_entry_id: z.string(), completion_args: CompletionArgs$inboundSchema.optional(), + from_entry_id: z.string(), }).transform((v) => { return remap$(v, { "handoff_execution": "handoffExecution", - "from_entry_id": "fromEntryId", "completion_args": "completionArgs", + "from_entry_id": "fromEntryId", }); }); @@ -101,8 +101,8 @@ export type ConversationRestartStreamRequest$Outbound = { stream: boolean; store: boolean; handoff_execution: string; - from_entry_id: string; completion_args?: CompletionArgs$Outbound | undefined; + from_entry_id: string; }; /** @internal */ @@ -118,13 +118,13 @@ export const ConversationRestartStreamRequest$outboundSchema: z.ZodType< ConversationRestartStreamRequestHandoffExecution$outboundSchema.default( "server", ), - fromEntryId: z.string(), completionArgs: CompletionArgs$outboundSchema.optional(), + fromEntryId: z.string(), }).transform((v) => { return remap$(v, { handoffExecution: "handoff_execution", - fromEntryId: "from_entry_id", completionArgs: "completion_args", + fromEntryId: "from_entry_id", }); }); diff --git a/src/models/components/filechunk.ts b/src/models/components/filechunk.ts new file mode 100644 index 00000000..8802c335 --- /dev/null +++ b/src/models/components/filechunk.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type FileChunk = { + type?: "file" | undefined; + fileId: string; +}; + +/** @internal */ +export const FileChunk$inboundSchema: z.ZodType< + FileChunk, + z.ZodTypeDef, + unknown +> = z.object({ + type: z.literal("file").default("file"), + file_id: z.string(), +}).transform((v) => { + return remap$(v, { + "file_id": "fileId", + }); +}); + +/** @internal */ +export type FileChunk$Outbound = { + type: "file"; + file_id: string; +}; + +/** @internal */ +export const FileChunk$outboundSchema: z.ZodType< + FileChunk$Outbound, + z.ZodTypeDef, + FileChunk +> = z.object({ + type: z.literal("file").default("file" as const), + fileId: z.string(), +}).transform((v) => { + return remap$(v, { + fileId: "file_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace FileChunk$ { + /** @deprecated use `FileChunk$inboundSchema` instead. */ + export const inboundSchema = FileChunk$inboundSchema; + /** @deprecated use `FileChunk$outboundSchema` instead. */ + export const outboundSchema = FileChunk$outboundSchema; + /** @deprecated use `FileChunk$Outbound` instead. */ + export type Outbound = FileChunk$Outbound; +} + +export function fileChunkToJSON(fileChunk: FileChunk): string { + return JSON.stringify(FileChunk$outboundSchema.parse(fileChunk)); +} + +export function fileChunkFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => FileChunk$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'FileChunk' from JSON`, + ); +} diff --git a/src/models/components/ftmodelcard.ts b/src/models/components/ftmodelcard.ts index 08164cc2..445217f1 100644 --- a/src/models/components/ftmodelcard.ts +++ b/src/models/components/ftmodelcard.ts @@ -5,7 +5,6 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -15,11 +14,6 @@ import { ModelCapabilities$outboundSchema, } from "./modelcapabilities.js"; -export const FTModelCardType = { - FineTuned: "fine-tuned", -} as const; -export type FTModelCardType = ClosedEnum; - /** * Extra fields for fine-tuned models. */ @@ -34,6 +28,7 @@ export type FTModelCard = { maxContextLength?: number | undefined; aliases?: Array | undefined; deprecation?: Date | null | undefined; + deprecationReplacementModel?: string | null | undefined; defaultModelTemperature?: number | null | undefined; type?: "fine-tuned" | undefined; job: string; @@ -41,27 +36,6 @@ export type FTModelCard = { archived?: boolean | undefined; }; -/** @internal */ -export const FTModelCardType$inboundSchema: z.ZodNativeEnum< - typeof FTModelCardType -> = z.nativeEnum(FTModelCardType); - -/** @internal */ -export const FTModelCardType$outboundSchema: z.ZodNativeEnum< - typeof FTModelCardType -> = FTModelCardType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace FTModelCardType$ { - /** @deprecated use `FTModelCardType$inboundSchema` instead. */ - export const inboundSchema = FTModelCardType$inboundSchema; - /** @deprecated use `FTModelCardType$outboundSchema` instead. */ - export const outboundSchema = FTModelCardType$outboundSchema; -} - /** @internal */ export const FTModelCard$inboundSchema: z.ZodType< FTModelCard, @@ -80,6 +54,7 @@ export const FTModelCard$inboundSchema: z.ZodType< deprecation: z.nullable( z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), + deprecation_replacement_model: z.nullable(z.string()).optional(), default_model_temperature: z.nullable(z.number()).optional(), type: z.literal("fine-tuned").default("fine-tuned"), job: z.string(), @@ -89,6 +64,7 @@ export const FTModelCard$inboundSchema: z.ZodType< return remap$(v, { "owned_by": "ownedBy", "max_context_length": "maxContextLength", + "deprecation_replacement_model": "deprecationReplacementModel", "default_model_temperature": "defaultModelTemperature", }); }); @@ -105,6 +81,7 @@ export type FTModelCard$Outbound = { max_context_length: number; aliases?: Array | undefined; deprecation?: string | null | undefined; + deprecation_replacement_model?: string | null | undefined; default_model_temperature?: number | null | undefined; type: "fine-tuned"; job: string; @@ -128,8 +105,9 @@ export const FTModelCard$outboundSchema: z.ZodType< maxContextLength: z.number().int().default(32768), aliases: z.array(z.string()).optional(), deprecation: z.nullable(z.date().transform(v => v.toISOString())).optional(), + deprecationReplacementModel: z.nullable(z.string()).optional(), defaultModelTemperature: z.nullable(z.number()).optional(), - type: z.literal("fine-tuned").default("fine-tuned"), + type: z.literal("fine-tuned").default("fine-tuned" as const), job: z.string(), root: z.string(), archived: z.boolean().default(false), @@ -137,6 +115,7 @@ export const FTModelCard$outboundSchema: z.ZodType< return remap$(v, { ownedBy: "owned_by", maxContextLength: "max_context_length", + deprecationReplacementModel: "deprecation_replacement_model", defaultModelTemperature: "default_model_temperature", }); }); diff --git a/src/models/components/index.ts b/src/models/components/index.ts index 322e2bfa..4302a4b7 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -72,6 +72,7 @@ export * from "./embeddingrequest.js"; export * from "./embeddingresponse.js"; export * from "./embeddingresponsedata.js"; export * from "./eventout.js"; +export * from "./filechunk.js"; export * from "./filepurpose.js"; export * from "./fileschema.js"; export * from "./filesignedurl.js"; diff --git a/src/models/components/inputentries.ts b/src/models/components/inputentries.ts index 6e33a796..1464ad68 100644 --- a/src/models/components/inputentries.ts +++ b/src/models/components/inputentries.ts @@ -6,6 +6,18 @@ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + AgentHandoffEntry, + AgentHandoffEntry$inboundSchema, + AgentHandoffEntry$Outbound, + AgentHandoffEntry$outboundSchema, +} from "./agenthandoffentry.js"; +import { + FunctionCallEntry, + FunctionCallEntry$inboundSchema, + FunctionCallEntry$Outbound, + FunctionCallEntry$outboundSchema, +} from "./functioncallentry.js"; import { FunctionResultEntry, FunctionResultEntry$inboundSchema, @@ -18,8 +30,26 @@ import { MessageInputEntry$Outbound, MessageInputEntry$outboundSchema, } from "./messageinputentry.js"; +import { + MessageOutputEntry, + MessageOutputEntry$inboundSchema, + MessageOutputEntry$Outbound, + MessageOutputEntry$outboundSchema, +} from "./messageoutputentry.js"; +import { + ToolExecutionEntry, + ToolExecutionEntry$inboundSchema, + ToolExecutionEntry$Outbound, + ToolExecutionEntry$outboundSchema, +} from "./toolexecutionentry.js"; -export type InputEntries = MessageInputEntry | FunctionResultEntry; +export type InputEntries = + | MessageInputEntry + | FunctionResultEntry + | ToolExecutionEntry + | FunctionCallEntry + | MessageOutputEntry + | AgentHandoffEntry; /** @internal */ export const InputEntries$inboundSchema: z.ZodType< @@ -29,12 +59,20 @@ export const InputEntries$inboundSchema: z.ZodType< > = z.union([ MessageInputEntry$inboundSchema, FunctionResultEntry$inboundSchema, + ToolExecutionEntry$inboundSchema, + FunctionCallEntry$inboundSchema, + MessageOutputEntry$inboundSchema, + AgentHandoffEntry$inboundSchema, ]); /** @internal */ export type InputEntries$Outbound = | MessageInputEntry$Outbound - | FunctionResultEntry$Outbound; + | FunctionResultEntry$Outbound + | ToolExecutionEntry$Outbound + | FunctionCallEntry$Outbound + | MessageOutputEntry$Outbound + | AgentHandoffEntry$Outbound; /** @internal */ export const InputEntries$outboundSchema: z.ZodType< @@ -44,6 +82,10 @@ export const InputEntries$outboundSchema: z.ZodType< > = z.union([ MessageInputEntry$outboundSchema, FunctionResultEntry$outboundSchema, + ToolExecutionEntry$outboundSchema, + FunctionCallEntry$outboundSchema, + MessageOutputEntry$outboundSchema, + AgentHandoffEntry$outboundSchema, ]); /** diff --git a/src/models/components/messageinputentry.ts b/src/models/components/messageinputentry.ts index fc91fb90..346695b2 100644 --- a/src/models/components/messageinputentry.ts +++ b/src/models/components/messageinputentry.ts @@ -20,10 +20,10 @@ export const ObjectT = { } as const; export type ObjectT = ClosedEnum; -export const MessageInputEntryType = { +export const Type = { MessageInput: "message.input", } as const; -export type MessageInputEntryType = ClosedEnum; +export type Type = ClosedEnum; export const MessageInputEntryRole = { Assistant: "assistant", @@ -40,7 +40,7 @@ export type MessageInputEntryContent = */ export type MessageInputEntry = { object?: ObjectT | undefined; - type?: MessageInputEntryType | undefined; + type?: Type | undefined; createdAt?: Date | undefined; completedAt?: Date | null | undefined; id?: string | undefined; @@ -68,24 +68,23 @@ export namespace ObjectT$ { } /** @internal */ -export const MessageInputEntryType$inboundSchema: z.ZodNativeEnum< - typeof MessageInputEntryType -> = z.nativeEnum(MessageInputEntryType); +export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Type, +); /** @internal */ -export const MessageInputEntryType$outboundSchema: z.ZodNativeEnum< - typeof MessageInputEntryType -> = MessageInputEntryType$inboundSchema; +export const Type$outboundSchema: z.ZodNativeEnum = + Type$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace MessageInputEntryType$ { - /** @deprecated use `MessageInputEntryType$inboundSchema` instead. */ - export const inboundSchema = MessageInputEntryType$inboundSchema; - /** @deprecated use `MessageInputEntryType$outboundSchema` instead. */ - export const outboundSchema = MessageInputEntryType$outboundSchema; +export namespace Type$ { + /** @deprecated use `Type$inboundSchema` instead. */ + export const inboundSchema = Type$inboundSchema; + /** @deprecated use `Type$outboundSchema` instead. */ + export const outboundSchema = Type$outboundSchema; } /** @internal */ @@ -166,7 +165,7 @@ export const MessageInputEntry$inboundSchema: z.ZodType< unknown > = z.object({ object: ObjectT$inboundSchema.default("entry"), - type: MessageInputEntryType$inboundSchema.default("message.input"), + type: Type$inboundSchema.default("message.input"), created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) .optional(), completed_at: z.nullable( @@ -203,7 +202,7 @@ export const MessageInputEntry$outboundSchema: z.ZodType< MessageInputEntry > = z.object({ object: ObjectT$outboundSchema.default("entry"), - type: MessageInputEntryType$outboundSchema.default("message.input"), + type: Type$outboundSchema.default("message.input"), createdAt: z.date().transform(v => v.toISOString()).optional(), completedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), id: z.string().optional(), diff --git a/src/models/components/modelcapabilities.ts b/src/models/components/modelcapabilities.ts index d89af13c..9817c29e 100644 --- a/src/models/components/modelcapabilities.ts +++ b/src/models/components/modelcapabilities.ts @@ -14,6 +14,7 @@ export type ModelCapabilities = { functionCalling?: boolean | undefined; fineTuning?: boolean | undefined; vision?: boolean | undefined; + classification?: boolean | undefined; }; /** @internal */ @@ -27,6 +28,7 @@ export const ModelCapabilities$inboundSchema: z.ZodType< function_calling: z.boolean().default(true), fine_tuning: z.boolean().default(false), vision: z.boolean().default(false), + classification: z.boolean().default(false), }).transform((v) => { return remap$(v, { "completion_chat": "completionChat", @@ -43,6 +45,7 @@ export type ModelCapabilities$Outbound = { function_calling: boolean; fine_tuning: boolean; vision: boolean; + classification: boolean; }; /** @internal */ @@ -56,6 +59,7 @@ export const ModelCapabilities$outboundSchema: z.ZodType< functionCalling: z.boolean().default(true), fineTuning: z.boolean().default(false), vision: z.boolean().default(false), + classification: z.boolean().default(false), }).transform((v) => { return remap$(v, { completionChat: "completion_chat", diff --git a/src/models/components/ocrrequest.ts b/src/models/components/ocrrequest.ts index e0abd7a5..9c5087e7 100644 --- a/src/models/components/ocrrequest.ts +++ b/src/models/components/ocrrequest.ts @@ -13,6 +13,12 @@ import { DocumentURLChunk$Outbound, DocumentURLChunk$outboundSchema, } from "./documenturlchunk.js"; +import { + FileChunk, + FileChunk$inboundSchema, + FileChunk$Outbound, + FileChunk$outboundSchema, +} from "./filechunk.js"; import { ImageURLChunk, ImageURLChunk$inboundSchema, @@ -29,7 +35,7 @@ import { /** * Document to run OCR on */ -export type Document = ImageURLChunk | DocumentURLChunk; +export type Document = FileChunk | ImageURLChunk | DocumentURLChunk; export type OCRRequest = { model: string | null; @@ -37,7 +43,7 @@ export type OCRRequest = { /** * Document to run OCR on */ - document: ImageURLChunk | DocumentURLChunk; + document: FileChunk | ImageURLChunk | DocumentURLChunk; /** * Specific pages user wants to process in various formats: single number, range, or list of both. Starts from 0 */ @@ -69,10 +75,15 @@ export const Document$inboundSchema: z.ZodType< Document, z.ZodTypeDef, unknown -> = z.union([ImageURLChunk$inboundSchema, DocumentURLChunk$inboundSchema]); +> = z.union([ + FileChunk$inboundSchema, + ImageURLChunk$inboundSchema, + DocumentURLChunk$inboundSchema, +]); /** @internal */ export type Document$Outbound = + | FileChunk$Outbound | ImageURLChunk$Outbound | DocumentURLChunk$Outbound; @@ -81,7 +92,11 @@ export const Document$outboundSchema: z.ZodType< Document$Outbound, z.ZodTypeDef, Document -> = z.union([ImageURLChunk$outboundSchema, DocumentURLChunk$outboundSchema]); +> = z.union([ + FileChunk$outboundSchema, + ImageURLChunk$outboundSchema, + DocumentURLChunk$outboundSchema, +]); /** * @internal @@ -119,6 +134,7 @@ export const OCRRequest$inboundSchema: z.ZodType< model: z.nullable(z.string()), id: z.string().optional(), document: z.union([ + FileChunk$inboundSchema, ImageURLChunk$inboundSchema, DocumentURLChunk$inboundSchema, ]), @@ -143,7 +159,10 @@ export const OCRRequest$inboundSchema: z.ZodType< export type OCRRequest$Outbound = { model: string | null; id?: string | undefined; - document: ImageURLChunk$Outbound | DocumentURLChunk$Outbound; + document: + | FileChunk$Outbound + | ImageURLChunk$Outbound + | DocumentURLChunk$Outbound; pages?: Array | null | undefined; include_image_base64?: boolean | null | undefined; image_limit?: number | null | undefined; @@ -161,6 +180,7 @@ export const OCRRequest$outboundSchema: z.ZodType< model: z.nullable(z.string()), id: z.string().optional(), document: z.union([ + FileChunk$outboundSchema, ImageURLChunk$outboundSchema, DocumentURLChunk$outboundSchema, ]), diff --git a/src/models/operations/agentsapiv1conversationsget.ts b/src/models/operations/agentsapiv1conversationsget.ts index 8abbbee8..a788931f 100644 --- a/src/models/operations/agentsapiv1conversationsget.ts +++ b/src/models/operations/agentsapiv1conversationsget.ts @@ -10,6 +10,9 @@ import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type AgentsApiV1ConversationsGetRequest = { + /** + * ID of the conversation from which we are fetching metadata. + */ conversationId: string; }; diff --git a/src/models/operations/agentsapiv1conversationshistory.ts b/src/models/operations/agentsapiv1conversationshistory.ts index 41a63985..78f67ce6 100644 --- a/src/models/operations/agentsapiv1conversationshistory.ts +++ b/src/models/operations/agentsapiv1conversationshistory.ts @@ -9,6 +9,9 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type AgentsApiV1ConversationsHistoryRequest = { + /** + * ID of the conversation from which we are fetching entries. + */ conversationId: string; }; diff --git a/src/models/operations/agentsapiv1conversationsmessages.ts b/src/models/operations/agentsapiv1conversationsmessages.ts index f780e0a1..19470b73 100644 --- a/src/models/operations/agentsapiv1conversationsmessages.ts +++ b/src/models/operations/agentsapiv1conversationsmessages.ts @@ -9,6 +9,9 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type AgentsApiV1ConversationsMessagesRequest = { + /** + * ID of the conversation from which we are fetching messages. + */ conversationId: string; }; diff --git a/src/models/operations/agentsapiv1conversationsrestart.ts b/src/models/operations/agentsapiv1conversationsrestart.ts index f568b5ec..94685442 100644 --- a/src/models/operations/agentsapiv1conversationsrestart.ts +++ b/src/models/operations/agentsapiv1conversationsrestart.ts @@ -10,6 +10,9 @@ import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type AgentsApiV1ConversationsRestartRequest = { + /** + * ID of the original conversation which is being restarted. + */ conversationId: string; conversationRestartRequest: components.ConversationRestartRequest; }; diff --git a/src/models/operations/agentsapiv1conversationsrestartstream.ts b/src/models/operations/agentsapiv1conversationsrestartstream.ts index 8d906b1c..962c98f2 100644 --- a/src/models/operations/agentsapiv1conversationsrestartstream.ts +++ b/src/models/operations/agentsapiv1conversationsrestartstream.ts @@ -10,6 +10,9 @@ import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type AgentsApiV1ConversationsRestartStreamRequest = { + /** + * ID of the original conversation which is being restarted. + */ conversationId: string; conversationRestartStreamRequest: components.ConversationRestartStreamRequest; }; diff --git a/src/sdk/models.ts b/src/sdk/models.ts index 38962edd..caf6db4a 100644 --- a/src/sdk/models.ts +++ b/src/sdk/models.ts @@ -33,7 +33,7 @@ export class Models extends ClientSDK { * Retrieve Model * * @remarks - * Retrieve a model information. + * Retrieve information about a model. */ async retrieve( request: operations.RetrieveModelV1ModelsModelIdGetRequest,