Skip to content
Merged
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
8 changes: 4 additions & 4 deletions langchain_benchmarks/utils/_langsmith.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from langsmith.utils import LangSmithNotFoundError
from tqdm import auto

WEB_API_URL = "https://web.smith.langchain.com/"
API_URL = "https://api.smith.langchain.com/"


def _parse_token_or_url(url_or_token: str, api_url: str) -> Tuple[str, Optional[str]]:
Expand All @@ -25,7 +25,7 @@ def _parse_token_or_url(url_or_token: str, api_url: str) -> Tuple[str, Optional[
# Extract the UUID from the path
path_parts = parsed_url.path.split("/")
uuid = path_parts[-2] if len(path_parts) >= 2 else None
return WEB_API_URL, uuid
return API_URL, uuid


# PUBLIC API
Expand All @@ -35,7 +35,7 @@ def clone_public_dataset(
token_or_url: str,
*,
dataset_name: Optional[str] = None,
source_api_url: str = WEB_API_URL,
source_api_url: str = API_URL,
) -> None:
"""Clone a public dataset to your own langsmith tenant.

Expand Down Expand Up @@ -98,7 +98,7 @@ def download_public_dataset(
token_or_url: str,
*,
path: Optional[Union[str, Path]] = None,
api_url: str = WEB_API_URL,
api_url: str = API_URL,
) -> None:
"""Download a public dataset."""
api_url, uuid = _parse_token_or_url(token_or_url, api_url)
Expand Down