Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ workflow_payload_offloading = [
workflow_payload_encryption = [
"cryptography>=41.0.0,<47.0.0",
]
workflow_payload_compression = [
"zstandard>=0.25.0,<0.26",
]


[project.urls]
Expand All @@ -69,6 +72,7 @@ dev = [
"griffe>=1.7.3,<2",
"authlib>=1.5.2,<2",
"websockets >=13.0",
"zstandard>=0.25.0,<0.26",
]
lint = [
"ruff>=0.11.10,<0.12",
Expand Down
4 changes: 4 additions & 0 deletions src/mistralai/extra/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ class WorkflowPayloadEncryptionException(MistralClientException):
"""Workflow payload encryption exception"""


class WorkflowPayloadCompressionException(MistralClientException):
"""Workflow payload compression exception"""


class RunException(MistralClientException):
"""Conversation run errors."""

Expand Down
Empty file.
26 changes: 26 additions & 0 deletions src/mistralai/extra/tests/fixtures/workflow_encoding.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from __future__ import annotations

from typing import Any


class InMemoryBlobStorage:
def __init__(self) -> None:
self.blobs: dict[str, bytes] = {}

async def __aenter__(self) -> "InMemoryBlobStorage":
return self

async def __aexit__(self, *_args: Any) -> None:
pass

async def upload_blob(self, key: str, content: bytes) -> str:
self.blobs[key] = content
return key

async def get_blob(self, key: str) -> bytes:
return self.blobs[key]

async def get_blob_properties(self, key: str) -> dict[str, Any] | None:
if key not in self.blobs:
return None
return {"size": len(self.blobs[key]), "last_modified": "test"}
Loading
Loading