opik 1.7.13 → 1.7.15
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/{Client-B_2JOueU.d.cts → Client-CiXa7NK8.d.cts} +368 -131
- package/dist/{Client-B_2JOueU.d.ts → Client-CiXa7NK8.d.ts} +368 -131
- package/dist/chunk-J6N7IE3K.js +4 -0
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/vercel/index.cjs +4 -4
- package/dist/vercel/index.d.cts +1 -1
- package/dist/vercel/index.d.ts +1 -1
- package/dist/vercel/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-BFXGGAXO.js +0 -4
|
@@ -156,6 +156,7 @@ interface FindDatasetsRequest {
|
|
|
156
156
|
page?: number;
|
|
157
157
|
size?: number;
|
|
158
158
|
withExperimentsOnly?: boolean;
|
|
159
|
+
withOptimizationsOnly?: boolean;
|
|
159
160
|
promptId?: string;
|
|
160
161
|
name?: string;
|
|
161
162
|
sorting?: string;
|
|
@@ -306,6 +307,118 @@ interface DatasetItemStreamRequest {
|
|
|
306
307
|
steamLimit?: number;
|
|
307
308
|
}
|
|
308
309
|
|
|
310
|
+
/**
|
|
311
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
312
|
+
*/
|
|
313
|
+
type ExperimentWriteType = "regular" | "trial" | "mini-batch";
|
|
314
|
+
declare const ExperimentWriteType: {
|
|
315
|
+
readonly Regular: "regular";
|
|
316
|
+
readonly Trial: "trial";
|
|
317
|
+
readonly MiniBatch: "mini-batch";
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
322
|
+
*/
|
|
323
|
+
/**
|
|
324
|
+
* @example
|
|
325
|
+
* {}
|
|
326
|
+
*/
|
|
327
|
+
interface FindExperimentsRequest {
|
|
328
|
+
page?: number;
|
|
329
|
+
size?: number;
|
|
330
|
+
datasetId?: string;
|
|
331
|
+
optimizationId?: string;
|
|
332
|
+
types?: string;
|
|
333
|
+
name?: string;
|
|
334
|
+
datasetDeleted?: boolean;
|
|
335
|
+
promptId?: string;
|
|
336
|
+
sorting?: string;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
341
|
+
*/
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* @example
|
|
345
|
+
* {
|
|
346
|
+
* datasetName: "dataset_name"
|
|
347
|
+
* }
|
|
348
|
+
*/
|
|
349
|
+
interface ExperimentWrite {
|
|
350
|
+
id?: string;
|
|
351
|
+
datasetName: string;
|
|
352
|
+
name?: string;
|
|
353
|
+
metadata?: JsonNodeWrite;
|
|
354
|
+
type?: ExperimentWriteType;
|
|
355
|
+
optimizationId?: string;
|
|
356
|
+
promptVersion?: PromptVersionLinkWrite;
|
|
357
|
+
promptVersions?: PromptVersionLinkWrite[];
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
362
|
+
*/
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* @example
|
|
366
|
+
* {
|
|
367
|
+
* experimentItems: [{
|
|
368
|
+
* experimentId: "experiment_id",
|
|
369
|
+
* datasetItemId: "dataset_item_id",
|
|
370
|
+
* traceId: "trace_id"
|
|
371
|
+
* }]
|
|
372
|
+
* }
|
|
373
|
+
*/
|
|
374
|
+
interface ExperimentItemsBatch {
|
|
375
|
+
experimentItems: ExperimentItem[];
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
380
|
+
*/
|
|
381
|
+
/**
|
|
382
|
+
* @example
|
|
383
|
+
* {
|
|
384
|
+
* ids: ["ids"]
|
|
385
|
+
* }
|
|
386
|
+
*/
|
|
387
|
+
interface ExperimentItemsDelete {
|
|
388
|
+
ids: string[];
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
393
|
+
*/
|
|
394
|
+
/**
|
|
395
|
+
* @example
|
|
396
|
+
* {}
|
|
397
|
+
*/
|
|
398
|
+
interface FindFeedbackScoreNamesRequest {
|
|
399
|
+
experimentIds?: string;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
404
|
+
*/
|
|
405
|
+
interface ExperimentItemStreamRequest {
|
|
406
|
+
experimentName: string;
|
|
407
|
+
limit?: number;
|
|
408
|
+
lastRetrievedId?: string;
|
|
409
|
+
/** Truncate image included in either input, output or metadata */
|
|
410
|
+
truncate?: boolean;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
415
|
+
*/
|
|
416
|
+
interface ExperimentStreamRequestPublic {
|
|
417
|
+
name: string;
|
|
418
|
+
limit?: number;
|
|
419
|
+
lastRetrievedId?: string;
|
|
420
|
+
}
|
|
421
|
+
|
|
309
422
|
/**
|
|
310
423
|
* This file was auto-generated by Fern from our API Definition.
|
|
311
424
|
*/
|
|
@@ -372,6 +485,75 @@ interface ProviderApiKeyUpdate {
|
|
|
372
485
|
name?: string;
|
|
373
486
|
}
|
|
374
487
|
|
|
488
|
+
/**
|
|
489
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
490
|
+
*/
|
|
491
|
+
type OptimizationWriteStatus = "running" | "completed" | "cancelled";
|
|
492
|
+
declare const OptimizationWriteStatus: {
|
|
493
|
+
readonly Running: "running";
|
|
494
|
+
readonly Completed: "completed";
|
|
495
|
+
readonly Cancelled: "cancelled";
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
500
|
+
*/
|
|
501
|
+
type OptimizationUpdateStatus = "running" | "completed" | "cancelled";
|
|
502
|
+
declare const OptimizationUpdateStatus: {
|
|
503
|
+
readonly Running: "running";
|
|
504
|
+
readonly Completed: "completed";
|
|
505
|
+
readonly Cancelled: "cancelled";
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
510
|
+
*/
|
|
511
|
+
/**
|
|
512
|
+
* @example
|
|
513
|
+
* {}
|
|
514
|
+
*/
|
|
515
|
+
interface FindOptimizationsRequest {
|
|
516
|
+
page?: number;
|
|
517
|
+
size?: number;
|
|
518
|
+
datasetId?: string;
|
|
519
|
+
name?: string;
|
|
520
|
+
datasetDeleted?: boolean;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
525
|
+
*/
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* @example
|
|
529
|
+
* {
|
|
530
|
+
* datasetName: "dataset_name",
|
|
531
|
+
* objectiveName: "objective_name",
|
|
532
|
+
* status: "running"
|
|
533
|
+
* }
|
|
534
|
+
*/
|
|
535
|
+
interface OptimizationWrite {
|
|
536
|
+
id?: string;
|
|
537
|
+
name?: string;
|
|
538
|
+
datasetName: string;
|
|
539
|
+
objectiveName: string;
|
|
540
|
+
status: OptimizationWriteStatus;
|
|
541
|
+
metadata?: JsonNodeWrite;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
546
|
+
*/
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* @example
|
|
550
|
+
* {}
|
|
551
|
+
*/
|
|
552
|
+
interface OptimizationUpdate {
|
|
553
|
+
name?: string;
|
|
554
|
+
status?: OptimizationUpdateStatus;
|
|
555
|
+
}
|
|
556
|
+
|
|
375
557
|
/**
|
|
376
558
|
* This file was auto-generated by Fern from our API Definition.
|
|
377
559
|
*/
|
|
@@ -854,117 +1036,6 @@ interface ChatCompletionRequest {
|
|
|
854
1036
|
functionCall?: FunctionCall;
|
|
855
1037
|
}
|
|
856
1038
|
|
|
857
|
-
/**
|
|
858
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
859
|
-
*/
|
|
860
|
-
/**
|
|
861
|
-
* @example
|
|
862
|
-
* {}
|
|
863
|
-
*/
|
|
864
|
-
interface FindExperimentsRequest {
|
|
865
|
-
page?: number;
|
|
866
|
-
size?: number;
|
|
867
|
-
datasetId?: string;
|
|
868
|
-
name?: string;
|
|
869
|
-
datasetDeleted?: boolean;
|
|
870
|
-
promptId?: string;
|
|
871
|
-
sorting?: string;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
/**
|
|
875
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
876
|
-
*/
|
|
877
|
-
|
|
878
|
-
/**
|
|
879
|
-
* @example
|
|
880
|
-
* {
|
|
881
|
-
* datasetName: "dataset_name"
|
|
882
|
-
* }
|
|
883
|
-
*/
|
|
884
|
-
interface ExperimentWrite {
|
|
885
|
-
id?: string;
|
|
886
|
-
datasetName: string;
|
|
887
|
-
name?: string;
|
|
888
|
-
metadata?: JsonNodeWrite;
|
|
889
|
-
promptVersion?: PromptVersionLinkWrite;
|
|
890
|
-
promptVersions?: PromptVersionLinkWrite[];
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
/**
|
|
894
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
895
|
-
*/
|
|
896
|
-
|
|
897
|
-
/**
|
|
898
|
-
* @example
|
|
899
|
-
* {
|
|
900
|
-
* experimentItems: [{
|
|
901
|
-
* experimentId: "experiment_id",
|
|
902
|
-
* datasetItemId: "dataset_item_id",
|
|
903
|
-
* traceId: "trace_id"
|
|
904
|
-
* }]
|
|
905
|
-
* }
|
|
906
|
-
*/
|
|
907
|
-
interface ExperimentItemsBatch {
|
|
908
|
-
experimentItems: ExperimentItem[];
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
/**
|
|
912
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
913
|
-
*/
|
|
914
|
-
/**
|
|
915
|
-
* @example
|
|
916
|
-
* {
|
|
917
|
-
* ids: ["ids"]
|
|
918
|
-
* }
|
|
919
|
-
*/
|
|
920
|
-
interface ExperimentItemsDelete {
|
|
921
|
-
ids: string[];
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
/**
|
|
925
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
926
|
-
*/
|
|
927
|
-
/**
|
|
928
|
-
* @example
|
|
929
|
-
* {
|
|
930
|
-
* ids: ["ids"]
|
|
931
|
-
* }
|
|
932
|
-
*/
|
|
933
|
-
interface ExperimentsDelete {
|
|
934
|
-
ids: string[];
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
/**
|
|
938
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
939
|
-
*/
|
|
940
|
-
/**
|
|
941
|
-
* @example
|
|
942
|
-
* {}
|
|
943
|
-
*/
|
|
944
|
-
interface FindFeedbackScoreNamesRequest {
|
|
945
|
-
experimentIds?: string;
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
/**
|
|
949
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
950
|
-
*/
|
|
951
|
-
interface ExperimentItemStreamRequest {
|
|
952
|
-
experimentName: string;
|
|
953
|
-
limit?: number;
|
|
954
|
-
lastRetrievedId?: string;
|
|
955
|
-
/** Truncate image included in either input, output or metadata */
|
|
956
|
-
truncate?: boolean;
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
/**
|
|
960
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
961
|
-
*/
|
|
962
|
-
interface ExperimentStreamRequestPublic {
|
|
963
|
-
name: string;
|
|
964
|
-
limit?: number;
|
|
965
|
-
lastRetrievedId?: string;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
1039
|
/**
|
|
969
1040
|
* This file was auto-generated by Fern from our API Definition.
|
|
970
1041
|
*/
|
|
@@ -986,8 +1057,8 @@ interface ExperimentStreamRequestPublic {
|
|
|
986
1057
|
* }]
|
|
987
1058
|
* }
|
|
988
1059
|
*/
|
|
989
|
-
interface
|
|
990
|
-
guardrails:
|
|
1060
|
+
interface GuardrailBatchWrite {
|
|
1061
|
+
guardrails: GuardrailWrite[];
|
|
991
1062
|
}
|
|
992
1063
|
|
|
993
1064
|
/**
|
|
@@ -1005,6 +1076,7 @@ interface GetTracesByProjectRequest {
|
|
|
1005
1076
|
filters?: string;
|
|
1006
1077
|
truncate?: boolean;
|
|
1007
1078
|
sorting?: string;
|
|
1079
|
+
exclude?: string;
|
|
1008
1080
|
}
|
|
1009
1081
|
|
|
1010
1082
|
/**
|
|
@@ -1015,7 +1087,6 @@ interface GetTracesByProjectRequest {
|
|
|
1015
1087
|
* @example
|
|
1016
1088
|
* {
|
|
1017
1089
|
* traces: [{
|
|
1018
|
-
* name: "name",
|
|
1019
1090
|
* startTime: "2024-01-15T09:30:00Z"
|
|
1020
1091
|
* }]
|
|
1021
1092
|
* }
|
|
@@ -1037,6 +1108,7 @@ interface TraceUpdate {
|
|
|
1037
1108
|
projectName?: string;
|
|
1038
1109
|
/** If null and project_name not specified, Default Project is assumed */
|
|
1039
1110
|
projectId?: string;
|
|
1111
|
+
name?: string;
|
|
1040
1112
|
endTime?: Date;
|
|
1041
1113
|
input?: JsonNode;
|
|
1042
1114
|
output?: JsonNode;
|
|
@@ -2145,8 +2217,11 @@ interface DatasetPublic {
|
|
|
2145
2217
|
lastUpdatedBy?: string;
|
|
2146
2218
|
experimentCount?: number;
|
|
2147
2219
|
datasetItemsCount?: number;
|
|
2220
|
+
optimizationCount?: number;
|
|
2148
2221
|
mostRecentExperimentAt?: Date;
|
|
2149
2222
|
lastCreatedExperimentAt?: Date;
|
|
2223
|
+
mostRecentOptimizationAt?: Date;
|
|
2224
|
+
lastCreatedOptimizationAt?: Date;
|
|
2150
2225
|
}
|
|
2151
2226
|
|
|
2152
2227
|
/**
|
|
@@ -2290,6 +2365,13 @@ interface PromptVersionLinkWrite {
|
|
|
2290
2365
|
id: string;
|
|
2291
2366
|
}
|
|
2292
2367
|
|
|
2368
|
+
/**
|
|
2369
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2370
|
+
*/
|
|
2371
|
+
interface DeleteIdsHolder {
|
|
2372
|
+
ids: string[];
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2293
2375
|
/**
|
|
2294
2376
|
* This file was auto-generated by Fern from our API Definition.
|
|
2295
2377
|
*/
|
|
@@ -2314,6 +2396,16 @@ interface ExperimentPagePublic {
|
|
|
2314
2396
|
sortableBy?: string[];
|
|
2315
2397
|
}
|
|
2316
2398
|
|
|
2399
|
+
/**
|
|
2400
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2401
|
+
*/
|
|
2402
|
+
type ExperimentPublicType = "regular" | "trial" | "mini-batch";
|
|
2403
|
+
declare const ExperimentPublicType: {
|
|
2404
|
+
readonly Regular: "regular";
|
|
2405
|
+
readonly Trial: "trial";
|
|
2406
|
+
readonly MiniBatch: "mini-batch";
|
|
2407
|
+
};
|
|
2408
|
+
|
|
2317
2409
|
/**
|
|
2318
2410
|
* This file was auto-generated by Fern from our API Definition.
|
|
2319
2411
|
*/
|
|
@@ -2324,6 +2416,8 @@ interface ExperimentPublic {
|
|
|
2324
2416
|
datasetId?: string;
|
|
2325
2417
|
name?: string;
|
|
2326
2418
|
metadata?: JsonNodePublic;
|
|
2419
|
+
type?: ExperimentPublicType;
|
|
2420
|
+
optimizationId?: string;
|
|
2327
2421
|
feedbackScores?: FeedbackScoreAveragePublic[];
|
|
2328
2422
|
comments?: CommentPublic[];
|
|
2329
2423
|
traceCount?: number;
|
|
@@ -2564,8 +2658,8 @@ interface NumericalFeedbackDetailUpdate {
|
|
|
2564
2658
|
/**
|
|
2565
2659
|
* This file was auto-generated by Fern from our API Definition.
|
|
2566
2660
|
*/
|
|
2567
|
-
type
|
|
2568
|
-
declare const
|
|
2661
|
+
type GuardrailWriteName = "TOPIC" | "PII";
|
|
2662
|
+
declare const GuardrailWriteName: {
|
|
2569
2663
|
readonly Topic: "TOPIC";
|
|
2570
2664
|
readonly Pii: "PII";
|
|
2571
2665
|
};
|
|
@@ -2573,8 +2667,8 @@ declare const GuardrailName: {
|
|
|
2573
2667
|
/**
|
|
2574
2668
|
* This file was auto-generated by Fern from our API Definition.
|
|
2575
2669
|
*/
|
|
2576
|
-
type
|
|
2577
|
-
declare const
|
|
2670
|
+
type GuardrailWriteResult = "passed" | "failed";
|
|
2671
|
+
declare const GuardrailWriteResult: {
|
|
2578
2672
|
readonly Passed: "passed";
|
|
2579
2673
|
readonly Failed: "failed";
|
|
2580
2674
|
};
|
|
@@ -2583,14 +2677,13 @@ declare const GuardrailResult: {
|
|
|
2583
2677
|
* This file was auto-generated by Fern from our API Definition.
|
|
2584
2678
|
*/
|
|
2585
2679
|
|
|
2586
|
-
interface
|
|
2587
|
-
id?: string;
|
|
2680
|
+
interface GuardrailWrite {
|
|
2588
2681
|
entityId: string;
|
|
2589
2682
|
secondaryId: string;
|
|
2590
2683
|
/** If null, the default project is used */
|
|
2591
2684
|
projectName?: string;
|
|
2592
|
-
name:
|
|
2593
|
-
result:
|
|
2685
|
+
name: GuardrailWriteName;
|
|
2686
|
+
result: GuardrailWriteResult;
|
|
2594
2687
|
config: JsonNode;
|
|
2595
2688
|
details: JsonNode;
|
|
2596
2689
|
}
|
|
@@ -2632,6 +2725,48 @@ interface ProviderApiKeyPublic {
|
|
|
2632
2725
|
lastUpdatedBy?: string;
|
|
2633
2726
|
}
|
|
2634
2727
|
|
|
2728
|
+
/**
|
|
2729
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2730
|
+
*/
|
|
2731
|
+
|
|
2732
|
+
interface OptimizationPagePublic {
|
|
2733
|
+
page?: number;
|
|
2734
|
+
size?: number;
|
|
2735
|
+
total?: number;
|
|
2736
|
+
content?: OptimizationPublic[];
|
|
2737
|
+
sortableBy?: string[];
|
|
2738
|
+
}
|
|
2739
|
+
|
|
2740
|
+
/**
|
|
2741
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2742
|
+
*/
|
|
2743
|
+
type OptimizationPublicStatus = "running" | "completed" | "cancelled";
|
|
2744
|
+
declare const OptimizationPublicStatus: {
|
|
2745
|
+
readonly Running: "running";
|
|
2746
|
+
readonly Completed: "completed";
|
|
2747
|
+
readonly Cancelled: "cancelled";
|
|
2748
|
+
};
|
|
2749
|
+
|
|
2750
|
+
/**
|
|
2751
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2752
|
+
*/
|
|
2753
|
+
|
|
2754
|
+
interface OptimizationPublic {
|
|
2755
|
+
id?: string;
|
|
2756
|
+
name?: string;
|
|
2757
|
+
datasetName: string;
|
|
2758
|
+
objectiveName: string;
|
|
2759
|
+
status: OptimizationPublicStatus;
|
|
2760
|
+
metadata?: JsonNodePublic;
|
|
2761
|
+
datasetId?: string;
|
|
2762
|
+
numTrials?: number;
|
|
2763
|
+
feedbackScores?: FeedbackScoreAveragePublic[];
|
|
2764
|
+
createdAt?: Date;
|
|
2765
|
+
createdBy?: string;
|
|
2766
|
+
lastUpdatedAt?: Date;
|
|
2767
|
+
lastUpdatedBy?: string;
|
|
2768
|
+
}
|
|
2769
|
+
|
|
2635
2770
|
/**
|
|
2636
2771
|
* This file was auto-generated by Fern from our API Definition.
|
|
2637
2772
|
*/
|
|
@@ -3283,7 +3418,7 @@ interface Trace$1 {
|
|
|
3283
3418
|
/** If null, the default project is used */
|
|
3284
3419
|
projectName?: string;
|
|
3285
3420
|
projectId?: string;
|
|
3286
|
-
name
|
|
3421
|
+
name?: string;
|
|
3287
3422
|
startTime: Date;
|
|
3288
3423
|
endTime?: Date;
|
|
3289
3424
|
input?: JsonNode;
|
|
@@ -3314,7 +3449,7 @@ interface TraceWrite {
|
|
|
3314
3449
|
id?: string;
|
|
3315
3450
|
/** If null, the default project is used */
|
|
3316
3451
|
projectName?: string;
|
|
3317
|
-
name
|
|
3452
|
+
name?: string;
|
|
3318
3453
|
startTime: Date;
|
|
3319
3454
|
endTime?: Date;
|
|
3320
3455
|
input?: JsonNodeWrite;
|
|
@@ -3322,6 +3457,7 @@ interface TraceWrite {
|
|
|
3322
3457
|
metadata?: JsonNodeWrite;
|
|
3323
3458
|
tags?: string[];
|
|
3324
3459
|
errorInfo?: ErrorInfoWrite;
|
|
3460
|
+
lastUpdatedAt?: Date;
|
|
3325
3461
|
threadId?: string;
|
|
3326
3462
|
}
|
|
3327
3463
|
|
|
@@ -3368,7 +3504,7 @@ interface GuardrailsValidationPublic {
|
|
|
3368
3504
|
interface TracePublic {
|
|
3369
3505
|
id?: string;
|
|
3370
3506
|
projectId?: string;
|
|
3371
|
-
name
|
|
3507
|
+
name?: string;
|
|
3372
3508
|
startTime: Date;
|
|
3373
3509
|
endTime?: Date;
|
|
3374
3510
|
input?: JsonNodePublic;
|
|
@@ -4236,7 +4372,7 @@ declare class Experiments {
|
|
|
4236
4372
|
/**
|
|
4237
4373
|
* Delete experiments by id
|
|
4238
4374
|
*
|
|
4239
|
-
* @param {OpikApi.
|
|
4375
|
+
* @param {OpikApi.DeleteIdsHolder} request
|
|
4240
4376
|
* @param {Experiments.RequestOptions} requestOptions - Request-specific configuration.
|
|
4241
4377
|
*
|
|
4242
4378
|
* @example
|
|
@@ -4244,7 +4380,7 @@ declare class Experiments {
|
|
|
4244
4380
|
* ids: ["ids"]
|
|
4245
4381
|
* })
|
|
4246
4382
|
*/
|
|
4247
|
-
deleteExperimentsById(request:
|
|
4383
|
+
deleteExperimentsById(request: DeleteIdsHolder, requestOptions?: Experiments.RequestOptions): Promise<void>;
|
|
4248
4384
|
/**
|
|
4249
4385
|
* Find Feedback Score names
|
|
4250
4386
|
*
|
|
@@ -4441,7 +4577,7 @@ declare class Guardrails {
|
|
|
4441
4577
|
/**
|
|
4442
4578
|
* Batch guardrails for traces
|
|
4443
4579
|
*
|
|
4444
|
-
* @param {OpikApi.
|
|
4580
|
+
* @param {OpikApi.GuardrailBatchWrite} request
|
|
4445
4581
|
* @param {Guardrails.RequestOptions} requestOptions - Request-specific configuration.
|
|
4446
4582
|
*
|
|
4447
4583
|
* @example
|
|
@@ -4460,7 +4596,7 @@ declare class Guardrails {
|
|
|
4460
4596
|
* }]
|
|
4461
4597
|
* })
|
|
4462
4598
|
*/
|
|
4463
|
-
createGuardrails(request:
|
|
4599
|
+
createGuardrails(request: GuardrailBatchWrite, requestOptions?: Guardrails.RequestOptions): Promise<void>;
|
|
4464
4600
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
4465
4601
|
Authorization: string | undefined;
|
|
4466
4602
|
}>;
|
|
@@ -4619,6 +4755,107 @@ declare class OpenTelemetryIngestion {
|
|
|
4619
4755
|
}>;
|
|
4620
4756
|
}
|
|
4621
4757
|
|
|
4758
|
+
/**
|
|
4759
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4760
|
+
*/
|
|
4761
|
+
|
|
4762
|
+
declare namespace Optimizations {
|
|
4763
|
+
interface Options {
|
|
4764
|
+
environment?: Supplier<OpikApiEnvironment | string>;
|
|
4765
|
+
/** Specify a custom URL to connect the client to. */
|
|
4766
|
+
baseUrl?: Supplier<string>;
|
|
4767
|
+
/** Override the Authorization header */
|
|
4768
|
+
apiKey?: Supplier<string | undefined>;
|
|
4769
|
+
/** Override the Comet-Workspace header */
|
|
4770
|
+
workspaceName?: Supplier<string | undefined>;
|
|
4771
|
+
}
|
|
4772
|
+
interface RequestOptions {
|
|
4773
|
+
/** The maximum time to wait for a response in seconds. */
|
|
4774
|
+
timeoutInSeconds?: number;
|
|
4775
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
4776
|
+
maxRetries?: number;
|
|
4777
|
+
/** A hook to abort the request. */
|
|
4778
|
+
abortSignal?: AbortSignal;
|
|
4779
|
+
/** Override the Authorization header */
|
|
4780
|
+
apiKey?: string | undefined;
|
|
4781
|
+
/** Override the Comet-Workspace header */
|
|
4782
|
+
workspaceName?: string | undefined;
|
|
4783
|
+
/** Additional headers to include in the request. */
|
|
4784
|
+
headers?: Record<string, string>;
|
|
4785
|
+
}
|
|
4786
|
+
}
|
|
4787
|
+
/**
|
|
4788
|
+
* Optimization resources
|
|
4789
|
+
*/
|
|
4790
|
+
declare class Optimizations {
|
|
4791
|
+
protected readonly _options: Optimizations.Options;
|
|
4792
|
+
constructor(_options?: Optimizations.Options);
|
|
4793
|
+
/**
|
|
4794
|
+
* Find optimizations
|
|
4795
|
+
*
|
|
4796
|
+
* @param {OpikApi.FindOptimizationsRequest} request
|
|
4797
|
+
* @param {Optimizations.RequestOptions} requestOptions - Request-specific configuration.
|
|
4798
|
+
*
|
|
4799
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
4800
|
+
*
|
|
4801
|
+
* @example
|
|
4802
|
+
* await client.optimizations.findOptimizations()
|
|
4803
|
+
*/
|
|
4804
|
+
findOptimizations(request?: FindOptimizationsRequest, requestOptions?: Optimizations.RequestOptions): Promise<OptimizationPagePublic>;
|
|
4805
|
+
/**
|
|
4806
|
+
* Create optimization
|
|
4807
|
+
*
|
|
4808
|
+
* @param {OpikApi.OptimizationWrite} request
|
|
4809
|
+
* @param {Optimizations.RequestOptions} requestOptions - Request-specific configuration.
|
|
4810
|
+
*
|
|
4811
|
+
* @example
|
|
4812
|
+
* await client.optimizations.createOptimization({
|
|
4813
|
+
* datasetName: "dataset_name",
|
|
4814
|
+
* objectiveName: "objective_name",
|
|
4815
|
+
* status: "running"
|
|
4816
|
+
* })
|
|
4817
|
+
*/
|
|
4818
|
+
createOptimization(request: OptimizationWrite, requestOptions?: Optimizations.RequestOptions): Promise<void>;
|
|
4819
|
+
/**
|
|
4820
|
+
* Delete optimizations by id
|
|
4821
|
+
*
|
|
4822
|
+
* @param {OpikApi.DeleteIdsHolder} request
|
|
4823
|
+
* @param {Optimizations.RequestOptions} requestOptions - Request-specific configuration.
|
|
4824
|
+
*
|
|
4825
|
+
* @example
|
|
4826
|
+
* await client.optimizations.deleteOptimizationsById({
|
|
4827
|
+
* ids: ["ids"]
|
|
4828
|
+
* })
|
|
4829
|
+
*/
|
|
4830
|
+
deleteOptimizationsById(request: DeleteIdsHolder, requestOptions?: Optimizations.RequestOptions): Promise<void>;
|
|
4831
|
+
/**
|
|
4832
|
+
* Get optimization by id
|
|
4833
|
+
*
|
|
4834
|
+
* @param {string} id
|
|
4835
|
+
* @param {Optimizations.RequestOptions} requestOptions - Request-specific configuration.
|
|
4836
|
+
*
|
|
4837
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
4838
|
+
*
|
|
4839
|
+
* @example
|
|
4840
|
+
* await client.optimizations.getOptimizationById("id")
|
|
4841
|
+
*/
|
|
4842
|
+
getOptimizationById(id: string, requestOptions?: Optimizations.RequestOptions): Promise<OptimizationPublic>;
|
|
4843
|
+
/**
|
|
4844
|
+
* Update optimization by id
|
|
4845
|
+
*
|
|
4846
|
+
* @param {string} id
|
|
4847
|
+
* @param {OpikApi.OptimizationUpdate} request
|
|
4848
|
+
* @param {Optimizations.RequestOptions} requestOptions - Request-specific configuration.
|
|
4849
|
+
*
|
|
4850
|
+
* @example
|
|
4851
|
+
* await client.optimizations.updateOptimizationsById("id")
|
|
4852
|
+
*/
|
|
4853
|
+
updateOptimizationsById(id: string, request?: OptimizationUpdate, requestOptions?: Optimizations.RequestOptions): Promise<void>;
|
|
4854
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
4855
|
+
Authorization: string | undefined;
|
|
4856
|
+
}>;
|
|
4857
|
+
}
|
|
4858
|
+
|
|
4622
4859
|
/**
|
|
4623
4860
|
* This file was auto-generated by Fern from our API Definition.
|
|
4624
4861
|
*/
|
|
@@ -5334,7 +5571,6 @@ declare class Traces {
|
|
|
5334
5571
|
*
|
|
5335
5572
|
* @example
|
|
5336
5573
|
* await client.traces.createTrace({
|
|
5337
|
-
* name: "name",
|
|
5338
5574
|
* startTime: "2024-01-15T09:30:00Z"
|
|
5339
5575
|
* })
|
|
5340
5576
|
*/
|
|
@@ -5348,7 +5584,6 @@ declare class Traces {
|
|
|
5348
5584
|
* @example
|
|
5349
5585
|
* await client.traces.createTraces({
|
|
5350
5586
|
* traces: [{
|
|
5351
|
-
* name: "name",
|
|
5352
5587
|
* startTime: "2024-01-15T09:30:00Z"
|
|
5353
5588
|
* }]
|
|
5354
5589
|
* })
|
|
@@ -5666,6 +5901,7 @@ declare class OpikApiClient {
|
|
|
5666
5901
|
protected _guardrails: Guardrails | undefined;
|
|
5667
5902
|
protected _llmProviderKey: LlmProviderKey | undefined;
|
|
5668
5903
|
protected _openTelemetryIngestion: OpenTelemetryIngestion | undefined;
|
|
5904
|
+
protected _optimizations: Optimizations | undefined;
|
|
5669
5905
|
protected _projects: Projects | undefined;
|
|
5670
5906
|
protected _prompts: Prompts | undefined;
|
|
5671
5907
|
protected _serviceToggles: ServiceToggles | undefined;
|
|
@@ -5684,6 +5920,7 @@ declare class OpikApiClient {
|
|
|
5684
5920
|
get guardrails(): Guardrails;
|
|
5685
5921
|
get llmProviderKey(): LlmProviderKey;
|
|
5686
5922
|
get openTelemetryIngestion(): OpenTelemetryIngestion;
|
|
5923
|
+
get optimizations(): Optimizations;
|
|
5687
5924
|
get projects(): Projects;
|
|
5688
5925
|
get prompts(): Prompts;
|
|
5689
5926
|
get serviceToggles(): ServiceToggles;
|