-
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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
- HTTP client wrapper - Sync client for Distill API
- Async support - aiohttp-based async client
- LangChain integration - Custom retriever with built-in dedup
- LlamaIndex integration - Node postprocessor
- Type hints - Full typing with py.typed marker
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
- Published to PyPI as
distill-ai - Works with Python 3.9+
- Async and sync APIs
- Integration examples in README
- 90%+ test coverage
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request