Skip to content

Commit

Permalink
Merge pull request #3 from mistralai/speakeasy-sdk-regen-1723033642
Browse files Browse the repository at this point in the history
chore: 🐝 Update SDK - Generate MISTRALAI-SDK 1.0.0
  • Loading branch information
GaspardBT authored Aug 7, 2024
2 parents 4f2ce5f + fd2be18 commit 536f8a8
Show file tree
Hide file tree
Showing 13 changed files with 341 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<div align="center">
<a href="https://codespaces.new/mistralai/mistral-ts-client.git/tree/main"><img src="https://github.com/codespaces/badge.svg" /></a>
<a href="https://codespaces.new/mistralai/client-ts.git/tree/main"><img src="https://github.com/codespaces/badge.svg" /></a>
</div>
<br>

Expand Down
302 changes: 302 additions & 0 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
typescript:
version: 1.0.0-rc.3
version: 1.0.0
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand All @@ -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
3 changes: 3 additions & 0 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
speakeasyVersion: 1.356.0
sources: {}
targets:
mistralai-sdk:
source: mistral-openapi
outLocation: /github/workspace/repo
mistralai-azure-sdk:
source: mistral-azure-source
outLocation: ./packages/mistralai-azure
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 536f8a8

Please sign in to comment.