From dc11aa322b2af6b77600117c29153effdbc40685 Mon Sep 17 00:00:00 2001 From: arthurolivierfortin Date: Wed, 4 Jun 2025 15:08:48 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=81=EF=B8=8F=20docs:=20update=20OCR=20?= =?UTF-8?q?documentation=20configuration=20to=20include=20azure=5Fmistral?= =?UTF-8?q?=5Focr=20strategy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../librechat_yaml/object_structure/ocr.mdx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/pages/docs/configuration/librechat_yaml/object_structure/ocr.mdx b/pages/docs/configuration/librechat_yaml/object_structure/ocr.mdx index 4c2466b64..c4a6c805b 100644 --- a/pages/docs/configuration/librechat_yaml/object_structure/ocr.mdx +++ b/pages/docs/configuration/librechat_yaml/object_structure/ocr.mdx @@ -14,11 +14,11 @@ There are 4 main fields under `ocr`: **Notes:** - If using the Mistral OCR API, you don't need to edit your `librechat.yaml` file. - - You only need the following environment variables to get started: `OCR_API_KEY` and `OCR_BASEURL`. +- You only need the following environment variables to get started: `OCR_API_KEY` and `OCR_BASEURL`. - OCR functionality allows the application to extract text from images, which can then be processed by AI models. - The default strategy is `mistral_ocr`, which uses Mistral's OCR capabilities. -- You can also configure a custom OCR service by setting the strategy to `custom_ocr`. -- If using the default Mistral OCR, you may optionally specify a specific Mistral model to use. +- Alternatively, set the strategy to `azure_mistral_ocr` to use an Azure-hosted Mistral model, or to `custom_ocr` to use a custom OCR service. +- If using the default Mistral OCR or Azure-hosted Mistral OCR, you may optionally specify a specific Mistral model to use. - Environment variable parsing is supported for `apiKey`, `baseURL`, and `mistralModel` parameters. - A `user_provided` strategy option is planned for future releases but is not yet implemented. @@ -40,6 +40,16 @@ ocr: strategy: "custom_ocr" ``` +Example with azure mistral OCR: + +```yaml filename="ocr with azure mistral OCR" +ocr: + mistralModel: "mistral-ocr-2503" # Specify the Azure Mistral model, mistral-ocr-2503 is an example" + apiKey: "${OCR_API_KEY}" # Optional: Defaults to OCR_API_KEY env variable + baseURL: "https://your-azure-mistral-ocr-endpoint.com/v1" # Optional: Defaults to OCR_BASEURL env variable, or Mistral's API if no variable set + strategy: "azure_mistral_ocr" +``` + ## mistralModel @@ -95,4 +105,5 @@ ocr: **Available Strategies:** - `mistral_ocr`: Uses Mistral's OCR capabilities. +- `azure_mistral_ocr`: Uses an Azure-hosted Mistral model for OCR. - `custom_ocr`: Uses a custom OCR service specified by the baseURL.