opik 1.8.49 → 1.8.51

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.
@@ -240,6 +240,28 @@ interface DatasetItemsDelete {
240
240
  itemIds: string[];
241
241
  }
242
242
 
243
+ /**
244
+ * This file was auto-generated by Fern from our API Definition.
245
+ */
246
+ /**
247
+ * @example
248
+ * {
249
+ * model: "gpt-4"
250
+ * }
251
+ */
252
+ interface DatasetExpansionWrite {
253
+ /** The model to use for synthetic data generation */
254
+ model: string;
255
+ /** Number of synthetic samples to generate */
256
+ sampleCount?: number;
257
+ /** Fields to preserve patterns from original data */
258
+ preserveFields?: string[];
259
+ /** Additional instructions for data variation */
260
+ variationInstructions?: string;
261
+ /** Custom prompt to use for generation instead of auto-generated one */
262
+ customPrompt?: string;
263
+ }
264
+
243
265
  /**
244
266
  * This file was auto-generated by Fern from our API Definition.
245
267
  */
@@ -1010,6 +1032,21 @@ interface AnnotationQueueBatchWrite {
1010
1032
  annotationQueues: AnnotationQueueWrite[];
1011
1033
  }
1012
1034
 
1035
+ /**
1036
+ * This file was auto-generated by Fern from our API Definition.
1037
+ */
1038
+ /**
1039
+ * @example
1040
+ * {}
1041
+ */
1042
+ interface FindAnnotationQueuesRequest {
1043
+ page?: number;
1044
+ size?: number;
1045
+ name?: string;
1046
+ filters?: string;
1047
+ sorting?: string;
1048
+ }
1049
+
1013
1050
  /**
1014
1051
  * This file was auto-generated by Fern from our API Definition.
1015
1052
  */
@@ -1454,6 +1491,14 @@ interface AnnotationQueueItemIds {
1454
1491
  ids: string[];
1455
1492
  }
1456
1493
 
1494
+ /**
1495
+ * This file was auto-generated by Fern from our API Definition.
1496
+ */
1497
+ interface FeedbackScoreAverage {
1498
+ name: string;
1499
+ value: number;
1500
+ }
1501
+
1457
1502
  /**
1458
1503
  * This file was auto-generated by Fern from our API Definition.
1459
1504
  */
@@ -1478,7 +1523,67 @@ interface AnnotationQueueWrite {
1478
1523
  instructions?: string;
1479
1524
  scope: AnnotationQueueWriteScope;
1480
1525
  commentsEnabled?: boolean;
1481
- feedbackDefinitions?: string[];
1526
+ feedbackDefinitionNames?: string[];
1527
+ }
1528
+
1529
+ /**
1530
+ * This file was auto-generated by Fern from our API Definition.
1531
+ */
1532
+
1533
+ interface AnnotationQueuePagePublic {
1534
+ page?: number;
1535
+ size?: number;
1536
+ total?: number;
1537
+ content?: AnnotationQueuePublic[];
1538
+ sortableBy?: string[];
1539
+ }
1540
+
1541
+ /**
1542
+ * This file was auto-generated by Fern from our API Definition.
1543
+ */
1544
+ interface AnnotationQueueReviewerPublic {
1545
+ username?: string;
1546
+ status?: number;
1547
+ }
1548
+
1549
+ /**
1550
+ * This file was auto-generated by Fern from our API Definition.
1551
+ */
1552
+ type AnnotationQueuePublicScope = "trace" | "thread";
1553
+ declare const AnnotationQueuePublicScope: {
1554
+ readonly Trace: "trace";
1555
+ readonly Thread: "thread";
1556
+ };
1557
+
1558
+ /**
1559
+ * This file was auto-generated by Fern from our API Definition.
1560
+ */
1561
+
1562
+ interface AnnotationQueuePublic {
1563
+ id?: string;
1564
+ projectId: string;
1565
+ projectName?: string;
1566
+ name: string;
1567
+ description?: string;
1568
+ instructions?: string;
1569
+ scope: AnnotationQueuePublicScope;
1570
+ commentsEnabled?: boolean;
1571
+ feedbackDefinitionNames?: string[];
1572
+ reviewers?: AnnotationQueueReviewerPublic[];
1573
+ feedbackScores?: FeedbackScoreAveragePublic[];
1574
+ itemsCount?: number;
1575
+ createdAt?: Date;
1576
+ createdBy?: string;
1577
+ lastUpdatedAt?: Date;
1578
+ lastUpdatedBy?: string;
1579
+ }
1580
+
1581
+ /**
1582
+ * This file was auto-generated by Fern from our API Definition.
1583
+ */
1584
+ interface FeedbackScoreAveragePublic {
1585
+ name: string;
1586
+ value: number;
1482
1587
  }
