Setting up a client

Wire a model, OCR provider and renderer into an Ovrin client, and override any of it per call. WithModel is the only option you must pass.

The Client is where the provider strategy is assembled. It is not the extraction logic itself; it is the runtime configuration used by the pipeline.

Basic flow

  1. choose your model provider
  2. choose OCR and renderer if needed
  3. create the client with those providers
  4. call Extract[T]

Example

client := ovrin.New(
    ovrin.WithModel(model),
    ovrin.WithOCR(ocr),
    ovrin.WithRenderer(renderer),
)

Notes

  • provider modules are separated from the core
  • only the modules you need enter your dependency graph
  • extraction logic remains the same regardless of the provider behind the seam