
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
vision-ocr
Advanced tools
Convert images to markdown using Llama 3.2 Vision model powered by Groq AI.
npm install vision-ocr
GROQ_API_KEY=your_api_key
import { ocr } from 'vision-ocr';
// Using a remote image
const markdown = await ocr({
filePath: 'https://example.com/image.jpg',
apiKey: 'your_groq_api_key' // Optional if env variable is set
});
// Using a local image
const markdown = await ocr({
filePath: './path/to/local/image.jpg'
});
console.log(markdown);
Main function to convert images to markdown.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
filePath | string | Yes | - | Path to local image or URL of remote image |
apiKey | string | No | process.env.GROQ_API_KEY | Your Groq API key |
model | string | No | "llama-3.2-11b-vision-preview" | Model to use for OCR |
llama-3.2-11b-vision-preview
llama-3.2-90b-vision-preview
The package throws errors in these cases:
try {
const markdown = await ocr({
filePath: 'path/to/image'
});
} catch (error) {
console.error('OCR failed:', error.message);
}
MIT © Saurabh Udupi (@0xSaurabhx)
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project was inspired by nutlope. Go check it out!
FAQs
Image to markdown (OCR) with Llama 3.2 Vision.
We found that vision-ocr demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.