Skip to main content

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).

Using PowerShell script:

./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.

Manual release:

poetry version 0.2.1
poetry build
export POETRY_PYPI_TOKEN_TESTPYPI="your-token"
poetry publish -r testpypi

export POETRY_PYPI_TOKEN_PYPI="your-token"
poetry publish

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

vondr-0.2.3.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vondr-0.2.3-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file vondr-0.2.3.tar.gz.

File metadata

  • Download URL: vondr-0.2.3.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.6.0

File hashes

Hashes for vondr-0.2.3.tar.gz
Algorithm Hash digest
SHA256 88a255992424e36c6fcf6168546ac17825e4b3b2486044489e3b0eba9661678b
MD5 1934e45c2597cd9adb2fa2926a618a1f
BLAKE2b-256 0e3ec9230638f75c310784c089cebf0b2c5ecb81cc05655e05817573b1d235b2

See more details on using hashes here.

File details

Details for the file vondr-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: vondr-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 14.3 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

Hashes for vondr-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 35c0148e733d98987536e14a3d19290b6ca1dc65f10a09a2bbbee021a905852e
MD5 b1230154a6eece7d8fe6005f4cfb0d98
BLAKE2b-256 7a5b4481c8044a5d6138622f27d11d7ca5fdc4d02b50a53872a5c8ab3c4b4ae0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page