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,186 changes: 2,112 additions & 74 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 @@ -32,7 +32,7 @@ generation:
generateNewTests: false
skipResponseBodyAssertions: false
python:
version: 2.1.3
version: 2.2.0rc1
additionalDependencies:
dev:
pytest: ^8.2.2
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ sources:
- speakeasy-sdk-regen-1773084660
mistral-openapi:
sourceNamespace: mistral-openapi
sourceRevisionDigest: sha256:480366372609b8e74697827a161a478dd87aa95460d0e078ecc73b5dfa0d00ff
sourceBlobDigest: sha256:23523b81989fa5223902dea44dd6bebf8eb7b1dceec5cc3aa4dbb969ecde6652
sourceRevisionDigest: sha256:edeef4396c29b9a5960e150514289777d4aef71037b03d14444238455fc1c1bd
sourceBlobDigest: sha256:b8b6deb9c127b45ad0cd5700c1e9d69f63927b070817e5986f7131f14dba6ba7
tags:
- latest
targets:
Expand All @@ -38,10 +38,10 @@ targets:
mistralai-sdk:
source: mistral-openapi
sourceNamespace: mistral-openapi
sourceRevisionDigest: sha256:480366372609b8e74697827a161a478dd87aa95460d0e078ecc73b5dfa0d00ff
sourceBlobDigest: sha256:23523b81989fa5223902dea44dd6bebf8eb7b1dceec5cc3aa4dbb969ecde6652
sourceRevisionDigest: sha256:edeef4396c29b9a5960e150514289777d4aef71037b03d14444238455fc1c1bd
sourceBlobDigest: sha256:b8b6deb9c127b45ad0cd5700c1e9d69f63927b070817e5986f7131f14dba6ba7
codeSamplesNamespace: mistral-openapi-code-samples
codeSamplesRevisionDigest: sha256:6d406cd8dd3e8da23675c1d278548dc5f54c616af47c94b0a704711a6b27d561
codeSamplesRevisionDigest: sha256:6fc37de5c06926f4bb561b007ea0856a0436829f465b0b054c19cb916cb25909
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.754.0
Expand Down
97 changes: 95 additions & 2 deletions README-PYPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Mistral AI API: Our Chat Completion and Embeddings APIs specification. Create yo
* [Providers' SDKs Example Usage](#providers-sdks-example-usage)
* [Available Resources and Operations](#available-resources-and-operations)
* [Server-sent event streaming](#server-sent-event-streaming)
* [Pagination](#pagination)
* [File uploads](#file-uploads)
* [Retries](#retries)
* [Error Handling](#error-handling)
Expand Down Expand Up @@ -490,6 +491,7 @@ print(res.choices[0].message.content)
* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/batchjobs/README.md#list) - Get Batch Jobs
* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/batchjobs/README.md#create) - Create Batch Job
* [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/batchjobs/README.md#get) - Get Batch Job
* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/batchjobs/README.md#delete) - Delete Batch Job
* [cancel](https://github.com/mistralai/client-python/blob/main/docs/sdks/batchjobs/README.md#cancel) - Cancel Batch Job

### [Beta.Agents](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md)
Expand Down Expand Up @@ -633,6 +635,13 @@ print(res.choices[0].message.content)

* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/embeddings/README.md#create) - Embeddings

### [Events](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md)

* [receive_workflow_event](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#receive_workflow_event) - Receive Workflow Event
* [receive_workflow_events_batch](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#receive_workflow_events_batch) - Receive Workflow Events Batch
* [get_stream_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#get_stream_events) - Get Stream Events
* [get_workflow_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#get_workflow_events) - Get Workflow Events

### [Files](https://github.com/mistralai/client-python/blob/main/docs/sdks/files/README.md)

* [upload](https://github.com/mistralai/client-python/blob/main/docs/sdks/files/README.md#upload) - Upload File
Expand Down Expand Up @@ -668,6 +677,63 @@ print(res.choices[0].message.content)

* [process](https://github.com/mistralai/client-python/blob/main/docs/sdks/ocr/README.md#process) - OCR

### [Workflows](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md)

* [get_workflows](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#get_workflows) - Get Workflows
* [get_workflow_registrations](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#get_workflow_registrations) - Get Workflow Registrations
* [execute_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#execute_workflow) - Execute Workflow
* [~~execute_workflow_registration~~](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#execute_workflow_registration) - Execute Workflow Registration :warning: **Deprecated**
* [get_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#get_workflow) - Get Workflow
* [update_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#update_workflow) - Update Workflow
* [get_workflow_registration](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#get_workflow_registration) - Get Workflow Registration
* [archive_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#archive_workflow) - Archive Workflow
* [unarchive_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#unarchive_workflow) - Unarchive Workflow

#### [Workflows.Deployments](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md)

* [list_deployments](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md#list_deployments) - List Deployments
* [get_deployment](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md#get_deployment) - Get Deployment

#### [Workflows.Events](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md)

* [receive_workflow_event](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#receive_workflow_event) - Receive Workflow Event
* [receive_workflow_events_batch](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#receive_workflow_events_batch) - Receive Workflow Events Batch
* [get_stream_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#get_stream_events) - Get Stream Events
* [get_workflow_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#get_workflow_events) - Get Workflow Events

#### [Workflows.Executions](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md)

* [get_workflow_execution](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#get_workflow_execution) - Get Workflow Execution
* [get_workflow_execution_history](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#get_workflow_execution_history) - Get Workflow Execution History
* [signal_workflow_execution](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#signal_workflow_execution) - Signal Workflow Execution
* [query_workflow_execution](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#query_workflow_execution) - Query Workflow Execution
* [terminate_workflow_execution](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#terminate_workflow_execution) - Terminate Workflow Execution
* [batch_terminate_workflow_executions](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#batch_terminate_workflow_executions) - Batch Terminate Workflow Executions
* [cancel_workflow_execution](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#cancel_workflow_execution) - Cancel Workflow Execution
* [batch_cancel_workflow_executions](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#batch_cancel_workflow_executions) - Batch Cancel Workflow Executions
* [reset_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#reset_workflow) - Reset Workflow
* [update_workflow_execution](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#update_workflow_execution) - Update Workflow Execution
* [get_workflow_execution_trace_otel](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#get_workflow_execution_trace_otel) - Get Workflow Execution Trace Otel
* [get_workflow_execution_trace_summary](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#get_workflow_execution_trace_summary) - Get Workflow Execution Trace Summary
* [get_workflow_execution_trace_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#get_workflow_execution_trace_events) - Get Workflow Execution Trace Events
* [stream](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#stream) - Stream

#### [Workflows.Metrics](https://github.com/mistralai/client-python/blob/main/docs/sdks/metrics/README.md)

* [get_workflow_metrics](https://github.com/mistralai/client-python/blob/main/docs/sdks/metrics/README.md#get_workflow_metrics) - Get Workflow Metrics

#### [Workflows.Runs](https://github.com/mistralai/client-python/blob/main/docs/sdks/runs/README.md)

* [list_runs](https://github.com/mistralai/client-python/blob/main/docs/sdks/runs/README.md#list_runs) - List Runs
* [get_run](https://github.com/mistralai/client-python/blob/main/docs/sdks/runs/README.md#get_run) - Get Run
* [get_run_history](https://github.com/mistralai/client-python/blob/main/docs/sdks/runs/README.md#get_run_history) - Get Run History

#### [Workflows.Schedules](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md)

* [get_schedules](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#get_schedules) - Get Schedules
* [schedule_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#schedule_workflow) - Schedule Workflow
* [unschedule_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#unschedule_workflow) - Unschedule Workflow

</details>
<!-- End Available Resources and Operations [operations] -->

Expand Down Expand Up @@ -708,6 +774,33 @@ with Mistral(
[context-manager]: https://book.pythontips.com/en/latest/context_managers.html
<!-- End Server-sent event streaming [eventstream] -->

<!-- Start Pagination [pagination] -->
## Pagination

Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
returned response object will have a `Next` method that can be called to pull down the next group of results. If the
return value of `Next` is `None`, then there are no more pages to be fetched.

Here's an example of one such pagination call:
```python
from mistralai.client import Mistral
import os


with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

res = mistral.workflows.get_workflows(active_only=False, include_shared=True, limit=50)

while res is not None:
# Handle items

res = res.next()

```
<!-- End Pagination [pagination] -->

<!-- Start File uploads [file-upload] -->
## File uploads

Expand Down Expand Up @@ -851,8 +944,8 @@ with Mistral(


**Inherit from [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py)**:
* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 69 of 131 methods.*
* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 131 methods.*
* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 105 of 172 methods.*
* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 172 methods.*
* [`ResponseValidationError`](https://github.com/mistralai/client-python/blob/main/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
Loading
Loading