llm-python
onlyphantom/llm-python
Large Language Models tutorials and sample scripts featuring langchain, openai, llamaindex, gpt, chromadb & pinecone
Overview
A repository with instructional materials, code samples and Python scripts focused on building applications around LLMs through various tools like LangChain, OpenAI API, Chroma DB, Pinecone.
Categories
Tags
Relationships
Related
Integrates with
Similar tools
ECC
affaan-m/ECC
The agent harness performance optimization system
AutoGPT
Significant-Gravitas/AutoGPT
AutoGPT: Build, Deploy, and Run AI Agents
ollama
ollama/ollama
Get up and running with Kimi-K2.6, GLM-5.1, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
prompts.chat
f/prompts.chat
The world's largest open-source prompt library for AI
JavaGuide
Snailclimb/JavaGuide
Snailclimb/JavaGuide: 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Install
git clone https://github.com/onlyphantom/llm-pythonREADME
llm-python
A set of instructional materials, code samples and Python scripts featuring LLMs (GPT etc) through interfaces like llamaindex, LangChain, OpenAI's Agent SDK, Chroma (Chromadb), Pinecone etc.
The code examples are aimed at helping you learn how to build LLM applications and Agents using Python. The code is designed to be self-contained and singularly focused, so you can pick and choose the usage patterns most relevant to your needs.
Many examples have accompanying videos on my YouTube channel.
Learn LangChain from my YouTube channel (~9 hours of LLM hands-on building tutorials); Each lesson is accompanied by the corresponding code in this repo and is designed to be self-contained -- while still focused on some key concepts in LLM (large language model) development and tooling.
Feel free to pick and choose your starting point based on your learning goals:
| Part | LLM Tutorial | Link | Video Duration |
|---|---|---|---|
| 1 | OpenAI tutorial and video walkthrough | Tutorial Video | 26:56 |
| 2 | LangChain + OpenAI tutorial: Building a Q&A system w/ own text data | Tutorial Video | 20:00 |
| 3 | LangChain + OpenAI to chat w/ (query) own Database / CSV | Tutorial Video | 19:30 |
| 4 | LangChain + HuggingFace's Inference API (no OpenAI credits required!) | Tutorial Video | 24:36 |
| 5 | Understanding Embeddings in LLMs | Tutorial Video | 29:22 |
| 6 | Query any website with LLamaIndex + GPT3 (ft. Chromadb, Trafilatura) | Tutorial Video | 11:11 |
| 7 | Locally-hosted, offline LLM w/LlamaIndex + OPT (open source, instruction-tuning LLM) | Tutorial Video | 32:27 |
| 8 | Building an AI Language Tutor: Pinecone + LlamaIndex + GPT-3 + BeautifulSoup | Tutorial Video | 51:08 |
| 9 | Building a queryable journal 💬 w/ OpenAI, markdown & LlamaIndex 🦙 | Tutorial Video | 40:29 |
| 10 | Making a Sci-Fi game w/ Cohere LLM + Stability.ai: Generative AI tutorial | Tutorial Video | 1:02:20 |
| 11 | GPT builds entire party invitation app from prompt (ft. SMOL Developer) | Tutorial Video | 41:33 |
| 12 | A language for LLM prompt design: Guidance | Tutorial Video | 43:15 |
| 13 | You should use LangChain's Caching! | Tutorial Video | 25:37 |
| 14 | Build Chat AI apps with Steamlit + LangChain | Tutorial Video | 32:11 |
The full lesson playlist can be found here.
Updates
Multi-Agent and Agentic Patterns Update: May 3rd 2025
I've pushed 6 new scripts to the repo, `19_agent