This first tutorial aimed at priming the basic concepts.
Some more advanced topics include:
Streaming responses — real-time output for chat-like experiences (you dont have to wait for the end of the message to display it. Only useful for interactive sessions)
Multi-step chains — feed one LLM’s output into another
Tool calling (function calling) — let the LLM decide when to run your Python functions ( only run it if you are experienced and can setup protected environments)
RAG from Python — query your own documents programmatically (i.e. let LLM scan documents via embedding models)
Structured data extraction — parse LLM output into pandas DataFrames
Local models via Ollama — same code but with local models instead of using OpenRouter (highly limited by the hardware/memory available)
Rate limiting and retry logic — production-grade reliability: avoid draining your credits by accident