Compare commits

...

1 Commits

Author SHA1 Message Date
William Fu-Hinthorn
93006441a8 Fix project link to include org 2023-08-30 06:25:50 -07:00
2 changed files with 2 additions and 15 deletions

View File

@@ -92,19 +92,6 @@ class TestResult(dict):
return pd.DataFrame(records, index=indices)
def _get_eval_project_url(api_url: str, project_id: str) -> str:
"""Get the project url from the api url."""
parsed = urlparse(api_url)
hostname = parsed.hostname or ""
if "api." in hostname:
hostname = hostname.replace("api.", "", 1)
if "localhost" in hostname:
# Remove the port
hostname = "localhost"
url = urlunparse(parsed._replace(netloc=hostname))
return f"{url}/projects/p/{project_id}?eval=true"
def _wrap_in_chain_factory(
llm_or_chain_factory: MODEL_OR_CHAIN_FACTORY,
dataset_name: str = "<my_dataset>",
@@ -1165,7 +1152,7 @@ def _prepare_eval_run(
raise ValueError(
f"Project {project_name} already exists. Please use a different name."
)
project_url = _get_eval_project_url(client.api_url, project.id)
project_url = f"{project.url}?eval=true"
print(
f"View the evaluation results for project '{project_name}' at:\n{project_url}"
)

View File

@@ -113,7 +113,7 @@ cassio = {version = "^0.0.7", optional = true}
rdflib = {version = "^6.3.2", optional = true}
sympy = {version = "^1.12", optional = true}
rapidfuzz = {version = "^3.1.1", optional = true}
langsmith = "~0.0.21"
langsmith = "~0.0.29"
rank-bm25 = {version = "^0.2.2", optional = true}
amadeus = {version = ">=8.1.0", optional = true}
geopandas = {version = "^0.13.1", optional = true}