1.1.1 • Published 7 months ago
@4xxi/langchain v1.1.1
Mistral OCR Parser
A LangChain integration for parsing OCR documents using Mistral models.
Installation
npm install @4xxi/langchain
Usage
import { 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);
Setup for Development
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm test
Development
npm 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
Releasing
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 --tags
Contributing
Please follow the LangChain contribution guidelines when making changes to this project.
License
MIT