Skip to main content

best_available_backend

Function best_available_backend 

Source
pub fn best_available_backend() -> Result<Box<dyn OcrBackend>, OcrError>
Expand description

Return the first available OCR backend in priority order.

The current order is:

  1. ocr-mistral with MISTRAL_API_KEY
  2. ocr-google with GOOGLE_VISION_API_KEY or Google credentials
  3. ocr-azure with AZURE_DOCUMENT_INTELLIGENCE_*
  4. ocr-aws with standard AWS credentials
  5. ocr-onnx via the Paddle ONNX adapter
  6. ocr via local ocrs model files