Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2,109 changes: 1,909 additions & 200 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ generation:
generateNewTests: false
skipResponseBodyAssertions: false
python:
version: 2.0.0rc1
version: 2.0.0
additionalDependencies:
dev:
pytest: ^8.2.2
Expand Down
12 changes: 6 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ sources:
- speakeasy-sdk-regen-1772455561
mistral-openapi:
sourceNamespace: mistral-openapi
sourceRevisionDigest: sha256:52cd52dd6272c5afe08072790b36e34de9a65c41357bab87a45cf6635dc30db0
sourceBlobDigest: sha256:7eb63e6d0b2226456aad34b5ae9edd75cc8e015643d478c09b717852e2852065
sourceRevisionDigest: sha256:640293da26384ecedd813123997d7946815084924b8cbd91069aea0829d28b53
sourceBlobDigest: sha256:940626b1345a63b95ae840bd523458ea2b418767d64b864ad06ded4d38c6ea4d
tags:
- latest
- speakeasy-sdk-regen-1772205200
- speakeasy-sdk-regen-1773084143
targets:
mistralai-azure-sdk:
source: mistral-azure-source
Expand All @@ -39,10 +39,10 @@ targets:
mistralai-sdk:
source: mistral-openapi
sourceNamespace: mistral-openapi
sourceRevisionDigest: sha256:52cd52dd6272c5afe08072790b36e34de9a65c41357bab87a45cf6635dc30db0
sourceBlobDigest: sha256:7eb63e6d0b2226456aad34b5ae9edd75cc8e015643d478c09b717852e2852065
sourceRevisionDigest: sha256:640293da26384ecedd813123997d7946815084924b8cbd91069aea0829d28b53
sourceBlobDigest: sha256:940626b1345a63b95ae840bd523458ea2b418767d64b864ad06ded4d38c6ea4d
codeSamplesNamespace: mistral-openapi-code-samples
codeSamplesRevisionDigest: sha256:534088a1428d166f80e9669ec6bc67d277e22113c745ef8904789f0c6e6381d9
codeSamplesRevisionDigest: sha256:57a8f791effc62a15982c2ca9560bddbf4a9d03ae9cb0171f352e73a34e7cf61
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.729.0
Expand Down
78 changes: 73 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ with Mistral(
res = mistral.files.upload(file={
"file_name": "example.file",
"content": open("example.file", "rb"),
})
}, visibility="workspace")

# Handle response
print(res)
Expand All @@ -243,7 +243,7 @@ async def main():
res = await mistral.files.upload_async(file={
"file_name": "example.file",
"content": open("example.file", "rb"),
})
}, visibility="workspace")

