Skip to content
Merged
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
4 changes: 2 additions & 2 deletions decart/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class DecartClient:
Args:
api_key: Your Decart API key. Defaults to the DECART_API_KEY environment variable.
base_url: API base URL for batch/process/queue endpoints (defaults to https://api.decart.ai)
realtime_base_url: WebSocket base URL for realtime streaming (defaults to wss://api3.decart.ai)
realtime_base_url: WebSocket base URL for realtime streaming (defaults to wss://api.decart.ai)
integration: Optional integration identifier (e.g., "langchain/0.1.0")

Example:
Expand Down Expand Up @@ -56,7 +56,7 @@ def __init__(
self,
api_key: Optional[str] = None,
base_url: str = "https://api.decart.ai",
realtime_base_url: str = "wss://api3.decart.ai",
realtime_base_url: str = "wss://api.decart.ai",
integration: Optional[str] = None,
) -> None:
resolved_api_key = api_key or os.environ.get("DECART_API_KEY", "").strip() or None
Expand Down
8 changes: 4 additions & 4 deletions tests/test_realtime_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ async def test_realtime_connect_omits_speed_when_unset():
url = await _connect_and_capture_url(model="lucy-2.5")
assert "speed" not in url
assert url == (
"wss://api3.decart.ai/v1/stream"
"wss://api.decart.ai/v1/stream"
"?api_key=test-key&model=lucy-2.5&livekit_early_room_info=true"
)

Expand All @@ -203,7 +203,7 @@ async def test_realtime_connect_omits_speed_when_unset():
async def test_realtime_connect_appends_speed_fast():
url = await _connect_and_capture_url(speed="fast", model="lucy-2.5")
assert url == (
"wss://api3.decart.ai/v1/stream"
"wss://api.decart.ai/v1/stream"
"?api_key=test-key&model=lucy-2.5&livekit_early_room_info=true&speed=fast"
)
assert url.count("speed=") == 1
Expand Down Expand Up @@ -743,13 +743,13 @@ def post(self, url, headers):

with patch("decart.realtime.client.aiohttp.ClientSession", return_value=fake_session):
room_info = await _fetch_watch_stream_credentials(
base_url="wss://api3.decart.ai",
base_url="wss://api.decart.ai",
api_key="test-key",
room_name="room-123",
)

assert fake_session.post_calls == [
("https://api3.decart.ai/watch-stream/room-123", {"x-api-key": "test-key"})
("https://api.decart.ai/watch-stream/room-123", {"x-api-key": "test-key"})
]
assert room_info.livekit_url == "wss://livekit.example"
assert room_info.session_id == "room-123"
Expand Down
Loading