FastAPI + LLM
The previous post covered why FastAPI fits GenAI applications well in principle. This one is the practical follow-through: a closer, more complete look at actually wiring an LLM into a FastAPI application — from a single endpoint to a more realistic setup with conversation...
Running LLMs Locally with llama.cpp
Understanding what llama.cpp is, as covered in the previous post, is one thing — actually getting a model running on your own machine is the practical next step. The process has gotten dramatically simpler over the past couple of years, to the point where running a genuinely...
Python Lists and Dictionaries in AI
If there's one pattern that shows up in nearly every line of generative AI code, it's this: lists and dictionaries, nested inside each other, moving data in and out of API calls. They've been referenced throughout this series as "the core data shapes of AI work," but they deserve a …
Python Classes for AI Applications
Functions are great for a single, self-contained piece of logic — summarize this text, classify this sentiment. But a lot of real generative AI applications need something functions alone don't handle well: state that persists and evolves over time — an ongoing conversation,...
Python Functions for AI Development
Once a generative AI script grows past a handful of lines, functions stop being optional structure and start being the thing that keeps the whole project sane. They're how you turn "a prompt I typed once" into "a reusable piece of AI logic anyone on the team can call." This …
Python Variables for AI Applications
Every generative AI script — no matter how simple or sophisticated — is built on the most basic unit in Python: the variable. It's easy to skim past variables as "too basic to matter" when you're eager to get to prompts and API calls, but the way you use variables directly shapes …
Python Fundamentals for GenAI Developers
You don't need to be a professional software engineer to start building with generative AI — but there's a core set of Python fundamentals that make working with LLMs, APIs, and AI frameworks dramatically smoother. If you're coming to Python specifically to build generative...