Setup
Get an API key
If you are attending the tutorial live, you may fill out this form and we will send you API keys: https://pos.it/pydataseattle2025workshop
See the section on the bottom on setting up your key.
Python
- Clone this repository: https://github.com/chendaniely/pydata-seattle-2025-llm
git clone https://github.com/chendaniely/pydata-seattle-2025-llm.git
git clone git@github.com:chendaniely/pydata-seattle-2025-llm.git- Use the provided
requirements.txtfile to create the virtual environments
pip install -r requirements.txtIDE
I’m using Positron: https://positron.posit.co/, but feel free to use VS Code and/or RStudio
GitHub Models
You will need to create a GitHub Personal Access Token (PAT). It does not need any context (e.g., repo, workflow, etc).
General instructions from the GitHub docs on creating a PAT: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic
Instructions from the GitHub Models docs: https://github.com/Azure-Samples/python-ai-agent-frameworks-demos/tree/main?tab=readme-ov-file#configuring-github-models
Local LLM: Ollama
- Download Ollama: https://ollama.com/
- Pick one of the many llama models on their model page from: https://ollama.com/search.
- Pick any random model that will fit on your computer
- You can pick multiple models if you’d like, we will compare results during workshop.
- Here are a few example models with their download sizes you can try:
| Model | Download Size | URL | Install Command |
|---|---|---|---|
| gpt-oss:20b | 14GB | https://gpt-oss.com/ | ollama run gpt-oss:20b |
| gpt-oss:120b | 65GB | - | ollama run gpt-oss:120b |
| qwen3:0.6b | 523MB | https://ollama.com/library/qwen3 | ollama run qwen3:0.6b |
| qwen | 5.2GB | - | ollama run qwen3 |
| Phi 4 mini | 3.2GB | https://ollama.com/library/phi4-reasoning | ollama run phi4-mini-reasoning |
| devstral | 14GB | https://ollama.com/library/devstral | ollama run devstral |
| llama4 | 67GB | https://ollama.com/library/llama4 | ollama run llama4 |
| llama4:128x17b | 245GB | - | ollama run llama4:128x17b |
(Optional): Chat provider with API
If you pay for Claude, OpenAI, etc access with their web/desktop application, this is a separate purchase for the API key. Depending on your usage, you may even find that paying for the API key could be cheaper!
Anthropic Claude
- Sign up at https://console.anthropic.com.
- Load up enough credit so you won’t be sad if something goes wrong.
- Create a key at https://console.anthropic.com/settings/keys
Google Gemini
- Log in to https://aistudio.google.com with a google account
- Click create API key & copy it to the clipboard.
OpenAI ChatGPT
- Log into https://platform.openai.com/.
- Create a key at https://platform.openai.com/settings/organization/api-keys
API Key setup
For Anthropic / OpenAI keys create a .env file in the root of the repository with the following information:
OPENAI_API_KEY=YOUR_KEY_HERE
ANTHROPIC_API_KEY=YOUR_KEY_HERE
You can also choose to set up the keys as a global environment variable by setting your ~/.bashrc or ~/.zshrc file. You will need to restart your terminal for variables to take affect.
export OPENAI_API_KEY=YOUR_KEY_HERE
export ANTHROPIC_API_KEY=YOUR_KEY_HERE