@tiens.nguyen/gonext-local-worker 1.0.73 → 1.0.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1061,8 +1061,10 @@ async function correctOcrText(extractedText, modelOverride = "") {
1061
1061
  if (override.startsWith("http://") || override.startsWith("https://")) {
1062
1062
  const baseUrl = /\/v1\/?$/i.test(override) ? override : `${override}/v1`;
1063
1063
  console.log(`[gonext-worker] OCR correction via server ${baseUrl}`);
1064
+ console.log(`[gonext-worker] OCR correction input: ${extractedText.slice(0, 300)}`);
1064
1065
  try {
1065
1066
  const corrected = await correctOcrTextViaServer(extractedText, baseUrl);
1067
+ console.log(`[gonext-worker] OCR correction output: ${corrected.slice(0, 300)}`);
1066
1068
  console.log(`[gonext-worker] OCR correction done: ${extractedText.length} → ${corrected.length} chars`);
1067
1069
  return corrected;
1068
1070
  } catch (e) {
@@ -1081,6 +1083,7 @@ async function correctOcrText(extractedText, modelOverride = "") {
1081
1083
  "Return only the corrected text without any explanation.\n\n" +
1082
1084
  `Text:\n${extractedText}`;
1083
1085
  console.log(`[gonext-worker] OCR correction via CLI model=${modelPath}`);
1086
+ console.log(`[gonext-worker] OCR correction input: ${extractedText.slice(0, 300)}`);
1084
1087
  // Write prompt to a temp Python script that calls mlx_lm programmatically,
1085
1088
  // avoiding CLI arg length/escaping limits and the missing --prompt-file flag.
1086
1089
  const scriptFile = join(tmpdir(), `gonext-ocr-correct-${Date.now()}.py`);
@@ -1104,6 +1107,7 @@ print(result)
1104
1107
  console.log(`[gonext-worker] OCR correction CLI stderr: ${stderr.trim().slice(0, 300)}`);
1105
1108
  }
1106
1109
  const corrected = normalizeCorrection(stdout, extractedText);
1110
+ console.log(`[gonext-worker] OCR correction output: ${corrected.slice(0, 300)}`);
1107
1111
  console.log(`[gonext-worker] OCR correction done: ${extractedText.length} → ${corrected.length} chars`);
1108
1112
  return corrected;
1109
1113
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiens.nguyen/gonext-local-worker",
3
- "version": "1.0.73",
3
+ "version": "1.0.74",
4
4
  "description": "Polls GoNext cloud API for async local LLM jobs and runs them against Ollama/OpenAI-compatible servers on this Mac",
5
5
  "type": "module",
6
6
  "license": "MIT",