Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The package provides optional features that can be installed based on your needs

```python
from PIL import Image
from vlmrun.client import VLMRun
from vlmrun import VLMRun
from vlmrun.common.utils import remote_image

# Initialize the client
Expand All @@ -86,7 +86,7 @@ print(response)
The VLM Run SDK provides OpenAI-compatible chat completions through the agent endpoint. This allows you to use the familiar OpenAI API with VLM Run's powerful vision-language models.

```python
from vlmrun.client import VLMRun
from vlmrun import VLMRun

client = VLMRun(
api_key="your-key",
Expand All @@ -106,7 +106,7 @@ For async support:

```python
import asyncio
from vlmrun.client import VLMRun
from vlmrun import VLMRun

client = VLMRun(api_key="your-key", base_url="https://api.vlm.run/v1")

Expand Down
12 changes: 12 additions & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@
from vlmrun.client.exceptions import ConfigurationError, AuthenticationError


def test_top_level_client_import():
"""Test that the public package exposes the main client."""
from vlmrun import VLMRun as TopLevelVLMRun
from vlmrun import __version__
import vlmrun

assert TopLevelVLMRun is VLMRun
assert vlmrun.VLMRun is VLMRun
assert isinstance(__version__, str)
assert "VLMRun" in vlmrun.__all__


def test_client_with_api_key(monkeypatch):
"""Test client initialization with API key provided in constructor."""
monkeypatch.delenv("VLMRUN_API_KEY", raising=False)
Expand Down
8 changes: 8 additions & 0 deletions vlmrun/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"""Public package interface for the VLM Run Python SDK."""

from __future__ import annotations

from vlmrun.client import VLMRun
from vlmrun.version import __version__

__all__ = ["VLMRun", "__version__"]