Weergave
Python SDK
De Vondr Python SDK biedt een eenvoudige manier om met het Vondr AI Platform te communiceren.
Installatie
bash
pip install vondrSnelle start
python
from vondr import VondrClient
client = VondrClient(
api_key="jouw-api-key",
base_url="https://{HOSTNAME}-api.vondr.ai/v1"
)
response = client.chat([
{"role": "user", "content": "Hallo!"}
])
print(response.choices[0].message.content)Functionaliteiten
De SDK ondersteunt de volgende functionaliteiten:
- Chat Completions - Tekstgeneratie en conversaties
- Tool Calling - Modellen toegang geven tot externe functies
- Embeddings - Tekst naar vectoren
- Rerank - Documenten rangschikken op relevantie
- Vision - Afbeeldingen analyseren
Configuratie
| Parameter | Beschrijving |
|---|---|
api_key | Je API-sleutel |
base_url | API base URL (bijv. https://{HOSTNAME}-api.vondr.ai/v1) |
Beschikbare modellen
| Model | Beschrijving |
|---|---|
vondr-fast | Snel algemeen model |
vondr-code | Geoptimaliseerd voor code |
vondr-think | Reasoning model met 'thinking' budget |
vondr-embed | Text embeddings |
vondr-rerank | Document reranking |
Synchrone vs asynchrone client
De SDK biedt zowel een synchrone als een asynchrone client:
python
from vondr import VondrClient
client = VondrClient(
api_key="jouw-api-key",
base_url="https://{HOSTNAME}-api.vondr.ai/v1"
)
response = client.chat([
{"role": "user", "content": "Hallo!"}
])
print(response.choices[0].message.content)python
from vondr import AsyncVondrClient
client = AsyncVondrClient(
api_key="jouw-api-key",
base_url="https://{HOSTNAME}-api.vondr.ai/v1"
)
response = await client.chat([
{"role": "user", "content": "Hallo!"}
])
print(response.choices[0].message.content)