opik 1.7.23 → 1.7.25

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.
@@ -898,8 +898,8 @@ interface SpanUpdate$1 {
898
898
  traceId: string;
899
899
  parentSpanId?: string;
900
900
  endTime?: Date;
901
- input?: JsonNode;
902
- output?: JsonNode;
901
+ input?: JsonListString;
902
+ output?: JsonListString;
903
903
  metadata?: JsonNode;
904
904
  model?: string;
905
905
  provider?: string;
@@ -1118,8 +1118,8 @@ interface TraceUpdate {
1118
1118
  projectId?: string;
1119
1119
  name?: string;
1120
1120
  endTime?: Date;
1121
- input?: JsonNode;
1122
- output?: JsonNode;
1121
+ input?: JsonListString;
1122
+ output?: JsonListString;
1123
1123
  metadata?: JsonNode;
1124
1124
  tags?: string[];
1125
1125
  errorInfo?: ErrorInfo;
@@ -1971,8 +1971,8 @@ interface ExperimentItem {
1971
1971
  experimentId: string;
1972
1972
  datasetItemId: string;
1973
1973
  traceId: string;
1974
- input?: JsonNode;
1975
- output?: JsonNode;
1974
+ input?: JsonListString;
1975
+ output?: JsonListString;
1976
1976
  feedbackScores?: FeedbackScore[];
1977
1977
  comments?: Comment[];
1978
1978
  totalEstimatedCost?: number;
@@ -2013,7 +2013,7 @@ interface FeedbackScore {
2013
2013
  /**
2014
2014
  * This file was auto-generated by Fern from our API Definition.
2015
2015
  */
2016
- type JsonNode = Record<string, unknown>;
2016
+ type JsonListString = Record<string, unknown> | Record<string, unknown>[] | string;
2017
2017
 
2018
2018
  /**
2019
2019
  * This file was auto-generated by Fern from our API Definition.
@@ -2125,8 +2125,8 @@ interface ExperimentItemCompare {
2125
2125
  experimentId: string;
2126
2126
  datasetItemId: string;
2127
2127
  traceId: string;
2128
- input?: JsonNodeCompare;
2129
- output?: JsonNodeCompare;
2128
+ input?: JsonListStringCompare;
2129
+ output?: JsonListStringCompare;
2130
2130
  feedbackScores?: FeedbackScoreCompare[];
2131
2131
  comments?: CommentCompare[];
2132
2132
  totalEstimatedCost?: number;
@@ -2167,7 +2167,7 @@ interface FeedbackScoreCompare {
2167
2167
  /**
2168
2168
  * This file was auto-generated by Fern from our API Definition.
2169
2169
  */
2170
- type JsonNodeCompare = Record<string, unknown>;
2170
+ type JsonListStringCompare = Record<string, unknown> | Record<string, unknown>[] | string;
2171
2171
 
2172
2172
  /**
2173
2173
  * This file was auto-generated by Fern from our API Definition.
@@ -2332,6 +2332,11 @@ interface FeedbackScoreAverage {
2332
2332
  value: number;
2333
2333
  }
2334
2334
 
2335
+ /**
2336
+ * This file was auto-generated by Fern from our API Definition.
2337
+ */
2338
+ type JsonNode = Record<string, unknown>;
2339
+
2335
2340
  /**
2336
2341
  * This file was auto-generated by Fern from our API Definition.
2337
2342
  */
@@ -3087,8 +3092,8 @@ interface Span$1 {
3087
3092
  type: SpanType;
3088
3093
  startTime: Date;
3089
3094
  endTime?: Date;
3090
- input?: JsonNode;
3091
- output?: JsonNode;
3095
+ input?: JsonListString;
3096
+ output?: JsonListString;
3092
3097
  metadata?: JsonNode;
3093
3098
  model?: string;
3094
3099
  provider?: string;
@@ -3116,6 +3121,11 @@ interface ErrorInfoWrite {
3116
3121
  traceback: string;
3117
3122
  }
3118
3123
 
3124
+ /**
3125
+ * This file was auto-generated by Fern from our API Definition.
3126
+ */
3127
+ type JsonListStringWrite = Record<string, unknown> | Record<string, unknown>[] | string;
3128
+
3119
3129
  /**
3120
3130
  * This file was auto-generated by Fern from our API Definition.
3121
3131
  */
@@ -3141,8 +3151,8 @@ interface SpanWrite {
3141
3151
  type: SpanWriteType;
3142
3152
  startTime: Date;
3143
3153
  endTime?: Date;
3144
- input?: JsonNodeWrite;
3145
- output?: JsonNodeWrite;
3154
+ input?: JsonListStringWrite;
3155
+ output?: JsonListStringWrite;
3146
3156
  metadata?: JsonNodeWrite;
3147
3157
  model?: string;
3148
3158
  provider?: string;
@@ -3196,6 +3206,11 @@ interface FeedbackScorePublic {
3196
3206
  lastUpdatedBy?: string;
3197
3207
  }
3198
3208
 
3209
+ /**
3210
+ * This file was auto-generated by Fern from our API Definition.
3211
+ */
3212
+ type JsonListStringPublic = Record<string, unknown> | Record<string, unknown>[] | string;
3213
+
3199
3214
  /**
3200
3215
  * This file was auto-generated by Fern from our API Definition.
3201
3216
  */
@@ -3222,8 +3237,8 @@ interface SpanPublic {
3222
3237
  type: SpanPublicType;
3223
3238
  startTime: Date;
3224
3239
  endTime?: Date;
3225
- input?: JsonNodePublic;
3226
- output?: JsonNodePublic;
3240
+ input?: JsonListStringPublic;
3241
+ output?: JsonListStringPublic;
3227
3242
  metadata?: JsonNodePublic;
3228
3243
  model?: string;
3229
3244
  provider?: string;
@@ -3415,8 +3430,8 @@ interface Trace$1 {
3415
3430
  name?: string;
3416
3431
  startTime: Date;
3417
3432
  endTime?: Date;
3418
- input?: JsonNode;
3419
- output?: JsonNode;
3433
+ input?: JsonListString;
3434
+ output?: JsonListString;
3420
3435
  metadata?: JsonNode;
3421
3436
  tags?: string[];
3422
3437
  errorInfo?: ErrorInfo;
@@ -3446,8 +3461,8 @@ interface TraceWrite {
3446
3461
  name?: string;
3447
3462
  startTime: Date;
3448
3463
  endTime?: Date;
3449
- input?: JsonNodeWrite;
3450
- output?: JsonNodeWrite;
3464
+ input?: JsonListStringWrite;
3465
+ output?: JsonListStringWrite;
3451
3466
  metadata?: JsonNodeWrite;
3452
3467
  tags?: string[];
3453
3468
  errorInfo?: ErrorInfoWrite;
@@ -3501,8 +3516,8 @@ interface TracePublic {
3501
3516
  name?: string;
3502
3517
  startTime: Date;
3503
3518
  endTime?: Date;
3504
- input?: JsonNodePublic;
3505
- output?: JsonNodePublic;
3519
+ input?: JsonListStringPublic;
3520
+ output?: JsonListStringPublic;
3506
3521
  metadata?: JsonNodePublic;
3507
3522
  tags?: string[];
3508
3523
  errorInfo?: ErrorInfoPublic;
@@ -6143,6 +6158,7 @@ interface SavedSpan extends Span$1 {
6143
6158
  declare class Span {
6144
6159
  data: SavedSpan;
6145
6160
  private opik;
6161
+ private childSpans;
6146
6162
  constructor(data: SavedSpan, opik: OpikClient);
6147
6163
  end: () => this;
6148
6164
  score: (score: {
@@ -6152,6 +6168,9 @@ declare class Span {
6152
6168
  reason?: string;
6153
6169
  }) => void;
6154
6170
  update: (updates: Omit<SpanUpdate$1, "traceId" | "parentSpanId" | "projectId" | "projectName">) => this;
6171
+ span: (spanData: Omit<Span$1, "startTime" | "traceId" | "parentSpanId" | "projectId" | "projectName" | "id"> & {
6172
+ startTime?: Date;
6173
+ }) => Span;
6155
6174
  }
6156
6175
 
6157
6176
  interface SavedTrace extends Trace$1 {
@@ -898,8 +898,8 @@ interface SpanUpdate$1 {
898
898
  traceId: string;
899
899
  parentSpanId?: string;
900
900
  endTime?: Date;
901
- input?: JsonNode;
902
- output?: JsonNode;
901
+ input?: JsonListString;
902
+ output?: JsonListString;
903
903
  metadata?: JsonNode;
904
904
  model?: string;
905
905
  provider?: string;
@@ -1118,8 +1118,8 @@ interface TraceUpdate {
1118
1118
  projectId?: string;
1119
1119
  name?: string;
1120
1120
  endTime?: Date;
1121
- input?: JsonNode;
1122
- output?: JsonNode;
1121
+ input?: JsonListString;
1122
+ output?: JsonListString;
1123
1123
  metadata?: JsonNode;
1124
1124
  tags?: string[];
1125
1125
  errorInfo?: ErrorInfo;
@@ -1971,8 +1971,8 @@ interface ExperimentItem {
1971
1971
  experimentId: string;
1972
1972
  datasetItemId: string;
1973
1973
  traceId: string;
1974
- input?: JsonNode;
1975
- output?: JsonNode;
1974
+ input?: JsonListString;
1975
+ output?: JsonListString;
1976
1976
  feedbackScores?: FeedbackScore[];
1977
1977
  comments?: Comment[];
1978
1978
  totalEstimatedCost?: number;
@@ -2013,7 +2013,7 @@ interface FeedbackScore {
2013
2013
  /**
2014
2014
  * This file was auto-generated by Fern from our API Definition.
2015
2015
  */
2016
- type JsonNode = Record<string, unknown>;
2016
+ type JsonListString = Record<string, unknown> | Record<string, unknown>[] | string;
2017
2017
 
2018
2018
  /**
2019
2019
  * This file was auto-generated by Fern from our API Definition.
@@ -2125,8 +2125,8 @@ interface ExperimentItemCompare {
2125
2125
  experimentId: string;
2126
2126
  datasetItemId: string;
2127
2127
  traceId: string;
2128
- input?: JsonNodeCompare;
2129
- output?: JsonNodeCompare;
2128
+ input?: JsonListStringCompare;
2129
+ output?: JsonListStringCompare;
2130
2130
  feedbackScores?: FeedbackScoreCompare[];
2131
2131
  comments?: CommentCompare[];
2132
2132
  totalEstimatedCost?: number;
@@ -2167,7 +2167,7 @@ interface FeedbackScoreCompare {
2167
2167
  /**
2168
2168
  * This file was auto-generated by Fern from our API Definition.
2169
2169
  */
2170
- type JsonNodeCompare = Record<string, unknown>;
2170
+ type JsonListStringCompare = Record<string, unknown> | Record<string, unknown>[] | string;
2171
2171
 
2172
2172
  /**
2173
2173
  * This file was auto-generated by Fern from our API Definition.
@@ -2332,6 +2332,11 @@ interface FeedbackScoreAverage {
2332
2332
  value: number;
2333
2333
  }
2334
2334
 
2335
+ /**
2336
+ * This file was auto-generated by Fern from our API Definition.
2337
+ */
2338
+ type JsonNode = Record<string, unknown>;
2339
+
2335
2340
  /**
2336
2341
  * This file was auto-generated by Fern from our API Definition.
2337
2342
  */
@@ -3087,8 +3092,8 @@ interface Span$1 {
3087
3092
  type: SpanType;
3088
3093
  startTime: Date;
3089
3094
  endTime?: Date;
3090
- input?: JsonNode;
3091
- output?: JsonNode;
3095
+ input?: JsonListString;
3096
+ output?: JsonListString;
3092
3097
  metadata?: JsonNode;
3093
3098
  model?: string;
3094
3099
  provider?: string;
@@ -3116,6 +3121,11 @@ interface ErrorInfoWrite {
3116
3121
  traceback: string;
3117
3122
  }
3118
3123
 
3124
+ /**
3125
+ * This file was auto-generated by Fern from our API Definition.
3126
+ */
3127
+ type JsonListStringWrite = Record<string, unknown> | Record<string, unknown>[] | string;
3128
+
3119
3129
  /**
3120
3130
  * This file was auto-generated by Fern from our API Definition.
3121
3131
  */
@@ -3141,8 +3151,8 @@ interface SpanWrite {
3141
3151
  type: SpanWriteType;
3142
3152
  startTime: Date;
3143
3153
  endTime?: Date;
3144
- input?: JsonNodeWrite;
3145
- output?: JsonNodeWrite;
3154
+ input?: JsonListStringWrite;
3155
+ output?: JsonListStringWrite;
3146
3156
  metadata?: JsonNodeWrite;
3147
3157
  model?: string;
3148
3158
  provider?: string;
@@ -3196,6 +3206,11 @@ interface FeedbackScorePublic {
3196
3206
  lastUpdatedBy?: string;
3197
3207
  }
3198
3208
 
3209
+ /**
3210
+ * This file was auto-generated by Fern from our API Definition.
3211
+ */
3212
+ type JsonListStringPublic = Record<string, unknown> | Record<string, unknown>[] | string;
3213
+
3199
3214
  /**
3200
3215
  * This file was auto-generated by Fern from our API Definition.
3201
3216
  */
@@ -3222,8 +3237,8 @@ interface SpanPublic {
3222
3237
  type: SpanPublicType;
3223
3238
  startTime: Date;
3224
3239
  endTime?: Date;
3225
- input?: JsonNodePublic;
3226
- output?: JsonNodePublic;
3240
+ input?: JsonListStringPublic;
3241
+ output?: JsonListStringPublic;
3227
3242
  metadata?: JsonNodePublic;
3228
3243
  model?: string;
3229
3244
  provider?: string;
@@ -3415,8 +3430,8 @@ interface Trace$1 {
3415
3430
  name?: string;
3416
3431
  startTime: Date;
3417
3432
  endTime?: Date;
3418
- input?: JsonNode;
3419
- output?: JsonNode;
3433
+ input?: JsonListString;
3434
+ output?: JsonListString;
3420
3435
  metadata?: JsonNode;
3421
3436
  tags?: string[];
3422
3437
  errorInfo?: ErrorInfo;
@@ -3446,8 +3461,8 @@ interface TraceWrite {
3446
3461
  name?: string;
3447
3462
  startTime: Date;
3448
3463
  endTime?: Date;
3449
- input?: JsonNodeWrite;
3450
- output?: JsonNodeWrite;
3464
+ input?: JsonListStringWrite;
3465
+ output?: JsonListStringWrite;
3451
3466
  metadata?: JsonNodeWrite;
3452
3467
  tags?: string[];
3453
3468
  errorInfo?: ErrorInfoWrite;
@@ -3501,8 +3516,8 @@ interface TracePublic {
3501
3516
  name?: string;
3502
3517
  startTime: Date;
3503
3518
  endTime?: Date;
3504
- input?: JsonNodePublic;
3505
- output?: JsonNodePublic;
3519
+ input?: JsonListStringPublic;
3520
+ output?: JsonListStringPublic;
3506
3521
  metadata?: JsonNodePublic;
3507
3522
  tags?: string[];
3508
3523
  errorInfo?: ErrorInfoPublic;
@@ -6143,6 +6158,7 @@ interface SavedSpan extends Span$1 {
6143
6158
  declare class Span {
6144
6159
  data: SavedSpan;
6145
6160
  private opik;
6161
+ private childSpans;
6146
6162
  constructor(data: SavedSpan, opik: OpikClient);
6147
6163
  end: () => this;
6148
6164
  score: (score: {
@@ -6152,6 +6168,9 @@ declare class Span {
6152
6168
  reason?: string;
6153
6169
  }) => void;
6154
6170
  update: (updates: Omit<SpanUpdate$1, "traceId" | "parentSpanId" | "projectId" | "projectName">) => this;
6171
+ span: (spanData: Omit<Span$1, "startTime" | "traceId" | "parentSpanId" | "projectId" | "projectName" | "id"> & {
6172
+ startTime?: Date;
6173
+ }) => Span;
6155
6174
  }
6156
6175
 
6157
6176
  interface SavedTrace extends Trace$1 {