Summary
Create pip install distill-ai package for Python developers.
Motivation
80% of AI developers use Python. A native SDK unlocks LangChain, LlamaIndex, and direct OpenAI/Anthropic integrations.
Components
Package Structure
distill-python/
├── src/distill/
│ ├── __init__.py
│ ├── client.py # Sync HTTP client
│ ├── async_client.py # Async HTTP client
│ ├── types.py # Pydantic models
│ ├── integrations/
│ │ ├── langchain.py # LangChain retriever
│ │ └── llamaindex.py # LlamaIndex postprocessor
│ └── py.typed
├── tests/
├── pyproject.toml
└── README.md
Usage Examples
# Basic usage
from distill import DistillClient
client = DistillClient(api_key="...")
result = client.dedupe(chunks=[...], threshold=0.15)
# Async
async with AsyncDistillClient(api_key="...") as client:
result = await client.pipeline(chunks=[...])
# LangChain
from distill.integrations.langchain import DistillRetriever
retriever = DistillRetriever(
base_retriever=vectorstore.as_retriever(),
distill_client=client
)
Acceptance Criteria
Summary
Create
pip install distill-aipackage for Python developers.Motivation
80% of AI developers use Python. A native SDK unlocks LangChain, LlamaIndex, and direct OpenAI/Anthropic integrations.
Components
Package Structure
Usage Examples
Acceptance Criteria
distill-ai