{"_id":"llama-ocr","_rev":"6-cbac807e8d7be10431f594d222b67e19","name":"llama-ocr","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.2":{"name":"llama-ocr","version":"0.0.2","keywords":["together ai","vLLMs","open source","AI models","OCR","Llama"],"author":{"url":"@nutlope","name":"Hassan El Mghari"},"license":"MIT","_id":"llama-ocr@0.0.2","maintainers":[{"name":"hassanelmghari","email":"hassan@hey.com"}],"homepage":"https://github.com/Nutlope/llama-ocr#readme","bugs":{"url":"https://github.com/Nutlope/llama-ocr/issues"},"dist":{"shasum":"6169be26eeeb50741e71e45575daf2faa7038510","tarball":"https://registry.npmjs.org/llama-ocr/-/llama-ocr-0.0.2.tgz","fileCount":6,"integrity":"sha512-lWx8c5fCRj/hMMXjvhse6fLpAjk5YfKcIC57whhP2wLEfYal1wDElKzrHIZVoIWXnFC6xvAJui5wbgOooAcn7Q==","signatures":[{"sig":"MEQCIBgBq1odlhFiScdJQC1YgaIycoUzMGg88LM+u2JreNcpAiAVHCvnoKnaC/UHnelfHfc1jRFvz1xM9n+wfhWmXVKxhA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1772},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"0a989fce267e526c3011ed9853b32f5ac1c649f7","scripts":{"build":"tsc"},"_npmUser":{"name":"hassanelmghari","email":"hassan@hey.com"},"repository":{"url":"git+https://github.com/Nutlope/llama-ocr.git","type":"git"},"_npmVersion":"10.2.4","description":"PDF to markdown (OCR) with Llama 3.2 Vision.","directories":{},"_nodeVersion":"20.11.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.3","@types/node":"^22.9.0"},"_npmOperationalInternal":{"tmp":"tmp/llama-ocr_0.0.2_1731342920271_0.6990115844663181","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"llama-ocr","version":"0.0.3","keywords":["together ai","vLLMs","open source","AI models","OCR","Llama"],"author":{"url":"@nutlope","name":"Hassan El Mghari"},"license":"MIT","_id":"llama-ocr@0.0.3","maintainers":[{"name":"hassanelmghari","email":"hassan@hey.com"}],"homepage":"https://github.com/Nutlope/llama-ocr#readme","bugs":{"url":"https://github.com/Nutlope/llama-ocr/issues"},"dist":{"shasum":"14aaab055ed2edde4ef3b528d8f5276f4a23c2a5","tarball":"https://registry.npmjs.org/llama-ocr/-/llama-ocr-0.0.3.tgz","fileCount":4,"integrity":"sha512-Fj5MQmAqGxVmI7TxX/SZKkzNOo/Y7uQU5C97Ar9yDnMj3uchihSw/VlxvxzP+RTz8qSYc4HXxd4c1oPt7NaSCA==","signatures":[{"sig":"MEYCIQDCyKPAllM7+e8qr3se5M9EWIRVYNAdgDFSwfSSw0qMogIhAOxFd01g/m2mCU61YFCva7DmkVR+AGEapbdaAZ2JnRTz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5047},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"847d6db16b709f314845365b7dc05362d89f6d66","scripts":{"test":"tsx ./test/index.ts","build":"tsc"},"_npmUser":{"name":"hassanelmghari","email":"hassan@hey.com"},"repository":{"url":"git+https://github.com/Nutlope/llama-ocr.git","type":"git"},"_npmVersion":"10.2.4","description":"Image to markdown (OCR) with Llama 3.2 Vision.","directories":{},"_nodeVersion":"20.11.0","dependencies":{"together-ai":"^0.9.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","typescript":"^5.6.3","@types/node":"^22.9.0"},"_npmOperationalInternal":{"tmp":"tmp/llama-ocr_0.0.3_1731374739509_0.19583914514905487","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"llama-ocr","version":"0.0.4","keywords":["together ai","vLLMs","open source","AI models","OCR","Llama"],"author":{"url":"@nutlope","name":"Hassan El Mghari"},"license":"MIT","_id":"llama-ocr@0.0.4","maintainers":[{"name":"hassanelmghari","email":"hassan@hey.com"}],"homepage":"https://github.com/Nutlope/llama-ocr#readme","bugs":{"url":"https://github.com/Nutlope/llama-ocr/issues"},"dist":{"shasum":"a289d483536f55fe2bcc9b02ebc31f9f41af574d","tarball":"https://registry.npmjs.org/llama-ocr/-/llama-ocr-0.0.4.tgz","fileCount":8,"integrity":"sha512-DLFQQZGJ2946bdNopv6pfCpd9olgvOX67D2h94fetPR7jnpY8kACeA30fJL2BiXnB1wS6v+GjHjcecbHjHa2vg==","signatures":[{"sig":"MEYCIQDIB/P6Qgl9BWKVy7S9HucEYvT4fml3cjLpmyWXGAC4kAIhAKBaaoCz8/kLgHJJ0irC/MaqkuIkFtmuIEtLTO1e2Ni3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8958},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"847d6db16b709f314845365b7dc05362d89f6d66","scripts":{"test":"tsx ./test/index.ts","build":"tsc"},"_npmUser":{"name":"hassanelmghari","email":"hassan@hey.com"},"repository":{"url":"git+https://github.com/Nutlope/llama-ocr.git","type":"git"},"_npmVersion":"10.2.4","description":"Image to markdown (OCR) with Llama 3.2 Vision.","directories":{},"_nodeVersion":"20.11.0","dependencies":{"together-ai":"^0.9.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","typescript":"^5.6.3","@types/node":"^22.9.0"},"_npmOperationalInternal":{"tmp":"tmp/llama-ocr_0.0.4_1731374754441_0.9831952487880569","host":"s3://npm-registry-packages"}},"0.0.5":{"name":"llama-ocr","version":"0.0.5","keywords":["together ai","vLLMs","open source","AI models","OCR","Llama"],"author":{"url":"@nutlope","name":"Hassan El Mghari"},"license":"MIT","_id":"llama-ocr@0.0.5","maintainers":[{"name":"hassanelmghari","email":"hassan@hey.com"}],"homepage":"https://github.com/Nutlope/llama-ocr#readme","bugs":{"url":"https://github.com/Nutlope/llama-ocr/issues"},"dist":{"shasum":"2521db5fdcfca686c7b2f2309763fc0d9311342d","tarball":"https://registry.npmjs.org/llama-ocr/-/llama-ocr-0.0.5.tgz","fileCount":6,"integrity":"sha512-QaT8PWPl1091s63Vqv5Xw3V457nRwzwVVCJvRViDILp91CFX5YlmgsHxsPk7xPgTOZ9kQgVlF3tPz6lAP1GjbQ==","signatures":[{"sig":"MEYCIQCTYIBJsQConG9i7GpoGTwNtC8BiSCCV3sdMl76I9t7+wIhALM6X7kfVz+vqmVGwOZT0zkVlcOEQqW5qLgu6bqPUEcW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8507},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"cb328a92000fafbf9cd856be4fc268ab7915b774","scripts":{"test":"tsx ./test/index.ts","build":"tsc"},"_npmUser":{"name":"hassanelmghari","email":"hassan@hey.com"},"repository":{"url":"git+https://github.com/Nutlope/llama-ocr.git","type":"git"},"_npmVersion":"10.2.4","description":"Image to markdown (OCR) with Llama 3.2 Vision.","directories":{},"_nodeVersion":"20.11.0","dependencies":{"together-ai":"^0.9.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","typescript":"^5.6.3","@types/node":"^22.9.0"},"_npmOperationalInternal":{"tmp":"tmp/llama-ocr_0.0.5_1731426001368_0.42968744548087456","host":"s3://npm-registry-packages"}},"0.0.6":{"name":"llama-ocr","version":"0.0.6","description":"Image to markdown (OCR) with Llama 3.2 Vision.","author":{"name":"Hassan El Mghari","url":"@nutlope"},"repository":{"type":"git","url":"git+https://github.com/Nutlope/llama-ocr.git"},"license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","test":"tsx ./test/index.ts"},"devDependencies":{"@types/node":"^22.9.0","tsx":"^4.19.2","typescript":"^5.6.3"},"keywords":["together ai","vLLMs","open source","AI models","OCR","Llama"],"dependencies":{"together-ai":"^0.9.0"},"_id":"llama-ocr@0.0.6","gitHead":"cb328a92000fafbf9cd856be4fc268ab7915b774","bugs":{"url":"https://github.com/Nutlope/llama-ocr/issues"},"homepage":"https://github.com/Nutlope/llama-ocr#readme","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-TsbMIqgTOD3F3C6/HFYYKe5aJAjo+Dpc6x05Hx/3YOUKY5cYQ58e5QP4B134UvkA5UOnCDmR3tO7C0KOAYM3TQ==","shasum":"ddf59d9c4e65d924ee6b7320ccc1076a0b3202bf","tarball":"https://registry.npmjs.org/llama-ocr/-/llama-ocr-0.0.6.tgz","fileCount":6,"unpackedSize":6850,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEWHwTAYbSesSUfU0emzvS4FgsL5YOg3dp4CEb8G6RUaAiEA1Wk2RetRj5jusM64IymKPgb6O4C0sR55zx2qw3iuaws="}]},"_npmUser":{"name":"hassanelmghari","email":"hassan@hey.com"},"directories":{},"maintainers":[{"name":"hassanelmghari","email":"hassan@hey.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/llama-ocr_0.0.6_1731429388798_0.08200479807858452"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-11T16:33:12.033Z","modified":"2024-11-12T16:36:29.214Z","0.0.1":"2024-11-11T16:33:12.208Z","0.0.2":"2024-11-11T16:35:20.552Z","0.0.3":"2024-11-12T01:25:39.727Z","0.0.4":"2024-11-12T01:25:54.619Z","0.0.5":"2024-11-12T15:40:01.523Z","0.0.6":"2024-11-12T16:36:29.035Z"},"bugs":{"url":"https://github.com/Nutlope/llama-ocr/issues"},"author":{"name":"Hassan El Mghari","url":"@nutlope"},"license":"MIT","homepage":"https://github.com/Nutlope/llama-ocr#readme","keywords":["together ai","vLLMs","open source","AI models","OCR","Llama"],"repository":{"type":"git","url":"git+https://github.com/Nutlope/llama-ocr.git"},"description":"Image to markdown (OCR) with Llama 3.2 Vision.","maintainers":[{"name":"hassanelmghari","email":"hassan@hey.com"}],"readme":"<div align=\"center\">\n  <div>\n    <h1 align=\"center\">Llama OCR</h1>\n  </div>\n\t<p>An npm library to run OCR for free with Llama 3.2 Vision.</p>\n\n<a href=\"https://www.npmjs.com/package/llama-ocr\"><img src=\"https://img.shields.io/npm/v/llama-ocr\" alt=\"Current version\"></a>\n\n</div>\n\n---\n\n## Installation\n\n`npm i llama-ocr`\n\n## Usage\n\n```js\nimport { ocr } from \"llama-ocr\";\n\nconst markdown = await ocr({\n  filePath: \"./trader-joes-receipt.jpg\", // path to your image (soon PDF!)\n  apiKey: process.env.TOGETHER_API_KEY, // Together AI API key\n});\n```\n\n## How it works\n\nThis library uses the free Llama 3.2 endpoint from [Together AI](https://dub.sh/together-ai) to parse images and return markdown. Paid endpoints for Llama 3.2 11B and Llama 3.2 90B are also available for faster performance and higher rate limits.\n\nYou can control this with the `model` option which is set to `Llama-3.2-90B-Vision` by default but can also accept `free` or `Llama-3.2-11B-Vision`.\n\n## Roadmap\n\n- [x] Add support for local images OCR\n- [x] Add support for remote images OCR\n- [ ] Add support for single page PDFs\n- [ ] Add support for multi-page PDFs OCR (take screenshots of PDF & feed to vision model)\n- [ ] Add support for JSON output in addition to markdown\n\n## Credit\n\nThis project was inspired by [Zerox](https://github.com/getomni-ai/zerox). Go check them out!\n","readmeFilename":"README.md"}