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.2.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.2-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vondr-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 99887d65f8d1551db2932280bdea68c1b807868631cb8ff0845fa170a512738f
MD5 47b8ff0de94d11cdc163c54d47f5c9c6
BLAKE2b-256 a9f48b1fe13287e6fe94693c77ff505a1e26fde4bcb08179ca1e373d822bdbea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vondr-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3bf9ddf19689a4e11e1cdde84d12f41f6e7e942bbfc728127e7f50e100ff3f1b
MD5 4255ddc3d7776bb640b43dc1c8e00527
BLAKE2b-256 5e02966793d850ad1f3f92c3b9f9d2037e8e079e4950f71f9d8b79b2b6f8623c

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