# Handle response
print(res)
Expand Down Expand Up @@ -498,6 +498,15 @@ print(res.choices[0].message.content)
* [list_version_aliases](docs/sdks/betaagents/README.md#list_version_aliases) - List all aliases for an agent.
* [delete_version_alias](docs/sdks/betaagents/README.md#delete_version_alias) - Delete an agent version alias.

### [Beta.Connectors](docs/sdks/connectors/README.md)

* [create](docs/sdks/connectors/README.md#create) - Create a new connector.
* [list](docs/sdks/connectors/README.md#list) - List all connectors.
* [call_tool](docs/sdks/connectors/README.md#call_tool) - Call Connector Tool
* [get](docs/sdks/connectors/README.md#get) - Get a connector.
* [update](docs/sdks/connectors/README.md#update) - Update a connector.
* [delete](docs/sdks/connectors/README.md#delete) - Delete a connector.

### [Beta.Conversations](docs/sdks/conversations/README.md)

* [start](docs/sdks/conversations/README.md#start) - Create a conversation and append entries to it.
Expand Down Expand Up @@ -539,6 +548,64 @@ print(res.choices[0].message.content)
* [extracted_text_signed_url](docs/sdks/documents/README.md#extracted_text_signed_url) - Retrieve the signed URL of text extracted from a given document.
* [reprocess](docs/sdks/documents/README.md#reprocess) - Reprocess a document.

### [Beta.Observability.Campaigns](docs/sdks/campaigns/README.md)

* [create](docs/sdks/campaigns/README.md#create) - Create and start a new campaign
* [list](docs/sdks/campaigns/README.md#list) - Get all campaigns
* [fetch](docs/sdks/campaigns/README.md#fetch) - Get campaign by id
* [delete](docs/sdks/campaigns/README.md#delete) - Delete a campaign
* [fetch_status](docs/sdks/campaigns/README.md#fetch_status) - Get campaign status by campaign id
* [list_events](docs/sdks/campaigns/README.md#list_events) - Get event ids that were selected by the given campaign

### [Beta.Observability.ChatCompletionEvents](docs/sdks/chatcompletionevents/README.md)

* [search](docs/sdks/chatcompletionevents/README.md#search) - Get Chat Completion Events
* [search_ids](docs/sdks/chatcompletionevents/README.md#search_ids) - Alternative to /search that returns only the IDs and that can return many IDs at once
* [fetch](docs/sdks/chatcompletionevents/README.md#fetch) - Get Chat Completion Event
* [fetch_similar_events](docs/sdks/chatcompletionevents/README.md#fetch_similar_events) - Get Similar Chat Completion Events
* [judge](docs/sdks/chatcompletionevents/README.md#judge) - Run Judge on an event based on the given options

#### [Beta.Observability.ChatCompletionEvents.Fields](docs/sdks/fields/README.md)

* [list](docs/sdks/fields/README.md#list) - Get Chat Completion Fields
* [fetch_options](docs/sdks/fields/README.md#fetch_options) - Get Chat Completion Field Options
* [fetch_option_counts](docs/sdks/fields/README.md#fetch_option_counts) - Get Chat Completion Field Options Counts

### [Beta.Observability.Datasets](docs/sdks/datasets/README.md)

* [create](docs/sdks/datasets/README.md#create) - Create a new empty dataset
* [list](docs/sdks/datasets/README.md#list) - List existing datasets
* [fetch](docs/sdks/datasets/README.md#fetch) - Get dataset by id
* [delete](docs/sdks/datasets/README.md#delete) - Delete a dataset
* [update](docs/sdks/datasets/README.md#update) - Patch dataset
* [list_records](docs/sdks/datasets/README.md#list_records) - List existing records in the dataset
* [create_record](docs/sdks/datasets/README.md#create_record) - Add a conversation to the dataset
* [import_from_campaign](docs/sdks/datasets/README.md#import_from_campaign) - Populate the dataset with a campaign
* [import_from_explorer](docs/sdks/datasets/README.md#import_from_explorer) - Populate the dataset with samples from the explorer
* [import_from_file](docs/sdks/datasets/README.md#import_from_file) - Populate the dataset with samples from an uploaded file
* [import_from_playground](docs/sdks/datasets/README.md#import_from_playground) - Populate the dataset with samples from the playground
* [import_from_dataset_records](docs/sdks/datasets/README.md#import_from_dataset_records) - Populate the dataset with samples from another dataset
* [export_to_jsonl](docs/sdks/datasets/README.md#export_to_jsonl) - Export to the Files API and retrieve presigned URL to download the resulting JSONL file
* [fetch_task](docs/sdks/datasets/README.md#fetch_task) - Get status of a dataset import task
* [list_tasks](docs/sdks/datasets/README.md#list_tasks) - List import tasks for the given dataset

#### [Beta.Observability.Datasets.Records](docs/sdks/records/README.md)

* [fetch](docs/sdks/records/README.md#fetch) - Get the content of a given conversation from a dataset
* [delete](docs/sdks/records/README.md#delete) - Delete a record from a dataset
* [bulk_delete](docs/sdks/records/README.md#bulk_delete) - Delete multiple records from datasets
* [judge](docs/sdks/records/README.md#judge) - Run Judge on a dataset record based on the given options
* [update_payload](docs/sdks/records/README.md#update_payload) - Update a dataset record conversation payload
* [update_properties](docs/sdks/records/README.md#update_properties) - Update conversation properties

### [Beta.Observability.Judges](docs/sdks/judges/README.md)

* [create](docs/sdks/judges/README.md#create) - Create a new judge
* [list](docs/sdks/judges/README.md#list) - Get judges with optional filtering and search
* [fetch](docs/sdks/judges/README.md#fetch) - Get judge by id
* [delete](docs/sdks/judges/README.md#delete) - Delete a judge
* [update](docs/sdks/judges/README.md#update) - Update a judge

### [Chat](docs/sdks/chat/README.md)

* [complete](docs/sdks/chat/README.md#complete) - Chat Completion
Expand Down Expand Up @@ -739,7 +806,7 @@ with Mistral(
res = None
try:

res = mistral.models.retrieve(model_id="ft:open-mistral-7b:587a6b29:20240514:7e773925")
res = mistral.models.list()

# Handle response
print(res)
Expand All @@ -762,7 +829,7 @@ with Mistral(
**Primary error:**
* [`MistralError`](./src/mistralai/client/errors/mistralerror.py): The base class for HTTP error responses.

<details><summary>Less common errors (6)</summary>
<details><summary>Less common errors (7)</summary>

<br />

Expand All @@ -773,7 +840,8 @@ with Mistral(


**Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**:
* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 53 of 75 methods.*
* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 60 of 121 methods.*
* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 40 of 121 methods.*
* [`ResponseValidationError`](./src/mistralai/client/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.

</details>
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,4 +388,14 @@ Based on:
### Generated
- [python v2.0.0rc1] .
### Releases
- [PyPI v2.0.0rc1] https://pypi.org/project/mistralai/2.0.0rc1 - .
- [PyPI v2.0.0rc1] https://pypi.org/project/mistralai/2.0.0rc1 - .

## 2026-03-09 19:22:03
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.729.0 (2.841.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v2.0.0] .
### Releases
- [PyPI v2.0.0] https://pypi.org/project/mistralai/2.0.0 - .
4 changes: 2 additions & 2 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ with Mistral(
res = mistral.files.upload(file={
"file_name": "example.file",
"content": open("example.file", "rb"),
})
}, visibility="workspace")

# Handle response
print(res)
Expand All @@ -99,7 +99,7 @@ async def main():
res = await mistral.files.upload_async(file={
"file_name": "example.file",
"content": open("example.file", "rb"),
})
}, visibility="workspace")

# Handle response
print(res)
Expand Down
8 changes: 8 additions & 0 deletions docs/errors/observabilityerror.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ObservabilityError


## Fields

| Field | Type | Required | Description |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `detail` | [models.ObservabilityErrorDetail](../models/observabilityerrordetail.md) | :heavy_check_mark: | N/A |
1 change: 1 addition & 0 deletions docs/models/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
| `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | Instruction prompt the model will follow during the conversation. |
| `tools` | List[[models.AgentTool](../models/agenttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. |
| `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API |
| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A |
| `model` | *str* | :heavy_check_mark: | N/A |
| `name` | *str* | :heavy_check_mark: | N/A |
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
Expand Down
17 changes: 17 additions & 0 deletions docs/models/and_.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# And


## Supported Types

### `models.FilterGroup`

```python
value: models.FilterGroup = /* values here */
```

### `models.FilterCondition`

```python
value: models.FilterCondition = /* values here */
```

10 changes: 10 additions & 0 deletions docs/models/annotations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Annotations


## Fields

| Field | Type | Required | Description |
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
| `audience` | List[[models.Audience](../models/audience.md)] | :heavy_minus_sign: | N/A |
| `priority` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A |
17 changes: 17 additions & 0 deletions docs/models/answer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Answer


## Supported Types

### `str`

```python
value: str = /* values here */
```

### `float`

```python
value: float = /* values here */
```

9 changes: 9 additions & 0 deletions docs/models/audience.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Audience


## Values

| Name | Value |
| ----------- | ----------- |
| `USER` | user |
| `ASSISTANT` | assistant |
15 changes: 15 additions & 0 deletions docs/models/audiocontent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# AudioContent

Audio content for a message.


## Fields

| Field | Type | Required | Description |
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
| `type` | *Literal["audio"]* | :heavy_check_mark: | N/A |
| `data` | *str* | :heavy_check_mark: | N/A |
| `mime_type` | *str* | :heavy_check_mark: | N/A |
| `annotations` | [OptionalNullable[models.Annotations]](../models/annotations.md) | :heavy_minus_sign: | N/A |
| `meta` | Dict[str, *Any*] | :heavy_minus_sign: | N/A |
| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A |
13 changes: 13 additions & 0 deletions docs/models/audiourl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# AudioURL

Audio URL.

Attributes:
url: The URL of the audio file.


## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `url` | *str* | :heavy_check_mark: | N/A |
15 changes: 15 additions & 0 deletions docs/models/audiourlchunk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# AudioURLChunk

Audio URL chunk.

Attributes:
type: The type of the chunk, which is always `ChunkTypes.audio_url`.
audio_url: The URL of the audio file.


## Fields

| Field | Type | Required | Description |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `type` | *Literal["audio_url"]* | :heavy_check_mark: | N/A |
| `audio_url` | [models.AudioURLUnion](../models/audiourlunion.md) | :heavy_check_mark: | N/A |
17 changes: 17 additions & 0 deletions docs/models/audiourlunion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# AudioURLUnion


## Supported Types

### `str`

```python
value: str = /* values here */
```

### `models.AudioURL`

```python
value: models.AudioURL = /* values here */
```

9 changes: 9 additions & 0 deletions docs/models/authdata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# AuthData


## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `client_id` | *str* | :heavy_check_mark: | N/A |
| `client_secret` | *str* | :heavy_check_mark: | N/A |
Loading