Skip to content

Installation

Requirements

  • Python 3.9 or higher
  • At least one LLM provider API key (OpenAI, Anthropic, Google, etc.)

Install from PyPI

pip install eval-ai-library

Lite Installation

If you only need the tracing functionality without evaluation metrics:

pip install "eval-ai-library[lite]"

This installs only pydantic and aiohttp — minimal footprint for production tracing.

Environment Setup

Set the API key(s) for the LLM provider(s) you plan to use:

export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export GOOGLE_API_KEY="AI..."
export AZURE_OPENAI_API_KEY="..."
export AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.com"
export AZURE_OPENAI_DEPLOYMENT="your-deployment-name"
# Ollama runs locally, no API key needed by default
export OLLAMA_API_BASE_URL="http://localhost:11434/v1"

Verify Installation

import eval_lib
print(eval_lib.__version__)

Optional: spaCy Model

Some metrics use spaCy for NLP processing. Download the English model:

python -m spacy download en_core_web_sm

Optional: Tesseract OCR

For OCR capabilities in data generation (extracting text from images):

brew install tesseract
sudo apt-get install tesseract-ocr

Download from Tesseract GitHub and add to PATH.

What's Next?