Python client for the Vondr AI Platform.
Project description
vondr
Python client for the Vondr AI Platform.
Installation
pip install vondr
Quick Start
from vondr import VondrClient
# Set environment variables or pass directly
# VONDR_API_KEY=your-api-key
# VONDR_BASE_URL=https://{HOSTNAME}-api.vondr.ai/v1
client = VondrClient()
response = client.chat([
{"role": "user", "content": "Hello!"}
])
print(response.choices[0].message.content)
Chat Completion
response = client.chat(
messages=[{"role": "user", "content": "Explain quantum computing"}],
model="vondr-fast", # or vondr-code, vondr-think
temperature=0.7,
max_tokens=4096,
)
print(response.choices[0].message.content)
Embeddings
response = client.embed(
input=["Hello world", "Goodbye world"],
model="vondr-embed",
)
for item in response.data:
print(f"Embedding {item.index}: {len(item.embedding)} dimensions")
Rerank
response = client.rerank(
query="capital of France",
documents=["Paris is in France", "Berlin is in Germany"],
model="vondr-rerank",
)
for result in response.results:
print(f"Document {result.index}: score {result.relevance_score:.3f}")
Vision (Images)
from vondr import VondrClient, encode_image
# Encode image from file path
image_uri = encode_image("/path/to/image.jpg")
client = VondrClient()
response = client.chat([
{
"role": "user",
"content": [
{"type": "text", "text": "What's in this image?"},
{"type": "image_url", "image_url": {"url": image_uri}}
]
}
])
print(response.choices[0].message.content)
Async Client
from vondr import AsyncVondrClient
client = AsyncVondrClient()
response = await client.chat([
{"role": "user", "content": "Hello!"}
])
print(response.choices[0].message.content)
Available Models
| Model | Description |
|---|---|
vondr-fast |
Fast general-purpose model |
vondr-code |
Optimized for code generation |
vondr-think |
Reasoning model with thinking budget |
vondr-embed |
Text embeddings |
vondr-rerank |
Document reranking |
Configuration
| Environment Variable | Description |
|---|---|
VONDR_API_KEY |
Your API key |
VONDR_BASE_URL |
API base URL (e.g., https://{HOSTNAME}-api.vondr.ai/v1) |
Development
Install Poetry (pipx install poetry recommended).
poetry install
poetry run pytest
Release
Set your token before publishing: POETRY_PYPI_TOKEN_PYPI (or POETRY_PYPI_TOKEN_TESTPYPI when targeting TestPyPI).
./scripts/release.ps1 -Version 0.2.1 # publish to PyPI
./scripts/release.ps1 -Version 0.2.1 -Repository testpypi # publish to TestPyPI
The script will bump the version in pyproject.toml, install deps, run tests, build wheel+sdist, publish, then commit/tag/push if a git remote exists.
Project details
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 vondr-0.2.1.tar.gz.
File metadata
- Download URL: vondr-0.2.1.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd37278bd6cdab09d1a7dddaf9332384184f7a53d688784c804019589e933eeb
|
|
| MD5 |
eace98728b62e02beb65b9391a5cee51
|
|
| BLAKE2b-256 |
4397d71debdeb3cb554593f49e9d9f9fa102b0118750a51324fc9101e91ad8ff
|
File details
Details for the file vondr-0.2.1-py3-none-any.whl.
File metadata
- Download URL: vondr-0.2.1-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b27c925f7a7927963f4d31b8642cd79bad267ed049568165f64694596cca3b24
|
|
| MD5 |
4ba43dfb523ece972d51d2b9a197de04
|
|
| BLAKE2b-256 |
55539fe14bdf8a2d0b2e3e782d3b37a8d164332080187bfce76d0b4f7b8f6b00
|