Skip to content

macro-cosm/energy-llm-inputs

Repository files navigation

Energy ABM LLM Input Builder

LLM-powered interface for creating custom input scenarios for energy ABMs.

Team

  • José: Backend/LLM Integration
  • Julian: CSV Operations
  • Toni: Frontend/UI

Quick Start

1. Environment Setup

# Clone and enter project
git clone https://github.com/macro-cosm/energy-llm-inputs.git
cd energy-llm-inputs

# Install with uv
uv sync --extra dev

# Set up environment variables
cp .env.template .env
# Edit .env and add your ANTHROPIC_API_KEY

2. Run Backend (José's work)

# Test the backend
uv run python test_backend.py

# Start the API server
uv run python run_backend.py

Visit http://localhost:8000/docs for API documentation.

3. Available Operations

The system currently supports:

  1. Scale Demand: Modify electricity demand by a factor

    • Example: "Increase demand by 20%"
    • Example: "Increase Houston demand by 30% in summer 2022"
  2. Add Assets: Add new power plants

    • Example: "Add a 500MW solar plant in West Texas"

Project Structure

  • backend/: FastAPI app with Anthropic Claude integration
    • models.py: Pydantic data models
    • llm_interface.py: Claude integration for query interpretation
    • main.py: FastAPI application
  • operations/: Pandas operations for CSV manipulation (Julian's work)
  • frontend/: Streamlit chat interface (Toni's work)

Development

Code Quality

# Format code
uv run black .
uv run isort .

# Lint code
uv run ruff .

# Run pre-commit hooks
uv run pre-commit run --all-files

About

LLM interface for generating energy ABM input scenarios

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •