[Enhancement]: Adding azure mistral ocr endpoint #7685
arthurolivierfortin
started this conversation in
Feature Requests & Suggestions
Replies: 1 comment
-
Looking forward to this feature. We have a Mistral AI Deployment on our azure account and we're planning to integrate with out LibreChat instance. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Support for Azure Mistral OCR Integration
For the centralized workspace, I would like to add support for using the Azure Mistral OCR endpoint.
Since Azure's Mistral OCR endpoint does not accept file uploads, the file stream must be passed directly in the
performOCR
request. This means the logic must skip theuploadDocumentToMistral
step entirely.I'm not yet sure how custom OCR integrations will be handled in the long term, so this implementation may evolve. For now, here’s the temporary solution I added using a constant defined in
librechat.yaml
.File:
api/server/services/Files/MistralOCR/crud.js
Line 145 — Flag to detect Azure endpoint usage
Line 172 — Conditionally skip uploadDocumentToMistral
Skip getSignedUrl if using Azure
Convert file to Base64 and use data URL for Azure
Call performOCR with the appropriate parameters
I’d like to refactor this logic in the future to align with upcoming custom OCR support, including avoiding assignments of null to mistralFile and signedUrlResponse, and conditionally skipping those blocks entirely.
That said, before moving forward, I’d like to know whether this feature is something you’d be interested in. If so, I’d appreciate your input on how you’d prefer this integration to be structured in order to align with future plans for custom OCR implementations.
Beta Was this translation helpful? Give feedback.
All reactions