Title here
Summary here
Install uv (one-time):
curl -LsSf https://astral.sh/uv/install.sh | sh# 1. Clone the repository
git clone https://github.com/LeMaterial/lematerial-llm-synthesis.git
cd lematerial-llm-synthesis
# 2. Create a virtual environment and install all dependencies
uv sync
# 3. Install the llm_synthesis package in editable mode
uv pip install -e .
# 4. Verify the installation
uv run python -c "import llm_synthesis; print('OK')"Copy the example environment file and add your keys:
cp .env.example .envEdit .env and fill in the keys you need:
GEMINI_API_KEY=... # Required for synthesis extraction (default model)
ANTHROPIC_API_KEY=... # Required for performance plot extraction
MISTRAL_API_KEY=... # Required for Mistral OCR (PDF extraction)
OPENAI_API_KEY=... # Optional: OpenAI models
OPENROUTER_QWEN_API_KEY=... # Optional: Qwen models
OPENROUTER_DEEPSEEK_API_KEY=... # Optional: DeepSeek modelsYou only need the keys for the models you actually plan to use. A free Gemini API key from aistudio.google.com is sufficient for running the default extraction pipeline.
If you want to download PDFs from journal websites, install the Playwright browsers:
uv run playwright installuvx pre-commit installlemat-synth --helpYou should see the extract and batch subcommands listed.