1483
1588
 
1484
1589
  /**
@@ -2260,6 +2365,35 @@ interface Comment {
2260
2365
  lastUpdatedBy?: string;
2261
2366
  }
2262
2367
 
2368
+ /**
2369
+ * This file was auto-generated by Fern from our API Definition.
2370
+ */
2371
+ type DatasetItemSource = "manual" | "trace" | "span" | "sdk";
2372
+ declare const DatasetItemSource: {
2373
+ readonly Manual: "manual";
2374
+ readonly Trace: "trace";
2375
+ readonly Span: "span";
2376
+ readonly Sdk: "sdk";
2377
+ };
2378
+
2379
+ /**
2380
+ * This file was auto-generated by Fern from our API Definition.
2381
+ */
2382
+
2383
+ interface DatasetItem {
2384
+ id?: string;
2385
+ traceId?: string;
2386
+ spanId?: string;
2387
+ source: DatasetItemSource;
2388
+ data: JsonNode;
2389
+ experimentItems?: ExperimentItem[];
2390
+ datasetId?: string;
2391
+ createdAt?: Date;
2392
+ lastUpdatedAt?: Date;
2393
+ createdBy?: string;
2394
+ lastUpdatedBy?: string;
2395
+ }
2396
+
2263
2397
  /**
2264
2398
  * This file was auto-generated by Fern from our API Definition.
2265
2399
  */
@@ -2369,6 +2503,21 @@ interface DatasetItemWrite {
2369
2503
  data: JsonNode;
2370
2504
  }
2371
2505
 
2506
+ /**
2507
+ * This file was auto-generated by Fern from our API Definition.
2508
+ */
2509
+
2510
+ interface DatasetExpansionResponse {
2511
+ /** List of generated synthetic dataset items */
2512
+ generatedSamples?: DatasetItem[];
2513
+ /** Model used for generation */
2514
+ model?: string;
2515
+ /** Total number of samples generated */
2516
+ totalGenerated?: number;
2517
+ /** Generation timestamp */
2518
+ generationTime?: Date;
2519
+ }
2520
+
2372
2521
  /**
2373
2522
  * This file was auto-generated by Fern from our API Definition.
2374
2523
  */
@@ -2711,14 +2860,6 @@ declare const ExperimentType: {
2711
2860
  readonly MiniBatch: "mini-batch";
2712
2861
  };
2713
2862
 
2714
- /**
2715
- * This file was auto-generated by Fern from our API Definition.
2716
- */
2717
- interface FeedbackScoreAverage {
2718
- name: string;
2719
- value: number;
2720
- }
2721
-
2722
2863
  /**
2723
2864
  * This file was auto-generated by Fern from our API Definition.
2724
2865
  */
@@ -3075,14 +3216,6 @@ interface ExperimentPublic {
3075
3216
  promptVersions?: PromptVersionLinkPublic[];
3076
3217
  }
3077
3218
 
3078
- /**
3079
- * This file was auto-generated by Fern from our API Definition.
3080
- */
3081
- interface FeedbackScoreAveragePublic {
3082
- name: string;
3083
- value: number;
3084
- }
3085
-
3086
3219
  /**
3087
3220
  * This file was auto-generated by Fern from our API Definition.
3088
3221
  */
