@arizeai/phoenix-client 7.2.0 → 7.3.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/README.md +3 -2
- package/dist/esm/__generated__/api/v1.d.ts +548 -0
- package/dist/esm/__generated__/api/v1.d.ts.map +1 -1
- package/dist/esm/client.d.ts +10 -2
- package/dist/esm/client.d.ts.map +1 -1
- package/dist/esm/client.js +6 -0
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/config.d.ts +10 -0
- package/dist/esm/config.d.ts.map +1 -1
- package/dist/esm/config.js +13 -9
- package/dist/esm/config.js.map +1 -1
- package/dist/esm/experiments/resumeEvaluation.d.ts.map +1 -1
- package/dist/esm/experiments/resumeEvaluation.js +5 -5
- package/dist/esm/experiments/resumeEvaluation.js.map +1 -1
- package/dist/esm/experiments/resumeExperiment.d.ts.map +1 -1
- package/dist/esm/experiments/resumeExperiment.js +5 -5
- package/dist/esm/experiments/resumeExperiment.js.map +1 -1
- package/dist/esm/experiments/runExperiment.d.ts.map +1 -1
- package/dist/esm/experiments/runExperiment.js +5 -5
- package/dist/esm/experiments/runExperiment.js.map +1 -1
- package/dist/esm/experiments/tracing.d.ts +27 -0
- package/dist/esm/experiments/tracing.d.ts.map +1 -1
- package/dist/esm/experiments/tracing.js +27 -0
- package/dist/esm/experiments/tracing.js.map +1 -1
- package/dist/esm/testing/phoenix-test-tracking.d.ts.map +1 -1
- package/dist/esm/testing/phoenix-test-tracking.js +9 -9
- package/dist/esm/testing/phoenix-test-tracking.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/src/__generated__/api/v1.d.ts +548 -0
- package/dist/src/__generated__/api/v1.d.ts.map +1 -1
- package/dist/src/client.d.ts +10 -2
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/client.js +6 -1
- package/dist/src/client.js.map +1 -1
- package/dist/src/config.d.ts +10 -0
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +11 -7
- package/dist/src/config.js.map +1 -1
- package/dist/src/experiments/resumeEvaluation.d.ts.map +1 -1
- package/dist/src/experiments/resumeEvaluation.js +4 -4
- package/dist/src/experiments/resumeEvaluation.js.map +1 -1
- package/dist/src/experiments/resumeExperiment.d.ts.map +1 -1
- package/dist/src/experiments/resumeExperiment.js +4 -4
- package/dist/src/experiments/resumeExperiment.js.map +1 -1
- package/dist/src/experiments/runExperiment.d.ts.map +1 -1
- package/dist/src/experiments/runExperiment.js +4 -4
- package/dist/src/experiments/runExperiment.js.map +1 -1
- package/dist/src/experiments/tracing.d.ts +27 -0
- package/dist/src/experiments/tracing.d.ts.map +1 -1
- package/dist/src/experiments/tracing.js +30 -0
- package/dist/src/experiments/tracing.js.map +1 -1
- package/dist/src/testing/phoenix-test-tracking.d.ts.map +1 -1
- package/dist/src/testing/phoenix-test-tracking.js +8 -8
- package/dist/src/testing/phoenix-test-tracking.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/ci-evals-jest.mdx +1 -1
- package/docs/ci-evals-vitest.mdx +1 -1
- package/docs/ci-evals.mdx +1 -1
- package/docs/overview.mdx +5 -5
- package/package.json +9 -9
- package/src/__generated__/api/v1.ts +548 -0
- package/src/client.ts +17 -1
- package/src/config.ts +28 -11
- package/src/experiments/resumeEvaluation.ts +11 -9
- package/src/experiments/resumeExperiment.ts +11 -9
- package/src/experiments/runExperiment.ts +9 -11
- package/src/experiments/tracing.ts +35 -0
- package/src/testing/phoenix-test-tracking.ts +12 -9
|
@@ -423,6 +423,41 @@ export interface paths {
|
|
|
423
423
|
patch?: never;
|
|
424
424
|
trace?: never;
|
|
425
425
|
};
|
|
426
|
+
"/v1/datasets/{dataset_identifier}/splits": {
|
|
427
|
+
parameters: {
|
|
428
|
+
query?: never;
|
|
429
|
+
header?: never;
|
|
430
|
+
path?: never;
|
|
431
|
+
cookie?: never;
|
|
432
|
+
};
|
|
433
|
+
get?: never;
|
|
434
|
+
put?: never;
|
|
435
|
+
/** Create a dataset split */
|
|
436
|
+
post: operations["createDatasetSplit"];
|
|
437
|
+
delete?: never;
|
|
438
|
+
options?: never;
|
|
439
|
+
head?: never;
|
|
440
|
+
patch?: never;
|
|
441
|
+
trace?: never;
|
|
442
|
+
};
|
|
443
|
+
"/v1/datasets/{dataset_identifier}/splits/{split_id}": {
|
|
444
|
+
parameters: {
|
|
445
|
+
query?: never;
|
|
446
|
+
header?: never;
|
|
447
|
+
path?: never;
|
|
448
|
+
cookie?: never;
|
|
449
|
+
};
|
|
450
|
+
get?: never;
|
|
451
|
+
put?: never;
|
|
452
|
+
post?: never;
|
|
453
|
+
/** Delete a dataset split */
|
|
454
|
+
delete: operations["deleteDatasetSplit"];
|
|
455
|
+
options?: never;
|
|
456
|
+
head?: never;
|
|
457
|
+
/** Update a dataset split */
|
|
458
|
+
patch: operations["updateDatasetSplit"];
|
|
459
|
+
trace?: never;
|
|
460
|
+
};
|
|
426
461
|
"/v1/datasets/{id}/csv": {
|
|
427
462
|
parameters: {
|
|
428
463
|
query?: never;
|
|
@@ -600,6 +635,50 @@ export interface paths {
|
|
|
600
635
|
patch?: never;
|
|
601
636
|
trace?: never;
|
|
602
637
|
};
|
|
638
|
+
"/v1/experiments/{experiment_id}/tags": {
|
|
639
|
+
parameters: {
|
|
640
|
+
query?: never;
|
|
641
|
+
header?: never;
|
|
642
|
+
path?: never;
|
|
643
|
+
cookie?: never;
|
|
644
|
+
};
|
|
645
|
+
/**
|
|
646
|
+
* List the tags applied to an experiment
|
|
647
|
+
* @description List the tags currently pointing at this experiment. Tags are scoped to the experiment's dataset, so a tag appears here only while this experiment owns it.
|
|
648
|
+
*/
|
|
649
|
+
get: operations["listExperimentTags"];
|
|
650
|
+
put?: never;
|
|
651
|
+
/**
|
|
652
|
+
* Assign a tag to an experiment
|
|
653
|
+
* @description Assign a tag to an experiment. Tags are scoped to the experiment's dataset and each tag name points at a single experiment, so assigning a tag that another experiment on the same dataset owns atomically moves the tag to this experiment. Re-assigning a tag the experiment already owns is idempotent and replaces the description. Assigning the reserved 'baseline' tag makes this experiment the dataset's baseline; ephemeral experiments cannot become the baseline.
|
|
654
|
+
*/
|
|
655
|
+
post: operations["setExperimentTag"];
|
|
656
|
+
delete?: never;
|
|
657
|
+
options?: never;
|
|
658
|
+
head?: never;
|
|
659
|
+
patch?: never;
|
|
660
|
+
trace?: never;
|
|
661
|
+
};
|
|
662
|
+
"/v1/experiments/{experiment_id}/tags/{tag_identifier}": {
|
|
663
|
+
parameters: {
|
|
664
|
+
query?: never;
|
|
665
|
+
header?: never;
|
|
666
|
+
path?: never;
|
|
667
|
+
cookie?: never;
|
|
668
|
+
};
|
|
669
|
+
get?: never;
|
|
670
|
+
put?: never;
|
|
671
|
+
post?: never;
|
|
672
|
+
/**
|
|
673
|
+
* Remove a tag from an experiment
|
|
674
|
+
* @description Remove a tag, identified by its node ID or name, from the experiment that owns it. This operation is idempotent and never steals a tag from another experiment: if the experiment does not currently own the tag, the request is a no-op.
|
|
675
|
+
*/
|
|
676
|
+
delete: operations["deleteExperimentTag"];
|
|
677
|
+
options?: never;
|
|
678
|
+
head?: never;
|
|
679
|
+
patch?: never;
|
|
680
|
+
trace?: never;
|
|
681
|
+
};
|
|
603
682
|
"/v1/experiments/{experiment_id}/runs": {
|
|
604
683
|
parameters: {
|
|
605
684
|
query?: never;
|
|
@@ -2304,6 +2383,40 @@ export interface components {
|
|
|
2304
2383
|
CreateDatasetLabelResponseBody: {
|
|
2305
2384
|
data: components["schemas"]["DatasetLabel"];
|
|
2306
2385
|
};
|
|
2386
|
+
/** CreateDatasetSplitRequestBody */
|
|
2387
|
+
CreateDatasetSplitRequestBody: {
|
|
2388
|
+
/**
|
|
2389
|
+
* Name
|
|
2390
|
+
* @description A unique name for the split.
|
|
2391
|
+
*/
|
|
2392
|
+
name: string;
|
|
2393
|
+
/**
|
|
2394
|
+
* Description
|
|
2395
|
+
* @description An optional description of the split.
|
|
2396
|
+
*/
|
|
2397
|
+
description?: string | null;
|
|
2398
|
+
/**
|
|
2399
|
+
* Color
|
|
2400
|
+
* @description An optional hex color for the split (e.g. #33c5e8). Omit for a default.
|
|
2401
|
+
*/
|
|
2402
|
+
color?: string | null;
|
|
2403
|
+
/**
|
|
2404
|
+
* Metadata
|
|
2405
|
+
* @description Arbitrary JSON metadata for the split.
|
|
2406
|
+
*/
|
|
2407
|
+
metadata?: {
|
|
2408
|
+
[key: string]: unknown;
|
|
2409
|
+
};
|
|
2410
|
+
/**
|
|
2411
|
+
* Example Ids
|
|
2412
|
+
* @description Optional dataset example IDs (GlobalIDs) to seed the split with. Each example must belong to this dataset. Omit to create an empty split.
|
|
2413
|
+
*/
|
|
2414
|
+
example_ids?: string[];
|
|
2415
|
+
};
|
|
2416
|
+
/** CreateDatasetSplitResponseBody */
|
|
2417
|
+
CreateDatasetSplitResponseBody: {
|
|
2418
|
+
data: components["schemas"]["DatasetSplit"];
|
|
2419
|
+
};
|
|
2307
2420
|
/**
|
|
2308
2421
|
* CreateExperimentRequestBody
|
|
2309
2422
|
* @description Details of the experiment to be created
|
|
@@ -2612,6 +2725,33 @@ export interface components {
|
|
|
2612
2725
|
/** Color */
|
|
2613
2726
|
color: string;
|
|
2614
2727
|
};
|
|
2728
|
+
/** DatasetSplit */
|
|
2729
|
+
DatasetSplit: {
|
|
2730
|
+
/** Id */
|
|
2731
|
+
id: string;
|
|
2732
|
+
/** Name */
|
|
2733
|
+
name: string;
|
|
2734
|
+
/** Description */
|
|
2735
|
+
description: string | null;
|
|
2736
|
+
/** Color */
|
|
2737
|
+
color: string;
|
|
2738
|
+
/** Metadata */
|
|
2739
|
+
metadata: {
|
|
2740
|
+
[key: string]: unknown;
|
|
2741
|
+
};
|
|
2742
|
+
/** Example Count */
|
|
2743
|
+
example_count: number;
|
|
2744
|
+
/**
|
|
2745
|
+
* Created At
|
|
2746
|
+
* Format: date-time
|
|
2747
|
+
*/
|
|
2748
|
+
created_at: string;
|
|
2749
|
+
/**
|
|
2750
|
+
* Updated At
|
|
2751
|
+
* Format: date-time
|
|
2752
|
+
*/
|
|
2753
|
+
updated_at: string;
|
|
2754
|
+
};
|
|
2615
2755
|
/** DatasetVersion */
|
|
2616
2756
|
DatasetVersion: {
|
|
2617
2757
|
/** Version Id */
|
|
@@ -3069,6 +3209,24 @@ export interface components {
|
|
|
3069
3209
|
*/
|
|
3070
3210
|
experiment_id: string;
|
|
3071
3211
|
};
|
|
3212
|
+
/** ExperimentTag */
|
|
3213
|
+
ExperimentTag: {
|
|
3214
|
+
/**
|
|
3215
|
+
* Id
|
|
3216
|
+
* @description The node ID of the tag
|
|
3217
|
+
*/
|
|
3218
|
+
id: string;
|
|
3219
|
+
/**
|
|
3220
|
+
* Name
|
|
3221
|
+
* @description The name of the tag
|
|
3222
|
+
*/
|
|
3223
|
+
name: string;
|
|
3224
|
+
/**
|
|
3225
|
+
* Description
|
|
3226
|
+
* @description The description of the tag
|
|
3227
|
+
*/
|
|
3228
|
+
description: string | null;
|
|
3229
|
+
};
|
|
3072
3230
|
/**
|
|
3073
3231
|
* FileUIPart
|
|
3074
3232
|
* @description A file part of a message.
|
|
@@ -3430,6 +3588,11 @@ export interface components {
|
|
|
3430
3588
|
/** Next Cursor */
|
|
3431
3589
|
next_cursor: string | null;
|
|
3432
3590
|
};
|
|
3591
|
+
/** ListExperimentTagsResponseBody */
|
|
3592
|
+
ListExperimentTagsResponseBody: {
|
|
3593
|
+
/** Data */
|
|
3594
|
+
data: components["schemas"]["ExperimentTag"][];
|
|
3595
|
+
};
|
|
3433
3596
|
/** ListExperimentsResponseBody */
|
|
3434
3597
|
ListExperimentsResponseBody: {
|
|
3435
3598
|
/** Data */
|
|
@@ -4989,6 +5152,20 @@ export interface components {
|
|
|
4989
5152
|
*/
|
|
4990
5153
|
dataset_label_ids?: string[];
|
|
4991
5154
|
};
|
|
5155
|
+
/** SetExperimentTagRequestBody */
|
|
5156
|
+
SetExperimentTagRequestBody: {
|
|
5157
|
+
/** @description The name of the tag to assign, e.g. 'baseline'. If another experiment on the same dataset already owns this tag, the tag is moved to this experiment. */
|
|
5158
|
+
name: components["schemas"]["Identifier"];
|
|
5159
|
+
/**
|
|
5160
|
+
* Description
|
|
5161
|
+
* @description An optional description of the tag (replaces any existing description)
|
|
5162
|
+
*/
|
|
5163
|
+
description?: string | null;
|
|
5164
|
+
};
|
|
5165
|
+
/** SetExperimentTagResponseBody */
|
|
5166
|
+
SetExperimentTagResponseBody: {
|
|
5167
|
+
data: components["schemas"]["ExperimentTag"];
|
|
5168
|
+
};
|
|
4992
5169
|
/** SetProjectAnnotationConfigsRequestBody */
|
|
4993
5170
|
SetProjectAnnotationConfigsRequestBody: {
|
|
4994
5171
|
/**
|
|
@@ -5924,6 +6101,45 @@ export interface components {
|
|
|
5924
6101
|
UpdateDatasetLabelResponseBody: {
|
|
5925
6102
|
data: components["schemas"]["DatasetLabel"];
|
|
5926
6103
|
};
|
|
6104
|
+
/** UpdateDatasetSplitRequestBody */
|
|
6105
|
+
UpdateDatasetSplitRequestBody: {
|
|
6106
|
+
/**
|
|
6107
|
+
* Name
|
|
6108
|
+
* @description A new unique name for the split.
|
|
6109
|
+
*/
|
|
6110
|
+
name?: string | null;
|
|
6111
|
+
/**
|
|
6112
|
+
* Description
|
|
6113
|
+
* @description A new description, or null to clear it.
|
|
6114
|
+
*/
|
|
6115
|
+
description?: string | null;
|
|
6116
|
+
/**
|
|
6117
|
+
* Color
|
|
6118
|
+
* @description A new hex color for the split.
|
|
6119
|
+
*/
|
|
6120
|
+
color?: string | null;
|
|
6121
|
+
/**
|
|
6122
|
+
* Metadata
|
|
6123
|
+
* @description New JSON metadata that replaces the existing metadata.
|
|
6124
|
+
*/
|
|
6125
|
+
metadata?: {
|
|
6126
|
+
[key: string]: unknown;
|
|
6127
|
+
} | null;
|
|
6128
|
+
/**
|
|
6129
|
+
* Add Example Ids
|
|
6130
|
+
* @description Dataset example IDs (GlobalIDs) to add to the split. Each example must belong to this dataset. Adding an example already in the split is a no-op.
|
|
6131
|
+
*/
|
|
6132
|
+
add_example_ids?: string[];
|
|
6133
|
+
/**
|
|
6134
|
+
* Remove Example Ids
|
|
6135
|
+
* @description Dataset example IDs (GlobalIDs) to remove from the split.
|
|
6136
|
+
*/
|
|
6137
|
+
remove_example_ids?: string[];
|
|
6138
|
+
};
|
|
6139
|
+
/** UpdateDatasetSplitResponseBody */
|
|
6140
|
+
UpdateDatasetSplitResponseBody: {
|
|
6141
|
+
data: components["schemas"]["DatasetSplit"];
|
|
6142
|
+
};
|
|
5927
6143
|
/**
|
|
5928
6144
|
* UpdateExperimentRequestBody
|
|
5929
6145
|
* @description Fields to update on an experiment. Omit a field to leave it unchanged.
|
|
@@ -7793,6 +8009,184 @@ export interface operations {
|
|
|
7793
8009
|
};
|
|
7794
8010
|
};
|
|
7795
8011
|
};
|
|
8012
|
+
createDatasetSplit: {
|
|
8013
|
+
parameters: {
|
|
8014
|
+
query?: never;
|
|
8015
|
+
header?: never;
|
|
8016
|
+
path: {
|
|
8017
|
+
/** @description The dataset identifier: either dataset ID or dataset name. */
|
|
8018
|
+
dataset_identifier: string;
|
|
8019
|
+
};
|
|
8020
|
+
cookie?: never;
|
|
8021
|
+
};
|
|
8022
|
+
requestBody: {
|
|
8023
|
+
content: {
|
|
8024
|
+
"application/json": components["schemas"]["CreateDatasetSplitRequestBody"];
|
|
8025
|
+
};
|
|
8026
|
+
};
|
|
8027
|
+
responses: {
|
|
8028
|
+
/** @description Successful Response */
|
|
8029
|
+
201: {
|
|
8030
|
+
headers: {
|
|
8031
|
+
[name: string]: unknown;
|
|
8032
|
+
};
|
|
8033
|
+
content: {
|
|
8034
|
+
"application/json": components["schemas"]["CreateDatasetSplitResponseBody"];
|
|
8035
|
+
};
|
|
8036
|
+
};
|
|
8037
|
+
/** @description Forbidden */
|
|
8038
|
+
403: {
|
|
8039
|
+
headers: {
|
|
8040
|
+
[name: string]: unknown;
|
|
8041
|
+
};
|
|
8042
|
+
content: {
|
|
8043
|
+
"text/plain": string;
|
|
8044
|
+
};
|
|
8045
|
+
};
|
|
8046
|
+
/** @description Dataset or example not found */
|
|
8047
|
+
404: {
|
|
8048
|
+
headers: {
|
|
8049
|
+
[name: string]: unknown;
|
|
8050
|
+
};
|
|
8051
|
+
content: {
|
|
8052
|
+
"text/plain": string;
|
|
8053
|
+
};
|
|
8054
|
+
};
|
|
8055
|
+
/** @description A dataset split with the given name already exists */
|
|
8056
|
+
409: {
|
|
8057
|
+
headers: {
|
|
8058
|
+
[name: string]: unknown;
|
|
8059
|
+
};
|
|
8060
|
+
content: {
|
|
8061
|
+
"text/plain": string;
|
|
8062
|
+
};
|
|
8063
|
+
};
|
|
8064
|
+
/** @description Invalid request */
|
|
8065
|
+
422: {
|
|
8066
|
+
headers: {
|
|
8067
|
+
[name: string]: unknown;
|
|
8068
|
+
};
|
|
8069
|
+
content: {
|
|
8070
|
+
"text/plain": string;
|
|
8071
|
+
};
|
|
8072
|
+
};
|
|
8073
|
+
};
|
|
8074
|
+
};
|
|
8075
|
+
deleteDatasetSplit: {
|
|
8076
|
+
parameters: {
|
|
8077
|
+
query?: never;
|
|
8078
|
+
header?: never;
|
|
8079
|
+
path: {
|
|
8080
|
+
/** @description The dataset identifier: either dataset ID or dataset name. */
|
|
8081
|
+
dataset_identifier: string;
|
|
8082
|
+
/** @description The ID (GlobalID) of the dataset split. */
|
|
8083
|
+
split_id: string;
|
|
8084
|
+
};
|
|
8085
|
+
cookie?: never;
|
|
8086
|
+
};
|
|
8087
|
+
requestBody?: never;
|
|
8088
|
+
responses: {
|
|
8089
|
+
/** @description Successful Response */
|
|
8090
|
+
204: {
|
|
8091
|
+
headers: {
|
|
8092
|
+
[name: string]: unknown;
|
|
8093
|
+
};
|
|
8094
|
+
content?: never;
|
|
8095
|
+
};
|
|
8096
|
+
/** @description Forbidden */
|
|
8097
|
+
403: {
|
|
8098
|
+
headers: {
|
|
8099
|
+
[name: string]: unknown;
|
|
8100
|
+
};
|
|
8101
|
+
content: {
|
|
8102
|
+
"text/plain": string;
|
|
8103
|
+
};
|
|
8104
|
+
};
|
|
8105
|
+
/** @description Dataset or split not found */
|
|
8106
|
+
404: {
|
|
8107
|
+
headers: {
|
|
8108
|
+
[name: string]: unknown;
|
|
8109
|
+
};
|
|
8110
|
+
content: {
|
|
8111
|
+
"text/plain": string;
|
|
8112
|
+
};
|
|
8113
|
+
};
|
|
8114
|
+
/** @description Invalid dataset split ID */
|
|
8115
|
+
422: {
|
|
8116
|
+
headers: {
|
|
8117
|
+
[name: string]: unknown;
|
|
8118
|
+
};
|
|
8119
|
+
content: {
|
|
8120
|
+
"text/plain": string;
|
|
8121
|
+
};
|
|
8122
|
+
};
|
|
8123
|
+
};
|
|
8124
|
+
};
|
|
8125
|
+
updateDatasetSplit: {
|
|
8126
|
+
parameters: {
|
|
8127
|
+
query?: never;
|
|
8128
|
+
header?: never;
|
|
8129
|
+
path: {
|
|
8130
|
+
/** @description The dataset identifier: either dataset ID or dataset name. */
|
|
8131
|
+
dataset_identifier: string;
|
|
8132
|
+
/** @description The ID (GlobalID) of the dataset split. */
|
|
8133
|
+
split_id: string;
|
|
8134
|
+
};
|
|
8135
|
+
cookie?: never;
|
|
8136
|
+
};
|
|
8137
|
+
requestBody: {
|
|
8138
|
+
content: {
|
|
8139
|
+
"application/json": components["schemas"]["UpdateDatasetSplitRequestBody"];
|
|
8140
|
+
};
|
|
8141
|
+
};
|
|
8142
|
+
responses: {
|
|
8143
|
+
/** @description Successful Response */
|
|
8144
|
+
200: {
|
|
8145
|
+
headers: {
|
|
8146
|
+
[name: string]: unknown;
|
|
8147
|
+
};
|
|
8148
|
+
content: {
|
|
8149
|
+
"application/json": components["schemas"]["UpdateDatasetSplitResponseBody"];
|
|
8150
|
+
};
|
|
8151
|
+
};
|
|
8152
|
+
/** @description Forbidden */
|
|
8153
|
+
403: {
|
|
8154
|
+
headers: {
|
|
8155
|
+
[name: string]: unknown;
|
|
8156
|
+
};
|
|
8157
|
+
content: {
|
|
8158
|
+
"text/plain": string;
|
|
8159
|
+
};
|
|
8160
|
+
};
|
|
8161
|
+
/** @description Dataset, split, or example not found */
|
|
8162
|
+
404: {
|
|
8163
|
+
headers: {
|
|
8164
|
+
[name: string]: unknown;
|
|
8165
|
+
};
|
|
8166
|
+
content: {
|
|
8167
|
+
"text/plain": string;
|
|
8168
|
+
};
|
|
8169
|
+
};
|
|
8170
|
+
/** @description A dataset split with the given name already exists */
|
|
8171
|
+
409: {
|
|
8172
|
+
headers: {
|
|
8173
|
+
[name: string]: unknown;
|
|
8174
|
+
};
|
|
8175
|
+
content: {
|
|
8176
|
+
"text/plain": string;
|
|
8177
|
+
};
|
|
8178
|
+
};
|
|
8179
|
+
/** @description Invalid request */
|
|
8180
|
+
422: {
|
|
8181
|
+
headers: {
|
|
8182
|
+
[name: string]: unknown;
|
|
8183
|
+
};
|
|
8184
|
+
content: {
|
|
8185
|
+
"text/plain": string;
|
|
8186
|
+
};
|
|
8187
|
+
};
|
|
8188
|
+
};
|
|
8189
|
+
};
|
|
7796
8190
|
getDatasetCsv: {
|
|
7797
8191
|
parameters: {
|
|
7798
8192
|
query?: {
|
|
@@ -8363,6 +8757,160 @@ export interface operations {
|
|
|
8363
8757
|
};
|
|
8364
8758
|
};
|
|
8365
8759
|
};
|
|
8760
|
+
listExperimentTags: {
|
|
8761
|
+
parameters: {
|
|
8762
|
+
query?: never;
|
|
8763
|
+
header?: never;
|
|
8764
|
+
path: {
|
|
8765
|
+
/** @description The ID of the experiment */
|
|
8766
|
+
experiment_id: string;
|
|
8767
|
+
};
|
|
8768
|
+
cookie?: never;
|
|
8769
|
+
};
|
|
8770
|
+
requestBody?: never;
|
|
8771
|
+
responses: {
|
|
8772
|
+
/** @description The tags currently applied to the experiment */
|
|
8773
|
+
200: {
|
|
8774
|
+
headers: {
|
|
8775
|
+
[name: string]: unknown;
|
|
8776
|
+
};
|
|
8777
|
+
content: {
|
|
8778
|
+
"application/json": components["schemas"]["ListExperimentTagsResponseBody"];
|
|
8779
|
+
};
|
|
8780
|
+
};
|
|
8781
|
+
/** @description Forbidden */
|
|
8782
|
+
403: {
|
|
8783
|
+
headers: {
|
|
8784
|
+
[name: string]: unknown;
|
|
8785
|
+
};
|
|
8786
|
+
content: {
|
|
8787
|
+
"text/plain": string;
|
|
8788
|
+
};
|
|
8789
|
+
};
|
|
8790
|
+
/** @description Experiment not found */
|
|
8791
|
+
404: {
|
|
8792
|
+
headers: {
|
|
8793
|
+
[name: string]: unknown;
|
|
8794
|
+
};
|
|
8795
|
+
content: {
|
|
8796
|
+
"text/plain": string;
|
|
8797
|
+
};
|
|
8798
|
+
};
|
|
8799
|
+
/** @description Invalid experiment ID */
|
|
8800
|
+
422: {
|
|
8801
|
+
headers: {
|
|
8802
|
+
[name: string]: unknown;
|
|
8803
|
+
};
|
|
8804
|
+
content: {
|
|
8805
|
+
"text/plain": string;
|
|
8806
|
+
};
|
|
8807
|
+
};
|
|
8808
|
+
};
|
|
8809
|
+
};
|
|
8810
|
+
setExperimentTag: {
|
|
8811
|
+
parameters: {
|
|
8812
|
+
query?: never;
|
|
8813
|
+
header?: never;
|
|
8814
|
+
path: {
|
|
8815
|
+
/** @description The ID of the experiment */
|
|
8816
|
+
experiment_id: string;
|
|
8817
|
+
};
|
|
8818
|
+
cookie?: never;
|
|
8819
|
+
};
|
|
8820
|
+
requestBody: {
|
|
8821
|
+
content: {
|
|
8822
|
+
"application/json": components["schemas"]["SetExperimentTagRequestBody"];
|
|
8823
|
+
};
|
|
8824
|
+
};
|
|
8825
|
+
responses: {
|
|
8826
|
+
/** @description The tag as it now applies to the experiment */
|
|
8827
|
+
200: {
|
|
8828
|
+
headers: {
|
|
8829
|
+
[name: string]: unknown;
|
|
8830
|
+
};
|
|
8831
|
+
content: {
|
|
8832
|
+
"application/json": components["schemas"]["SetExperimentTagResponseBody"];
|
|
8833
|
+
};
|
|
8834
|
+
};
|
|
8835
|
+
/** @description Forbidden */
|
|
8836
|
+
403: {
|
|
8837
|
+
headers: {
|
|
8838
|
+
[name: string]: unknown;
|
|
8839
|
+
};
|
|
8840
|
+
content: {
|
|
8841
|
+
"text/plain": string;
|
|
8842
|
+
};
|
|
8843
|
+
};
|
|
8844
|
+
/** @description Experiment not found */
|
|
8845
|
+
404: {
|
|
8846
|
+
headers: {
|
|
8847
|
+
[name: string]: unknown;
|
|
8848
|
+
};
|
|
8849
|
+
content: {
|
|
8850
|
+
"text/plain": string;
|
|
8851
|
+
};
|
|
8852
|
+
};
|
|
8853
|
+
/** @description Invalid experiment ID or request body, or the experiment is ephemeral and cannot be tagged as the baseline */
|
|
8854
|
+
422: {
|
|
8855
|
+
headers: {
|
|
8856
|
+
[name: string]: unknown;
|
|
8857
|
+
};
|
|
8858
|
+
content: {
|
|
8859
|
+
"text/plain": string;
|
|
8860
|
+
};
|
|
8861
|
+
};
|
|
8862
|
+
};
|
|
8863
|
+
};
|
|
8864
|
+
deleteExperimentTag: {
|
|
8865
|
+
parameters: {
|
|
8866
|
+
query?: never;
|
|
8867
|
+
header?: never;
|
|
8868
|
+
path: {
|
|
8869
|
+
/** @description The ID of the experiment */
|
|
8870
|
+
experiment_id: string;
|
|
8871
|
+
/** @description The node ID or name of the tag to remove */
|
|
8872
|
+
tag_identifier: string;
|
|
8873
|
+
};
|
|
8874
|
+
cookie?: never;
|
|
8875
|
+
};
|
|
8876
|
+
requestBody?: never;
|
|
8877
|
+
responses: {
|
|
8878
|
+
/** @description No content returned on successful tag removal */
|
|
8879
|
+
204: {
|
|
8880
|
+
headers: {
|
|
8881
|
+
[name: string]: unknown;
|
|
8882
|
+
};
|
|
8883
|
+
content?: never;
|
|
8884
|
+
};
|
|
8885
|
+
/** @description Forbidden */
|
|
8886
|
+
403: {
|
|
8887
|
+
headers: {
|
|
8888
|
+
[name: string]: unknown;
|
|
8889
|
+
};
|
|
8890
|
+
content: {
|
|
8891
|
+
"text/plain": string;
|
|
8892
|
+
};
|
|
8893
|
+
};
|
|
8894
|
+
/** @description Experiment not found */
|
|
8895
|
+
404: {
|
|
8896
|
+
headers: {
|
|
8897
|
+
[name: string]: unknown;
|
|
8898
|
+
};
|
|
8899
|
+
content: {
|
|
8900
|
+
"text/plain": string;
|
|
8901
|
+
};
|
|
8902
|
+
};
|
|
8903
|
+
/** @description Invalid experiment ID or tag identifier */
|
|
8904
|
+
422: {
|
|
8905
|
+
headers: {
|
|
8906
|
+
[name: string]: unknown;
|
|
8907
|
+
};
|
|
8908
|
+
content: {
|
|
8909
|
+
"text/plain": string;
|
|
8910
|
+
};
|
|
8911
|
+
};
|
|
8912
|
+
};
|
|
8913
|
+
};
|
|
8366
8914
|
listExperimentRuns: {
|
|
8367
8915
|
parameters: {
|
|
8368
8916
|
query?: {
|
package/src/client.ts
CHANGED
|
@@ -9,6 +9,7 @@ import type {
|
|
|
9
9
|
paths as oapiPathsV1,
|
|
10
10
|
} from "./__generated__/api/v1.d.ts";
|
|
11
11
|
import {
|
|
12
|
+
type BaseUrlSource,
|
|
12
13
|
defaultGetEnvironmentOptions,
|
|
13
14
|
makeDefaultClientOptions,
|
|
14
15
|
} from "./config";
|
|
@@ -36,6 +37,14 @@ export type Types = {
|
|
|
36
37
|
};
|
|
37
38
|
};
|
|
38
39
|
|
|
40
|
+
/**
|
|
41
|
+
* The client's resolved options, tagged with where the base URL came from so
|
|
42
|
+
* consumers can tell deliberate configuration from an ambient environment.
|
|
43
|
+
*/
|
|
44
|
+
export type PhoenixClientOptions = ClientOptions & {
|
|
45
|
+
baseUrlSource: BaseUrlSource;
|
|
46
|
+
};
|
|
47
|
+
|
|
39
48
|
/**
|
|
40
49
|
* Merge all configuration options according to priority:
|
|
41
50
|
* defaults < environment < explicit options
|
|
@@ -51,13 +60,20 @@ export const getMergedOptions = ({
|
|
|
51
60
|
}: {
|
|
52
61
|
options?: Partial<ClientOptions>;
|
|
53
62
|
getEnvironmentOptions?: () => Partial<ClientOptions>;
|
|
54
|
-
} = {}):
|
|
63
|
+
} = {}): PhoenixClientOptions => {
|
|
55
64
|
const defaultOptions = makeDefaultClientOptions();
|
|
56
65
|
const environmentOptions = getEnvironmentOptions();
|
|
66
|
+
const baseUrlSource: BaseUrlSource =
|
|
67
|
+
options.baseUrl !== undefined
|
|
68
|
+
? "explicit"
|
|
69
|
+
: environmentOptions.baseUrl !== undefined
|
|
70
|
+
? "environment"
|
|
71
|
+
: "default";
|
|
57
72
|
return {
|
|
58
73
|
...defaultOptions,
|
|
59
74
|
...environmentOptions,
|
|
60
75
|
...options,
|
|
76
|
+
baseUrlSource,
|
|
61
77
|
};
|
|
62
78
|
};
|
|
63
79
|
|