From e5720112dbdbc8d84d47d4f7d9a158fa2e4a8ce5 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 7 Aug 2024 14:13:44 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.356.0 --- .devcontainer/README.md | 2 +- .speakeasy/gen.lock | 302 ++++++++++++++++++++++++++++++++++++ .speakeasy/gen.yaml | 4 +- .speakeasy/workflow.lock | 46 ++++++ README.md | 22 +-- RELEASES.md | 11 ++ docs/sdks/agents/README.md | 4 +- jsr.json | 2 +- package-lock.json | 4 +- package.json | 4 +- src/funcs/agentsComplete.ts | 2 +- src/lib/config.ts | 4 +- src/sdk/agents.ts | 2 +- 13 files changed, 384 insertions(+), 25 deletions(-) create mode 100644 .speakeasy/gen.lock create mode 100644 .speakeasy/workflow.lock create mode 100644 RELEASES.md diff --git a/.devcontainer/README.md b/.devcontainer/README.md index 63d669a..9832db9 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -1,6 +1,6 @@
- +

diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock new file mode 100644 index 0000000..f061024 --- /dev/null +++ b/.speakeasy/gen.lock @@ -0,0 +1,302 @@ +lockVersion: 2.0.0 +id: 81b65c50-f2e3-40a3-bd65-346524007b3d +management: + docChecksum: 9e7a46648104410da4d94d5c2b373d20 + docVersion: 0.0.2 + speakeasyVersion: 1.356.0 + generationVersion: 2.388.1 + releaseVersion: 1.0.0 + configChecksum: 869d7356f7c026cd6078168155323e9e + repoURL: https://github.com/mistralai/client-ts.git + installationURL: https://github.com/mistralai/client-ts + published: true +features: + typescript: + additionalDependencies: 0.1.0 + constsAndDefaults: 0.1.6 + core: 3.12.2 + defaultEnabledRetries: 0.1.0 + devContainers: 2.90.0 + envVarSecurityUsage: 0.1.1 + examples: 2.81.4 + globalSecurity: 2.82.10 + globalSecurityCallbacks: 0.1.0 + globalSecurityFlattening: 0.1.0 + globalServerURLs: 2.82.4 + nameOverrides: 2.81.2 + nullables: 0.1.0 + responseFormat: 0.2.3 + retries: 2.83.0 + sdkHooks: 0.1.0 + serverEvents: 0.1.4 + serverEventsSentinels: 0.1.0 + serverIDs: 2.81.2 + unions: 2.85.6 +generatedFiles: + - src/funcs/modelsList.ts + - src/funcs/modelsRetrieve.ts + - src/funcs/modelsDelete.ts + - src/funcs/modelsUpdate.ts + - src/funcs/modelsArchive.ts + - src/funcs/modelsUnarchive.ts + - src/funcs/filesUpload.ts + - src/funcs/filesList.ts + - src/funcs/filesRetrieve.ts + - src/funcs/filesDelete.ts + - src/funcs/chatComplete.ts + - src/funcs/chatStream.ts + - src/funcs/fimComplete.ts + - src/funcs/fimStream.ts + - src/funcs/agentsComplete.ts + - src/funcs/agentsStream.ts + - src/funcs/embeddingsCreate.ts + - src/funcs/fineTuningJobsList.ts + - src/funcs/fineTuningJobsCreate.ts + - src/funcs/fineTuningJobsGet.ts + - src/funcs/fineTuningJobsCancel.ts + - src/funcs/fineTuningJobsStart.ts + - src/sdk/models.ts + - src/sdk/files.ts + - src/sdk/jobs.ts + - src/sdk/finetuning.ts + - src/sdk/chat.ts + - src/sdk/fim.ts + - src/sdk/agents.ts + - src/sdk/embeddings.ts + - src/sdk/sdk.ts + - .eslintrc.cjs + - .npmignore + - RUNTIMES.md + - jsr.json + - package.json + - src/core.ts + - src/index.ts + - src/lib/base64.ts + - src/lib/config.ts + - src/lib/dlv.ts + - src/lib/encodings.ts + - src/lib/env.ts + - src/lib/event-streams.ts + - src/lib/http.ts + - src/lib/is-plain-object.ts + - src/lib/matchers.ts + - src/lib/primitives.ts + - src/lib/retries.ts + - src/lib/schemas.ts + - src/lib/sdks.ts + - src/lib/security.ts + - src/lib/url.ts + - src/sdk/index.ts + - src/models/errors/httpclienterrors.ts + - src/models/errors/sdkerror.ts + - src/models/errors/sdkvalidationerror.ts + - src/types/blobs.ts + - src/types/enums.ts + - src/types/fp.ts + - src/types/index.ts + - src/types/operations.ts + - src/types/rfcdate.ts + - tsconfig.json + - src/models/components/modellist.ts + - src/models/components/modelcard.ts + - src/models/components/modelcapabilities.ts + - src/models/components/validationerror.ts + - src/models/components/deletemodelout.ts + - src/models/components/ftmodelout.ts + - src/models/components/ftmodelcapabilitiesout.ts + - src/models/components/updateftmodelin.ts + - src/models/components/archiveftmodelout.ts + - src/models/components/unarchiveftmodelout.ts + - src/models/components/uploadfileout.ts + - src/models/components/source.ts + - src/models/components/sampletype.ts + - src/models/components/listfilesout.ts + - src/models/components/fileschema.ts + - src/models/components/retrievefileout.ts + - src/models/components/deletefileout.ts + - src/models/components/jobsout.ts + - src/models/components/jobout.ts + - src/models/components/jobmetadataout.ts + - src/models/components/githubrepositoryout.ts + - src/models/components/wandbintegrationout.ts + - src/models/components/finetuneablemodel.ts + - src/models/components/trainingparameters.ts + - src/models/components/legacyjobmetadataout.ts + - src/models/components/jobin.ts + - src/models/components/githubrepositoryin.ts + - src/models/components/wandbintegration.ts + - src/models/components/trainingparametersin.ts + - src/models/components/trainingfile.ts + - src/models/components/detailedjobout.ts + - src/models/components/checkpointout.ts + - src/models/components/metricout.ts + - src/models/components/eventout.ts + - src/models/components/chatcompletionresponse.ts + - src/models/components/chatcompletionchoice.ts + - src/models/components/assistantmessage.ts + - src/models/components/toolcall.ts + - src/models/components/functioncall.ts + - src/models/components/usageinfo.ts + - src/models/components/chatcompletionrequest.ts + - src/models/components/tool.ts + - src/models/components/function.ts + - src/models/components/responseformat.ts + - src/models/components/systemmessage.ts + - src/models/components/contentchunk.ts + - src/models/components/usermessage.ts + - src/models/components/textchunk.ts + - src/models/components/toolmessage.ts + - src/models/components/completionevent.ts + - src/models/components/completionchunk.ts + - src/models/components/completionresponsestreamchoice.ts + - src/models/components/deltamessage.ts + - src/models/components/chatcompletionstreamrequest.ts + - src/models/components/fimcompletionresponse.ts + - src/models/components/fimcompletionrequest.ts + - src/models/components/fimcompletionstreamrequest.ts + - src/models/components/agentscompletionrequest.ts + - src/models/components/agentscompletionstreamrequest.ts + - src/models/components/embeddingresponse.ts + - src/models/components/embeddingresponsedata.ts + - src/models/components/embeddingrequest.ts + - src/models/components/security.ts + - src/models/errors/httpvalidationerror.ts + - src/models/operations/retrievemodelv1modelsmodelidget.ts + - src/models/operations/deletemodelv1modelsmodeliddelete.ts + - src/models/operations/jobsapiroutesfinetuningupdatefinetunedmodel.ts + - src/models/operations/jobsapiroutesfinetuningarchivefinetunedmodel.ts + - src/models/operations/jobsapiroutesfinetuningunarchivefinetunedmodel.ts + - src/models/operations/filesapiroutesuploadfile.ts + - src/models/operations/filesapiroutesretrievefile.ts + - src/models/operations/filesapiroutesdeletefile.ts + - src/models/operations/jobsapiroutesfinetuninggetfinetuningjobs.ts + - src/models/operations/jobsapiroutesfinetuningcreatefinetuningjob.ts + - src/models/operations/jobsapiroutesfinetuninggetfinetuningjob.ts + - src/models/operations/jobsapiroutesfinetuningcancelfinetuningjob.ts + - src/models/operations/jobsapiroutesfinetuningstartfinetuningjob.ts + - src/models/errors/index.ts + - src/models/components/index.ts + - src/models/operations/index.ts + - docs/models/components/modellist.md + - docs/models/components/modelcard.md + - docs/models/components/modelcapabilities.md + - docs/models/components/loc.md + - docs/models/components/validationerror.md + - docs/models/components/deletemodelout.md + - docs/models/components/ftmodelout.md + - docs/models/components/ftmodelcapabilitiesout.md + - docs/models/components/updateftmodelin.md + - docs/models/components/archiveftmodelout.md + - docs/models/components/unarchiveftmodelout.md + - docs/models/components/uploadfileout.md + - docs/models/components/source.md + - docs/models/components/sampletype.md + - docs/models/components/listfilesout.md + - docs/models/components/fileschema.md + - docs/models/components/retrievefileout.md + - docs/models/components/deletefileout.md + - docs/models/components/jobsout.md + - docs/models/components/status.md + - docs/models/components/jobout.md + - docs/models/components/jobmetadataout.md + - docs/models/components/githubrepositoryout.md + - docs/models/components/wandbintegrationout.md + - docs/models/components/finetuneablemodel.md + - docs/models/components/trainingparameters.md + - docs/models/components/legacyjobmetadataout.md + - docs/models/components/jobin.md + - docs/models/components/githubrepositoryin.md + - docs/models/components/wandbintegration.md + - docs/models/components/trainingparametersin.md + - docs/models/components/trainingfile.md + - docs/models/components/detailedjoboutstatus.md + - docs/models/components/detailedjobout.md + - docs/models/components/checkpointout.md + - docs/models/components/metricout.md + - docs/models/components/eventout.md + - docs/models/components/chatcompletionresponse.md + - docs/models/components/finishreason.md + - docs/models/components/chatcompletionchoice.md + - docs/models/components/assistantmessagerole.md + - docs/models/components/assistantmessage.md + - docs/models/components/toolcall.md + - docs/models/components/arguments.md + - docs/models/components/functioncall.md + - docs/models/components/usageinfo.md + - docs/models/components/stop.md + - docs/models/components/messages.md + - docs/models/components/toolchoice.md + - docs/models/components/chatcompletionrequest.md + - docs/models/components/tool.md + - docs/models/components/functiont.md + - docs/models/components/responseformats.md + - docs/models/components/responseformat.md + - docs/models/components/content.md + - docs/models/components/role.md + - docs/models/components/systemmessage.md + - docs/models/components/contentchunk.md + - docs/models/components/usermessagecontent.md + - docs/models/components/usermessagerole.md + - docs/models/components/usermessage.md + - docs/models/components/textchunk.md + - docs/models/components/toolmessagerole.md + - docs/models/components/toolmessage.md + - docs/models/components/completionevent.md + - docs/models/components/completionchunk.md + - docs/models/components/completionresponsestreamchoicefinishreason.md + - docs/models/components/completionresponsestreamchoice.md + - docs/models/components/deltamessage.md + - docs/models/components/chatcompletionstreamrequeststop.md + - docs/models/components/chatcompletionstreamrequestmessages.md + - docs/models/components/chatcompletionstreamrequesttoolchoice.md + - docs/models/components/chatcompletionstreamrequest.md + - docs/models/components/fimcompletionresponse.md + - docs/models/components/fimcompletionrequeststop.md + - docs/models/components/fimcompletionrequest.md + - docs/models/components/fimcompletionstreamrequeststop.md + - docs/models/components/fimcompletionstreamrequest.md + - docs/models/components/agentscompletionrequeststop.md + - docs/models/components/agentscompletionrequestmessages.md + - docs/models/components/agentscompletionrequesttoolchoice.md + - docs/models/components/agentscompletionrequest.md + - docs/models/components/agentscompletionstreamrequeststop.md + - docs/models/components/agentscompletionstreamrequest.md + - docs/models/components/embeddingresponse.md + - docs/models/components/embeddingresponsedata.md + - docs/models/components/inputs.md + - docs/models/components/embeddingrequest.md + - docs/models/components/security.md + - docs/models/errors/httpvalidationerror.md + - docs/models/operations/retrievemodelv1modelsmodelidgetrequest.md + - docs/models/operations/deletemodelv1modelsmodeliddeleterequest.md + - docs/models/operations/jobsapiroutesfinetuningupdatefinetunedmodelrequest.md + - docs/models/operations/jobsapiroutesfinetuningarchivefinetunedmodelrequest.md + - docs/models/operations/jobsapiroutesfinetuningunarchivefinetunedmodelrequest.md + - docs/models/operations/filet.md + - docs/models/operations/filesapiroutesuploadfilemultipartbodyparams.md + - docs/models/operations/filesapiroutesretrievefilerequest.md + - docs/models/operations/filesapiroutesdeletefilerequest.md + - docs/models/operations/status.md + - docs/models/operations/jobsapiroutesfinetuninggetfinetuningjobsrequest.md + - docs/models/operations/jobsapiroutesfinetuningcreatefinetuningjobresponse.md + - docs/models/operations/jobsapiroutesfinetuninggetfinetuningjobrequest.md + - docs/models/operations/jobsapiroutesfinetuningcancelfinetuningjobrequest.md + - docs/models/operations/jobsapiroutesfinetuningstartfinetuningjobrequest.md + - docs/sdks/mistral/README.md + - docs/lib/utils/retryconfig.md + - docs/sdks/models/README.md + - docs/sdks/files/README.md + - docs/sdks/finetuning/README.md + - docs/sdks/jobs/README.md + - docs/sdks/chat/README.md + - docs/sdks/fim/README.md + - docs/sdks/agents/README.md + - docs/sdks/embeddings/README.md + - USAGE.md + - .gitattributes + - .devcontainer/README.md + - .devcontainer/devcontainer.json + - .devcontainer/setup.sh + - src/hooks/hooks.ts + - src/hooks/types.ts + - src/hooks/index.ts diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 17cb4f7..2c81e83 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -15,7 +15,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true typescript: - version: 1.0.0-rc.3 + version: 1.0.0 additionalDependencies: dependencies: {} devDependencies: {} @@ -39,7 +39,7 @@ typescript: methodArguments: require-security-and-request moduleFormat: commonjs outputModelSuffix: output - packageName: "@mistralai/mistralai" + packageName: '@mistralai/mistralai' responseFormat: flat templateVersion: v2 useIndexModules: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock new file mode 100644 index 0000000..5a7bc3a --- /dev/null +++ b/.speakeasy/workflow.lock @@ -0,0 +1,46 @@ +speakeasyVersion: 1.356.0 +sources: {} +targets: + mistralai-sdk: + source: mistral-openapi + outLocation: /github/workspace/repo +workflow: + workflowVersion: 1.0.0 + speakeasyVersion: latest + sources: + mistral-azure-source: + inputs: + - location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-azure + registry: + location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-azure + mistral-google-cloud-source: + inputs: + - location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-google-cloud + registry: + location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-google-cloud + mistral-openapi: + inputs: + - location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi + registry: + location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi + targets: + mistralai-azure-sdk: + target: typescript + source: mistral-azure-source + output: ./packages/mistralai-azure + publish: + npm: + token: $npm_token + mistralai-gcp-sdk: + target: typescript + source: mistral-google-cloud-source + output: ./packages/mistralai-gcp + publish: + npm: + token: $npm_token + mistralai-sdk: + target: typescript + source: mistral-openapi + publish: + npm: + token: $npm_token diff --git a/README.md b/README.md index f279ba7..645266f 100644 --- a/README.md +++ b/README.md @@ -188,7 +188,7 @@ We have dedicated SDKs for the following providers: ### [agents](docs/sdks/agents/README.md) -* [complete](docs/sdks/agents/README.md#complete) - Chat Completion +* [complete](docs/sdks/agents/README.md#complete) - Agents Completion * [stream](docs/sdks/agents/README.md#stream) - Stream Agents completion ### [embeddings](docs/sdks/embeddings/README.md) @@ -342,10 +342,10 @@ run(); All SDK methods return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type. -| Error Object | Status Code | Content Type | -| -------------------------- | ----------- | ---------------- | -| errors.HTTPValidationError | 422 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4xx-5xx | */* | Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging. @@ -397,9 +397,9 @@ run(); You can override the default server globally by passing a server name to the `server` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers: -| Name | Server | Variables | -| ------ | ------------------------ | --------- | -| `prod` | `https://api.mistral.ai` | None | +| Name | Server | Variables | +| ----- | ------ | --------- | +| `prod` | `https://api.mistral.ai` | None | ```typescript import { Mistral } from "@mistralai/mistralai"; @@ -501,9 +501,9 @@ const sdk = new Mistral({ httpClient }); This SDK supports the following security scheme globally: -| Name | Type | Scheme | Environment Variable | -| -------- | ---- | ----------- | -------------------- | -| `apiKey` | http | HTTP Bearer | `MISTRAL_API_KEY` | +| Name | Type | Scheme | Environment Variable | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `apiKey` | http | HTTP Bearer | `MISTRAL_API_KEY` | To authenticate with the API the `nullT` parameter must be set when initializing the SDK client instance. For example: ```typescript diff --git a/RELEASES.md b/RELEASES.md new file mode 100644 index 0000000..6d24f07 --- /dev/null +++ b/RELEASES.md @@ -0,0 +1,11 @@ + + +## 2024-08-07 14:12:46 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.356.0 (2.388.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v1.0.0] . +### Releases +- [NPM v1.0.0] https://www.npmjs.com/package/@mistralai/mistralai/v/1.0.0 - . \ No newline at end of file diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index a7e40f0..a8d0dab 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -7,12 +7,12 @@ Agents API. ### Available Operations -* [complete](#complete) - Chat Completion +* [complete](#complete) - Agents Completion * [stream](#stream) - Stream Agents completion ## complete -Chat Completion +Agents Completion ### Example Usage diff --git a/jsr.json b/jsr.json index 0fd7e4a..1621832 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@mistralai/mistralai", - "version": "1.0.0-rc.9", + "version": "1.0.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 41228d9..bba5a16 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@mistralai/mistralai", - "version": "1.0.0-rc.9", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@mistralai/mistralai", - "version": "1.0.0-rc.9", + "version": "1.0.0", "devDependencies": { "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", diff --git a/package.json b/package.json index 0de0b5b..ae470b1 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "@mistralai/mistralai", - "version": "1.0.0-rc.9", + "version": "1.0.0", "author": "Speakeasy", "main": "./index.js", "sideEffects": false, "repository": { "type": "git", - "url": "https://github.com/mistralai/mistral-ts-client.git" + "url": "https://github.com/mistralai/client-ts.git" }, "scripts": { "lint": "eslint --max-warnings=0 src", diff --git a/src/funcs/agentsComplete.ts b/src/funcs/agentsComplete.ts index 5e695d6..e15013f 100644 --- a/src/funcs/agentsComplete.ts +++ b/src/funcs/agentsComplete.ts @@ -23,7 +23,7 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { Result } from "../types/fp.js"; /** - * Chat Completion + * Agents Completion */ export async function agentsComplete( client$: MistralCore, diff --git a/src/lib/config.ts b/src/lib/config.ts index 1c52405..3a17baa 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -53,7 +53,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.0.2", - sdkVersion: "1.0.0-rc.9", + sdkVersion: "1.0.0", genVersion: "2.388.1", - userAgent: "speakeasy-sdk/typescript 1.0.0-rc.9 2.388.1 0.0.2 @mistralai/mistralai", + userAgent: "speakeasy-sdk/typescript 1.0.0 2.388.1 0.0.2 @mistralai/mistralai", } as const; diff --git a/src/sdk/agents.ts b/src/sdk/agents.ts index 81dff99..19bacd6 100644 --- a/src/sdk/agents.ts +++ b/src/sdk/agents.ts @@ -11,7 +11,7 @@ import { unwrapAsync } from "../types/fp.js"; export class Agents extends ClientSDK { /** - * Chat Completion + * Agents Completion */ async complete( request: components.AgentsCompletionRequest,