Llama Cloud Services
repository·main·Indexed 26 days ago
https://github.com/run-llama/llama_cloud_servicesManaged services for RAG workflows, including parsing (LlamaParse), extraction (LlamaExtract), classification (LlamaClassify), and indexing (LlamaCloud Index). This repository provides TypeScript and Python examples for these services. Note: This repository and the llama-parse package are deprecated in favor of the llama-cloud and @llamaindex/llama-cloud packages.
What's inside llama_cloud_services
- LlamaCloud provides managed parsing, ingestion, and retrieval services. It is designed to provide production-grade context-augmentation for LLM and RAG (Retrieval-Augmented Generation) applications.
Explore LlamaCloud Services TypeScript examples
mainThe
examples-tsdirectory contains several TypeScript end-to-end applications demonstrating how to use LlamaCloud services. Specifically, you can find examples for:- LlamaParse: For document parsing tasks.
- LlamaCloud Index: For indexing and retrieval tasks.
To use these examples, navigate to the specific sub-directory (
./parse/or./index/) and follow the instructions provided within those folders.Explore LlamaCloud Services Python examples
mainThis repository contains Python notebooks providing examples for the following LlamaCloud services:
- LlamaParse: For document parsing.
- LlamaExtract: For data extraction.
- LlamaCloudIndex: For indexing services.
To use these examples, navigate to the respective subdirectories and follow the instructions provided within each notebook.
Maintain code quality in LlamaParse Demo
mainTo ensure code consistency and quality, use the following
pnpmscripts:- Format code:
pnpm run format - Lint code:
pnpm run lint
pnpm run format pnpm run lint- Format code:
Run the LlamaExtract Demo
mainThe LlamaExtract demo is a CLI application that extracts structured data from documents (like scientific papers) and renders them into markdown.
To start the application, run:
npm run startOnce started, the application will prompt you to enter the file path of the document you wish to process.
Maintain Code Quality in the LlamaCloud Index Demo
mainTo ensure code consistency and quality in the demo project, use the following
pnpmcommands:- Format code: Applies code formatting.
pnpm run format
- **Lint code**: Runs linting checks. ```bash pnpm run lintpnpm run format pnpm run lint- Format code: Applies code formatting.
Install and set up the LlamaExtract Demo
mainTo run the LlamaExtract TypeScript demo, ensure you have Node.js (v18+) and
pnpminstalled. Follow these steps to clone, install dependencies, and configure your environment:- Clone the repository and navigate to the extract directory:
git clone https://github.com/run-llama/llama_cloud_services cd lama_cloud_services/examples-ts/extract/ - Install dependencies:
npm install - Set your LlamaCloud API key in your environment:
export LLAMA_CLOUD_API_KEY="your-llamacloud-api-key"
git clone https://github.com/run-llama/llama_cloud_services cd lama_cloud_services/examples-ts/extract/ npm install export LLAMA_CLOUD_API_KEY="your-llamacloud-api-key"- Clone the repository and navigate to the extract directory:
Install and set up the LlamaParse Demo
mainTo run the LlamaParse TypeScript demo, you need Node.js (v18+),
pnpm, an OpenAI API key, and a LlamaCloud API key.- Clone the repository and navigate to the demo directory:
git clone https://github.com/run-llama/llama_cloud_services cd lama_cloud_services/examples-ts/parse/- Install dependencies:
pnpm install- Configure your environment variables:
export OPENAI_API_KEY="your-openai-api-key" export LLAMA_CLOUD_API_KEY="your-llamacloud-api-key"git clone https://github.com/run-llama/llama_cloud_services cd lama_cloud_services/examples-ts/parse/ pnpm install export OPENAI_API_KEY="your-openai-api-key" export LLAMA_CLOUD_API_KEY="your-llamacloud-api-key"Migrate from deprecated LlamaParse packages
mainThe
llama-parsepackage is deprecated and will be maintained until May 1, 2026. For improved performance and active development, migrate to the following packages:- Python:
pip install llama-cloud>=1.0 - TypeScript:
npm install @llamaindex/llama-cloud
- Python:
Install LlamaParse
mainTo use LlamaParse, first ensure you have an API key from https://cloud.llamaindex.ai/api-key.
If you are upgrading from
llama-indexv0.9.X or older, uninstall the old version first to avoid conflicts. Then, install the latestllama-indexandllama-parsepackages.# Run this if upgrading from v0.9.x or older pip uninstall llama-index pip install -U llama-index --upgrade --no-cache-dir --force-reinstall # Install LlamaParse pip install llama-parseRun the LlamaCloud Index Demo
mainUse the following commands to interact with the demo application:
- Start the Demo: Runs the application in standard mode. It will display a welcome screen and prompt you to start chatting.
pnpm run start - Development Mode: Runs the application with hot reload support for active development.
pnpm run dev - Build the Project: Compiles the project for production.
pnpm run build
pnpm run start- Start the Demo: Runs the application in standard mode. It will display a welcome screen and prompt you to start chatting.
Install and run the LlamaClassify Demo
mainThe LlamaClassify Demo is a TypeScript application that showcases the LlamaClassify agentic document classification service. It allows you to classify documents (e.g., financial statements) based on custom rules and provides reasoning-based insights and confidence scores.
Prerequisites
- Node.js (version 22 or higher)
- pnpm package manager
- LlamaCloud API key
Installation Steps
- Clone the repository and navigate to the classify directory:
git clone https://github.com/run-llama/llama_cloud_services cd lama_cloud_services/examples-ts/classify/- Install dependencies:
npm install- Set your LlamaCloud API key in your environment:
export LLAMA_CLOUD_API_KEY="your-llamacloud-api-key"Running the Demo
Start the development server with:
npm run devThe application will be available at
http://localhost:3000.git clone https://github.com/run-llama/llama_cloud_services cd lama_cloud_services/examples-ts/classify/ npm install export LLAMA_CLOUD_API_KEY="your-llamacloud-api-key" npm run dev