From 98dd0bb32356d8438ff355808e815c7de771c1b7 Mon Sep 17 00:00:00 2001 From: ztimson Date: Mon, 22 Dec 2025 13:48:53 -0500 Subject: [PATCH] Auto download teseract models --- package.json | 2 +- src/vision.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e46f741..303aab4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ztimson/ai-utils", - "version": "0.2.2", + "version": "0.2.3", "description": "AI Utility library", "author": "Zak Timson", "license": "MIT", diff --git a/src/vision.ts b/src/vision.ts index c5506b7..ad06df6 100644 --- a/src/vision.ts +++ b/src/vision.ts @@ -15,7 +15,7 @@ export class Vision { return { abort: () => { worker?.terminate(); }, response: new Promise(async res => { - worker = await createWorker('eng', 1, {langPath: this.ai.options.path}); + worker = await createWorker('eng', 1, {cachePath: this.ai.options.path}); const {data} = await worker.recognize(path); await worker.terminate(); res(data.text.trim() || null);