A LangChain integration for parsing OCR documents using Mistral models.
npm install @4xxi/langchainimport { MistralOcrPDFLoader } from '@4xxi/langchain';
const loader = new MistralOcrPDFLoader(
'path/to/your/document.pdf',
{
apiKey: 'your-mistral-api-key',
modelName: 'mistral-large-latest'
}
);
const docs = await loader.load();
console.log(docs);# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm testnpm run build- Build the projectnpm run build:watch- Watch and rebuild on changesnpm run test- Run testsnpm run test:watch- Watch and run tests on changesnpm run lint- Run lintingnpm run format- Format code
We use GitHub Actions to automate the release process. For detailed instructions, see RELEASE.md.
Quick steps for manual release:
# Bump version (patch, minor, or major)
npm version patch
# Build and publish to npm
npm publish --access public
# Push changes to GitHub
git push && git push --tagsPlease follow the LangChain contribution guidelines when making changes to this project.
MIT