mirror of
https://github.com/run-llama/llama_cloud_services.git
synced 2026-07-21 20:15:23 -04:00
LlamaClassify Demo
A TypeScript demo application showcasing the power of LlamaClassify - an agentic documents classification service from LlamaCloud. This demo allows you to classify financial documents among three different types (Cash flow statement, Income Statement and Balance Sheet).
Table of Contents
Features
- 📄 Documemt Classification: Classify files based on well-defined rules you can customized and play around with.
- 🤖 Reasoning-based Actionable Insights: Get in-depth, reasoning based insights on the document classification, accompanied by confidence scores.
- 🎨 Beautiful UI: DaisyUI-based interface powered by TanStack
- ⚡ Fast Development: Hot reload support with development mode
- 🛠️ TypeScript: Full TypeScript support with strict type checking
Prerequisites
- Node.js (version 22 or higher)
- pnpm package manager
- LlamaCloud API key
Installation
- Clone the repository:
git clone https://github.com/run-llama/llama_cloud_services
cd lama_cloud_services/examples-ts/classify/
- Install dependencies:
npm install
- Set up your environment variables:
# Add your API key to your environment
export LLAMA_CLOUD_API_KEY="your-llamacloud-api-key"
Usage
Start the Demo
npm run dev
The application will be up and running on http://localhost:3000
How It Works
- Document Input: Enter the path to your document when prompted
- Parsing: LlamaClassify, based on the rules you can find here, processes the document and classifies it
- Results: The classification outcome, as well as the reasoning behind it and the confidence score, are displayed in the UI.
Troubleshooting
Common Issues
- Module Resolution Errors: Ensure you're using Node.js 22+ and have all dependencies installed
- API Key Issues: Verify your LlamaCloud API key is correctly set
- File Path Errors: Use absolute paths or ensure relative paths are correct from the project root
License
MIT License - see the LICENSE file for details.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run
npm run formatandnpm run lint - Submit a pull request