@arizeai/phoenix-client 6.8.0 → 6.8.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/__generated__/api/v1.d.ts +284 -5
- package/dist/esm/__generated__/api/v1.d.ts.map +1 -1
- package/dist/esm/constants/serverRequirements.d.ts +1 -0
- package/dist/esm/constants/serverRequirements.d.ts.map +1 -1
- package/dist/esm/constants/serverRequirements.js +8 -0
- package/dist/esm/constants/serverRequirements.js.map +1 -1
- package/dist/esm/datasets/appendDatasetExamples.d.ts +9 -3
- package/dist/esm/datasets/appendDatasetExamples.d.ts.map +1 -1
- package/dist/esm/datasets/appendDatasetExamples.js +23 -3
- package/dist/esm/datasets/appendDatasetExamples.js.map +1 -1
- package/dist/esm/datasets/createDataset.d.ts +4 -1
- package/dist/esm/datasets/createDataset.d.ts.map +1 -1
- package/dist/esm/datasets/createDataset.js +38 -3
- package/dist/esm/datasets/createDataset.js.map +1 -1
- package/dist/esm/datasets/getDatasetExamples.d.ts.map +1 -1
- package/dist/esm/datasets/getDatasetExamples.js +3 -2
- package/dist/esm/datasets/getDatasetExamples.js.map +1 -1
- package/dist/esm/datasets/index.d.ts +0 -1
- package/dist/esm/datasets/index.d.ts.map +1 -1
- package/dist/esm/datasets/index.js +0 -1
- package/dist/esm/datasets/index.js.map +1 -1
- package/dist/esm/experiments/resumeEvaluation.d.ts.map +1 -1
- package/dist/esm/experiments/resumeEvaluation.js +2 -1
- 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 +3 -2
- package/dist/esm/experiments/resumeExperiment.js.map +1 -1
- package/dist/esm/experiments/runExperiment.js +1 -1
- package/dist/esm/experiments/runExperiment.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/types/datasets.d.ts +10 -1
- package/dist/esm/types/datasets.d.ts.map +1 -1
- package/dist/esm/utils/formatPromptMessages.d.ts.map +1 -1
- package/dist/esm/utils/getPromptBySelector.d.ts.map +1 -1
- package/dist/src/__generated__/api/v1.d.ts +284 -5
- package/dist/src/__generated__/api/v1.d.ts.map +1 -1
- package/dist/src/constants/serverRequirements.d.ts +1 -0
- package/dist/src/constants/serverRequirements.d.ts.map +1 -1
- package/dist/src/constants/serverRequirements.js +9 -1
- package/dist/src/constants/serverRequirements.js.map +1 -1
- package/dist/src/datasets/appendDatasetExamples.d.ts +9 -3
- package/dist/src/datasets/appendDatasetExamples.d.ts.map +1 -1
- package/dist/src/datasets/appendDatasetExamples.js +24 -5
- package/dist/src/datasets/appendDatasetExamples.js.map +1 -1
- package/dist/src/datasets/createDataset.d.ts +4 -1
- package/dist/src/datasets/createDataset.d.ts.map +1 -1
- package/dist/src/datasets/createDataset.js +42 -5
- package/dist/src/datasets/createDataset.js.map +1 -1
- package/dist/src/datasets/getDatasetExamples.d.ts.map +1 -1
- package/dist/src/datasets/getDatasetExamples.js +15 -1
- package/dist/src/datasets/getDatasetExamples.js.map +1 -1
- package/dist/src/datasets/index.d.ts +0 -1
- package/dist/src/datasets/index.d.ts.map +1 -1
- package/dist/src/datasets/index.js +0 -1
- package/dist/src/datasets/index.js.map +1 -1
- package/dist/src/experiments/resumeEvaluation.d.ts.map +1 -1
- package/dist/src/experiments/resumeEvaluation.js +2 -1
- 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 +3 -2
- package/dist/src/experiments/resumeExperiment.js.map +1 -1
- package/dist/src/experiments/runExperiment.js +1 -1
- package/dist/src/experiments/runExperiment.js.map +1 -1
- package/dist/src/types/datasets.d.ts +10 -1
- package/dist/src/types/datasets.d.ts.map +1 -1
- package/dist/src/utils/formatPromptMessages.d.ts.map +1 -1
- package/dist/src/utils/getPromptBySelector.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/__generated__/api/v1.ts +284 -5
- package/src/constants/serverRequirements.ts +9 -0
- package/src/datasets/appendDatasetExamples.ts +26 -5
- package/src/datasets/createDataset.ts +66 -18
- package/src/datasets/getDatasetExamples.ts +7 -4
- package/src/datasets/index.ts +0 -1
- package/src/experiments/resumeEvaluation.ts +2 -1
- package/src/experiments/resumeExperiment.ts +3 -2
- package/src/experiments/runExperiment.ts +1 -1
- package/src/types/datasets.ts +10 -1
- package/dist/esm/datasets/createOrGetDataset.d.ts +0 -18
- package/dist/esm/datasets/createOrGetDataset.d.ts.map +0 -1
- package/dist/esm/datasets/createOrGetDataset.js +0 -29
- package/dist/esm/datasets/createOrGetDataset.js.map +0 -1
- package/dist/src/datasets/createOrGetDataset.d.ts +0 -18
- package/dist/src/datasets/createOrGetDataset.d.ts.map +0 -1
- package/dist/src/datasets/createOrGetDataset.js +0 -32
- package/dist/src/datasets/createOrGetDataset.js.map +0 -1
- package/src/datasets/createOrGetDataset.ts +0 -40
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arizeai/phoenix-client",
|
|
3
|
-
"version": "6.8.
|
|
3
|
+
"version": "6.8.1",
|
|
4
4
|
"description": "A client for the Phoenix API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"arize",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"openapi-fetch": "^0.12.5",
|
|
80
80
|
"tiny-invariant": "^1.3.3",
|
|
81
81
|
"zod": "^4.0.14",
|
|
82
|
-
"@arizeai/phoenix-
|
|
83
|
-
"@arizeai/phoenix-
|
|
82
|
+
"@arizeai/phoenix-config": "0.1.3",
|
|
83
|
+
"@arizeai/phoenix-otel": "1.0.0"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@ai-sdk/openai": "^3.0.29",
|
|
@@ -214,6 +214,23 @@ export interface paths {
|
|
|
214
214
|
patch?: never;
|
|
215
215
|
trace?: never;
|
|
216
216
|
};
|
|
217
|
+
"/v1/datasets/{id}/jsonl": {
|
|
218
|
+
parameters: {
|
|
219
|
+
query?: never;
|
|
220
|
+
header?: never;
|
|
221
|
+
path?: never;
|
|
222
|
+
cookie?: never;
|
|
223
|
+
};
|
|
224
|
+
/** Download dataset examples as JSONL file */
|
|
225
|
+
get: operations["getDatasetJSONL"];
|
|
226
|
+
put?: never;
|
|
227
|
+
post?: never;
|
|
228
|
+
delete?: never;
|
|
229
|
+
options?: never;
|
|
230
|
+
head?: never;
|
|
231
|
+
patch?: never;
|
|
232
|
+
trace?: never;
|
|
233
|
+
};
|
|
217
234
|
"/v1/datasets/{id}/jsonl/openai_ft": {
|
|
218
235
|
parameters: {
|
|
219
236
|
query?: never;
|
|
@@ -914,6 +931,26 @@ export interface paths {
|
|
|
914
931
|
patch?: never;
|
|
915
932
|
trace?: never;
|
|
916
933
|
};
|
|
934
|
+
"/v1/session_notes": {
|
|
935
|
+
parameters: {
|
|
936
|
+
query?: never;
|
|
937
|
+
header?: never;
|
|
938
|
+
path?: never;
|
|
939
|
+
cookie?: never;
|
|
940
|
+
};
|
|
941
|
+
get?: never;
|
|
942
|
+
put?: never;
|
|
943
|
+
/**
|
|
944
|
+
* Create a session note
|
|
945
|
+
* @description Add a note annotation to a session. Notes are special annotations that allow multiple entries per session (unlike regular annotations which are unique by name and identifier). Each note gets a unique UUIDv4 identifier.
|
|
946
|
+
*/
|
|
947
|
+
post: operations["createSessionNote"];
|
|
948
|
+
delete?: never;
|
|
949
|
+
options?: never;
|
|
950
|
+
head?: never;
|
|
951
|
+
patch?: never;
|
|
952
|
+
trace?: never;
|
|
953
|
+
};
|
|
917
954
|
"/v1/document_annotations": {
|
|
918
955
|
parameters: {
|
|
919
956
|
query?: never;
|
|
@@ -1285,6 +1322,14 @@ export interface components {
|
|
|
1285
1322
|
CreatePromptResponseBody: {
|
|
1286
1323
|
data: components["schemas"]["PromptVersion"];
|
|
1287
1324
|
};
|
|
1325
|
+
/** CreateSessionNoteRequestBody */
|
|
1326
|
+
CreateSessionNoteRequestBody: {
|
|
1327
|
+
data: components["schemas"]["SessionNoteData"];
|
|
1328
|
+
};
|
|
1329
|
+
/** CreateSessionNoteResponseBody */
|
|
1330
|
+
CreateSessionNoteResponseBody: {
|
|
1331
|
+
data: components["schemas"]["InsertedSessionAnnotation"];
|
|
1332
|
+
};
|
|
1288
1333
|
/** CreateSpanNoteRequestBody */
|
|
1289
1334
|
CreateSpanNoteRequestBody: {
|
|
1290
1335
|
data: components["schemas"]["SpanNoteData"];
|
|
@@ -1363,6 +1408,8 @@ export interface components {
|
|
|
1363
1408
|
DatasetExample: {
|
|
1364
1409
|
/** Id */
|
|
1365
1410
|
id: string;
|
|
1411
|
+
/** Node Id */
|
|
1412
|
+
node_id: string;
|
|
1366
1413
|
/** Input */
|
|
1367
1414
|
input: {
|
|
1368
1415
|
[key: string]: unknown;
|
|
@@ -2215,8 +2262,34 @@ export interface components {
|
|
|
2215
2262
|
top_p?: number;
|
|
2216
2263
|
/** Stop Sequences */
|
|
2217
2264
|
stop_sequences?: string[];
|
|
2265
|
+
output_config?: components["schemas"]["PromptAnthropicOutputConfig"];
|
|
2218
2266
|
/** Thinking */
|
|
2219
|
-
thinking?: components["schemas"]["PromptAnthropicThinkingConfigDisabled"] | components["schemas"]["PromptAnthropicThinkingConfigEnabled"];
|
|
2267
|
+
thinking?: components["schemas"]["PromptAnthropicThinkingConfigDisabled"] | components["schemas"]["PromptAnthropicThinkingConfigEnabled"] | components["schemas"]["PromptAnthropicThinkingConfigAdaptive"];
|
|
2268
|
+
/** Extra Body */
|
|
2269
|
+
extra_body?: {
|
|
2270
|
+
[key: string]: unknown;
|
|
2271
|
+
};
|
|
2272
|
+
};
|
|
2273
|
+
/** PromptAnthropicOutputConfig */
|
|
2274
|
+
PromptAnthropicOutputConfig: {
|
|
2275
|
+
/**
|
|
2276
|
+
* Effort
|
|
2277
|
+
* @enum {string}
|
|
2278
|
+
*/
|
|
2279
|
+
effort?: "low" | "medium" | "high" | "xhigh" | "max";
|
|
2280
|
+
};
|
|
2281
|
+
/** PromptAnthropicThinkingConfigAdaptive */
|
|
2282
|
+
PromptAnthropicThinkingConfigAdaptive: {
|
|
2283
|
+
/**
|
|
2284
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2285
|
+
* @enum {string}
|
|
2286
|
+
*/
|
|
2287
|
+
type: "adaptive";
|
|
2288
|
+
/**
|
|
2289
|
+
* Display
|
|
2290
|
+
* @enum {string}
|
|
2291
|
+
*/
|
|
2292
|
+
display?: "summarized" | "omitted";
|
|
2220
2293
|
};
|
|
2221
2294
|
/** PromptAnthropicThinkingConfigDisabled */
|
|
2222
2295
|
PromptAnthropicThinkingConfigDisabled: {
|
|
@@ -2235,6 +2308,11 @@ export interface components {
|
|
|
2235
2308
|
type: "enabled";
|
|
2236
2309
|
/** Budget Tokens */
|
|
2237
2310
|
budget_tokens: number;
|
|
2311
|
+
/**
|
|
2312
|
+
* Display
|
|
2313
|
+
* @enum {string}
|
|
2314
|
+
*/
|
|
2315
|
+
display?: "summarized" | "omitted";
|
|
2238
2316
|
};
|
|
2239
2317
|
/** PromptAwsInvocationParameters */
|
|
2240
2318
|
PromptAwsInvocationParameters: {
|
|
@@ -2253,6 +2331,8 @@ export interface components {
|
|
|
2253
2331
|
temperature?: number;
|
|
2254
2332
|
/** Top P */
|
|
2255
2333
|
top_p?: number;
|
|
2334
|
+
/** Stop Sequences */
|
|
2335
|
+
stop_sequences?: string[];
|
|
2256
2336
|
};
|
|
2257
2337
|
/** PromptAzureOpenAIInvocationParameters */
|
|
2258
2338
|
PromptAzureOpenAIInvocationParameters: {
|
|
@@ -2279,11 +2359,17 @@ export interface components {
|
|
|
2279
2359
|
top_p?: number;
|
|
2280
2360
|
/** Seed */
|
|
2281
2361
|
seed?: number;
|
|
2362
|
+
/** Stop */
|
|
2363
|
+
stop?: string[];
|
|
2282
2364
|
/**
|
|
2283
2365
|
* Reasoning Effort
|
|
2284
2366
|
* @enum {string}
|
|
2285
2367
|
*/
|
|
2286
2368
|
reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
2369
|
+
/** Extra Body */
|
|
2370
|
+
extra_body?: {
|
|
2371
|
+
[key: string]: unknown;
|
|
2372
|
+
};
|
|
2287
2373
|
};
|
|
2288
2374
|
/** PromptCerebrasInvocationParameters */
|
|
2289
2375
|
PromptCerebrasInvocationParameters: {
|
|
@@ -2310,11 +2396,17 @@ export interface components {
|
|
|
2310
2396
|
top_p?: number;
|
|
2311
2397
|
/** Seed */
|
|
2312
2398
|
seed?: number;
|
|
2399
|
+
/** Stop */
|
|
2400
|
+
stop?: string[];
|
|
2313
2401
|
/**
|
|
2314
2402
|
* Reasoning Effort
|
|
2315
2403
|
* @enum {string}
|
|
2316
2404
|
*/
|
|
2317
2405
|
reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
2406
|
+
/** Extra Body */
|
|
2407
|
+
extra_body?: {
|
|
2408
|
+
[key: string]: unknown;
|
|
2409
|
+
};
|
|
2318
2410
|
};
|
|
2319
2411
|
/** PromptChatTemplate */
|
|
2320
2412
|
PromptChatTemplate: {
|
|
@@ -2363,11 +2455,17 @@ export interface components {
|
|
|
2363
2455
|
top_p?: number;
|
|
2364
2456
|
/** Seed */
|
|
2365
2457
|
seed?: number;
|
|
2458
|
+
/** Stop */
|
|
2459
|
+
stop?: string[];
|
|
2366
2460
|
/**
|
|
2367
2461
|
* Reasoning Effort
|
|
2368
2462
|
* @enum {string}
|
|
2369
2463
|
*/
|
|
2370
2464
|
reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
2465
|
+
/** Extra Body */
|
|
2466
|
+
extra_body?: {
|
|
2467
|
+
[key: string]: unknown;
|
|
2468
|
+
};
|
|
2371
2469
|
};
|
|
2372
2470
|
/** PromptFireworksInvocationParameters */
|
|
2373
2471
|
PromptFireworksInvocationParameters: {
|
|
@@ -2394,11 +2492,17 @@ export interface components {
|
|
|
2394
2492
|
top_p?: number;
|
|
2395
2493
|
/** Seed */
|
|
2396
2494
|
seed?: number;
|
|
2495
|
+
/** Stop */
|
|
2496
|
+
stop?: string[];
|
|
2397
2497
|
/**
|
|
2398
2498
|
* Reasoning Effort
|
|
2399
2499
|
* @enum {string}
|
|
2400
2500
|
*/
|
|
2401
2501
|
reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
2502
|
+
/** Extra Body */
|
|
2503
|
+
extra_body?: {
|
|
2504
|
+
[key: string]: unknown;
|
|
2505
|
+
};
|
|
2402
2506
|
};
|
|
2403
2507
|
/** PromptGoogleInvocationParameters */
|
|
2404
2508
|
PromptGoogleInvocationParameters: {
|
|
@@ -2425,6 +2529,19 @@ export interface components {
|
|
|
2425
2529
|
top_p?: number;
|
|
2426
2530
|
/** Top K */
|
|
2427
2531
|
top_k?: number;
|
|
2532
|
+
thinking_config?: components["schemas"]["PromptGoogleThinkingConfig"];
|
|
2533
|
+
};
|
|
2534
|
+
/** PromptGoogleThinkingConfig */
|
|
2535
|
+
PromptGoogleThinkingConfig: {
|
|
2536
|
+
/** Thinking Budget */
|
|
2537
|
+
thinking_budget?: number;
|
|
2538
|
+
/**
|
|
2539
|
+
* Thinking Level
|
|
2540
|
+
* @enum {string}
|
|
2541
|
+
*/
|
|
2542
|
+
thinking_level?: "minimal" | "low" | "medium" | "high";
|
|
2543
|
+
/** Include Thoughts */
|
|
2544
|
+
include_thoughts?: boolean;
|
|
2428
2545
|
};
|
|
2429
2546
|
/** PromptGroqInvocationParameters */
|
|
2430
2547
|
PromptGroqInvocationParameters: {
|
|
@@ -2451,11 +2568,17 @@ export interface components {
|
|
|
2451
2568
|
top_p?: number;
|
|
2452
2569
|
/** Seed */
|
|
2453
2570
|
seed?: number;
|
|
2571
|
+
/** Stop */
|
|
2572
|
+
stop?: string[];
|
|
2454
2573
|
/**
|
|
2455
2574
|
* Reasoning Effort
|
|
2456
2575
|
* @enum {string}
|
|
2457
2576
|
*/
|
|
2458
2577
|
reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
2578
|
+
/** Extra Body */
|
|
2579
|
+
extra_body?: {
|
|
2580
|
+
[key: string]: unknown;
|
|
2581
|
+
};
|
|
2459
2582
|
};
|
|
2460
2583
|
/** PromptMessage */
|
|
2461
2584
|
PromptMessage: {
|
|
@@ -2492,11 +2615,17 @@ export interface components {
|
|
|
2492
2615
|
top_p?: number;
|
|
2493
2616
|
/** Seed */
|
|
2494
2617
|
seed?: number;
|
|
2618
|
+
/** Stop */
|
|
2619
|
+
stop?: string[];
|
|
2495
2620
|
/**
|
|
2496
2621
|
* Reasoning Effort
|
|
2497
2622
|
* @enum {string}
|
|
2498
2623
|
*/
|
|
2499
2624
|
reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
2625
|
+
/** Extra Body */
|
|
2626
|
+
extra_body?: {
|
|
2627
|
+
[key: string]: unknown;
|
|
2628
|
+
};
|
|
2500
2629
|
};
|
|
2501
2630
|
/** PromptOllamaInvocationParameters */
|
|
2502
2631
|
PromptOllamaInvocationParameters: {
|
|
@@ -2523,11 +2652,17 @@ export interface components {
|
|
|
2523
2652
|
top_p?: number;
|
|
2524
2653
|
/** Seed */
|
|
2525
2654
|
seed?: number;
|
|
2655
|
+
/** Stop */
|
|
2656
|
+
stop?: string[];
|
|
2526
2657
|
/**
|
|
2527
2658
|
* Reasoning Effort
|
|
2528
2659
|
* @enum {string}
|
|
2529
2660
|
*/
|
|
2530
2661
|
reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
2662
|
+
/** Extra Body */
|
|
2663
|
+
extra_body?: {
|
|
2664
|
+
[key: string]: unknown;
|
|
2665
|
+
};
|
|
2531
2666
|
};
|
|
2532
2667
|
/** PromptOpenAIInvocationParameters */
|
|
2533
2668
|
PromptOpenAIInvocationParameters: {
|
|
@@ -2554,11 +2689,17 @@ export interface components {
|
|
|
2554
2689
|
top_p?: number;
|
|
2555
2690
|
/** Seed */
|
|
2556
2691
|
seed?: number;
|
|
2692
|
+
/** Stop */
|
|
2693
|
+
stop?: string[];
|
|
2557
2694
|
/**
|
|
2558
2695
|
* Reasoning Effort
|
|
2559
2696
|
* @enum {string}
|
|
2560
2697
|
*/
|
|
2561
2698
|
reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
2699
|
+
/** Extra Body */
|
|
2700
|
+
extra_body?: {
|
|
2701
|
+
[key: string]: unknown;
|
|
2702
|
+
};
|
|
2562
2703
|
};
|
|
2563
2704
|
/** PromptPerplexityInvocationParameters */
|
|
2564
2705
|
PromptPerplexityInvocationParameters: {
|
|
@@ -2585,11 +2726,17 @@ export interface components {
|
|
|
2585
2726
|
top_p?: number;
|
|
2586
2727
|
/** Seed */
|
|
2587
2728
|
seed?: number;
|
|
2729
|
+
/** Stop */
|
|
2730
|
+
stop?: string[];
|
|
2588
2731
|
/**
|
|
2589
2732
|
* Reasoning Effort
|
|
2590
2733
|
* @enum {string}
|
|
2591
2734
|
*/
|
|
2592
2735
|
reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
2736
|
+
/** Extra Body */
|
|
2737
|
+
extra_body?: {
|
|
2738
|
+
[key: string]: unknown;
|
|
2739
|
+
};
|
|
2593
2740
|
};
|
|
2594
2741
|
/** PromptResponseFormatJSONSchema */
|
|
2595
2742
|
PromptResponseFormatJSONSchema: {
|
|
@@ -2658,11 +2805,17 @@ export interface components {
|
|
|
2658
2805
|
top_p?: number;
|
|
2659
2806
|
/** Seed */
|
|
2660
2807
|
seed?: number;
|
|
2808
|
+
/** Stop */
|
|
2809
|
+
stop?: string[];
|
|
2661
2810
|
/**
|
|
2662
2811
|
* Reasoning Effort
|
|
2663
2812
|
* @enum {string}
|
|
2664
2813
|
*/
|
|
2665
2814
|
reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
2815
|
+
/** Extra Body */
|
|
2816
|
+
extra_body?: {
|
|
2817
|
+
[key: string]: unknown;
|
|
2818
|
+
};
|
|
2666
2819
|
};
|
|
2667
2820
|
/** PromptToolChoiceNone */
|
|
2668
2821
|
PromptToolChoiceNone: {
|
|
@@ -2809,11 +2962,17 @@ export interface components {
|
|
|
2809
2962
|
top_p?: number;
|
|
2810
2963
|
/** Seed */
|
|
2811
2964
|
seed?: number;
|
|
2965
|
+
/** Stop */
|
|
2966
|
+
stop?: string[];
|
|
2812
2967
|
/**
|
|
2813
2968
|
* Reasoning Effort
|
|
2814
2969
|
* @enum {string}
|
|
2815
2970
|
*/
|
|
2816
2971
|
reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
2972
|
+
/** Extra Body */
|
|
2973
|
+
extra_body?: {
|
|
2974
|
+
[key: string]: unknown;
|
|
2975
|
+
};
|
|
2817
2976
|
};
|
|
2818
2977
|
/** ResponseBody[UpsertOrDeleteSecretsResult] */
|
|
2819
2978
|
ResponseBody_UpsertOrDeleteSecretsResult_: {
|
|
@@ -2947,6 +3106,19 @@ export interface components {
|
|
|
2947
3106
|
/** Traces */
|
|
2948
3107
|
traces: components["schemas"]["SessionTraceData"][];
|
|
2949
3108
|
};
|
|
3109
|
+
/** SessionNoteData */
|
|
3110
|
+
SessionNoteData: {
|
|
3111
|
+
/**
|
|
3112
|
+
* Session Id
|
|
3113
|
+
* @description Session ID
|
|
3114
|
+
*/
|
|
3115
|
+
session_id: string;
|
|
3116
|
+
/**
|
|
3117
|
+
* Note
|
|
3118
|
+
* @description The note text to add to the session
|
|
3119
|
+
*/
|
|
3120
|
+
note: string;
|
|
3121
|
+
};
|
|
2950
3122
|
/** SessionTraceData */
|
|
2951
3123
|
SessionTraceData: {
|
|
2952
3124
|
/** Id */
|
|
@@ -3468,6 +3640,12 @@ export interface components {
|
|
|
3468
3640
|
dataset_id: string;
|
|
3469
3641
|
/** Version Id */
|
|
3470
3642
|
version_id: string;
|
|
3643
|
+
/** Num Created Examples */
|
|
3644
|
+
num_created_examples: number;
|
|
3645
|
+
/** Num Updated Examples */
|
|
3646
|
+
num_updated_examples: number;
|
|
3647
|
+
/** Num Deleted Examples */
|
|
3648
|
+
num_deleted_examples: number;
|
|
3471
3649
|
};
|
|
3472
3650
|
/** UploadDatasetResponseBody */
|
|
3473
3651
|
UploadDatasetResponseBody: {
|
|
@@ -4173,7 +4351,7 @@ export interface operations {
|
|
|
4173
4351
|
content: {
|
|
4174
4352
|
"application/json": {
|
|
4175
4353
|
/** @enum {string} */
|
|
4176
|
-
action?: "create" | "append";
|
|
4354
|
+
action?: "create" | "append" | "update";
|
|
4177
4355
|
name: string;
|
|
4178
4356
|
description?: string;
|
|
4179
4357
|
inputs: Record<string, unknown>[];
|
|
@@ -4183,21 +4361,27 @@ export interface operations {
|
|
|
4183
4361
|
splits?: (string | string[] | null)[];
|
|
4184
4362
|
/** @description Span IDs to link examples back to spans */
|
|
4185
4363
|
span_ids?: (string | null)[];
|
|
4364
|
+
/** @description Optional example ID per example. If provided, it is used as the example's stable public ID. */
|
|
4365
|
+
example_ids?: (string | null)[];
|
|
4186
4366
|
};
|
|
4187
4367
|
"multipart/form-data": {
|
|
4188
4368
|
/** @enum {string} */
|
|
4189
|
-
action?: "create" | "append";
|
|
4369
|
+
action?: "create" | "append" | "update";
|
|
4190
4370
|
name: string;
|
|
4191
4371
|
description?: string;
|
|
4192
4372
|
"input_keys[]": string[];
|
|
4193
4373
|
"output_keys[]": string[];
|
|
4194
4374
|
"metadata_keys[]"?: string[];
|
|
4195
|
-
/** @description Column names for auto-assigning examples to splits */
|
|
4375
|
+
/** @description Deprecated: use split_key instead. Column names for auto-assigning examples to splits */
|
|
4196
4376
|
"split_keys[]"?: string[];
|
|
4377
|
+
/** @description Single column name containing split names (plain string or JSON list) per row */
|
|
4378
|
+
split_key?: string;
|
|
4197
4379
|
/** @description Column names whose object values should be flattened into their selected bucket */
|
|
4198
4380
|
"flatten_keys[]"?: string[];
|
|
4199
4381
|
/** @description Column name for span IDs to link examples back to spans */
|
|
4200
4382
|
span_id_key?: string;
|
|
4383
|
+
/** @description Column name containing stable IDs for examples. When provided, examples with matching IDs are updated in place when their content changes. */
|
|
4384
|
+
example_id_key?: string;
|
|
4201
4385
|
/** Format: binary */
|
|
4202
4386
|
file: string;
|
|
4203
4387
|
};
|
|
@@ -4222,7 +4406,7 @@ export interface operations {
|
|
|
4222
4406
|
"text/plain": string;
|
|
4223
4407
|
};
|
|
4224
4408
|
};
|
|
4225
|
-
/** @description Dataset
|
|
4409
|
+
/** @description Dataset with the given name already exists (action=create). */
|
|
4226
4410
|
409: {
|
|
4227
4411
|
headers: {
|
|
4228
4412
|
[name: string]: unknown;
|
|
@@ -4341,6 +4525,50 @@ export interface operations {
|
|
|
4341
4525
|
};
|
|
4342
4526
|
};
|
|
4343
4527
|
};
|
|
4528
|
+
getDatasetJSONL: {
|
|
4529
|
+
parameters: {
|
|
4530
|
+
query?: {
|
|
4531
|
+
/** @description The ID of the dataset version (if omitted, returns data from the latest version) */
|
|
4532
|
+
version_id?: string | null;
|
|
4533
|
+
};
|
|
4534
|
+
header?: never;
|
|
4535
|
+
path: {
|
|
4536
|
+
/** @description The ID of the dataset */
|
|
4537
|
+
id: string;
|
|
4538
|
+
};
|
|
4539
|
+
cookie?: never;
|
|
4540
|
+
};
|
|
4541
|
+
requestBody?: never;
|
|
4542
|
+
responses: {
|
|
4543
|
+
/** @description Successful Response */
|
|
4544
|
+
200: {
|
|
4545
|
+
headers: {
|
|
4546
|
+
[name: string]: unknown;
|
|
4547
|
+
};
|
|
4548
|
+
content: {
|
|
4549
|
+
"text/plain": string;
|
|
4550
|
+
};
|
|
4551
|
+
};
|
|
4552
|
+
/** @description Forbidden */
|
|
4553
|
+
403: {
|
|
4554
|
+
headers: {
|
|
4555
|
+
[name: string]: unknown;
|
|
4556
|
+
};
|
|
4557
|
+
content: {
|
|
4558
|
+
"text/plain": string;
|
|
4559
|
+
};
|
|
4560
|
+
};
|
|
4561
|
+
/** @description Invalid dataset or version ID */
|
|
4562
|
+
422: {
|
|
4563
|
+
headers: {
|
|
4564
|
+
[name: string]: unknown;
|
|
4565
|
+
};
|
|
4566
|
+
content: {
|
|
4567
|
+
"text/plain": string;
|
|
4568
|
+
};
|
|
4569
|
+
};
|
|
4570
|
+
};
|
|
4571
|
+
};
|
|
4344
4572
|
getDatasetJSONLOpenAIFineTuning: {
|
|
4345
4573
|
parameters: {
|
|
4346
4574
|
query?: {
|
|
@@ -6565,6 +6793,57 @@ export interface operations {
|
|
|
6565
6793
|
};
|
|
6566
6794
|
};
|
|
6567
6795
|
};
|
|
6796
|
+
createSessionNote: {
|
|
6797
|
+
parameters: {
|
|
6798
|
+
query?: never;
|
|
6799
|
+
header?: never;
|
|
6800
|
+
path?: never;
|
|
6801
|
+
cookie?: never;
|
|
6802
|
+
};
|
|
6803
|
+
requestBody: {
|
|
6804
|
+
content: {
|
|
6805
|
+
"application/json": components["schemas"]["CreateSessionNoteRequestBody"];
|
|
6806
|
+
};
|
|
6807
|
+
};
|
|
6808
|
+
responses: {
|
|
6809
|
+
/** @description Session note created successfully */
|
|
6810
|
+
200: {
|
|
6811
|
+
headers: {
|
|
6812
|
+
[name: string]: unknown;
|
|
6813
|
+
};
|
|
6814
|
+
content: {
|
|
6815
|
+
"application/json": components["schemas"]["CreateSessionNoteResponseBody"];
|
|
6816
|
+
};
|
|
6817
|
+
};
|
|
6818
|
+
/** @description Forbidden */
|
|
6819
|
+
403: {
|
|
6820
|
+
headers: {
|
|
6821
|
+
[name: string]: unknown;
|
|
6822
|
+
};
|
|
6823
|
+
content: {
|
|
6824
|
+
"text/plain": string;
|
|
6825
|
+
};
|
|
6826
|
+
};
|
|
6827
|
+
/** @description Session not found */
|
|
6828
|
+
404: {
|
|
6829
|
+
headers: {
|
|
6830
|
+
[name: string]: unknown;
|
|
6831
|
+
};
|
|
6832
|
+
content: {
|
|
6833
|
+
"text/plain": string;
|
|
6834
|
+
};
|
|
6835
|
+
};
|
|
6836
|
+
/** @description Validation Error */
|
|
6837
|
+
422: {
|
|
6838
|
+
headers: {
|
|
6839
|
+
[name: string]: unknown;
|
|
6840
|
+
};
|
|
6841
|
+
content: {
|
|
6842
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
6843
|
+
};
|
|
6844
|
+
};
|
|
6845
|
+
};
|
|
6846
|
+
};
|
|
6568
6847
|
annotateSpanDocuments: {
|
|
6569
6848
|
parameters: {
|
|
6570
6849
|
query?: {
|
|
@@ -91,6 +91,14 @@ export const GET_SPANS_BY_ATTRIBUTE: ParameterRequirement = {
|
|
|
91
91
|
minServerVersion: [14, 9, 0],
|
|
92
92
|
};
|
|
93
93
|
|
|
94
|
+
export const DATASET_UPLOAD_EXAMPLE_IDS: ParameterRequirement = {
|
|
95
|
+
kind: "parameter",
|
|
96
|
+
parameterName: "example_ids",
|
|
97
|
+
parameterLocation: "body",
|
|
98
|
+
route: "POST /v1/datasets/upload",
|
|
99
|
+
minServerVersion: [15, 0, 0],
|
|
100
|
+
};
|
|
101
|
+
|
|
94
102
|
/**
|
|
95
103
|
* Aggregate list of every known capability requirement.
|
|
96
104
|
*
|
|
@@ -108,4 +116,5 @@ export const ALL_REQUIREMENTS: readonly CapabilityRequirement[] = [
|
|
|
108
116
|
GET_SPANS_FILTERS,
|
|
109
117
|
GET_SPANS_BY_ATTRIBUTE,
|
|
110
118
|
LIST_PROJECT_TRACES,
|
|
119
|
+
DATASET_UPLOAD_EXAMPLE_IDS,
|
|
111
120
|
] as const;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import invariant from "tiny-invariant";
|
|
2
2
|
|
|
3
3
|
import { createClient } from "../client";
|
|
4
|
+
import { DATASET_UPLOAD_EXAMPLE_IDS } from "../constants/serverRequirements";
|
|
4
5
|
import type { ClientFn } from "../types/core";
|
|
5
6
|
import type { DatasetSelector, Example } from "../types/datasets";
|
|
7
|
+
import { ensureServerCapability } from "../utils/serverVersionUtils";
|
|
6
8
|
import { getDatasetInfo } from "./getDatasetInfo";
|
|
7
9
|
|
|
8
10
|
export type AppendDatasetExamplesParams = ClientFn & {
|
|
@@ -18,8 +20,7 @@ export type AppendDatasetExamplesParams = ClientFn & {
|
|
|
18
20
|
|
|
19
21
|
export type AppendDatasetExamplesResponse = {
|
|
20
22
|
datasetId: string;
|
|
21
|
-
|
|
22
|
-
// versionId: string;
|
|
23
|
+
versionId: string;
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
/**
|
|
@@ -36,19 +37,24 @@ export type AppendDatasetExamplesResponse = {
|
|
|
36
37
|
* - `metadata`: Optional metadata for the example
|
|
37
38
|
* - `splits`: Optional split assignment (string, array of strings, or null)
|
|
38
39
|
* - `spanId`: Optional OpenTelemetry span ID to link the example back to its source span
|
|
40
|
+
* - `id`: Optional stable ID for the example, used to reference or update it later
|
|
39
41
|
*
|
|
40
|
-
* @returns A promise that resolves to the dataset ID
|
|
42
|
+
* @returns A promise that resolves to the dataset ID and version ID
|
|
41
43
|
*
|
|
42
44
|
* @example
|
|
43
45
|
* ```ts
|
|
44
|
-
*
|
|
45
|
-
* const { datasetId } = await appendDatasetExamples({
|
|
46
|
+
* const { datasetId, versionId } = await appendDatasetExamples({
|
|
46
47
|
* dataset: { datasetName: "qa-dataset" },
|
|
47
48
|
* examples: [
|
|
48
49
|
* {
|
|
49
50
|
* input: { question: "What is deep learning?" },
|
|
50
51
|
* output: { answer: "Deep learning is..." },
|
|
51
52
|
* spanId: "span123abc" // Links to the source span
|
|
53
|
+
* },
|
|
54
|
+
* {
|
|
55
|
+
* id: "my-stable-id", // Stable ID for referencing this example later
|
|
56
|
+
* input: { question: "What is a transformer?" },
|
|
57
|
+
* output: { answer: "A transformer is..." },
|
|
52
58
|
* }
|
|
53
59
|
* ]
|
|
54
60
|
* });
|
|
@@ -73,6 +79,12 @@ export async function appendDatasetExamples({
|
|
|
73
79
|
// Only include span_ids in the request if at least one example has a span ID
|
|
74
80
|
const hasSpanIds = spanIds.some((id) => id !== null);
|
|
75
81
|
|
|
82
|
+
// Extract example IDs from examples, preserving null/undefined as null
|
|
83
|
+
const exampleIds = examples.map((example) => example?.id ?? null);
|
|
84
|
+
|
|
85
|
+
// Only include example_ids in the request if at least one example has an ID
|
|
86
|
+
const hasExampleIds = exampleIds.some((id) => id !== null);
|
|
87
|
+
|
|
76
88
|
let datasetName: string;
|
|
77
89
|
if ("datasetName" in dataset) {
|
|
78
90
|
datasetName = dataset.datasetName;
|
|
@@ -83,6 +95,12 @@ export async function appendDatasetExamples({
|
|
|
83
95
|
});
|
|
84
96
|
datasetName = datasetInfo.name;
|
|
85
97
|
}
|
|
98
|
+
if (hasExampleIds) {
|
|
99
|
+
await ensureServerCapability({
|
|
100
|
+
client,
|
|
101
|
+
requirement: DATASET_UPLOAD_EXAMPLE_IDS,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
86
104
|
const appendResponse = await client.POST("/v1/datasets/upload", {
|
|
87
105
|
params: {
|
|
88
106
|
query: {
|
|
@@ -97,11 +115,14 @@ export async function appendDatasetExamples({
|
|
|
97
115
|
metadata,
|
|
98
116
|
splits,
|
|
99
117
|
...(hasSpanIds ? { span_ids: spanIds } : {}),
|
|
118
|
+
...(hasExampleIds ? { example_ids: exampleIds } : {}),
|
|
100
119
|
},
|
|
101
120
|
});
|
|
102
121
|
invariant(appendResponse.data?.data, "Failed to append dataset examples");
|
|
103
122
|
const datasetId = appendResponse.data.data.dataset_id;
|
|
123
|
+
const versionId = appendResponse.data.data.version_id;
|
|
104
124
|
return {
|
|
105
125
|
datasetId,
|
|
126
|
+
versionId,
|
|
106
127
|
};
|
|
107
128
|
}
|