LLM-powered interface for creating custom input scenarios for energy ABMs.
- José: Backend/LLM Integration
- Julian: CSV Operations
- Toni: Frontend/UI
# 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# Test the backend
uv run python test_backend.py
# Start the API server
uv run python run_backend.pyVisit http://localhost:8000/docs for API documentation.
The system currently supports:
-
Scale Demand: Modify electricity demand by a factor
- Example: "Increase demand by 20%"
- Example: "Increase Houston demand by 30% in summer 2022"
-
Add Assets: Add new power plants
- Example: "Add a 500MW solar plant in West Texas"
backend/: FastAPI app with Anthropic Claude integrationmodels.py: Pydantic data modelsllm_interface.py: Claude integration for query interpretationmain.py: FastAPI application
operations/: Pandas operations for CSV manipulation (Julian's work)frontend/: Streamlit chat interface (Toni's work)
# Format code
uv run black .
uv run isort .
# Lint code
uv run ruff .
# Run pre-commit hooks
uv run pre-commit run --all-files