From 58a2402f22b5fd1bba60ccf0163a8d281a1e2eda Mon Sep 17 00:00:00 2001 From: Tyler Maran Date: Sat, 28 Sep 2024 22:01:33 -0700 Subject: [PATCH 1/2] 1.0.29 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6374de61..807434dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "zerox", - "version": "1.0.28", + "version": "1.0.29", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "zerox", - "version": "1.0.28", + "version": "1.0.29", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 7159829b..70173943 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zerox", - "version": "1.0.28", + "version": "1.0.29", "description": "ocr documents using gpt-4o-mini", "main": "node-zerox/dist/index.js", "scripts": { From 490cc00e7a426a4e8aacbcdeda3ff068e24564e9 Mon Sep 17 00:00:00 2001 From: Tyler Maran Date: Sun, 6 Oct 2024 18:04:24 -0700 Subject: [PATCH 2/2] prompt updates --- node-zerox/src/openAI.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/node-zerox/src/openAI.ts b/node-zerox/src/openAI.ts index ffd58c20..9adebcdb 100644 --- a/node-zerox/src/openAI.ts +++ b/node-zerox/src/openAI.ts @@ -13,7 +13,11 @@ export const getCompletion = async ({ const systemPrompt = ` Convert the following PDF page to markdown. Return only the markdown with no explanation text. Do not include deliminators like '''markdown. - You must include all information on the page. Do not exclude headers, footers, or subtext. + + RULES: + - You must include all information on the page. Do not exclude headers, footers, or subtext. + - Charts & infographics must be interpreted to a markdown format + - Non text based images must be replaced with [Description of image](image.png) `; // Default system message.