From 79ac972e98400877e0ac899167e4b5bf679d51fb Mon Sep 17 00:00:00 2001 From: Alexander Song Date: Mon, 5 Aug 2024 20:25:41 -0700 Subject: [PATCH] fix: ensure rest api urls include custom root path --- src/phoenix/session/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/phoenix/session/client.py b/src/phoenix/session/client.py index c72b3717ce..7b64ba20f9 100644 --- a/src/phoenix/session/client.py +++ b/src/phoenix/session/client.py @@ -324,7 +324,7 @@ def _get_dataset_id_by_name(self, name: str) -> str: Dataset: The dataset object. """ response = self._client.get( - urljoin(self._base_url, "/v1/datasets"), + urljoin(self._base_url, "v1/datasets"), params={"name": name}, ) response.raise_for_status() @@ -366,7 +366,7 @@ def get_dataset( raise ValueError("Dataset id or name must be provided.") response = self._client.get( - urljoin(self._base_url, f"/v1/datasets/{quote(id)}/examples"), + urljoin(self._base_url, f"v1/datasets/{quote(id)}/examples"), params={"version_id": version_id} if version_id else None, ) response.raise_for_status()