nvidia-dynamo
OpenAI-compatible inference client with multimodal support, designed for NVIDIA Dynamo-style serving stacks.
Features
- Chat completions (streaming and non-streaming) against any OpenAI-compatible endpoint
- Multimodal messages: attach images by file path or URL (base64 data-URI encoding)
- Text embeddings
- Automatic retry with backoff on 429 / 5xx / connection errors
- Token estimation with CJK-aware budgeting
Install
pip install nvidia-dynamo
Quick start
from nvidia_dynamo import NVDynamoClient, ChatMessage
client = NVDynamoClient(api_key="sk-...", base_url="http://localhost:8000/v1")
resp = client.chat(
model="dynamo-llm",
messages=[
ChatMessage.system("You are a helpful assistant."),
ChatMessage.user("What is Dynamo?"),
],
)
print(resp["choices"][0]["message"]["content"])
Multimodal
msg = ChatMessage.multimodal(
"Describe this image.",
["/tmp/screenshot.png", "https://example.com/diagram.png"],
)
resp = client.chat(model="dynamo-vlm", messages=[msg])
Token budgeting
from nvidia_dynamo import estimate_tokens, truncate_to_tokens
assert estimate_tokens("hello world") <= estimate_tokens("你好世界" * 10)
prompt = truncate_to_tokens(long_doc, max_tokens=2048)
License
Apache-2.0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nvidia_dynamo-0.1.0.tar.gz
(6.8 kB
view details)
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 nvidia_dynamo-0.1.0.tar.gz.
File metadata
- Download URL: nvidia_dynamo-0.1.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bcade3ec53d77d0a46a22a30a343925c6642e897043dc9c3b73db416496a2c0
|
|
| MD5 |
0a314f1794f0793a053b4611ab6748c3
|
|
| BLAKE2b-256 |
8e16d4f812cff888b621aba9e76f21daac461a027b1f724e49e15628c6ed196c
|
File details
Details for the file nvidia_dynamo-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nvidia_dynamo-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d5e80df75cc83d417eeba8ce4a2158c17c056ba2d9be56a506b75f784039626
|
|
| MD5 |
963df96ffd7161bf38cca5385077ce62
|
|
| BLAKE2b-256 |
129e187954b4c9ea2b787abf092a73cc109fed48e1f1579d433607e3354df1e4
|