-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
docsDocumentationDocumentationf3d1Assigned to f3d1Assigned to f3d1good first issueGood for newcomersGood for newcomers
Milestone
Description
Write Python quickstart examples showing how to use LLMKit.
Primary: Python SDK (NEW)
We now have a Python SDK: pip install llmkit
Examples to write using the SDK:
- Basic chat completion (
from llmkit import LLMKit) - Streaming response (
client.chat_stream()with CostStream) - Session tracking (
client.session("my-agent")) - Cost callback (
on_cost=parameter) - Standalone cost estimation (
estimate_cost(response)- works without proxy) - Async client (
AsyncLLMKit)
Secondary: base_url approach (zero-migration)
For devs who don't want to change their existing code:
7. OpenAI client with base_url pointed at proxy
8. With session tracking header (x-llmkit-session-id)
Framework integrations
- LangChain with LLMKit SDK
- LlamaIndex with LLMKit SDK
Each example should be a standalone .py file in examples/ directory. Include requirements.txt.
Proxy URL: https://llmkit-proxy.smigolsmigol.workers.dev/v1
Auth: LLMKIT_API_KEY env var or api_key= parameter
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
docsDocumentationDocumentationf3d1Assigned to f3d1Assigned to f3d1good first issueGood for newcomersGood for newcomers