@@ -4696,6 +4829,30 @@ declare class AnnotationQueues {
4696
4829
  */
4697
4830
  createAnnotationQueueBatch(request: AnnotationQueueBatchWrite, requestOptions?: AnnotationQueues.RequestOptions): HttpResponsePromise<void>;
4698
4831
  private __createAnnotationQueueBatch;
4832
+ /**
4833
+ * Find annotation queues with filtering and sorting
4834
+ *
4835
+ * @param {OpikApi.FindAnnotationQueuesRequest} request
4836
+ * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.
4837
+ *
4838
+ * @example
4839
+ * await client.annotationQueues.findAnnotationQueues()
4840
+ */
4841
+ findAnnotationQueues(request?: FindAnnotationQueuesRequest, requestOptions?: AnnotationQueues.RequestOptions): HttpResponsePromise<AnnotationQueuePagePublic>;
4842
+ private __findAnnotationQueues;
4843
+ /**
4844
+ * Get annotation queue by id
4845
+ *
4846
+ * @param {string} id
4847
+ * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.
4848
+ *
4849
+ * @throws {@link OpikApi.NotFoundError}
4850
+ *
4851
+ * @example
4852
+ * await client.annotationQueues.getAnnotationQueueById("id")
4853
+ */
4854
+ getAnnotationQueueById(id: string, requestOptions?: AnnotationQueues.RequestOptions): HttpResponsePromise<AnnotationQueuePublic>;
4855
+ private __getAnnotationQueueById;
4699
4856
  /**
4700
4857
  * Remove items from annotation queue
4701
4858
  *
@@ -5261,6 +5418,20 @@ declare class Datasets {
5261
5418
  */
5262
5419
  deleteDatasetsBatch(request: BatchDelete, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<void>;
5263
5420
  private __deleteDatasetsBatch;
5421
+ /**
5422
+ * Generate synthetic dataset samples using LLM based on existing data patterns
5423
+ *
5424
+ * @param {string} id
5425
+ * @param {OpikApi.DatasetExpansionWrite} request
5426
+ * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
5427
+ *
5428
+ * @example
5429
+ * await client.datasets.expandDataset("id", {
5430
+ * model: "gpt-4"
5431
+ * })
5432
+ */
5433
+ expandDataset(id: string, request: DatasetExpansionWrite, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<DatasetExpansionResponse>;
5434
+ private __expandDataset;
5264
5435
  /**
5265
5436
  * Find dataset items with experiment items
5266
5437
  *
@@ -240,6 +240,28 @@ interface DatasetItemsDelete {
240
240
  itemIds: string[];
241
241
  }
242
242
 
243
+ /**
244
+ * This file was auto-generated by Fern from our API Definition.
245
+ */
246
+ /**
247
+ * @example
248
+ * {
249
+ * model: "gpt-4"
250
+ * }
251
+ */
252
+ interface DatasetExpansionWrite {
253
+ /** The model to use for synthetic data generation */
254
+ model: string;
255
+ /** Number of synthetic samples to generate */
256
+ sampleCount?: number;
257
+ /** Fields to preserve patterns from original data */
258
+ preserveFields?: string[];
259
+ /** Additional instructions for data variation */
260
+ variationInstructions?: string;
261
+ /** Custom prompt to use for generation instead of auto-generated one */
262
+ customPrompt?: string;
263
+ }
264
+
243
265
  /**
244
266
  * This file was auto-generated by Fern from our API Definition.
245
267
  */
@@ -1010,6 +1032,21 @@ interface AnnotationQueueBatchWrite {
1010
1032
  annotationQueues: AnnotationQueueWrite[];
1011
1033
  }
1012
1034
 
1035
+ /**
1036
+ * This file was auto-generated by Fern from our API Definition.
1037
+ */
1038
+ /**
1039
+ * @example
1040
+ * {}
1041
+ */
1042
+ interface FindAnnotationQueuesRequest {
1043
+ page?: number;
1044
+ size?: number;
1045
+ name?: string;
1046
+ filters?: string;
1047
+ sorting?: string;
1048
+ }
1049
+
1013
1050
  /**
1014
1051
  * This file was auto-generated by Fern from our API Definition.
1015
1052
  */
@@ -1454,6 +1491,14 @@ interface AnnotationQueueItemIds {
1454
1491
  ids: string[];
1455
1492
  }
1456
1493
 
1494
+ /**
1495
+ * This file was auto-generated by Fern from our API Definition.
1496
+ */
1497
+ interface FeedbackScoreAverage {
1498
+ name: string;
1499
+ value: number;
1500
+ }
1501
+
1457
1502
  /**
1458
1503
  * This file was auto-generated by Fern from our API Definition.
1459
1504
  */
@@ -1478,7 +1523,67 @@ interface AnnotationQueueWrite {
1478
1523
  instructions?: string;
1479
1524
  scope: AnnotationQueueWriteScope;
1480
1525
  commentsEnabled?: boolean;
1481
- feedbackDefinitions?: string[];
1526
+ feedbackDefinitionNames?: string[];
1527
+ }
1528
+
1529
+ /**
1530
+ * This file was auto-generated by Fern from our API Definition.
1531
+ */
1532
+
1533
+ interface AnnotationQueuePagePublic {
1534
+ page?: number;
1535
+ size?: number;
1536
+ total?: number;
1537
+ content?: AnnotationQueuePublic[];
1538
+ sortableBy?: string[];
1539
+ }
1540
+
1541
+ /**
1542
+ * This file was auto-generated by Fern from our API Definition.
1543
+ */
1544
+ interface AnnotationQueueReviewerPublic {
1545
+ username?: string;
1546
+ status?: number;
1547
+ }
1548
+
1549
+ /**
1550
+ * This file was auto-generated by Fern from our API Definition.
1551
+ */
1552
+ type AnnotationQueuePublicScope = "trace" | "thread";
1553
+ declare const AnnotationQueuePublicScope: {
1554
+ readonly Trace: "trace";
1555
+ readonly Thread: "thread";
1556
+ };
1557
+
1558
+ /**
1559
+ * This file was auto-generated by Fern from our API Definition.
1560
+ */
1561
+
1562
+ interface AnnotationQueuePublic {
1563
+ id?: string;
1564
+ projectId: string;
1565
+ projectName?: string;
1566
+ name: string;
1567
+ description?: string;
1568
+ instructions?: string;
1569
+ scope: AnnotationQueuePublicScope;
1570
+ commentsEnabled?: boolean;
1571
+ feedbackDefinitionNames?: string[];
1572
+ reviewers?: AnnotationQueueReviewerPublic[];
1573
+ feedbackScores?: FeedbackScoreAveragePublic[];
1574
+ itemsCount?: number;
1575
+ createdAt?: Date;
1576
+ createdBy?: string;
1577
+ lastUpdatedAt?: Date;
1578
+ lastUpdatedBy?: string;
1579
+ }
1580
+
1581
+ /**
1582
+ * This file was auto-generated by Fern from our API Definition.
1583
+ */
1584
+ interface FeedbackScoreAveragePublic {
1585
+ name: string;
1586
+ value: number;
1482
1587
  }
1483
1588
 
1484
1589
  /**
@@ -2260,6 +2365,35 @@ interface Comment {
2260
2365
  lastUpdatedBy?: string;
2261
2366
  }
2262
2367
 
2368
+ /**
2369
+ * This file was auto-generated by Fern from our API Definition.
2370
+ */
2371
+ type DatasetItemSource = "manual" | "trace" | "span" | "sdk";
2372
+ declare const DatasetItemSource: {
2373
+ readonly Manual: "manual";
2374
+ readonly Trace: "trace";
2375
+ readonly Span: "span";
2376
+ readonly Sdk: "sdk";
2377
+ };
2378
+
2379
+ /**
2380
+ * This file was auto-generated by Fern from our API Definition.
2381
+ */
2382
+
2383
+ interface DatasetItem {
2384
+ id?: string;
2385
+ traceId?: string;
2386
+ spanId?: string;
2387
+ source: DatasetItemSource;
2388
+ data: JsonNode;
2389
+ experimentItems?: ExperimentItem[];
2390
+ datasetId?: string;
2391
+ createdAt?: Date;
2392
+ lastUpdatedAt?: Date;
2393
+ createdBy?: string;
2394
+ lastUpdatedBy?: string;
2395
+ }
2396
+
2263
2397
  /**
2264
2398
  * This file was auto-generated by Fern from our API Definition.
2265
2399
  */
@@ -2369,6 +2503,21 @@ interface DatasetItemWrite {
2369
2503
  data: JsonNode;
2370
2504
  }
2371
2505
 
2506
+ /**
2507
+ * This file was auto-generated by Fern from our API Definition.
2508
+ */
2509
+
2510
+ interface DatasetExpansionResponse {
2511
+ /** List of generated synthetic dataset items */
2512
+ generatedSamples?: DatasetItem[];
2513
+ /** Model used for generation */
2514
+ model?: string;
2515
+ /** Total number of samples generated */
2516
+ totalGenerated?: number;
2517
+ /** Generation timestamp */
2518
+ generationTime?: Date;
2519
+ }
2520
+
2372
2521
  /**
2373
2522
  * This file was auto-generated by Fern from our API Definition.
2374
2523
  */
@@ -2711,14 +2860,6 @@ declare const ExperimentType: {
2711
2860
  readonly MiniBatch: "mini-batch";
2712
2861
  };
2713
2862
 
2714
- /**
2715
- * This file was auto-generated by Fern from our API Definition.
2716
- */
2717
- interface FeedbackScoreAverage {
2718
- name: string;
2719
- value: number;
2720
- }
2721
-
2722
2863
  /**
2723
2864
  * This file was auto-generated by Fern from our API Definition.
2724
2865
  */
@@ -3075,14 +3216,6 @@ interface ExperimentPublic {
3075
3216
  promptVersions?: PromptVersionLinkPublic[];
3076
3217
  }
3077
3218
 
3078
- /**
3079
- * This file was auto-generated by Fern from our API Definition.
3080
- */
3081
- interface FeedbackScoreAveragePublic {
3082
- name: string;
3083
- value: number;
3084
- }
3085
-
3086
3219
  /**
3087
3220
  * This file was auto-generated by Fern from our API Definition.
3088
3221
  */
@@ -4696,6 +4829,30 @@ declare class AnnotationQueues {
4696
4829
  */
4697
4830
  createAnnotationQueueBatch(request: AnnotationQueueBatchWrite, requestOptions?: AnnotationQueues.RequestOptions): HttpResponsePromise<void>;
4698
4831
  private __createAnnotationQueueBatch;
4832
+ /**
4833
+ * Find annotation queues with filtering and sorting
4834
+ *
4835
+ * @param {OpikApi.FindAnnotationQueuesRequest} request
4836
+ * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.
4837
+ *
4838
+ * @example
4839
+ * await client.annotationQueues.findAnnotationQueues()
4840
+ */
4841
+ findAnnotationQueues(request?: FindAnnotationQueuesRequest, requestOptions?: AnnotationQueues.RequestOptions): HttpResponsePromise<AnnotationQueuePagePublic>;
4842
+ private __findAnnotationQueues;
4843
+ /**
4844
+ * Get annotation queue by id
4845
+ *
4846
+ * @param {string} id
4847
+ * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.
4848
+ *
4849
+ * @throws {@link OpikApi.NotFoundError}
4850
+ *
4851
+ * @example
4852
+ * await client.annotationQueues.getAnnotationQueueById("id")
4853
+ */
4854
+ getAnnotationQueueById(id: string, requestOptions?: AnnotationQueues.RequestOptions): HttpResponsePromise<AnnotationQueuePublic>;
4855
+ private __getAnnotationQueueById;
4699
4856
  /**
4700
4857
  * Remove items from annotation queue
4701
4858
  *
@@ -5261,6 +5418,20 @@ declare class Datasets {
5261
5418
  */
5262
5419
  deleteDatasetsBatch(request: BatchDelete, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<void>;
5263
5420
  private __deleteDatasetsBatch;
5421
+ /**
5422
+ * Generate synthetic dataset samples using LLM based on existing data patterns
5423
+ *
5424
+ * @param {string} id
5425
+ * @param {OpikApi.DatasetExpansionWrite} request
5426
+ * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
5427
+ *
5428
+ * @example
5429
+ * await client.datasets.expandDataset("id", {
5430
+ * model: "gpt-4"
5431
+ * })
5432
+ */
5433
+ expandDataset(id: string, request: DatasetExpansionWrite, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<DatasetExpansionResponse>;
5434
+ private __expandDataset;
5264
5435
  /**
5265
5436
  * Find dataset items with experiment items
5266
5437
  *