Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
speakeasyVersion: 1.517.3
speakeasyVersion: 1.606.10
sources:
mistral-azure-source:
sourceNamespace: mistral-openapi-azure
sourceRevisionDigest: sha256:670c460702ec74f7077491464a6dc5ee9d873969c80e812c48dbf4deb160e470
sourceBlobDigest: sha256:5a3ebfa4cb00a015bb7bb03ec7442fc7e0b9c17ca66ab35d3045290b2ad87eac
sourceRevisionDigest: sha256:597774940087aa6fcd0d62d088533e695b2b98c6f1048ceb73712688484e96f4
sourceBlobDigest: sha256:d7f5753d129b1f4a2a5631130ec30c13dc29c6b763d18e0e1d96ae2fe9e0fc62
tags:
- latest
- speakeasy-sdk-regen-1756133560
- speakeasy-sdk-regen-1756820965
mistral-google-cloud-source:
sourceNamespace: mistral-openapi-google-cloud
sourceRevisionDigest: sha256:4a5343e63c6a78152e472b00ccc46d7bcb15594496bc94c8040039d3a9d4c5f8
Expand All @@ -25,10 +25,10 @@ targets:
mistralai-azure-sdk:
source: mistral-azure-source
sourceNamespace: mistral-openapi-azure
sourceRevisionDigest: sha256:670c460702ec74f7077491464a6dc5ee9d873969c80e812c48dbf4deb160e470
sourceBlobDigest: sha256:5a3ebfa4cb00a015bb7bb03ec7442fc7e0b9c17ca66ab35d3045290b2ad87eac
sourceRevisionDigest: sha256:597774940087aa6fcd0d62d088533e695b2b98c6f1048ceb73712688484e96f4
sourceBlobDigest: sha256:d7f5753d129b1f4a2a5631130ec30c13dc29c6b763d18e0e1d96ae2fe9e0fc62
codeSamplesNamespace: mistral-openapi-azure-code-samples
codeSamplesRevisionDigest: sha256:d373ba4abaf784b31d5e84bf6df764cfefc312dc926b6ac1503f95c2a0c5cfee
codeSamplesRevisionDigest: sha256:d911a84daedd405bf470148ad76626dd4e38c21bf0b4b2aaead7aec5efdd760c
mistralai-gcp-sdk:
source: mistral-google-cloud-source
sourceNamespace: mistral-openapi-google-cloud
Expand All @@ -45,7 +45,7 @@ targets:
codeSamplesRevisionDigest: sha256:34e2099c693e2889e7a954dd68353d33403f7b2bdb0eb39e2c69f3c8c1e58b70
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.517.3
speakeasyVersion: v1.606.10
sources:
mistral-azure-source:
inputs:
Expand Down
8 changes: 8 additions & 0 deletions packages/mistralai-azure/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/examples/node_modules
.DS_Store
**/.speakeasy/temp/
**/.speakeasy/logs/
.DS_Store
.env
.env.local
.env.*.local
/mcp-server
/bin
/.eslintcache
Expand Down
45 changes: 28 additions & 17 deletions packages/mistralai-azure/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 01e8a40b-3df3-4d9a-9501-2eb9e0d26c05
management:
docChecksum: 87653f040f5b36c90e066870f34c478e
docChecksum: 65d0e29b5374a9509e9af311f51a1b21
docVersion: 1.0.0
speakeasyVersion: 1.517.3
generationVersion: 2.548.6
releaseVersion: 1.6.0
configChecksum: 9a8039f55bb9f5f2ed7dc48f15005ec5
speakeasyVersion: 1.606.10
generationVersion: 2.687.13
releaseVersion: 1.7.0
configChecksum: 7ac97405dd6668d2395562f99adc191b
repoURL: https://github.com/mistralai/client-ts.git
repoSubDirectory: packages/mistralai-azure
installationURL: https://gitpkg.now.sh/mistralai/client-ts/packages/mistralai-azure
Expand All @@ -15,26 +15,26 @@ features:
typescript:
additionalDependencies: 0.1.0
additionalProperties: 0.1.1
constsAndDefaults: 0.1.11
core: 3.21.4
constsAndDefaults: 0.1.12
core: 3.21.20
defaultEnabledRetries: 0.1.0
enumUnions: 0.1.0
envVarSecurityUsage: 0.1.2
examples: 2.81.5
examples: 2.82.3
globalSecurity: 2.82.13
globalSecurityCallbacks: 0.1.0
globalSecurityFlattening: 0.1.0
globalServerURLs: 2.82.4
globalServerURLs: 2.82.5
nameOverrides: 2.81.2
nullables: 0.1.1
openEnums: 0.1.1
responseFormat: 0.2.3
retries: 2.83.0
sdkHooks: 0.2.0
serverEvents: 0.1.5
sdkHooks: 0.3.0
serverEvents: 0.1.8
serverEventsSentinels: 0.1.0
serverIDs: 2.81.2
unions: 2.85.8
unions: 2.85.11
generatedFiles:
- .gitattributes
- .npmignore
Expand Down Expand Up @@ -92,7 +92,11 @@ generatedFiles:
- docs/models/components/stop.md
- docs/models/components/systemmessage.md
- docs/models/components/systemmessagecontent.md
- docs/models/components/systemmessagecontentchunks.md
- docs/models/components/textchunk.md
- docs/models/components/thinkchunk.md
- docs/models/components/thinkchunktype.md
- docs/models/components/thinking.md
- docs/models/components/tool.md
- docs/models/components/toolcall.md
- docs/models/components/toolchoice.md
Expand All @@ -109,6 +113,9 @@ generatedFiles:
- docs/models/components/validationerror.md
- docs/models/errors/httpvalidationerror.md
- eslint.config.mjs
- examples/.env.template
- examples/chatComplete.example.ts
- examples/package.json
- jsr.json
- package.json
- src/core.ts
Expand Down Expand Up @@ -168,7 +175,9 @@ generatedFiles:
- src/models/components/responseformats.ts
- src/models/components/security.ts
- src/models/components/systemmessage.ts
- src/models/components/systemmessagecontentchunks.ts
- src/models/components/textchunk.ts
- src/models/components/thinkchunk.ts
- src/models/components/tool.ts
- src/models/components/toolcall.ts
- src/models/components/toolchoice.ts
Expand All @@ -181,6 +190,8 @@ generatedFiles:
- src/models/errors/httpclienterrors.ts
- src/models/errors/httpvalidationerror.ts
- src/models/errors/index.ts
- src/models/errors/mistralazureerror.ts
- src/models/errors/responsevalidationerror.ts
- src/models/errors/sdkerror.ts
- src/models/errors/sdkvalidationerror.ts
- src/sdk/chat.ts
Expand All @@ -204,24 +215,24 @@ examples:
responses:
"422":
application/json: {}
"200": {}
chat_completion_v1_chat_completions_post:
speakeasy-default-chat-completion-v1-chat-completions-post:
requestBody:
application/json: {"model": "azureai", "stream": false, "messages": [{"content": "Who is the best French painter? Answer in one short sentence.", "role": "user"}]}
responses:
"200":
application/json: {"id": "cmpl-e5cc70bb28c444948073e77776eb30ef", "object": "chat.completion", "model": "mistral-small-latest", "usage": {"prompt_tokens": 16, "completion_tokens": 34, "total_tokens": 50}, "created": 1702256327, "choices": [{"index": 0, "message": {"prefix": false, "role": "assistant"}, "finish_reason": "stop"}, {"index": 0, "message": {"prefix": false, "role": "assistant"}, "finish_reason": "stop"}, {"index": 0, "message": {"prefix": false, "role": "assistant"}, "finish_reason": "stop"}]}
application/json: {"id": "cmpl-e5cc70bb28c444948073e77776eb30ef", "object": "chat.completion", "model": "mistral-small-latest", "usage": {"prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0}, "created": 1702256327, "choices": []}
"422":
application/json: {}
ocr_v1_ocr_post:
speakeasy-default-ocr-v1-ocr-post:
requestBody:
application/json: {"model": "Focus", "document": {"type": "file", "file_id": "d36f3178-f390-4532-8486-0e0b118bbaba"}}
application/json: {"model": "CX-9", "document": {"document_url": "https://upset-labourer.net/", "type": "document_url"}}
responses:
"200":
application/json: {"pages": [], "model": "Expedition", "usage_info": {"pages_processed": 487025}}
application/json: {"pages": [], "model": "Golf", "usage_info": {"pages_processed": 944919}}
"422":
application/json: {}
examplesVersion: 1.0.0
examplesVersion: 1.0.2
generatedTests: {}
releaseNotes: "## SDK Changes Detected:\n* `mistralazure.chat.complete()`: \n * `request.messages.[].[assistant].content.[array]` **Changed** **Breaking** :warning:\n"
12 changes: 11 additions & 1 deletion packages/mistralai-azure/.speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,33 @@ generation:
maintainOpenAPIOrder: true
usageSnippets:
optionalPropertyRendering: withExample
sdkInitStyle: constructor
useClassNamesForArrayFields: true
fixes:
nameResolutionDec2023: true
nameResolutionFeb2025: false
parameterOrderingFeb2024: true
requestResponseComponentNamesFeb2024: true
securityFeb2025: false
sharedErrorComponentsApr2025: false
auth:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
tests:
generateTests: true
generateNewTests: false
skipResponseBodyAssertions: false
typescript:
version: 1.6.0
version: 1.7.0
additionalDependencies:
dependencies: {}
devDependencies: {}
peerDependencies: {}
additionalPackageJSON: {}
author: Speakeasy
baseErrorName: MistralAzureError
clientServerStatusCodesAsErrors: true
constFieldsAlwaysOptional: true
defaultErrorName: SDKError
enableCustomCodeRegions: false
enableMCPServer: false
Expand All @@ -31,6 +39,7 @@ typescript:
envVarPrefix: MISTRAL
flattenGlobalSecurity: true
flatteningOrder: body-first
generateExamples: true
imports:
option: openapi
paths:
Expand All @@ -48,4 +57,5 @@ typescript:
packageName: '@mistralai/mistralai-azure'
responseFormat: flat
templateVersion: v2
usageSDKInitImports: []
useIndexModules: true
27 changes: 5 additions & 22 deletions packages/mistralai-azure/FUNCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ specific category of applications.
```typescript
import { MistralAzureCore } from "@mistralai/mistralai-azure/core.js";
import { chatComplete } from "@mistralai/mistralai-azure/funcs/chatComplete.js";
import { SDKValidationError } from "@mistralai/mistralai-azure/models/errors/sdkvalidationerror.js";

// Use `MistralAzureCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
Expand All @@ -38,28 +37,12 @@ async function run() {
},
],
});

