This repository demonstrates the use of various DSPy optimizers integrated with Langwatch for observability and metrics logging.
-
Langwatch requires Python 3.12, does not currently support 3.13
-
Install dependencies:
pip install -r requirements.txt
-
Set up your
.env
file with the required API keys for OpenAI and Langwatch.OPENAI_API_KEY="openai-api-key"
LANGWATCH_API_KEY="langwatch-project-key" LANGWATCH_ENDPOINT="http://localhost:5560" or if hosting https://langwatch.ai/
- COPRO: See
/src/copro/
andnotebooks/copro-tutorial.ipnyb
Each optimizer contains a Jupter Notebook end to end tutorial in notebooks/, as well as python code files implementing the optimizer with Langwatch integration and metrics logging in src/.