diff --git a/README.md b/README.md index ceedac4..9525abe 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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", @@ -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") diff --git a/tests/test_client.py b/tests/test_client.py index f70dc44..8e5db7e 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -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) diff --git a/vlmrun/__init__.py b/vlmrun/__init__.py new file mode 100644 index 0000000..8ada3b1 --- /dev/null +++ b/vlmrun/__init__.py @@ -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__"]