Skip to content

👁️ docs: update OCR documentation configuration to include azure_mist… #318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
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
19 changes: 15 additions & 4 deletions pages/docs/configuration/librechat_yaml/object_structure/ocr.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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

<OptionTable
Expand Down Expand Up @@ -83,7 +93,7 @@ ocr:

<OptionTable
options={[
['strategy', 'String', 'The OCR strategy to use.', 'Determines which OCR service to use. Options are "mistral_ocr" or "custom_ocr". Defaults to "mistral_ocr".'],
['strategy', 'String', 'The OCR strategy to use.', 'Determines which OCR service to use. Options are "mistral_ocr", "custom_ocr" or "azure_mistral_ocr". Defaults to "mistral_ocr".'],
]}
/>

Expand All @@ -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.