Python SDK for Evalio AI - LLM A/B testing platform
Project description
Evalio Python SDK
Python SDK for Evalio AI, an LLM experimentation platform for routing traffic between model or prompt variants, reporting metrics, and collecting feedback.
Package name
Install package:
pip install evalio-ai
Import path stays:
from evalio import EvalioClient
With Anthropic support:
pip install "evalio-ai[anthropic]"
Quick Start
from evalio import EvalioClient
client = EvalioClient(
api_key="sk-evalio-your-key",
base_url="https://evalio-ai-production.up.railway.app",
provider_keys={"openai": "sk-your-openai-key"},
)
response = client.run(
experiment_id=12,
messages=[{"role": "user", "content": "How do I reset my password?"}],
user_id="user-123",
idempotency_key="support-reset-user-123-msg-001",
provider_params={"temperature": 0.2},
)
print(response.content)
print(response.variant)
print(response.request_id)
print(response.cost_usd)
print(response.latency_ms)
What the SDK does
- Calls Evalio to get a routing decision
- Calls the assigned provider/model
- Reports completion metrics back to Evalio
- Returns the provider response
Sticky assignment means the same user_id stays on the same variant after the first assignment.
Per-call provider parameters
If your app needs JSON mode or other call-specific provider options, pass them at runtime:
response = client.run(
experiment_id=12,
messages=[{"role": "user", "content": "Return valid JSON only"}],
user_id="user-123",
idempotency_key="json-user-123-msg-001",
provider_params={
"temperature": 0.2,
"response_format": {"type": "json_object"},
},
)
Runtime params are merged on top of the variant's saved extra_params.
Feedback
client.feedback(
response.request_id,
score=1,
comment="Helpful answer",
idempotency_key=f"feedback:{response.request_id}:thumbs-up",
)
Retry safety
EvalioClient.run(..., idempotency_key=...) and EvalioClient.feedback(..., idempotency_key=...)
can be retried safely. The backend replays the original result instead of creating duplicates.
Supported providers
- OpenAI
- Anthropic via optional extra
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file evalio_ai-0.1.2.tar.gz.
File metadata
- Download URL: evalio_ai-0.1.2.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd78efdf01267bfd3259a3e52c0bfb4712b5fd8fa4fbeb66683aed3aa8260407
|
|
| MD5 |
d8251fbae8a2f2ca7fa3b520e01a9803
|
|
| BLAKE2b-256 |
debf6660da414ed529abecc6c3f49f739390cf2de5c3f0aa7ce0341c384ea646
|
File details
Details for the file evalio_ai-0.1.2-py3-none-any.whl.
File metadata
- Download URL: evalio_ai-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
334259db05ccf22de35fc82d7fbfff4f01ad3aa0ce970ba21a9b2180c6f0c27f
|
|
| MD5 |
9261c1904850918e271b0da41c47d3ad
|
|
| BLAKE2b-256 |
8de7058000c5875d258e3549a01957842394aa3569ea215b18702de3ab58d127
|