This repo goes over some very basic ways to get structured output from LLMs. The example is a scenario where you want to classify a customer and add them to an email list.
- Initialize virtual environment ~
python3 -m venv venv
- Initialize environment ~
source venv/bin/activate
- Install dependencies ~
pip install -r requirements.txt
- Create .env file ~
touch .env
- Add your
ANTHROPIC_API_KEY=
- Add your
- Run
fresh.py
~python fresh.py
Inspect the additional files, examples.json
and start.py
, if you want to get an idea of evaluating using assertions.
Here is the youtube video: https://youtu.be/ioAMwEJQWSs