@arizeai/phoenix-client 5.4.0 → 5.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/utils/urlUtils.d.ts.map +1 -1
- package/dist/esm/utils/urlUtils.js +14 -4
- package/dist/esm/utils/urlUtils.js.map +1 -1
- package/dist/src/utils/urlUtils.d.ts.map +1 -1
- package/dist/src/utils/urlUtils.js +14 -4
- package/dist/src/utils/urlUtils.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/utils/urlUtils.ts +17 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arizeai/phoenix-client",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.1",
|
|
4
4
|
"description": "A client for the Phoenix API",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"tsx": "^4.19.3",
|
|
68
68
|
"typescript": "^5.8.2",
|
|
69
69
|
"vitest": "^4.0.10",
|
|
70
|
-
"@arizeai/phoenix-evals": "0.
|
|
70
|
+
"@arizeai/phoenix-evals": "0.6.0"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@arizeai/openinference-semantic-conventions": "^1.1.0",
|
package/src/utils/urlUtils.ts
CHANGED
|
@@ -8,7 +8,13 @@
|
|
|
8
8
|
* @returns The base URL for the Phoenix web UI
|
|
9
9
|
*/
|
|
10
10
|
function getWebBaseUrl(baseUrl: string): string {
|
|
11
|
-
|
|
11
|
+
const url = new URL(baseUrl);
|
|
12
|
+
// Ensure the pathname ends with a trailing slash for proper path concatenation
|
|
13
|
+
// Without this, the URL constructor treats the last segment as a file and replaces it
|
|
14
|
+
if (!url.pathname.endsWith("/")) {
|
|
15
|
+
url.pathname += "/";
|
|
16
|
+
}
|
|
17
|
+
return url.toString();
|
|
12
18
|
}
|
|
13
19
|
|
|
14
20
|
/**
|
|
@@ -28,7 +34,9 @@ export function getExperimentUrl({
|
|
|
28
34
|
datasetId: string;
|
|
29
35
|
experimentId: string;
|
|
30
36
|
}): string {
|
|
31
|
-
|
|
37
|
+
const url = new URL(`datasets/${datasetId}/compare`, getWebBaseUrl(baseUrl));
|
|
38
|
+
url.searchParams.set("experimentId", experimentId);
|
|
39
|
+
return url.toString();
|
|
32
40
|
}
|
|
33
41
|
|
|
34
42
|
/**
|
|
@@ -45,7 +53,11 @@ export function getDatasetExperimentsUrl({
|
|
|
45
53
|
baseUrl: string;
|
|
46
54
|
datasetId: string;
|
|
47
55
|
}): string {
|
|
48
|
-
|
|
56
|
+
const url = new URL(
|
|
57
|
+
`datasets/${datasetId}/experiments`,
|
|
58
|
+
getWebBaseUrl(baseUrl)
|
|
59
|
+
);
|
|
60
|
+
return url.toString();
|
|
49
61
|
}
|
|
50
62
|
|
|
51
63
|
/**
|
|
@@ -62,5 +74,6 @@ export function getDatasetUrl({
|
|
|
62
74
|
baseUrl: string;
|
|
63
75
|
datasetId: string;
|
|
64
76
|
}): string {
|
|
65
|
-
|
|
77
|
+
const url = new URL(`datasets/${datasetId}/examples`, getWebBaseUrl(baseUrl));
|
|
78
|
+
return url.toString();
|
|
66
79
|
}
|