pi-llm¶
Unified LLM provider abstraction for Python.
pi-llm provides a clean, typed interface for making LLM API calls with streaming events, tool calling, extended thinking, and cost tracking.
Key Concepts¶
- Models & Providers — Model catalog and provider registry
- Streaming —
stream_simple(),complete_simple(), andEventStream - Events — The 12 streaming event types
- Messages & Context — Message types and conversation context
- Tools — Tool definition, JSON Schema, and validation
- Thinking / Reasoning — Extended thinking levels
- Cost Tracking — Token usage and dollar cost calculation
How-to Guides¶
API Reference¶
See the auto-generated API Reference for complete documentation of all public types and functions.