opik 1.9.33 → 1.9.36

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/index.d.ts CHANGED
@@ -434,6 +434,7 @@ interface GetDatasetExperimentItemsStatsRequest {
434
434
  interface GetDatasetItemsRequest {
435
435
  page?: number;
436
436
  size?: number;
437
+ version?: string;
437
438
  filters?: string;
438
439
  truncate?: boolean;
439
440
  }
@@ -2339,6 +2340,47 @@ interface LlmAsJudgeOutputSchema {
2339
2340
  description: string;
2340
2341
  }
2341
2342
 
2343
+ /**
2344
+ * This file was auto-generated by Fern from our API Definition.
2345
+ */
2346
+ type SpanFilterOperator = "contains" | "not_contains" | "starts_with" | "ends_with" | "=" | "!=" | ">" | ">=" | "<" | "<=" | "is_empty" | "is_not_empty";
2347
+ declare const SpanFilterOperator: {
2348
+ readonly Contains: "contains";
2349
+ readonly NotContains: "not_contains";
2350
+ readonly StartsWith: "starts_with";
2351
+ readonly EndsWith: "ends_with";
2352
+ readonly EqualTo: "=";
2353
+ readonly NotEquals: "!=";
2354
+ readonly GreaterThan: ">";
2355
+ readonly GreaterThanOrEqualTo: ">=";
2356
+ readonly LessThan: "<";
2357
+ readonly LessThanOrEqualTo: "<=";
2358
+ readonly IsEmpty: "is_empty";
2359
+ readonly IsNotEmpty: "is_not_empty";
2360
+ };
2361
+
2362
+ /**
2363
+ * This file was auto-generated by Fern from our API Definition.
2364
+ */
2365
+
2366
+ interface SpanFilter {
2367
+ field?: string;
2368
+ operator?: SpanFilterOperator;
2369
+ key?: string;
2370
+ value?: string;
2371
+ }
2372
+
2373
+ /**
2374
+ * This file was auto-generated by Fern from our API Definition.
2375
+ */
2376
+
2377
+ interface SpanLlmAsJudgeCode {
2378
+ model: LlmAsJudgeModelParameters;
2379
+ messages: LlmAsJudgeMessage[];
2380
+ variables: Record<string, string>;
2381
+ schema: LlmAsJudgeOutputSchema[];
2382
+ }
2383
+
2342
2384
  /**
2343
2385
  * This file was auto-generated by Fern from our API Definition.
2344
2386
  */
@@ -2369,6 +2411,36 @@ interface TraceFilter {
2369
2411
  value?: string;
2370
2412
  }
2371
2413
 
2414
+ /**
2415
+ * This file was auto-generated by Fern from our API Definition.
2416
+ */
2417
+ type TraceThreadFilterOperator = "contains" | "not_contains" | "starts_with" | "ends_with" | "=" | "!=" | ">" | ">=" | "<" | "<=" | "is_empty" | "is_not_empty";
2418
+ declare const TraceThreadFilterOperator: {
2419
+ readonly Contains: "contains";
2420
+ readonly NotContains: "not_contains";
2421
+ readonly StartsWith: "starts_with";
2422
+ readonly EndsWith: "ends_with";
2423
+ readonly EqualTo: "=";
2424
+ readonly NotEquals: "!=";
2425
+ readonly GreaterThan: ">";
2426
+ readonly GreaterThanOrEqualTo: ">=";
2427
+ readonly LessThan: "<";
2428
+ readonly LessThanOrEqualTo: "<=";
2429
+ readonly IsEmpty: "is_empty";
2430
+ readonly IsNotEmpty: "is_not_empty";
2431
+ };
2432
+
2433
+ /**
2434
+ * This file was auto-generated by Fern from our API Definition.
2435
+ */
2436
+
2437
+ interface TraceThreadFilter {
2438
+ field?: string;
2439
+ operator?: TraceThreadFilterOperator;
2440
+ key?: string;
2441
+ value?: string;
2442
+ }
2443
+
2372
2444
  /**
2373
2445
  * This file was auto-generated by Fern from our API Definition.
2374
2446
  */
@@ -2406,14 +2478,25 @@ interface VideoUrl {
2406
2478
  */
2407
2479
 
2408
2480
  interface AutomationRuleEvaluatorLlmAsJudgeWrite {
2481
+ filters?: TraceFilterWrite[];
2409
2482
  code?: LlmAsJudgeCodeWrite;
2410
2483
  }
2411
2484
 
2485
+ /**
2486
+ * This file was auto-generated by Fern from our API Definition.
2487
+ */
2488
+
2489
+ interface AutomationRuleEvaluatorSpanLlmAsJudgeWrite {
2490
+ filters?: SpanFilterWrite[];
2491
+ code?: SpanLlmAsJudgeCodeWrite;
2492
+ }
2493
+
2412
2494
  /**
2413
2495
  * This file was auto-generated by Fern from our API Definition.
2414
2496
  */
2415
2497
 
2416
2498
  interface AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite {
2499
+ filters?: TraceThreadFilterWrite[];
2417
2500
  code?: TraceThreadLlmAsJudgeCodeWrite;
2418
2501
  }
2419
2502
 
@@ -2422,6 +2505,7 @@ interface AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite {
2422
2505
  */
2423
2506
 
2424
2507
  interface AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite {
2508
+ filters?: TraceThreadFilterWrite[];
2425
2509
  code?: TraceThreadUserDefinedMetricPythonCodeWrite;
2426
2510
  }
2427
2511
 
@@ -2430,6 +2514,7 @@ interface AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite {
2430
2514
  */
2431
2515
 
2432
2516
  interface AutomationRuleEvaluatorUserDefinedMetricPythonWrite {
2517
+ filters?: TraceFilterWrite[];
2433
2518
  code?: UserDefinedMetricPythonCodeWrite;
2434
2519
  }
2435
2520
 
@@ -2437,7 +2522,7 @@ interface AutomationRuleEvaluatorUserDefinedMetricPythonWrite {
2437
2522
  * This file was auto-generated by Fern from our API Definition.
2438
2523
  */
2439
2524
 
2440
- type AutomationRuleEvaluatorWrite = AutomationRuleEvaluatorWrite.LlmAsJudge | AutomationRuleEvaluatorWrite.UserDefinedMetricPython | AutomationRuleEvaluatorWrite.TraceThreadLlmAsJudge | AutomationRuleEvaluatorWrite.TraceThreadUserDefinedMetricPython;
2525
+ type AutomationRuleEvaluatorWrite = AutomationRuleEvaluatorWrite.LlmAsJudge | AutomationRuleEvaluatorWrite.UserDefinedMetricPython | AutomationRuleEvaluatorWrite.TraceThreadLlmAsJudge | AutomationRuleEvaluatorWrite.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorWrite.SpanLlmAsJudge;
2441
2526
  declare namespace AutomationRuleEvaluatorWrite {
2442
2527
  interface LlmAsJudge extends AutomationRuleEvaluatorLlmAsJudgeWrite, _Base {
2443
2528
  type: "llm_as_judge";
@@ -2451,12 +2536,14 @@ declare namespace AutomationRuleEvaluatorWrite {
2451
2536
  interface TraceThreadUserDefinedMetricPython extends AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite, _Base {
2452
2537
  type: "trace_thread_user_defined_metric_python";
2453
2538
  }
2539
+ interface SpanLlmAsJudge extends AutomationRuleEvaluatorSpanLlmAsJudgeWrite, _Base {
2540
+ type: "span_llm_as_judge";
2541
+ }
2454
2542
  interface _Base {
2455
2543
  projectId: string;
2456
2544
  name: string;
2457
2545
  samplingRate?: number;
2458
2546
  enabled?: boolean;
2459
- filters?: TraceFilterWrite[];
2460
2547
  action: "evaluator";
2461
2548
  }
2462
2549
  }
@@ -2551,6 +2638,47 @@ interface LlmAsJudgeOutputSchemaWrite {
2551
2638
  description: string;
2552
2639
  }
2553
2640
 
2641
+ /**
2642
+ * This file was auto-generated by Fern from our API Definition.
2643
+ */
2644
+ type SpanFilterWriteOperator = "contains" | "not_contains" | "starts_with" | "ends_with" | "=" | "!=" | ">" | ">=" | "<" | "<=" | "is_empty" | "is_not_empty";
2645
+ declare const SpanFilterWriteOperator: {
2646
+ readonly Contains: "contains";
2647
+ readonly NotContains: "not_contains";
2648
+ readonly StartsWith: "starts_with";
2649
+ readonly EndsWith: "ends_with";
2650
+ readonly EqualTo: "=";
2651
+ readonly NotEquals: "!=";
2652
+ readonly GreaterThan: ">";
2653
+ readonly GreaterThanOrEqualTo: ">=";
2654
+ readonly LessThan: "<";
2655
+ readonly LessThanOrEqualTo: "<=";
2656
+ readonly IsEmpty: "is_empty";
2657
+ readonly IsNotEmpty: "is_not_empty";
2658
+ };
2659
+
2660
+ /**
2661
+ * This file was auto-generated by Fern from our API Definition.
2662
+ */
2663
+
2664
+ interface SpanFilterWrite {
2665
+ field?: string;
2666
+ operator?: SpanFilterWriteOperator;
2667
+ key?: string;
2668
+ value?: string;
2669
+ }
2670
+
2671
+ /**
2672
+ * This file was auto-generated by Fern from our API Definition.
2673
+ */
2674
+
2675
+ interface SpanLlmAsJudgeCodeWrite {
2676
+ model: LlmAsJudgeModelParametersWrite;
2677
+ messages: LlmAsJudgeMessageWrite[];
2678
+ variables: Record<string, string>;
2679
+ schema: LlmAsJudgeOutputSchemaWrite[];
2680
+ }
2681
+
2554
2682
  /**
2555
2683
  * This file was auto-generated by Fern from our API Definition.
2556
2684
  */
@@ -2581,6 +2709,36 @@ interface TraceFilterWrite {
2581
2709
  value?: string;
2582
2710
  }
2583
2711
 
2712
+ /**
2713
+ * This file was auto-generated by Fern from our API Definition.
2714
+ */
2715
+ type TraceThreadFilterWriteOperator = "contains" | "not_contains" | "starts_with" | "ends_with" | "=" | "!=" | ">" | ">=" | "<" | "<=" | "is_empty" | "is_not_empty";
2716
+ declare const TraceThreadFilterWriteOperator: {
2717
+ readonly Contains: "contains";
2718
+ readonly NotContains: "not_contains";
2719
+ readonly StartsWith: "starts_with";
2720
+ readonly EndsWith: "ends_with";
2721
+ readonly EqualTo: "=";
2722
+ readonly NotEquals: "!=";
2723
+ readonly GreaterThan: ">";
2724
+ readonly GreaterThanOrEqualTo: ">=";
2725
+ readonly LessThan: "<";
2726
+ readonly LessThanOrEqualTo: "<=";
2727
+ readonly IsEmpty: "is_empty";
2728
+ readonly IsNotEmpty: "is_not_empty";
2729
+ };
2730
+
2731
+ /**
2732
+ * This file was auto-generated by Fern from our API Definition.
2733
+ */
2734
+
2735
+ interface TraceThreadFilterWrite {
2736
+ field?: string;
2737
+ operator?: TraceThreadFilterWriteOperator;
2738
+ key?: string;
2739
+ value?: string;
2740
+ }
2741
+
2584
2742
  /**
2585
2743
  * This file was auto-generated by Fern from our API Definition.
2586
2744
  */
@@ -2618,6 +2776,7 @@ interface VideoUrlWrite {
2618
2776
  */
2619
2777
 
2620
2778
  interface AutomationRuleEvaluatorLlmAsJudgePublic {
2779
+ filters?: TraceFilterPublic[];
2621
2780
  code?: LlmAsJudgeCodePublic;
2622
2781
  }
2623
2782
 
@@ -2625,8 +2784,8 @@ interface AutomationRuleEvaluatorLlmAsJudgePublic {
2625
2784
  * This file was auto-generated by Fern from our API Definition.
2626
2785
  */
2627
2786
 
2628
- type AutomationRuleEvaluatorObjectPublic = AutomationRuleEvaluatorObjectPublic.LlmAsJudge | AutomationRuleEvaluatorObjectPublic.UserDefinedMetricPython | AutomationRuleEvaluatorObjectPublic.TraceThreadLlmAsJudge | AutomationRuleEvaluatorObjectPublic.TraceThreadUserDefinedMetricPython;
2629
- declare namespace AutomationRuleEvaluatorObjectPublic {
2787
+ type AutomationRuleEvaluatorObjectObjectPublic = AutomationRuleEvaluatorObjectObjectPublic.LlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic.UserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic.TraceThreadLlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic.SpanLlmAsJudge;
2788
+ declare namespace AutomationRuleEvaluatorObjectObjectPublic {
2630
2789
  interface LlmAsJudge extends AutomationRuleEvaluatorLlmAsJudgePublic, _Base {
2631
2790
  type: "llm_as_judge";
2632
2791
  }
@@ -2639,6 +2798,9 @@ declare namespace AutomationRuleEvaluatorObjectPublic {
2639
2798
  interface TraceThreadUserDefinedMetricPython extends AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic, _Base {
2640
2799
  type: "trace_thread_user_defined_metric_python";
2641
2800
  }
2801
+ interface SpanLlmAsJudge extends AutomationRuleEvaluatorSpanLlmAsJudgePublic, _Base {
2802
+ type: "span_llm_as_judge";
2803
+ }
2642
2804
  interface _Base {
2643
2805
  id?: string;
2644
2806
  projectId: string;
@@ -2646,7 +2808,6 @@ declare namespace AutomationRuleEvaluatorObjectPublic {
2646
2808
  name: string;
2647
2809
  samplingRate?: number;
2648
2810
  enabled?: boolean;
2649
- filters?: TraceFilterPublic[];
2650
2811
  createdAt?: Date;
2651
2812
  createdBy?: string;
2652
2813
  lastUpdatedAt?: Date;
@@ -2663,15 +2824,25 @@ interface AutomationRuleEvaluatorPagePublic {
2663
2824
  page?: number;
2664
2825
  size?: number;
2665
2826
  total?: number;
2666
- content?: AutomationRuleEvaluatorObjectPublic[];
2827
+ content?: AutomationRuleEvaluatorObjectObjectPublic[];
2667
2828
  sortableBy?: string[];
2668
2829
  }
2669
2830
 
2831
+ /**
2832
+ * This file was auto-generated by Fern from our API Definition.
2833
+ */
2834
+
2835
+ interface AutomationRuleEvaluatorSpanLlmAsJudgePublic {
2836
+ filters?: SpanFilterPublic[];
2837
+ code?: SpanLlmAsJudgeCodePublic;
2838
+ }
2839
+
2670
2840
  /**
2671
2841
  * This file was auto-generated by Fern from our API Definition.
2672
2842
  */
2673
2843
 
2674
2844
  interface AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic {
2845
+ filters?: TraceThreadFilterPublic[];
2675
2846
  code?: TraceThreadLlmAsJudgeCodePublic;
2676
2847
  }
2677
2848
 
@@ -2680,6 +2851,7 @@ interface AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic {
2680
2851
  */
2681
2852
 
2682
2853
  interface AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic {
2854
+ filters?: TraceThreadFilterPublic[];
2683
2855
  code?: TraceThreadUserDefinedMetricPythonCodePublic;
2684
2856
  }
2685
2857
 
@@ -2688,6 +2860,7 @@ interface AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic {
2688
2860
  */
2689
2861
 
2690
2862
  interface AutomationRuleEvaluatorUserDefinedMetricPythonPublic {
2863
+ filters?: TraceFilterPublic[];
2691
2864
  code?: UserDefinedMetricPythonCodePublic;
2692
2865
  }
2693
2866
 
@@ -2781,6 +2954,47 @@ interface LlmAsJudgeOutputSchemaPublic {
2781
2954
  description: string;
2782
2955
  }
2783
2956
 
2957
+ /**
2958
+ * This file was auto-generated by Fern from our API Definition.
2959
+ */
2960
+ type SpanFilterPublicOperator = "contains" | "not_contains" | "starts_with" | "ends_with" | "=" | "!=" | ">" | ">=" | "<" | "<=" | "is_empty" | "is_not_empty";
2961
+ declare const SpanFilterPublicOperator: {
2962
+ readonly Contains: "contains";
2963
+ readonly NotContains: "not_contains";
2964
+ readonly StartsWith: "starts_with";
2965
+ readonly EndsWith: "ends_with";
2966
+ readonly EqualTo: "=";
2967
+ readonly NotEquals: "!=";
2968
+ readonly GreaterThan: ">";
2969
+ readonly GreaterThanOrEqualTo: ">=";
2970
+ readonly LessThan: "<";
2971
+ readonly LessThanOrEqualTo: "<=";
2972
+ readonly IsEmpty: "is_empty";
2973
+ readonly IsNotEmpty: "is_not_empty";
2974
+ };
2975
+
2976
+ /**
2977
+ * This file was auto-generated by Fern from our API Definition.
2978
+ */
2979
+
2980
+ interface SpanFilterPublic {
2981
+ field?: string;
2982
+ operator?: SpanFilterPublicOperator;
2983
+ key?: string;
2984
+ value?: string;
2985
+ }
2986
+
2987
+ /**
2988
+ * This file was auto-generated by Fern from our API Definition.
2989
+ */
2990
+
2991
+ interface SpanLlmAsJudgeCodePublic {
2992
+ model: LlmAsJudgeModelParametersPublic;
2993
+ messages: LlmAsJudgeMessagePublic[];
2994
+ variables: Record<string, string>;
2995
+ schema: LlmAsJudgeOutputSchemaPublic[];
2996
+ }
2997
+
2784
2998
  /**
2785
2999
  * This file was auto-generated by Fern from our API Definition.
2786
3000
  */
@@ -2811,6 +3025,36 @@ interface TraceFilterPublic {
2811
3025
  value?: string;
2812
3026
  }
2813
3027
 
3028
+ /**
3029
+ * This file was auto-generated by Fern from our API Definition.
3030
+ */
3031
+ type TraceThreadFilterPublicOperator = "contains" | "not_contains" | "starts_with" | "ends_with" | "=" | "!=" | ">" | ">=" | "<" | "<=" | "is_empty" | "is_not_empty";
3032
+ declare const TraceThreadFilterPublicOperator: {
3033
+ readonly Contains: "contains";
3034
+ readonly NotContains: "not_contains";
3035
+ readonly StartsWith: "starts_with";
3036
+ readonly EndsWith: "ends_with";
3037
+ readonly EqualTo: "=";
3038
+ readonly NotEquals: "!=";
3039
+ readonly GreaterThan: ">";
3040
+ readonly GreaterThanOrEqualTo: ">=";
3041
+ readonly LessThan: "<";
3042
+ readonly LessThanOrEqualTo: "<=";
3043
+ readonly IsEmpty: "is_empty";
3044
+ readonly IsNotEmpty: "is_not_empty";
3045
+ };
3046
+
3047
+ /**
3048
+ * This file was auto-generated by Fern from our API Definition.
3049
+ */
3050
+
3051
+ interface TraceThreadFilterPublic {
3052
+ field?: string;
3053
+ operator?: TraceThreadFilterPublicOperator;
3054
+ key?: string;
3055
+ value?: string;
3056
+ }
3057
+
2814
3058
  /**
2815
3059
  * This file was auto-generated by Fern from our API Definition.
2816
3060
  */
@@ -2847,7 +3091,7 @@ interface VideoUrlPublic {
2847
3091
  * This file was auto-generated by Fern from our API Definition.
2848
3092
  */
2849
3093
 
2850
- type AutomationRuleEvaluatorPublic = AutomationRuleEvaluatorPublic.LlmAsJudge | AutomationRuleEvaluatorPublic.UserDefinedMetricPython | AutomationRuleEvaluatorPublic.TraceThreadLlmAsJudge | AutomationRuleEvaluatorPublic.TraceThreadUserDefinedMetricPython;
3094
+ type AutomationRuleEvaluatorPublic = AutomationRuleEvaluatorPublic.LlmAsJudge | AutomationRuleEvaluatorPublic.UserDefinedMetricPython | AutomationRuleEvaluatorPublic.TraceThreadLlmAsJudge | AutomationRuleEvaluatorPublic.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorPublic.SpanLlmAsJudge;
2851
3095
  declare namespace AutomationRuleEvaluatorPublic {
2852
3096
  interface LlmAsJudge extends AutomationRuleEvaluatorLlmAsJudgePublic, _Base {
2853
3097
  type: "llm_as_judge";
@@ -2861,6 +3105,9 @@ declare namespace AutomationRuleEvaluatorPublic {
2861
3105
  interface TraceThreadUserDefinedMetricPython extends AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic, _Base {
2862
3106
  type: "trace_thread_user_defined_metric_python";
2863
3107
  }
3108
+ interface SpanLlmAsJudge extends AutomationRuleEvaluatorSpanLlmAsJudgePublic, _Base {
3109
+ type: "span_llm_as_judge";
3110
+ }
2864
3111
  interface _Base {
2865
3112
  id?: string;
2866
3113
  projectId: string;
@@ -2868,7 +3115,6 @@ declare namespace AutomationRuleEvaluatorPublic {
2868
3115
  name: string;
2869
3116
  samplingRate?: number;
2870
3117
  enabled?: boolean;
2871
- filters?: TraceFilterPublic[];
2872
3118
  createdAt?: Date;
2873
3119
  createdBy?: string;
2874
3120
  lastUpdatedAt?: Date;
@@ -2916,7 +3162,7 @@ interface LogPage {
2916
3162
  * This file was auto-generated by Fern from our API Definition.
2917
3163
  */
2918
3164
 
2919
- type AutomationRuleEvaluatorUpdate = AutomationRuleEvaluatorUpdate.LlmAsJudge | AutomationRuleEvaluatorUpdate.UserDefinedMetricPython | AutomationRuleEvaluatorUpdate.TraceThreadLlmAsJudge | AutomationRuleEvaluatorUpdate.TraceThreadUserDefinedMetricPython;
3165
+ type AutomationRuleEvaluatorUpdate = AutomationRuleEvaluatorUpdate.LlmAsJudge | AutomationRuleEvaluatorUpdate.UserDefinedMetricPython | AutomationRuleEvaluatorUpdate.TraceThreadLlmAsJudge | AutomationRuleEvaluatorUpdate.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorUpdate.SpanLlmAsJudge;
2920
3166
  declare namespace AutomationRuleEvaluatorUpdate {
2921
3167
  interface LlmAsJudge extends AutomationRuleEvaluatorUpdateLlmAsJudge, _Base {
2922
3168
  type: "llm_as_judge";
@@ -2930,11 +3176,13 @@ declare namespace AutomationRuleEvaluatorUpdate {
2930
3176
  interface TraceThreadUserDefinedMetricPython extends AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython, _Base {
2931
3177
  type: "trace_thread_user_defined_metric_python";
2932
3178
  }
3179
+ interface SpanLlmAsJudge extends AutomationRuleEvaluatorUpdateSpanLlmAsJudge, _Base {
3180
+ type: "span_llm_as_judge";
3181
+ }
2933
3182
  interface _Base {
2934
3183
  name: string;
2935
3184
  samplingRate?: number;
2936
3185
  enabled?: boolean;
2937
- filters?: TraceFilter[];
2938
3186
  projectId: string;
2939
3187
  action: "evaluator";
2940
3188
  }
@@ -2945,14 +3193,25 @@ declare namespace AutomationRuleEvaluatorUpdate {
2945
3193
  */
2946
3194
 
2947
3195
  interface AutomationRuleEvaluatorUpdateLlmAsJudge {
3196
+ filters?: TraceFilter[];
2948
3197
  code?: LlmAsJudgeCode;
2949
3198
  }
2950
3199
 
3200
+ /**
3201
+ * This file was auto-generated by Fern from our API Definition.
3202
+ */
3203
+
3204
+ interface AutomationRuleEvaluatorUpdateSpanLlmAsJudge {
3205
+ filters?: SpanFilter[];
3206
+ code?: SpanLlmAsJudgeCode;
3207
+ }
3208
+
2951
3209
  /**
2952
3210
  * This file was auto-generated by Fern from our API Definition.
2953
3211
  */
2954
3212
 
2955
3213
  interface AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge {
3214
+ filters?: TraceThreadFilter[];
2956
3215
  code?: TraceThreadLlmAsJudgeCode;
2957
3216
  }
2958
3217
 
@@ -2961,6 +3220,7 @@ interface AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge {
2961
3220
  */
2962
3221
 
2963
3222
  interface AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython {
3223
+ filters?: TraceThreadFilter[];
2964
3224
  code?: TraceThreadUserDefinedMetricPythonCode;
2965
3225
  }
2966
3226
 
@@ -2969,6 +3229,7 @@ interface AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython {
2969
3229
  */
2970
3230
 
2971
3231
  interface AutomationRuleEvaluatorUpdateUserDefinedMetricPython {
3232
+ filters?: TraceFilter[];
2972
3233
  code?: UserDefinedMetricPythonCode;
2973
3234
  }
2974
3235
 
@@ -3244,6 +3505,7 @@ declare const DatasetItemSource: {
3244
3505
 
3245
3506
  interface DatasetItem {
3246
3507
  id?: string;
3508
+ draftItemId?: string;
3247
3509
  traceId?: string;
3248
3510
  spanId?: string;
3249
3511
  source: DatasetItemSource;
@@ -3341,6 +3603,8 @@ interface ValueEntry {
3341
3603
  categoryName?: string;
3342
3604
  source?: ValueEntrySource;
3343
3605
  lastUpdatedAt?: Date;
3606
+ spanType?: string;
3607
+ spanId?: string;
3344
3608
  }
3345
3609
 
3346
3610
  /**
@@ -3478,6 +3742,7 @@ declare const DatasetItemCompareSource: {
3478
3742
 
3479
3743
  interface DatasetItemCompare {
3480
3744
  id?: string;
3745
+ draftItemId?: string;
3481
3746
  traceId?: string;
3482
3747
  spanId?: string;
3483
3748
  source: DatasetItemCompareSource;
@@ -3575,6 +3840,8 @@ interface ValueEntryCompare {
3575
3840
  categoryName?: string;
3576
3841
  source?: ValueEntryCompareSource;
3577
3842
  lastUpdatedAt?: Date;
3843
+ spanType?: string;
3844
+ spanId?: string;
3578
3845
  }
3579
3846
 
3580
3847
  /**
@@ -3709,6 +3976,7 @@ declare const DatasetItemPublicSource: {
3709
3976
 
3710
3977
  interface DatasetItemPublic {
3711
3978
  id?: string;
3979
+ draftItemId?: string;
3712
3980
  traceId?: string;
3713
3981
  spanId?: string;
3714
3982
  source: DatasetItemPublicSource;
@@ -3818,6 +4086,26 @@ interface PageColumns {
3818
4086
  columns?: Column[];
3819
4087
  }
3820
4088
 
4089
+ /**
4090
+ * This file was auto-generated by Fern from our API Definition.
4091
+ */
4092
+
4093
+ interface DatasetVersionDiff {
4094
+ fromVersion?: string;
4095
+ toVersion?: string;
4096
+ statistics?: DatasetVersionDiffStats;
4097
+ }
4098
+
4099
+ /**
4100
+ * This file was auto-generated by Fern from our API Definition.
4101
+ */
4102
+ interface DatasetVersionDiffStats {
4103
+ itemsAdded?: number;
4104
+ itemsModified?: number;
4105
+ itemsDeleted?: number;
4106
+ itemsUnchanged?: number;
4107
+ }
4108
+
3821
4109
  /**
3822
4110
  * This file was auto-generated by Fern from our API Definition.
3823
4111
  */
@@ -4014,6 +4302,8 @@ interface Trace$1 {
4014
4302
  createdBy?: string;
4015
4303
  lastUpdatedBy?: string;
4016
4304
  feedbackScores?: FeedbackScore[];
4305
+ /** Aggregated feedback scores from all spans in this trace, averaged by score name */
4306
+ spanFeedbackScores?: FeedbackScore[];
4017
4307
  comments?: Comment[];
4018
4308
  guardrailsValidations?: GuardrailsValidation[];
4019
4309
  totalEstimatedCost?: number;
@@ -4159,6 +4449,8 @@ interface ValueEntryExperimentItemBulkWriteView {
4159
4449
  categoryName?: string;
4160
4450
  source?: ValueEntryExperimentItemBulkWriteViewSource;
4161
4451
  lastUpdatedAt?: Date;
4452
+ spanType?: string;
4453
+ spanId?: string;
4162
4454
  }
4163
4455
 
4164
4456
  /**
@@ -4874,36 +5166,6 @@ interface ResultsNumberPublic {
4874
5166
  data?: DataPointNumberPublic[];
4875
5167
  }
4876
5168
 
4877
- /**
4878
- * This file was auto-generated by Fern from our API Definition.
4879
- */
4880
- type TraceThreadFilterPublicOperator = "contains" | "not_contains" | "starts_with" | "ends_with" | "=" | "!=" | ">" | ">=" | "<" | "<=" | "is_empty" | "is_not_empty";
4881
- declare const TraceThreadFilterPublicOperator: {
4882
- readonly Contains: "contains";
4883
- readonly NotContains: "not_contains";
4884
- readonly StartsWith: "starts_with";
4885
- readonly EndsWith: "ends_with";
4886
- readonly EqualTo: "=";
4887
- readonly NotEquals: "!=";
4888
- readonly GreaterThan: ">";
4889
- readonly GreaterThanOrEqualTo: ">=";
4890
- readonly LessThan: "<";
4891
- readonly LessThanOrEqualTo: "<=";
4892
- readonly IsEmpty: "is_empty";
4893
- readonly IsNotEmpty: "is_not_empty";
4894
- };
4895
-
4896
- /**
4897
- * This file was auto-generated by Fern from our API Definition.
4898
- */
4899
-
4900
- interface TraceThreadFilterPublic {
4901
- field?: string;
4902
- operator?: TraceThreadFilterPublicOperator;
4903
- key?: string;
4904
- value?: string;
4905
- }
4906
-
4907
5169
  /**
4908
5170
  * This file was auto-generated by Fern from our API Definition.
4909
5171
  */
@@ -5108,6 +5370,7 @@ interface PromptPublic {
5108
5370
  interface ServiceTogglesConfig {
5109
5371
  pythonEvaluatorEnabled: boolean;
5110
5372
  traceThreadPythonEvaluatorEnabled: boolean;
5373
+ spanLlmAsJudgeEnabled: boolean;
5111
5374
  guardrailsEnabled: boolean;
5112
5375
  opikAiEnabled: boolean;
5113
5376
  alertsEnabled: boolean;
@@ -5230,6 +5493,9 @@ declare const FeedbackScorePublicSource: {
5230
5493
  * This file was auto-generated by Fern from our API Definition.
5231
5494
  */
5232
5495
 
5496
+ /**
5497
+ * Aggregated feedback scores from all spans in this trace, averaged by score name
5498
+ */
5233
5499
  interface FeedbackScorePublic {
5234
5500
  name: string;
5235
5501
  categoryName?: string;
@@ -5309,6 +5575,8 @@ interface ValueEntryPublic {
5309
5575
  categoryName?: string;
5310
5576
  source?: ValueEntryPublicSource;
5311
5577
  lastUpdatedAt?: Date;
5578
+ spanType?: string;
5579
+ spanId?: string;
5312
5580
  }
5313
5581
 
5314
5582
  /**
@@ -5358,36 +5626,6 @@ interface FeedbackScoreBatchItem {
5358
5626
  id: string;
5359
5627
  }
5360
5628
 
5361
- /**
5362
- * This file was auto-generated by Fern from our API Definition.
5363
- */
5364
- type SpanFilterPublicOperator = "contains" | "not_contains" | "starts_with" | "ends_with" | "=" | "!=" | ">" | ">=" | "<" | "<=" | "is_empty" | "is_not_empty";
5365
- declare const SpanFilterPublicOperator: {
5366
- readonly Contains: "contains";
5367
- readonly NotContains: "not_contains";
5368
- readonly StartsWith: "starts_with";
5369
- readonly EndsWith: "ends_with";
5370
- readonly EqualTo: "=";
5371
- readonly NotEquals: "!=";
5372
- readonly GreaterThan: ">";
5373
- readonly GreaterThanOrEqualTo: ">=";
5374
- readonly LessThan: "<";
5375
- readonly LessThanOrEqualTo: "<=";
5376
- readonly IsEmpty: "is_empty";
5377
- readonly IsNotEmpty: "is_not_empty";
5378
- };
5379
-
5380
- /**
5381
- * This file was auto-generated by Fern from our API Definition.
5382
- */
5383
-
5384
- interface SpanFilterPublic {
5385
- field?: string;
5386
- operator?: SpanFilterPublicOperator;
5387
- key?: string;
5388
- value?: string;
5389
- }
5390
-
5391
5629
  /**
5392
5630
  * This file was auto-generated by Fern from our API Definition.
5393
5631
  */
@@ -5500,6 +5738,8 @@ interface TracePublic {
5500
5738
  createdBy?: string;
5501
5739
  lastUpdatedBy?: string;
5502
5740
  feedbackScores?: FeedbackScorePublic[];
5741
+ /** Aggregated feedback scores from all spans in this trace, averaged by score name */
5742
+ spanFeedbackScores?: FeedbackScorePublic[];
5503
5743
  comments?: CommentPublic[];
5504
5744
  guardrailsValidations?: GuardrailsValidationPublic[];
5505
5745
  totalEstimatedCost?: number;
@@ -5610,36 +5850,6 @@ interface FeedbackScoreBatchItemThread {
5610
5850
  threadId: string;
5611
5851
  }
5612
5852
 
5613
- /**
5614
- * This file was auto-generated by Fern from our API Definition.
5615
- */
5616
- type TraceThreadFilterOperator = "contains" | "not_contains" | "starts_with" | "ends_with" | "=" | "!=" | ">" | ">=" | "<" | "<=" | "is_empty" | "is_not_empty";
5617
- declare const TraceThreadFilterOperator: {
5618
- readonly Contains: "contains";
5619
- readonly NotContains: "not_contains";
5620
- readonly StartsWith: "starts_with";
5621
- readonly EndsWith: "ends_with";
5622
- readonly EqualTo: "=";
5623
- readonly NotEquals: "!=";
5624
- readonly GreaterThan: ">";
5625
- readonly GreaterThanOrEqualTo: ">=";
5626
- readonly LessThan: "<";
5627
- readonly LessThanOrEqualTo: "<=";
5628
- readonly IsEmpty: "is_empty";
5629
- readonly IsNotEmpty: "is_not_empty";
5630
- };
5631
-
5632
- /**
5633
- * This file was auto-generated by Fern from our API Definition.
5634
- */
5635
-
5636
- interface TraceThreadFilter {
5637
- field?: string;
5638
- operator?: TraceThreadFilterOperator;
5639
- key?: string;
5640
- value?: string;
5641
- }
5642
-
5643
5853
  /**
5644
5854
  * This file was auto-generated by Fern from our API Definition.
5645
5855
  */
@@ -6466,7 +6676,8 @@ declare class AutomationRuleEvaluators {
6466
6676
  *
6467
6677
  * @example
6468
6678
  * await client.automationRuleEvaluators.createAutomationRuleEvaluator({
6469
- * type: "llm_as_judge"
6679
+ * type: "llm_as_judge",
6680
+ * filters: [{}]
6470
6681
  * })
6471
6682
  */
6472
6683
  createAutomationRuleEvaluator(request: AutomationRuleEvaluatorWrite, requestOptions?: AutomationRuleEvaluators.RequestOptions): HttpResponsePromise<void>;
@@ -7016,6 +7227,19 @@ declare class Datasets {
7016
7227
  */
7017
7228
  streamDatasetItems(request: DatasetItemStreamRequest, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<stream.Readable>;
7018
7229
  private __streamDatasetItems;
7230
+ /**
7231
+ * Compare the latest committed dataset version with the current draft state. This endpoint provides insights into changes made since the last version was committed. The comparison calculates additions, modifications, deletions, and unchanged items between the latest version snapshot and current draft.
7232
+ *
7233
+ * @param {string} id
7234
+ * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
7235
+ *
7236
+ * @throws {@link OpikApi.NotFoundError}
7237
+ *
7238
+ * @example
7239
+ * await client.datasets.compareDatasetVersions("id")
7240
+ */
7241
+ compareDatasetVersions(id: string, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<DatasetVersionDiff>;
7242
+ private __compareDatasetVersions;
7019
7243
  /**
7020
7244
  * Add a tag to a specific dataset version for easy reference (e.g., 'baseline', 'v1.0', 'production')
7021
7245
  *