ai

Page actions AI-ready formats and sharing
Open LLM text
Share with AI
Ask Claude Ask ChatGPT Ask Gemini Ask Copilot

Thin LLM streaming for chirp.

Provider string in, typed async iterables out. Not a framework.

Basic usage::

from chirp.ai import LLM, AgentRun llm = LLM("anthropic:claude-sonnet-4-20250514") # Generate text text = await llm.generate("Explain…

Thin LLM streaming for chirp.

Provider string in, typed async iterables out. Not a framework.

Basic usage::

from chirp.ai import LLM, AgentRun

llm = LLM("anthropic:claude-sonnet-4-20250514")

# Generate text
text = await llm.generate("Explain quantum computing simply")

# Stream unified events
async for event in llm.stream_events("Analyze this document:"):
    ...

# Agent loop with tools
run = AgentRun(llm, app.tools)
async for event in run.stream("What's the weather?"):
    ...

Requireshttpx::

pip install chirp[ai]

ai

Name Type Default Description
type —
qualified_name —
element_type —
description —
source_file —
line_number —
is_autodoc —
autodoc_element —
_autodoc_template —
_autodoc_url_path —
_autodoc_page_type —
title —
doc_content_hash —

View source · /home/runner/work/chirp/chirp/site/../src/chirp/ai/__init__.py:1