v1.12.4
Breaking Changes📦 mistral-clientView on GitHub →
⚠ 9 breaking🔧 28 symbols
Summary
Version 1.12.4 introduces numerous breaking changes across the Python SDK, primarily affecting the request and response schemas for beta conversation, agent, chat, FIM, classifier, OCR, and audio transcription endpoints.
⚠️ Breaking Changes
- The structure of requests and responses for various endpoints under `mistral.beta.conversations` has changed, specifically affecting `request.inputs.[array].[]` and various `response` fields.
- The structure of requests and responses for various endpoints under `mistral.beta.agents` has changed, specifically affecting `response.object` and `response.[].object` fields.
- The structure of requests and responses for `mistral.chat.complete()` and `mistral.agents.complete()` has changed, specifically affecting `request.messages.[]` and `response.choices.[].message` fields.
- The structure of streaming responses for `mistral.chat.stream()` and `mistral.agents.stream()` has changed, specifically affecting `response.[].data.choices.[].delta.content.[array].[]`.
- The structure of requests and responses for `mistral.fim.complete()` and `mistral.fim.stream()` has changed, specifically affecting `response.choices.[].message` and `response.[].data.choices.[].delta.content.[array].[]`.
- The structure of requests for `mistral.classifiers.moderate_chat()` and `mistral.classifiers.classify_chat()` has changed, affecting `request.inputs.[array].[]` and `request.inputs.[inputs].messages.[]` respectively.
- The structure of the request for `mistral.ocr.process()` has changed, affecting `request.document`.
- The structure of the response for `mistral.audio.transcriptions.complete()` has changed, affecting `response.segments.[].type`.
- The structure of the streaming response for `mistral.audio.transcriptions.stream()` has changed, affecting `response.[].data`.
Migration Steps
- Review and update code interacting with `mistral.beta.conversations` endpoints to align with the new request/response schemas for `request.inputs.[array].[]` and response fields.
- Review and update code interacting with `mistral.beta.agents` endpoints to align with the new response schema for `response.object` and `response.[].object` fields.
- Review and update code interacting with `mistral.chat.complete()` and `mistral.agents.complete()` to align with the new request structure for `request.messages.[]` and response structure for `response.choices.[].message`.
- Review and update code handling streaming responses from `mistral.chat.stream()` and `mistral.agents.stream()` to align with the new structure for `response.[].data.choices.[].delta.content.[array].[]`.
- Review and update code interacting with `mistral.fim.complete()` and `mistral.fim.stream()` to align with the new response schemas.
- Review and update code sending requests to `mistral.classifiers.moderate_chat()` and `mistral.classifiers.classify_chat()` to align with the updated input structures.
- Review and update code sending requests to `mistral.ocr.process()` to align with the new `request.document` structure.
- Review and update code processing responses from `mistral.audio.transcriptions.complete()` to align with the new `response.segments.[].type` structure.
- Review and update code processing streaming responses from `mistral.audio.transcriptions.stream()` to align with the new `response.[].data` structure.
Affected Symbols
mistral.beta.conversations.start()mistral.beta.conversations.list()mistral.beta.conversations.get()mistral.beta.conversations.append()mistral.beta.conversations.get_history()mistral.beta.conversations.get_messages()mistral.beta.conversations.restart()mistral.beta.conversations.start_stream()mistral.beta.conversations.append_stream()mistral.beta.conversations.restart_stream()mistral.beta.agents.create()mistral.beta.agents.list()mistral.beta.agents.get()mistral.beta.agents.update()mistral.beta.agents.update_version()mistral.beta.agents.list_versions()mistral.beta.agents.get_version()mistral.chat.complete()mistral.chat.stream()mistral.fim.complete()mistral.fim.stream()mistral.agents.complete()mistral.agents.stream()mistral.classifiers.moderate_chat()mistral.classifiers.classify_chat()mistral.ocr.process()mistral.audio.transcriptions.complete()mistral.audio.transcriptions.stream()