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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 2d045ec7-2ebb-4f4d-ad25-40953b132161
management:
docChecksum: e9c447db719018a5721988252c09c2dc
docChecksum: 12226a12b72a82af24e4b098c631ff42
docVersion: 1.0.0
speakeasyVersion: 1.517.3
generationVersion: 2.548.6
releaseVersion: 1.8.0
configChecksum: 1f7adfac0b677cdca4c073a11cbcef02
releaseVersion: 1.8.1
configChecksum: a47e6a59e54c30528cf829e1a6fcc310
repoURL: https://github.com/mistralai/client-python.git
installationURL: https://github.com/mistralai/client-python.git
published: true
Expand Down Expand Up @@ -185,6 +185,7 @@ generatedFiles:
- docs/models/documentlibrarytooltype.md
- docs/models/documenturlchunk.md
- docs/models/documenturlchunktype.md
- docs/models/embeddingdtype.md
- docs/models/embeddingrequest.md
- docs/models/embeddingrequestinputs.md
- docs/models/embeddingresponse.md
Expand Down Expand Up @@ -398,7 +399,6 @@ generatedFiles:
- docs/sdks/ocr/README.md
- poetry.toml
- py.typed
- pylintrc
- scripts/prepare_readme.py
- scripts/publish.sh
- src/mistralai/__init__.py
Expand Down Expand Up @@ -500,6 +500,7 @@ generatedFiles:
- src/mistralai/models/deltamessage.py
- src/mistralai/models/documentlibrarytool.py
- src/mistralai/models/documenturlchunk.py
- src/mistralai/models/embeddingdtype.py
- src/mistralai/models/embeddingrequest.py
- src/mistralai/models/embeddingresponse.py
- src/mistralai/models/embeddingresponsedata.py
Expand Down Expand Up @@ -1004,6 +1005,7 @@ examples:
responses:
"422":
application/json: {}
"200": {}
agents_api_v1_conversations_append_stream:
speakeasy-default-agents-api-v1-conversations-append-stream:
parameters:
Expand All @@ -1014,6 +1016,7 @@ examples:
responses:
"422":
application/json: {}
"200": {}
agents_api_v1_conversations_restart_stream:
speakeasy-default-agents-api-v1-conversations-restart-stream:
parameters:
Expand All @@ -1024,6 +1027,7 @@ examples:
responses:
"422":
application/json: {}
"200": {}
agents_api_v1_agents_create:
speakeasy-default-agents-api-v1-agents-create:
requestBody:
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
python:
version: 1.8.0
version: 1.8.1
additionalDependencies:
dev:
pytest: ^8.2.2
Expand Down
11 changes: 6 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ sources:
- latest
mistral-openapi:
sourceNamespace: mistral-openapi
sourceRevisionDigest: sha256:f2590d9933e1e9208fa5b8e509b671e6a86907268bcd5dad41dc4179e20c5b69
sourceBlobDigest: sha256:3026ed65da39c94e9787697305e7e059bec5cff09bceeddc6e68c289cfaeb592
sourceRevisionDigest: sha256:ab414b4936bea95f6713273bbcee90d66af9da18c6672d62ce885769c47edc34
sourceBlobDigest: sha256:109235b09f0f6d400d146591dff959fac189a873fc95f4b32867d47d65779d28
tags:
- latest
- speakeasy-sdk-regen-1748446717
targets:
mistralai-azure-sdk:
source: mistral-azure-source
Expand All @@ -36,10 +37,10 @@ targets:
mistralai-sdk:
source: mistral-openapi
sourceNamespace: mistral-openapi
sourceRevisionDigest: sha256:f2590d9933e1e9208fa5b8e509b671e6a86907268bcd5dad41dc4179e20c5b69
sourceBlobDigest: sha256:3026ed65da39c94e9787697305e7e059bec5cff09bceeddc6e68c289cfaeb592
sourceRevisionDigest: sha256:ab414b4936bea95f6713273bbcee90d66af9da18c6672d62ce885769c47edc34
sourceBlobDigest: sha256:109235b09f0f6d400d146591dff959fac189a873fc95f4b32867d47d65779d28
codeSamplesNamespace: mistral-openapi-code-samples
codeSamplesRevisionDigest: sha256:bd4031e558c0426c02f2a4f3bb1642068047aa555e0f9cbbc70de74ff7ec04ec
codeSamplesRevisionDigest: sha256:03b507fe6fdcabb21ec711d436300a3888b22fbfc970722bb3433db31c06047a
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.517.3
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,14 @@ Based on:
### Generated
- [python v1.8.0] .
### Releases
- [PyPI v1.8.0] https://pypi.org/project/mistralai/1.8.0 - .
- [PyPI v1.8.0] https://pypi.org/project/mistralai/1.8.0 - .

## 2025-05-28 15:38:22
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.517.3 (2.548.6) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.8.1] .
### Releases
- [PyPI v1.8.1] https://pypi.org/project/mistralai/1.8.1 - .
4 changes: 2 additions & 2 deletions docs/models/chatcompletionresponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
| `object` | *str* | :heavy_check_mark: | N/A | chat.completion |
| `model` | *str* | :heavy_check_mark: | N/A | mistral-small-latest |
| `usage` | [models.UsageInfo](../models/usageinfo.md) | :heavy_check_mark: | N/A | |
| `created` | *Optional[int]* | :heavy_minus_sign: | N/A | 1702256327 |
| `choices` | List[[models.ChatCompletionChoice](../models/chatcompletionchoice.md)] | :heavy_minus_sign: | N/A | |
| `created` | *int* | :heavy_check_mark: | N/A | 1702256327 |
| `choices` | List[[models.ChatCompletionChoice](../models/chatcompletionchoice.md)] | :heavy_check_mark: | N/A | |
12 changes: 12 additions & 0 deletions docs/models/embeddingdtype.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EmbeddingDtype


## Values

| Name | Value |
| --------- | --------- |
| `FLOAT` | float |
| `INT8` | int8 |
| `UINT8` | uint8 |
| `BINARY` | binary |
| `UBINARY` | ubinary |
4 changes: 3 additions & 1 deletion docs/models/embeddingrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
| `model` | *str* | :heavy_check_mark: | ID of the model to use. | mistral-embed |
| `inputs` | [models.EmbeddingRequestInputs](../models/embeddingrequestinputs.md) | :heavy_check_mark: | Text to embed. | [<br/>"Embed this sentence.",<br/>"As well as this one."<br/>] |
| `inputs` | [models.EmbeddingRequestInputs](../models/embeddingrequestinputs.md) | :heavy_check_mark: | Text to embed. | [<br/>"Embed this sentence.",<br/>"As well as this one."<br/>] |
| `output_dimension` | *OptionalNullable[int]* | :heavy_minus_sign: | The dimension of the output embeddings. | |
| `output_dtype` | [Optional[models.EmbeddingDtype]](../models/embeddingdtype.md) | :heavy_minus_sign: | N/A | |
4 changes: 2 additions & 2 deletions docs/models/fimcompletionresponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
| `object` | *str* | :heavy_check_mark: | N/A | chat.completion |
| `model` | *str* | :heavy_check_mark: | N/A | codestral-latest |
| `usage` | [models.UsageInfo](../models/usageinfo.md) | :heavy_check_mark: | N/A | |
| `created` | *Optional[int]* | :heavy_minus_sign: | N/A | 1702256327 |
| `choices` | List[[models.ChatCompletionChoice](../models/chatcompletionchoice.md)] | :heavy_minus_sign: | N/A | |
| `created` | *int* | :heavy_check_mark: | N/A | 1702256327 |
| `choices` | List[[models.ChatCompletionChoice](../models/chatcompletionchoice.md)] | :heavy_check_mark: | N/A | |
2 changes: 2 additions & 0 deletions docs/sdks/conversations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

## Overview

(beta) Converstations API

### Available Operations

