@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/urlUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"urlUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/urlUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAiBH;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,SAAS,EACT,YAAY,GACb,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,MAAM,CAIT;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,OAAO,EACP,SAAS,GACV,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,MAAM,CAMT;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,SAAS,GACV,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,MAAM,CAGT"}
|
|
@@ -7,7 +7,13 @@
|
|
|
7
7
|
* @returns The base URL for the Phoenix web UI
|
|
8
8
|
*/
|
|
9
9
|
function getWebBaseUrl(baseUrl) {
|
|
10
|
-
|
|
10
|
+
const url = new URL(baseUrl);
|
|
11
|
+
// Ensure the pathname ends with a trailing slash for proper path concatenation
|
|
12
|
+
// Without this, the URL constructor treats the last segment as a file and replaces it
|
|
13
|
+
if (!url.pathname.endsWith("/")) {
|
|
14
|
+
url.pathname += "/";
|
|
15
|
+
}
|
|
16
|
+
return url.toString();
|
|
11
17
|
}
|
|
12
18
|
/**
|
|
13
19
|
* Get the URL to view a specific experiment in the Phoenix web UI
|
|
@@ -18,7 +24,9 @@ function getWebBaseUrl(baseUrl) {
|
|
|
18
24
|
* @returns The URL to view the experiment
|
|
19
25
|
*/
|
|
20
26
|
export function getExperimentUrl({ baseUrl, datasetId, experimentId, }) {
|
|
21
|
-
|
|
27
|
+
const url = new URL(`datasets/${datasetId}/compare`, getWebBaseUrl(baseUrl));
|
|
28
|
+
url.searchParams.set("experimentId", experimentId);
|
|
29
|
+
return url.toString();
|
|
22
30
|
}
|
|
23
31
|
/**
|
|
24
32
|
* Get the URL to view experiments for a dataset in the Phoenix web UI
|
|
@@ -28,7 +36,8 @@ export function getExperimentUrl({ baseUrl, datasetId, experimentId, }) {
|
|
|
28
36
|
* @returns The URL to view dataset experiments
|
|
29
37
|
*/
|
|
30
38
|
export function getDatasetExperimentsUrl({ baseUrl, datasetId, }) {
|
|
31
|
-
|
|
39
|
+
const url = new URL(`datasets/${datasetId}/experiments`, getWebBaseUrl(baseUrl));
|
|
40
|
+
return url.toString();
|
|
32
41
|
}
|
|
33
42
|
/**
|
|
34
43
|
* Get the URL to view a dataset in the Phoenix web UI
|
|
@@ -38,6 +47,7 @@ export function getDatasetExperimentsUrl({ baseUrl, datasetId, }) {
|
|
|
38
47
|
* @returns The URL to view the dataset
|
|
39
48
|
*/
|
|
40
49
|
export function getDatasetUrl({ baseUrl, datasetId, }) {
|
|
41
|
-
|
|
50
|
+
const url = new URL(`datasets/${datasetId}/examples`, getWebBaseUrl(baseUrl));
|
|
51
|
+
return url.toString();
|
|
42
52
|
}
|
|
43
53
|
//# sourceMappingURL=urlUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlUtils.js","sourceRoot":"","sources":["../../../src/utils/urlUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AACH,SAAS,aAAa,CAAC,OAAe;IACpC,
|
|
1
|
+
{"version":3,"file":"urlUtils.js","sourceRoot":"","sources":["../../../src/utils/urlUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AACH,SAAS,aAAa,CAAC,OAAe;IACpC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,+EAA+E;IAC/E,sFAAsF;IACtF,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAChC,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC;IACtB,CAAC;IACD,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,OAAO,EACP,SAAS,EACT,YAAY,GAKb;IACC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,YAAY,SAAS,UAAU,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7E,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IACnD,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CAAC,EACvC,OAAO,EACP,SAAS,GAIV;IACC,MAAM,GAAG,GAAG,IAAI,GAAG,CACjB,YAAY,SAAS,cAAc,EACnC,aAAa,CAAC,OAAO,CAAC,CACvB,CAAC;IACF,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,OAAO,EACP,SAAS,GAIV;IACC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,YAAY,SAAS,WAAW,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9E,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/urlUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"urlUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/urlUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAiBH;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,SAAS,EACT,YAAY,GACb,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,MAAM,CAIT;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,OAAO,EACP,SAAS,GACV,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,MAAM,CAMT;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,SAAS,GACV,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,MAAM,CAGT"}
|
|
@@ -12,7 +12,13 @@ exports.getDatasetUrl = getDatasetUrl;
|
|
|
12
12
|
* @returns The base URL for the Phoenix web UI
|
|
13
13
|
*/
|
|
14
14
|
function getWebBaseUrl(baseUrl) {
|
|
15
|
-
|
|
15
|
+
const url = new URL(baseUrl);
|
|
16
|
+
// Ensure the pathname ends with a trailing slash for proper path concatenation
|
|
17
|
+
// Without this, the URL constructor treats the last segment as a file and replaces it
|
|
18
|
+
if (!url.pathname.endsWith("/")) {
|
|
19
|
+
url.pathname += "/";
|
|
20
|
+
}
|
|
21
|
+
return url.toString();
|
|
16
22
|
}
|
|
17
23
|
/**
|
|
18
24
|
* Get the URL to view a specific experiment in the Phoenix web UI
|
|
@@ -23,7 +29,9 @@ function getWebBaseUrl(baseUrl) {
|
|
|
23
29
|
* @returns The URL to view the experiment
|
|
24
30
|
*/
|
|
25
31
|
function getExperimentUrl({ baseUrl, datasetId, experimentId, }) {
|
|
26
|
-
|
|
32
|
+
const url = new URL(`datasets/${datasetId}/compare`, getWebBaseUrl(baseUrl));
|
|
33
|
+
url.searchParams.set("experimentId", experimentId);
|
|
34
|
+
return url.toString();
|
|
27
35
|
}
|
|
28
36
|
/**
|
|
29
37
|
* Get the URL to view experiments for a dataset in the Phoenix web UI
|
|
@@ -33,7 +41,8 @@ function getExperimentUrl({ baseUrl, datasetId, experimentId, }) {
|
|
|
33
41
|
* @returns The URL to view dataset experiments
|
|
34
42
|
*/
|
|
35
43
|
function getDatasetExperimentsUrl({ baseUrl, datasetId, }) {
|
|
36
|
-
|
|
44
|
+
const url = new URL(`datasets/${datasetId}/experiments`, getWebBaseUrl(baseUrl));
|
|
45
|
+
return url.toString();
|
|
37
46
|
}
|
|
38
47
|
/**
|
|
39
48
|
* Get the URL to view a dataset in the Phoenix web UI
|
|
@@ -43,6 +52,7 @@ function getDatasetExperimentsUrl({ baseUrl, datasetId, }) {
|
|
|
43
52
|
* @returns The URL to view the dataset
|
|
44
53
|
*/
|
|
45
54
|
function getDatasetUrl({ baseUrl, datasetId, }) {
|
|
46
|
-
|
|
55
|
+
const url = new URL(`datasets/${datasetId}/examples`, getWebBaseUrl(baseUrl));
|
|
56
|
+
return url.toString();
|
|
47
57
|
}
|
|
48
58
|
//# sourceMappingURL=urlUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlUtils.js","sourceRoot":"","sources":["../../../src/utils/urlUtils.ts"],"names":[],"mappings":";AAAA;;GAEG;;
|
|
1
|
+
{"version":3,"file":"urlUtils.js","sourceRoot":"","sources":["../../../src/utils/urlUtils.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAyBH,4CAYC;AASD,4DAYC;AASD,sCASC;AA1ED;;;;GAIG;AACH,SAAS,aAAa,CAAC,OAAe;IACpC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,+EAA+E;IAC/E,sFAAsF;IACtF,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAChC,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC;IACtB,CAAC;IACD,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,SAAS,EACT,YAAY,GAKb;IACC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,YAAY,SAAS,UAAU,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7E,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IACnD,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,wBAAwB,CAAC,EACvC,OAAO,EACP,SAAS,GAIV;IACC,MAAM,GAAG,GAAG,IAAI,GAAG,CACjB,YAAY,SAAS,cAAc,EACnC,aAAa,CAAC,OAAO,CAAC,CACvB,CAAC;IACF,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,SAAS,GAIV;IACC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,YAAY,SAAS,WAAW,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9E,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC"}
|