switch (true) {
case res.ok:
// The success case will be handled outside of the switch block
break;
case res.error instanceof SDKValidationError:
// Pretty-print validation errors.
return console.log(res.error.pretty());
case res.error instanceof Error:
return console.log(res.error);
default:
// TypeScript's type checking will fail on the following line if the above
// cases were not exhaustive.
res.error satisfies never;
throw new Error("Assertion failed: expected error checks to be exhaustive: " + res.error);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("chatComplete failed:", res.error);
}


const { value: result } = res;

// Handle the result
console.log(result);
}

run();
Expand Down
12 changes: 11 additions & 1 deletion packages/mistralai-azure/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,14 @@ Based on:
### Generated
- [typescript v1.6.0] packages/mistralai-azure
### Releases
- [NPM v1.6.0] https://www.npmjs.com/package/@mistralai/mistralai-azure/v/1.6.0 - packages/mistralai-azure
- [NPM v1.6.0] https://www.npmjs.com/package/@mistralai/mistralai-azure/v/1.6.0 - packages/mistralai-azure

## 2025-09-02 13:49:09
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.606.10 (2.687.13) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v1.7.0] packages/mistralai-azure
### Releases
- [NPM v1.7.0] https://www.npmjs.com/package/@mistralai/mistralai-azure/v/1.7.0 - packages/mistralai-azure
2 changes: 2 additions & 0 deletions packages/mistralai-azure/docs/models/components/arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
```typescript
const value: { [k: string]: any } = {
"key": "<value>",
"key1": "<value>",
"key2": "<value>",
};
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ const value: string = "<value>";
### `components.ContentChunk[]`

```typescript
const value: components.ContentChunk[] = [
{
imageUrl: {
url: "https://jittery-window.com",
},
type: "image_url",
},
];
const value: components.ContentChunk[] = [];
```

Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@

## Supported Types

### `components.AssistantMessage`

```typescript
const value: components.AssistantMessage = {};
```

### `components.SystemMessage`

```typescript
Expand All @@ -21,14 +15,7 @@ const value: components.SystemMessage = {

```typescript
const value: components.ToolMessage = {
content: [
{
imageUrl: {
url: "https://sugary-brace.org/",
},
type: "image_url",
},
],
content: [],
};
```

Expand All @@ -40,3 +27,9 @@ const value: components.UserMessage = {
};
```

### `components.AssistantMessage`

```typescript
const value: components.AssistantMessage = {};
```

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const value: string = "<value>";

```typescript
const value: string[] = [
"<value>",
"<value 1>",
"<value 2>",
];
```

Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ let value: ChatCompletionResponse = {
model: "mistral-small-latest",
usage: {},
created: 1702256327,
choices: [
{
index: 0,
message: {},
finishReason: "stop",
},
],
choices: [],
};
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ const value: components.ToolChoice = {
### `components.ToolChoiceEnum`

```typescript
const value: components.ToolChoiceEnum = "none";
const value: components.ToolChoiceEnum = "required";
```

Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,8 @@ import { CompletionChunk } from "@mistralai/mistralai-azure/models/components";

let value: CompletionChunk = {
id: "<id>",
model: "Golf",
choices: [
{
index: 423655,
delta: {},
finishReason: "error",
},
],
model: "Prius",
choices: [],
};
```

Expand Down
Loading