* [start](#start) - Create a conversation and append entries to it.
Expand Down
2 changes: 2 additions & 0 deletions docs/sdks/embeddings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ with Mistral(
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `model` | *str* | :heavy_check_mark: | ID of the model to use. | mistral-embed |
| `inputs` | [models.EmbeddingRequestInputs](../../models/embeddingrequestinputs.md) | :heavy_check_mark: | Text to embed. | [<br/>"Embed this sentence.",<br/>"As well as this one."<br/>] |
| `output_dimension` | *OptionalNullable[int]* | :heavy_minus_sign: | The dimension of the output embeddings. | |
| `output_dtype` | [Optional[models.EmbeddingDtype]](../../models/embeddingdtype.md) | :heavy_minus_sign: | N/A | |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |

### Response
Expand Down
2 changes: 2 additions & 0 deletions docs/sdks/mistralagents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

## Overview

(beta) Agents API

### Available Operations

* [create](#create) - Create a agent that can be used within a conversation.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "mistralai"
version = "1.8.0"
version = "1.8.1"
description = "Python Client SDK for the Mistral AI API."
authors = [{ name = "Mistral" },]
readme = "README-PYPI.md"
Expand Down
4 changes: 2 additions & 2 deletions src/mistralai/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import importlib.metadata

__title__: str = "mistralai"
__version__: str = "1.8.0"
__version__: str = "1.8.1"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.548.6"
__user_agent__: str = "speakeasy-sdk/python 1.8.0 2.548.6 1.0.0 mistralai"
__user_agent__: str = "speakeasy-sdk/python 1.8.1 2.548.6 1.0.0 mistralai"

try:
if __package__ is not None:
Expand Down
2 changes: 2 additions & 0 deletions src/mistralai/beta.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

class Beta(BaseSDK):
conversations: Conversations
r"""(beta) Converstations API"""
agents: MistralAgents
r"""(beta) Agents API"""

def __init__(self, sdk_config: SDKConfiguration) -> None:
BaseSDK.__init__(self, sdk_config)
Expand Down
7 changes: 5 additions & 2 deletions src/mistralai/conversations.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@
# endregion imports



class Conversations(BaseSDK):
r"""(beta) Converstations API"""

# region sdk-class-body
# Custom run code allowing client side execution of code

Expand Down Expand Up @@ -146,7 +147,9 @@ async def run_stream_async(
completion_args=completion_args,
)

async def run_generator() -> AsyncGenerator[Union[RunResultEvents, RunResult], None]:
async def run_generator() -> (
AsyncGenerator[Union[RunResultEvents, RunResult], None]
):
current_entries = input_entries
while True:
received_event_tracker: defaultdict[
Expand Down
12 changes: 12 additions & 0 deletions src/mistralai/embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def create(
inputs: Union[
models.EmbeddingRequestInputs, models.EmbeddingRequestInputsTypedDict
],
output_dimension: OptionalNullable[int] = UNSET,
output_dtype: Optional[models.EmbeddingDtype] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
Expand All @@ -29,6 +31,8 @@ def create(

:param model: ID of the model to use.
:param inputs: Text to embed.
:param output_dimension: The dimension of the output embeddings.
:param output_dtype:
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
Expand All @@ -47,6 +51,8 @@ def create(
request = models.EmbeddingRequest(
model=model,
inputs=inputs,
output_dimension=output_dimension,
output_dtype=output_dtype,
)

req = self._build_request(
Expand Down Expand Up @@ -125,6 +131,8 @@ async def create_async(
inputs: Union[
models.EmbeddingRequestInputs, models.EmbeddingRequestInputsTypedDict
],
output_dimension: OptionalNullable[int] = UNSET,
output_dtype: Optional[models.EmbeddingDtype] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
Expand All @@ -136,6 +144,8 @@ async def create_async(

:param model: ID of the model to use.
:param inputs: Text to embed.
:param output_dimension: The dimension of the output embeddings.
:param output_dtype:
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
Expand All @@ -154,6 +164,8 @@ async def create_async(
request = models.EmbeddingRequest(
model=model,
inputs=inputs,
output_dimension=output_dimension,
output_dtype=output_dtype,
)

req = self._build_request_async(
Expand Down
2 changes: 2 additions & 0 deletions src/mistralai/mistral_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@


class MistralAgents(BaseSDK):
r"""(beta) Agents API"""

def create(
self,
*,
Expand Down
2 changes: 2 additions & 0 deletions src/mistralai/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@
DocumentURLChunkType,
DocumentURLChunkTypedDict,
)
from .embeddingdtype import EmbeddingDtype
from .embeddingrequest import (
EmbeddingRequest,
EmbeddingRequestInputs,
Expand Down Expand Up @@ -964,6 +965,7 @@
"DocumentURLChunk",
"DocumentURLChunkType",
"DocumentURLChunkTypedDict",
"EmbeddingDtype",
"EmbeddingRequest",
"EmbeddingRequestInputs",
"EmbeddingRequestInputsTypedDict",
Expand Down
Loading
Loading