Co-authored-by: Clément Drouin <clement.drouin@mistral.ai>
Co-authored-by: Clément Sirieix <clement.sirieix@mistral.ai>
Co-authored-by: Gauthier Guinet <43207538+Gguinet@users.noreply.github.com>
Co-authored-by: Kim-Adeline Miguel <kimadeline.miguel@mistral.ai>
Co-authored-by: Michel Thomazo <51709227+michelTho@users.noreply.github.com>
Co-authored-by: Quentin <torroba.q@gmail.com>
Co-authored-by: Simon <80467011+sorgfresser@users.noreply.github.com>
Co-authored-by: Simon Van de Kerckhove <simon.vandekerckhove@mistral.ai>
Co-authored-by: Vincent G <10739306+VinceOPS@users.noreply.github.com>
Co-authored-by: angelapopopo <angele.lenglemetz@mistral.ai>
Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Mathias Gesbert 2026-03-23 18:45:21 +01:00 committed by GitHub
parent 5103019b01
commit eb580209d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
180 changed files with 11136 additions and 1030 deletions

View file

@ -39,10 +39,17 @@ async def _empty_audio_stream() -> AsyncIterator[bytes]:
yield
def _make_sdk_session_created() -> MagicMock:
from mistralai.client.models import RealtimeTranscriptionSessionCreated
def _make_sdk_session_created(request_id: str = "test-request-id") -> MagicMock:
from mistralai.client.models import (
RealtimeTranscriptionSession,
RealtimeTranscriptionSessionCreated,
)
return MagicMock(spec=RealtimeTranscriptionSessionCreated)
session = MagicMock(spec=RealtimeTranscriptionSession)
session.request_id = request_id
mock = MagicMock(spec=RealtimeTranscriptionSessionCreated)
mock.session = session
return mock
def _make_sdk_text_delta(text: str) -> MagicMock:
@ -104,6 +111,7 @@ class TestEventMapping:
assert len(events) == 1
assert isinstance(events[0], TranscribeSessionCreated)
assert events[0].request_id == "test-request-id"
@pytest.mark.asyncio
async def test_text_delta(self) -> None: