@roarkanalytics/sdk 2.23.1 → 2.25.0

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.
Files changed (107) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +18 -23
  3. package/client.d.mts +14 -8
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +14 -8
  6. package/client.d.ts.map +1 -1
  7. package/client.js +6 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +9 -3
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/call.d.mts +0 -20
  13. package/resources/call.d.mts.map +1 -1
  14. package/resources/call.d.ts +0 -20
  15. package/resources/call.d.ts.map +1 -1
  16. package/resources/evaluation.d.mts +0 -2783
  17. package/resources/evaluation.d.mts.map +1 -1
  18. package/resources/evaluation.d.ts +0 -2783
  19. package/resources/evaluation.d.ts.map +1 -1
  20. package/resources/evaluation.js +0 -46
  21. package/resources/evaluation.js.map +1 -1
  22. package/resources/evaluation.mjs +0 -46
  23. package/resources/evaluation.mjs.map +1 -1
  24. package/resources/index.d.mts +6 -4
  25. package/resources/index.d.mts.map +1 -1
  26. package/resources/index.d.ts +6 -4
  27. package/resources/index.d.ts.map +1 -1
  28. package/resources/index.js +5 -1
  29. package/resources/index.js.map +1 -1
  30. package/resources/index.mjs +5 -3
  31. package/resources/index.mjs.map +1 -1
  32. package/resources/integrations.d.mts +0 -110
  33. package/resources/integrations.d.mts.map +1 -1
  34. package/resources/integrations.d.ts +0 -110
  35. package/resources/integrations.d.ts.map +1 -1
  36. package/resources/integrations.js +0 -37
  37. package/resources/integrations.js.map +1 -1
  38. package/resources/integrations.mjs +0 -37
  39. package/resources/integrations.mjs.map +1 -1
  40. package/resources/metric-collection-job.d.mts +237 -0
  41. package/resources/metric-collection-job.d.mts.map +1 -0
  42. package/resources/metric-collection-job.d.ts +237 -0
  43. package/resources/metric-collection-job.d.ts.map +1 -0
  44. package/resources/metric-collection-job.js +29 -0
  45. package/resources/metric-collection-job.js.map +1 -0
  46. package/resources/metric-collection-job.mjs +25 -0
  47. package/resources/metric-collection-job.mjs.map +1 -0
  48. package/resources/metric-policy.d.mts +502 -0
  49. package/resources/metric-policy.d.mts.map +1 -0
  50. package/resources/metric-policy.d.ts +502 -0
  51. package/resources/metric-policy.d.ts.map +1 -0
  52. package/resources/metric-policy.js +76 -0
  53. package/resources/metric-policy.js.map +1 -0
  54. package/resources/metric-policy.mjs +72 -0
  55. package/resources/metric-policy.mjs.map +1 -0
  56. package/resources/metric.d.mts +188 -2
  57. package/resources/metric.d.mts.map +1 -1
  58. package/resources/metric.d.ts +188 -2
  59. package/resources/metric.d.ts.map +1 -1
  60. package/resources/metric.js +21 -0
  61. package/resources/metric.js.map +1 -1
  62. package/resources/metric.mjs +21 -0
  63. package/resources/metric.mjs.map +1 -1
  64. package/resources/simulation-job.d.mts +12 -2
  65. package/resources/simulation-job.d.mts.map +1 -1
  66. package/resources/simulation-job.d.ts +12 -2
  67. package/resources/simulation-job.d.ts.map +1 -1
  68. package/resources/simulation-persona.d.mts +36 -6
  69. package/resources/simulation-persona.d.mts.map +1 -1
  70. package/resources/simulation-persona.d.ts +36 -6
  71. package/resources/simulation-persona.d.ts.map +1 -1
  72. package/resources/simulation-run-plan-job.d.mts +41 -5
  73. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  74. package/resources/simulation-run-plan-job.d.ts +41 -5
  75. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  76. package/resources/simulation-run-plan-job.js +4 -3
  77. package/resources/simulation-run-plan-job.js.map +1 -1
  78. package/resources/simulation-run-plan-job.mjs +4 -3
  79. package/resources/simulation-run-plan-job.mjs.map +1 -1
  80. package/resources/simulation-run-plan.d.mts +90 -16
  81. package/resources/simulation-run-plan.d.mts.map +1 -1
  82. package/resources/simulation-run-plan.d.ts +90 -16
  83. package/resources/simulation-run-plan.d.ts.map +1 -1
  84. package/resources/simulation-run-plan.js +2 -2
  85. package/resources/simulation-run-plan.mjs +2 -2
  86. package/resources/simulation-scenario.d.mts +27 -7
  87. package/resources/simulation-scenario.d.mts.map +1 -1
  88. package/resources/simulation-scenario.d.ts +27 -7
  89. package/resources/simulation-scenario.d.ts.map +1 -1
  90. package/src/client.ts +59 -43
  91. package/src/resources/call.ts +0 -20
  92. package/src/resources/evaluation.ts +1 -3570
  93. package/src/resources/index.ts +27 -22
  94. package/src/resources/integrations.ts +1 -131
  95. package/src/resources/metric-collection-job.ts +307 -0
  96. package/src/resources/metric-policy.ts +679 -0
  97. package/src/resources/metric.ts +233 -2
  98. package/src/resources/simulation-job.ts +14 -2
  99. package/src/resources/simulation-persona.ts +42 -6
  100. package/src/resources/simulation-run-plan-job.ts +46 -4
  101. package/src/resources/simulation-run-plan.ts +102 -16
  102. package/src/resources/simulation-scenario.ts +49 -3
  103. package/src/version.ts +1 -1
  104. package/version.d.mts +1 -1
  105. package/version.d.ts +1 -1
  106. package/version.js +1 -1
  107. package/version.mjs +1 -1
@@ -1,2787 +1,4 @@
1
1
  import { APIResource } from "../core/resource.mjs";
2
- import { APIPromise } from "../core/api-promise.mjs";
3
- import { RequestOptions } from "../internal/request-options.mjs";
4
2
  export declare class Evaluation extends APIResource {
5
- /**
6
- * Creates a new evaluator with the specified blocks and configuration.
7
- */
8
- createEvaluator(body: EvaluationCreateEvaluatorParams, options?: RequestOptions): APIPromise<EvaluationCreateEvaluatorResponse>;
9
- /**
10
- * Create a evaluation job for a single call or dataset of calls
11
- */
12
- createJob(body: EvaluationCreateJobParams, options?: RequestOptions): APIPromise<EvaluationCreateJobResponse>;
13
- /**
14
- * Returns a specific evaluator with its blocks and configuration.
15
- */
16
- getEvaluatorByID(evaluatorID: string, options?: RequestOptions): APIPromise<EvaluationGetEvaluatorByIDResponse>;
17
- /**
18
- * Retrieve details of a specific evaluation job
19
- */
20
- getJob(jobID: string, options?: RequestOptions): APIPromise<EvaluationGetJobResponse>;
21
- /**
22
- * Returns a list of evaluators with their blocks and configuration for the
23
- * authenticated project.
24
- */
25
- listEvaluators(query?: EvaluationListEvaluatorsParams | null | undefined, options?: RequestOptions): APIPromise<EvaluationListEvaluatorsResponse>;
26
- /**
27
- * Retrieve paginated details of a specific evaluation job runs
28
- */
29
- listJobRuns(jobID: string, query?: EvaluationListJobRunsParams | null | undefined, options?: RequestOptions): APIPromise<EvaluationListJobRunsResponse>;
30
- /**
31
- * Updates an existing evaluator. When blocks are provided: blocks with an id
32
- * update existing blocks, blocks without an id create new blocks, and existing
33
- * blocks not included in the array are deleted.
34
- */
35
- updateEvaluator(evaluatorID: string, body?: EvaluationUpdateEvaluatorParams | null | undefined, options?: RequestOptions): APIPromise<EvaluationUpdateEvaluatorResponse>;
36
- }
37
- export interface EvaluationCreateEvaluatorResponse {
38
- /**
39
- * Evaluator with its configured blocks
40
- */
41
- data: EvaluationCreateEvaluatorResponse.Data;
42
- }
43
- export declare namespace EvaluationCreateEvaluatorResponse {
44
- /**
45
- * Evaluator with its configured blocks
46
- */
47
- interface Data {
48
- /**
49
- * Unique identifier for the evaluator
50
- */
51
- id: string;
52
- /**
53
- * Array of evaluation blocks configured for this evaluator
54
- */
55
- blocks: Array<Data.UnionMember0 | Data.UnionMember1 | Data.UnionMember2 | Data.UnionMember3 | Data.UnionMember4 | Data.UnionMember5 | Data.UnionMember6 | Data.UnionMember7 | Data.UnionMember8>;
56
- /**
57
- * ISO timestamp when the evaluator was created
58
- */
59
- createdAt: string;
60
- /**
61
- * Optional description of the evaluator
62
- */
63
- description: string | null;
64
- /**
65
- * Name of the evaluator
66
- */
67
- name: string;
68
- /**
69
- * Unique slug identifier for the evaluator
70
- */
71
- slug: string;
72
- /**
73
- * ISO timestamp when the evaluator was last updated
74
- */
75
- updatedAt: string;
76
- }
77
- namespace Data {
78
- interface UnionMember0 {
79
- /**
80
- * Unique identifier for the block
81
- */
82
- id: string;
83
- /**
84
- * Block type identifier
85
- */
86
- blockType: 'CUSTOM_PROMPT';
87
- /**
88
- * Optional description of what this block evaluates
89
- */
90
- description: string | null;
91
- /**
92
- * Name of the metric this prompt evaluates
93
- */
94
- metricName: string;
95
- /**
96
- * Display name of the evaluation block
97
- */
98
- name: string;
99
- /**
100
- * Order in which this block is executed
101
- */
102
- orderIndex: number;
103
- /**
104
- * The prompt to evaluate the call against
105
- */
106
- prompt: string;
107
- /**
108
- * Minimum score threshold to pass evaluation (0-1)
109
- */
110
- threshold: number;
111
- /**
112
- * Weight of this block in the overall evaluation score (0-100)
113
- */
114
- weight: number;
115
- }
116
- interface UnionMember1 {
117
- /**
118
- * Unique identifier for the block
119
- */
120
- id: string;
121
- /**
122
- * Block type identifier
123
- */
124
- blockType: 'DATAFIELD_CHECK';
125
- /**
126
- * Optional description of what this block evaluates
127
- */
128
- description: string | null;
129
- /**
130
- * Criteria for evaluating the property
131
- */
132
- evaluationCriteria: string;
133
- /**
134
- * Whether this property must be present
135
- */
136
- isRequired: boolean;
137
- /**
138
- * Display name of the evaluation block
139
- */
140
- name: string;
141
- /**
142
- * Order in which this block is executed
143
- */
144
- orderIndex: number;
145
- /**
146
- * Name of the property to check
147
- */
148
- propertyName: string;
149
- /**
150
- * Minimum score threshold to pass evaluation (0-1)
151
- */
152
- threshold: number;
153
- /**
154
- * Expected type of the property value
155
- */
156
- valueType: string;
157
- /**
158
- * Weight of this block in the overall evaluation score (0-100)
159
- */
160
- weight: number;
161
- }
162
- interface UnionMember2 {
163
- /**
164
- * Unique identifier for the block
165
- */
166
- id: string;
167
- /**
168
- * Block type identifier
169
- */
170
- blockType: 'EMOTION';
171
- /**
172
- * Optional description of what this block evaluates
173
- */
174
- description: string | null;
175
- /**
176
- * Display name of the evaluation block
177
- */
178
- name: string;
179
- /**
180
- * Order in which this block is executed
181
- */
182
- orderIndex: number;
183
- /**
184
- * The emotion to detect (e.g., "joy", "anger", "sadness")
185
- */
186
- selectedEmotion: string;
187
- /**
188
- * Minimum confidence threshold for emotion detection (0-1)
189
- */
190
- threshold: number;
191
- /**
192
- * Weight of this block in the overall evaluation score (0-100)
193
- */
194
- weight: number;
195
- }
196
- interface UnionMember3 {
197
- /**
198
- * Unique identifier for the block
199
- */
200
- id: string;
201
- /**
202
- * Block type identifier
203
- */
204
- blockType: 'LATENCY';
205
- /**
206
- * Optional description of what this block evaluates
207
- */
208
- description: string | null;
209
- /**
210
- * Maximum number of silence periods allowed
211
- */
212
- maxAllowedSilences: number;
213
- /**
214
- * Minimum duration of silence in milliseconds to be considered
215
- */
216
- minSilenceDuration: number;
217
- /**
218
- * Display name of the evaluation block
219
- */
220
- name: string;
221
- /**
222
- * Order in which this block is executed
223
- */
224
- orderIndex: number;
225
- /**
226
- * Maximum allowed latency score
227
- */
228
- threshold: number;
229
- /**
230
- * Weight of this block in the overall evaluation score (0-100)
231
- */
232
- weight: number;
233
- }
234
- interface UnionMember4 {
235
- /**
236
- * Unique identifier for the block
237
- */
238
- id: string;
239
- /**
240
- * Block type identifier
241
- */
242
- blockType: 'POLITENESS';
243
- /**
244
- * Optional description of what this block evaluates
245
- */
246
- description: string | null;
247
- /**
248
- * Display name of the evaluation block
249
- */
250
- name: string;
251
- /**
252
- * Order in which this block is executed
253
- */
254
- orderIndex: number;
255
- /**
256
- * Minimum politeness score threshold (0-1)
257
- */
258
- threshold: number;
259
- /**
260
- * Weight of this block in the overall evaluation score (0-100)
261
- */
262
- weight: number;
263
- }
264
- interface UnionMember5 {
265
- /**
266
- * Unique identifier for the block
267
- */
268
- id: string;
269
- /**
270
- * Block type identifier
271
- */
272
- blockType: 'SENTIMENT';
273
- /**
274
- * Optional description of what this block evaluates
275
- */
276
- description: string | null;
277
- /**
278
- * Display name of the evaluation block
279
- */
280
- name: string;
281
- /**
282
- * Order in which this block is executed
283
- */
284
- orderIndex: number;
285
- /**
286
- * Minimum sentiment score threshold (0-1)
287
- */
288
- threshold: number;
289
- /**
290
- * Weight of this block in the overall evaluation score (0-100)
291
- */
292
- weight: number;
293
- }
294
- interface UnionMember6 {
295
- /**
296
- * Unique identifier for the block
297
- */
298
- id: string;
299
- /**
300
- * Block type identifier
301
- */
302
- blockType: 'TOOL_CALLS';
303
- /**
304
- * Optional description of what this block evaluates
305
- */
306
- description: string | null;
307
- /**
308
- * Condition that must be met for tool invocation
309
- */
310
- invocationCondition: string | null;
311
- /**
312
- * Minimum number of times the tool should be invoked
313
- */
314
- minInvocationCount: number | null;
315
- /**
316
- * Display name of the evaluation block
317
- */
318
- name: string;
319
- /**
320
- * Order in which this block is executed
321
- */
322
- orderIndex: number;
323
- /**
324
- * Whether the tool should be invoked
325
- */
326
- shouldBeInvoked: boolean;
327
- /**
328
- * ID of the tool definition
329
- */
330
- toolDefinitionId: string;
331
- /**
332
- * Weight of this block in the overall evaluation score (0-100)
333
- */
334
- weight: number;
335
- }
336
- interface UnionMember7 {
337
- /**
338
- * Unique identifier for the block
339
- */
340
- id: string;
341
- /**
342
- * Block type identifier
343
- */
344
- blockType: 'TOXICITY';
345
- /**
346
- * Optional description of what this block evaluates
347
- */
348
- description: string | null;
349
- /**
350
- * Display name of the evaluation block
351
- */
352
- name: string;
353
- /**
354
- * Order in which this block is executed
355
- */
356
- orderIndex: number;
357
- /**
358
- * Maximum allowed toxicity score (0-1)
359
- */
360
- threshold: number;
361
- /**
362
- * Weight of this block in the overall evaluation score (0-100)
363
- */
364
- weight: number;
365
- }
366
- interface UnionMember8 {
367
- /**
368
- * Unique identifier for the block
369
- */
370
- id: string;
371
- /**
372
- * Block type identifier
373
- */
374
- blockType: 'VOCAL_CUE';
375
- /**
376
- * Optional description of what this block evaluates
377
- */
378
- description: string | null;
379
- /**
380
- * Display name of the evaluation block
381
- */
382
- name: string;
383
- /**
384
- * Order in which this block is executed
385
- */
386
- orderIndex: number;
387
- /**
388
- * The vocal cue to detect (e.g., "pace", "tone", "volume")
389
- */
390
- selectedCue: string;
391
- /**
392
- * Minimum confidence threshold for vocal cue detection (0-1)
393
- */
394
- threshold: number;
395
- /**
396
- * Weight of this block in the overall evaluation score (0-100)
397
- */
398
- weight: number;
399
- }
400
- }
401
- }
402
- export interface EvaluationCreateJobResponse {
403
- data: EvaluationCreateJobResponse.Data;
404
- }
405
- export declare namespace EvaluationCreateJobResponse {
406
- interface Data {
407
- /**
408
- * ID of the evaluation job
409
- */
410
- jobId: string;
411
- /**
412
- * Status of the evaluation job
413
- */
414
- status: 'PENDING' | 'PROCESSING' | 'SUCCESS' | 'FAILURE';
415
- /**
416
- * ID of the call being evaluated (only present for single call evaluations)
417
- */
418
- callId?: string;
419
- }
420
- }
421
- /**
422
- * Evaluator with its configured blocks
423
- */
424
- export interface EvaluationGetEvaluatorByIDResponse {
425
- /**
426
- * Unique identifier for the evaluator
427
- */
428
- id: string;
429
- /**
430
- * Array of evaluation blocks configured for this evaluator
431
- */
432
- blocks: Array<EvaluationGetEvaluatorByIDResponse.UnionMember0 | EvaluationGetEvaluatorByIDResponse.UnionMember1 | EvaluationGetEvaluatorByIDResponse.UnionMember2 | EvaluationGetEvaluatorByIDResponse.UnionMember3 | EvaluationGetEvaluatorByIDResponse.UnionMember4 | EvaluationGetEvaluatorByIDResponse.UnionMember5 | EvaluationGetEvaluatorByIDResponse.UnionMember6 | EvaluationGetEvaluatorByIDResponse.UnionMember7 | EvaluationGetEvaluatorByIDResponse.UnionMember8>;
433
- /**
434
- * ISO timestamp when the evaluator was created
435
- */
436
- createdAt: string;
437
- /**
438
- * Optional description of the evaluator
439
- */
440
- description: string | null;
441
- /**
442
- * Name of the evaluator
443
- */
444
- name: string;
445
- /**
446
- * Unique slug identifier for the evaluator
447
- */
448
- slug: string;
449
- /**
450
- * ISO timestamp when the evaluator was last updated
451
- */
452
- updatedAt: string;
453
- }
454
- export declare namespace EvaluationGetEvaluatorByIDResponse {
455
- interface UnionMember0 {
456
- /**
457
- * Unique identifier for the block
458
- */
459
- id: string;
460
- /**
461
- * Block type identifier
462
- */
463
- blockType: 'CUSTOM_PROMPT';
464
- /**
465
- * Optional description of what this block evaluates
466
- */
467
- description: string | null;
468
- /**
469
- * Name of the metric this prompt evaluates
470
- */
471
- metricName: string;
472
- /**
473
- * Display name of the evaluation block
474
- */
475
- name: string;
476
- /**
477
- * Order in which this block is executed
478
- */
479
- orderIndex: number;
480
- /**
481
- * The prompt to evaluate the call against
482
- */
483
- prompt: string;
484
- /**
485
- * Minimum score threshold to pass evaluation (0-1)
486
- */
487
- threshold: number;
488
- /**
489
- * Weight of this block in the overall evaluation score (0-100)
490
- */
491
- weight: number;
492
- }
493
- interface UnionMember1 {
494
- /**
495
- * Unique identifier for the block
496
- */
497
- id: string;
498
- /**
499
- * Block type identifier
500
- */
501
- blockType: 'DATAFIELD_CHECK';
502
- /**
503
- * Optional description of what this block evaluates
504
- */
505
- description: string | null;
506
- /**
507
- * Criteria for evaluating the property
508
- */
509
- evaluationCriteria: string;
510
- /**
511
- * Whether this property must be present
512
- */
513
- isRequired: boolean;
514
- /**
515
- * Display name of the evaluation block
516
- */
517
- name: string;
518
- /**
519
- * Order in which this block is executed
520
- */
521
- orderIndex: number;
522
- /**
523
- * Name of the property to check
524
- */
525
- propertyName: string;
526
- /**
527
- * Minimum score threshold to pass evaluation (0-1)
528
- */
529
- threshold: number;
530
- /**
531
- * Expected type of the property value
532
- */
533
- valueType: string;
534
- /**
535
- * Weight of this block in the overall evaluation score (0-100)
536
- */
537
- weight: number;
538
- }
539
- interface UnionMember2 {
540
- /**
541
- * Unique identifier for the block
542
- */
543
- id: string;
544
- /**
545
- * Block type identifier
546
- */
547
- blockType: 'EMOTION';
548
- /**
549
- * Optional description of what this block evaluates
550
- */
551
- description: string | null;
552
- /**
553
- * Display name of the evaluation block
554
- */
555
- name: string;
556
- /**
557
- * Order in which this block is executed
558
- */
559
- orderIndex: number;
560
- /**
561
- * The emotion to detect (e.g., "joy", "anger", "sadness")
562
- */
563
- selectedEmotion: string;
564
- /**
565
- * Minimum confidence threshold for emotion detection (0-1)
566
- */
567
- threshold: number;
568
- /**
569
- * Weight of this block in the overall evaluation score (0-100)
570
- */
571
- weight: number;
572
- }
573
- interface UnionMember3 {
574
- /**
575
- * Unique identifier for the block
576
- */
577
- id: string;
578
- /**
579
- * Block type identifier
580
- */
581
- blockType: 'LATENCY';
582
- /**
583
- * Optional description of what this block evaluates
584
- */
585
- description: string | null;
586
- /**
587
- * Maximum number of silence periods allowed
588
- */
589
- maxAllowedSilences: number;
590
- /**
591
- * Minimum duration of silence in milliseconds to be considered
592
- */
593
- minSilenceDuration: number;
594
- /**
595
- * Display name of the evaluation block
596
- */
597
- name: string;
598
- /**
599
- * Order in which this block is executed
600
- */
601
- orderIndex: number;
602
- /**
603
- * Maximum allowed latency score
604
- */
605
- threshold: number;
606
- /**
607
- * Weight of this block in the overall evaluation score (0-100)
608
- */
609
- weight: number;
610
- }
611
- interface UnionMember4 {
612
- /**
613
- * Unique identifier for the block
614
- */
615
- id: string;
616
- /**
617
- * Block type identifier
618
- */
619
- blockType: 'POLITENESS';
620
- /**
621
- * Optional description of what this block evaluates
622
- */
623
- description: string | null;
624
- /**
625
- * Display name of the evaluation block
626
- */
627
- name: string;
628
- /**
629
- * Order in which this block is executed
630
- */
631
- orderIndex: number;
632
- /**
633
- * Minimum politeness score threshold (0-1)
634
- */
635
- threshold: number;
636
- /**
637
- * Weight of this block in the overall evaluation score (0-100)
638
- */
639
- weight: number;
640
- }
641
- interface UnionMember5 {
642
- /**
643
- * Unique identifier for the block
644
- */
645
- id: string;
646
- /**
647
- * Block type identifier
648
- */
649
- blockType: 'SENTIMENT';
650
- /**
651
- * Optional description of what this block evaluates
652
- */
653
- description: string | null;
654
- /**
655
- * Display name of the evaluation block
656
- */
657
- name: string;
658
- /**
659
- * Order in which this block is executed
660
- */
661
- orderIndex: number;
662
- /**
663
- * Minimum sentiment score threshold (0-1)
664
- */
665
- threshold: number;
666
- /**
667
- * Weight of this block in the overall evaluation score (0-100)
668
- */
669
- weight: number;
670
- }
671
- interface UnionMember6 {
672
- /**
673
- * Unique identifier for the block
674
- */
675
- id: string;
676
- /**
677
- * Block type identifier
678
- */
679
- blockType: 'TOOL_CALLS';
680
- /**
681
- * Optional description of what this block evaluates
682
- */
683
- description: string | null;
684
- /**
685
- * Condition that must be met for tool invocation
686
- */
687
- invocationCondition: string | null;
688
- /**
689
- * Minimum number of times the tool should be invoked
690
- */
691
- minInvocationCount: number | null;
692
- /**
693
- * Display name of the evaluation block
694
- */
695
- name: string;
696
- /**
697
- * Order in which this block is executed
698
- */
699
- orderIndex: number;
700
- /**
701
- * Whether the tool should be invoked
702
- */
703
- shouldBeInvoked: boolean;
704
- /**
705
- * ID of the tool definition
706
- */
707
- toolDefinitionId: string;
708
- /**
709
- * Weight of this block in the overall evaluation score (0-100)
710
- */
711
- weight: number;
712
- }
713
- interface UnionMember7 {
714
- /**
715
- * Unique identifier for the block
716
- */
717
- id: string;
718
- /**
719
- * Block type identifier
720
- */
721
- blockType: 'TOXICITY';
722
- /**
723
- * Optional description of what this block evaluates
724
- */
725
- description: string | null;
726
- /**
727
- * Display name of the evaluation block
728
- */
729
- name: string;
730
- /**
731
- * Order in which this block is executed
732
- */
733
- orderIndex: number;
734
- /**
735
- * Maximum allowed toxicity score (0-1)
736
- */
737
- threshold: number;
738
- /**
739
- * Weight of this block in the overall evaluation score (0-100)
740
- */
741
- weight: number;
742
- }
743
- interface UnionMember8 {
744
- /**
745
- * Unique identifier for the block
746
- */
747
- id: string;
748
- /**
749
- * Block type identifier
750
- */
751
- blockType: 'VOCAL_CUE';
752
- /**
753
- * Optional description of what this block evaluates
754
- */
755
- description: string | null;
756
- /**
757
- * Display name of the evaluation block
758
- */
759
- name: string;
760
- /**
761
- * Order in which this block is executed
762
- */
763
- orderIndex: number;
764
- /**
765
- * The vocal cue to detect (e.g., "pace", "tone", "volume")
766
- */
767
- selectedCue: string;
768
- /**
769
- * Minimum confidence threshold for vocal cue detection (0-1)
770
- */
771
- threshold: number;
772
- /**
773
- * Weight of this block in the overall evaluation score (0-100)
774
- */
775
- weight: number;
776
- }
777
- }
778
- export interface EvaluationGetJobResponse {
779
- /**
780
- * Evaluation job response payload
781
- */
782
- data: EvaluationGetJobResponse.Data;
783
- }
784
- export declare namespace EvaluationGetJobResponse {
785
- /**
786
- * Evaluation job response payload
787
- */
788
- interface Data {
789
- /**
790
- * ID of the evaluation job
791
- */
792
- id: string;
793
- /**
794
- * Status of the evaluation job
795
- */
796
- status: 'PENDING' | 'PROCESSING' | 'SUCCESS' | 'FAILURE';
797
- /**
798
- * Call being evaluated
799
- */
800
- call?: Data.Call;
801
- /**
802
- * Dataset being evaluated
803
- */
804
- dataset?: Data.Dataset;
805
- }
806
- namespace Data {
807
- /**
808
- * Call being evaluated
809
- */
810
- interface Call {
811
- /**
812
- * ID of the call being evaluated
813
- */
814
- id: string | null;
815
- }
816
- /**
817
- * Dataset being evaluated
818
- */
819
- interface Dataset {
820
- /**
821
- * ID of the dataset
822
- */
823
- id: string | null;
824
- /**
825
- * Calls in the dataset
826
- */
827
- calls: Array<Dataset.Call>;
828
- }
829
- namespace Dataset {
830
- interface Call {
831
- /**
832
- * ID of the call
833
- */
834
- id: string | null;
835
- }
836
- }
837
- }
838
- }
839
- /**
840
- * Response containing evaluators and pagination info
841
- */
842
- export interface EvaluationListEvaluatorsResponse {
843
- /**
844
- * Array of evaluators with their blocks
845
- */
846
- data: Array<EvaluationListEvaluatorsResponse.Data>;
847
- /**
848
- * Pagination information
849
- */
850
- pagination: EvaluationListEvaluatorsResponse.Pagination;
851
- }
852
- export declare namespace EvaluationListEvaluatorsResponse {
853
- /**
854
- * Evaluator with its configured blocks
855
- */
856
- interface Data {
857
- /**
858
- * Unique identifier for the evaluator
859
- */
860
- id: string;
861
- /**
862
- * Array of evaluation blocks configured for this evaluator
863
- */
864
- blocks: Array<Data.UnionMember0 | Data.UnionMember1 | Data.UnionMember2 | Data.UnionMember3 | Data.UnionMember4 | Data.UnionMember5 | Data.UnionMember6 | Data.UnionMember7 | Data.UnionMember8>;
865
- /**
866
- * ISO timestamp when the evaluator was created
867
- */
868
- createdAt: string;
869
- /**
870
- * Optional description of the evaluator
871
- */
872
- description: string | null;
873
- /**
874
- * Name of the evaluator
875
- */
876
- name: string;
877
- /**
878
- * Unique slug identifier for the evaluator
879
- */
880
- slug: string;
881
- /**
882
- * ISO timestamp when the evaluator was last updated
883
- */
884
- updatedAt: string;
885
- }
886
- namespace Data {
887
- interface UnionMember0 {
888
- /**
889
- * Unique identifier for the block
890
- */
891
- id: string;
892
- /**
893
- * Block type identifier
894
- */
895
- blockType: 'CUSTOM_PROMPT';
896
- /**
897
- * Optional description of what this block evaluates
898
- */
899
- description: string | null;
900
- /**
901
- * Name of the metric this prompt evaluates
902
- */
903
- metricName: string;
904
- /**
905
- * Display name of the evaluation block
906
- */
907
- name: string;
908
- /**
909
- * Order in which this block is executed
910
- */
911
- orderIndex: number;
912
- /**
913
- * The prompt to evaluate the call against
914
- */
915
- prompt: string;
916
- /**
917
- * Minimum score threshold to pass evaluation (0-1)
918
- */
919
- threshold: number;
920
- /**
921
- * Weight of this block in the overall evaluation score (0-100)
922
- */
923
- weight: number;
924
- }
925
- interface UnionMember1 {
926
- /**
927
- * Unique identifier for the block
928
- */
929
- id: string;
930
- /**
931
- * Block type identifier
932
- */
933
- blockType: 'DATAFIELD_CHECK';
934
- /**
935
- * Optional description of what this block evaluates
936
- */
937
- description: string | null;
938
- /**
939
- * Criteria for evaluating the property
940
- */
941
- evaluationCriteria: string;
942
- /**
943
- * Whether this property must be present
944
- */
945
- isRequired: boolean;
946
- /**
947
- * Display name of the evaluation block
948
- */
949
- name: string;
950
- /**
951
- * Order in which this block is executed
952
- */
953
- orderIndex: number;
954
- /**
955
- * Name of the property to check
956
- */
957
- propertyName: string;
958
- /**
959
- * Minimum score threshold to pass evaluation (0-1)
960
- */
961
- threshold: number;
962
- /**
963
- * Expected type of the property value
964
- */
965
- valueType: string;
966
- /**
967
- * Weight of this block in the overall evaluation score (0-100)
968
- */
969
- weight: number;
970
- }
971
- interface UnionMember2 {
972
- /**
973
- * Unique identifier for the block
974
- */
975
- id: string;
976
- /**
977
- * Block type identifier
978
- */
979
- blockType: 'EMOTION';
980
- /**
981
- * Optional description of what this block evaluates
982
- */
983
- description: string | null;
984
- /**
985
- * Display name of the evaluation block
986
- */
987
- name: string;
988
- /**
989
- * Order in which this block is executed
990
- */
991
- orderIndex: number;
992
- /**
993
- * The emotion to detect (e.g., "joy", "anger", "sadness")
994
- */
995
- selectedEmotion: string;
996
- /**
997
- * Minimum confidence threshold for emotion detection (0-1)
998
- */
999
- threshold: number;
1000
- /**
1001
- * Weight of this block in the overall evaluation score (0-100)
1002
- */
1003
- weight: number;
1004
- }
1005
- interface UnionMember3 {
1006
- /**
1007
- * Unique identifier for the block
1008
- */
1009
- id: string;
1010
- /**
1011
- * Block type identifier
1012
- */
1013
- blockType: 'LATENCY';
1014
- /**
1015
- * Optional description of what this block evaluates
1016
- */
1017
- description: string | null;
1018
- /**
1019
- * Maximum number of silence periods allowed
1020
- */
1021
- maxAllowedSilences: number;
1022
- /**
1023
- * Minimum duration of silence in milliseconds to be considered
1024
- */
1025
- minSilenceDuration: number;
1026
- /**
1027
- * Display name of the evaluation block
1028
- */
1029
- name: string;
1030
- /**
1031
- * Order in which this block is executed
1032
- */
1033
- orderIndex: number;
1034
- /**
1035
- * Maximum allowed latency score
1036
- */
1037
- threshold: number;
1038
- /**
1039
- * Weight of this block in the overall evaluation score (0-100)
1040
- */
1041
- weight: number;
1042
- }
1043
- interface UnionMember4 {
1044
- /**
1045
- * Unique identifier for the block
1046
- */
1047
- id: string;
1048
- /**
1049
- * Block type identifier
1050
- */
1051
- blockType: 'POLITENESS';
1052
- /**
1053
- * Optional description of what this block evaluates
1054
- */
1055
- description: string | null;
1056
- /**
1057
- * Display name of the evaluation block
1058
- */
1059
- name: string;
1060
- /**
1061
- * Order in which this block is executed
1062
- */
1063
- orderIndex: number;
1064
- /**
1065
- * Minimum politeness score threshold (0-1)
1066
- */
1067
- threshold: number;
1068
- /**
1069
- * Weight of this block in the overall evaluation score (0-100)
1070
- */
1071
- weight: number;
1072
- }
1073
- interface UnionMember5 {
1074
- /**
1075
- * Unique identifier for the block
1076
- */
1077
- id: string;
1078
- /**
1079
- * Block type identifier
1080
- */
1081
- blockType: 'SENTIMENT';
1082
- /**
1083
- * Optional description of what this block evaluates
1084
- */
1085
- description: string | null;
1086
- /**
1087
- * Display name of the evaluation block
1088
- */
1089
- name: string;
1090
- /**
1091
- * Order in which this block is executed
1092
- */
1093
- orderIndex: number;
1094
- /**
1095
- * Minimum sentiment score threshold (0-1)
1096
- */
1097
- threshold: number;
1098
- /**
1099
- * Weight of this block in the overall evaluation score (0-100)
1100
- */
1101
- weight: number;
1102
- }
1103
- interface UnionMember6 {
1104
- /**
1105
- * Unique identifier for the block
1106
- */
1107
- id: string;
1108
- /**
1109
- * Block type identifier
1110
- */
1111
- blockType: 'TOOL_CALLS';
1112
- /**
1113
- * Optional description of what this block evaluates
1114
- */
1115
- description: string | null;
1116
- /**
1117
- * Condition that must be met for tool invocation
1118
- */
1119
- invocationCondition: string | null;
1120
- /**
1121
- * Minimum number of times the tool should be invoked
1122
- */
1123
- minInvocationCount: number | null;
1124
- /**
1125
- * Display name of the evaluation block
1126
- */
1127
- name: string;
1128
- /**
1129
- * Order in which this block is executed
1130
- */
1131
- orderIndex: number;
1132
- /**
1133
- * Whether the tool should be invoked
1134
- */
1135
- shouldBeInvoked: boolean;
1136
- /**
1137
- * ID of the tool definition
1138
- */
1139
- toolDefinitionId: string;
1140
- /**
1141
- * Weight of this block in the overall evaluation score (0-100)
1142
- */
1143
- weight: number;
1144
- }
1145
- interface UnionMember7 {
1146
- /**
1147
- * Unique identifier for the block
1148
- */
1149
- id: string;
1150
- /**
1151
- * Block type identifier
1152
- */
1153
- blockType: 'TOXICITY';
1154
- /**
1155
- * Optional description of what this block evaluates
1156
- */
1157
- description: string | null;
1158
- /**
1159
- * Display name of the evaluation block
1160
- */
1161
- name: string;
1162
- /**
1163
- * Order in which this block is executed
1164
- */
1165
- orderIndex: number;
1166
- /**
1167
- * Maximum allowed toxicity score (0-1)
1168
- */
1169
- threshold: number;
1170
- /**
1171
- * Weight of this block in the overall evaluation score (0-100)
1172
- */
1173
- weight: number;
1174
- }
1175
- interface UnionMember8 {
1176
- /**
1177
- * Unique identifier for the block
1178
- */
1179
- id: string;
1180
- /**
1181
- * Block type identifier
1182
- */
1183
- blockType: 'VOCAL_CUE';
1184
- /**
1185
- * Optional description of what this block evaluates
1186
- */
1187
- description: string | null;
1188
- /**
1189
- * Display name of the evaluation block
1190
- */
1191
- name: string;
1192
- /**
1193
- * Order in which this block is executed
1194
- */
1195
- orderIndex: number;
1196
- /**
1197
- * The vocal cue to detect (e.g., "pace", "tone", "volume")
1198
- */
1199
- selectedCue: string;
1200
- /**
1201
- * Minimum confidence threshold for vocal cue detection (0-1)
1202
- */
1203
- threshold: number;
1204
- /**
1205
- * Weight of this block in the overall evaluation score (0-100)
1206
- */
1207
- weight: number;
1208
- }
1209
- }
1210
- /**
1211
- * Pagination information
1212
- */
1213
- interface Pagination {
1214
- /**
1215
- * Whether there are more evaluators to fetch
1216
- */
1217
- hasMore: boolean;
1218
- /**
1219
- * Cursor for the next page, null if no more pages
1220
- */
1221
- nextCursor: string | null;
1222
- /**
1223
- * Total number of evaluators
1224
- */
1225
- total: number;
1226
- }
1227
- }
1228
- export interface EvaluationListJobRunsResponse {
1229
- /**
1230
- * Evaluation job runs response payload
1231
- */
1232
- data: EvaluationListJobRunsResponse.Data;
1233
- }
1234
- export declare namespace EvaluationListJobRunsResponse {
1235
- /**
1236
- * Evaluation job runs response payload
1237
- */
1238
- interface Data {
1239
- /**
1240
- * Evaluator runs of the evaluation job
1241
- */
1242
- data: Array<Data.Data> | null;
1243
- /**
1244
- * Pagination information
1245
- */
1246
- pagination: Data.Pagination | null;
1247
- }
1248
- namespace Data {
1249
- interface Data {
1250
- /**
1251
- * All block runs for this evaluator, including skipped ones
1252
- */
1253
- blockRuns: Array<Data.BlockRun>;
1254
- evaluator: Data.Evaluator;
1255
- evidence: Array<Data.Evidence>;
1256
- metrics: Array<Data.Metric>;
1257
- /**
1258
- * Status of the evaluator run
1259
- */
1260
- status: 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED';
1261
- /**
1262
- * ID of the evaluator run
1263
- */
1264
- id?: string;
1265
- /**
1266
- * When the evaluator run completed
1267
- */
1268
- completedAt?: string | null;
1269
- /**
1270
- * Result of the evaluator run based on score threshold (IRRELEVANT is mapped to
1271
- * SKIPPED)
1272
- */
1273
- result?: 'SUCCESS' | 'FAILURE' | 'SKIPPED' | null;
1274
- /**
1275
- * Score of the evaluation run (0-1)
1276
- */
1277
- score?: number | null;
1278
- /**
1279
- * When the evaluator run started
1280
- */
1281
- startedAt?: string | null;
1282
- /**
1283
- * Summary of the evaluation run
1284
- */
1285
- summary?: string | null;
1286
- }
1287
- namespace Data {
1288
- interface BlockRun {
1289
- /**
1290
- * ID of the block definition
1291
- */
1292
- blockDefinitionId: string;
1293
- /**
1294
- * Name of the evaluation block
1295
- */
1296
- blockName: string;
1297
- /**
1298
- * ID of the block run instance
1299
- */
1300
- blockRunId: string;
1301
- /**
1302
- * When the block run was created
1303
- */
1304
- createdAt: string;
1305
- /**
1306
- * Reason for the outcome (pass/fail explanation or skip reason)
1307
- */
1308
- reason: string | null;
1309
- /**
1310
- * Result of the block run
1311
- */
1312
- result: 'PASSED' | 'FAILED' | 'SKIPPED' | null;
1313
- /**
1314
- * Score of the block run (0-1)
1315
- */
1316
- score: number | null;
1317
- /**
1318
- * Status of the block run
1319
- */
1320
- status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
1321
- }
1322
- interface Evaluator {
1323
- /**
1324
- * ID of the evaluator
1325
- */
1326
- id: string;
1327
- /**
1328
- * Name of the evaluator
1329
- */
1330
- name: string;
1331
- /**
1332
- * Weight of the evaluator
1333
- */
1334
- weight?: number;
1335
- }
1336
- interface Evidence {
1337
- /**
1338
- * Comment text of the evidence
1339
- */
1340
- commentText: string | null;
1341
- /**
1342
- * Created at of the evidence
1343
- */
1344
- createdAt: string;
1345
- /**
1346
- * Is positive of the evidence
1347
- */
1348
- isPositive: boolean;
1349
- /**
1350
- * Snippet text of the evidence
1351
- */
1352
- snippetText: string;
1353
- }
1354
- interface Metric {
1355
- /**
1356
- * Boolean value of the metric
1357
- */
1358
- booleanValue: boolean | null;
1359
- /**
1360
- * Confidence level of the metric (0-1)
1361
- */
1362
- confidence: number | null;
1363
- /**
1364
- * Created at of the metric
1365
- */
1366
- createdAt: string;
1367
- /**
1368
- * Name of the metric
1369
- */
1370
- name: string;
1371
- /**
1372
- * Numeric value of the metric
1373
- */
1374
- numericValue: number | null;
1375
- /**
1376
- * Reasoning of the metric
1377
- */
1378
- reasoning: string | null;
1379
- /**
1380
- * Role of the metric
1381
- */
1382
- role: string;
1383
- /**
1384
- * Text value of the metric
1385
- */
1386
- textValue: string | null;
1387
- /**
1388
- * Value type of the metric
1389
- */
1390
- valueType: string;
1391
- }
1392
- }
1393
- /**
1394
- * Pagination information
1395
- */
1396
- interface Pagination {
1397
- /**
1398
- * Whether there are more items to fetch
1399
- */
1400
- hasMore: boolean;
1401
- /**
1402
- * Cursor for the next page of items
1403
- */
1404
- nextCursor: string | null;
1405
- /**
1406
- * Total number of items
1407
- */
1408
- total: number;
1409
- }
1410
- }
1411
- }
1412
- export interface EvaluationUpdateEvaluatorResponse {
1413
- /**
1414
- * Evaluator with its configured blocks
1415
- */
1416
- data: EvaluationUpdateEvaluatorResponse.Data;
1417
- }
1418
- export declare namespace EvaluationUpdateEvaluatorResponse {
1419
- /**
1420
- * Evaluator with its configured blocks
1421
- */
1422
- interface Data {
1423
- /**
1424
- * Unique identifier for the evaluator
1425
- */
1426
- id: string;
1427
- /**
1428
- * Array of evaluation blocks configured for this evaluator
1429
- */
1430
- blocks: Array<Data.UnionMember0 | Data.UnionMember1 | Data.UnionMember2 | Data.UnionMember3 | Data.UnionMember4 | Data.UnionMember5 | Data.UnionMember6 | Data.UnionMember7 | Data.UnionMember8>;
1431
- /**
1432
- * ISO timestamp when the evaluator was created
1433
- */
1434
- createdAt: string;
1435
- /**
1436
- * Optional description of the evaluator
1437
- */
1438
- description: string | null;
1439
- /**
1440
- * Name of the evaluator
1441
- */
1442
- name: string;
1443
- /**
1444
- * Unique slug identifier for the evaluator
1445
- */
1446
- slug: string;
1447
- /**
1448
- * ISO timestamp when the evaluator was last updated
1449
- */
1450
- updatedAt: string;
1451
- }
1452
- namespace Data {
1453
- interface UnionMember0 {
1454
- /**
1455
- * Unique identifier for the block
1456
- */
1457
- id: string;
1458
- /**
1459
- * Block type identifier
1460
- */
1461
- blockType: 'CUSTOM_PROMPT';
1462
- /**
1463
- * Optional description of what this block evaluates
1464
- */
1465
- description: string | null;
1466
- /**
1467
- * Name of the metric this prompt evaluates
1468
- */
1469
- metricName: string;
1470
- /**
1471
- * Display name of the evaluation block
1472
- */
1473
- name: string;
1474
- /**
1475
- * Order in which this block is executed
1476
- */
1477
- orderIndex: number;
1478
- /**
1479
- * The prompt to evaluate the call against
1480
- */
1481
- prompt: string;
1482
- /**
1483
- * Minimum score threshold to pass evaluation (0-1)
1484
- */
1485
- threshold: number;
1486
- /**
1487
- * Weight of this block in the overall evaluation score (0-100)
1488
- */
1489
- weight: number;
1490
- }
1491
- interface UnionMember1 {
1492
- /**
1493
- * Unique identifier for the block
1494
- */
1495
- id: string;
1496
- /**
1497
- * Block type identifier
1498
- */
1499
- blockType: 'DATAFIELD_CHECK';
1500
- /**
1501
- * Optional description of what this block evaluates
1502
- */
1503
- description: string | null;
1504
- /**
1505
- * Criteria for evaluating the property
1506
- */
1507
- evaluationCriteria: string;
1508
- /**
1509
- * Whether this property must be present
1510
- */
1511
- isRequired: boolean;
1512
- /**
1513
- * Display name of the evaluation block
1514
- */
1515
- name: string;
1516
- /**
1517
- * Order in which this block is executed
1518
- */
1519
- orderIndex: number;
1520
- /**
1521
- * Name of the property to check
1522
- */
1523
- propertyName: string;
1524
- /**
1525
- * Minimum score threshold to pass evaluation (0-1)
1526
- */
1527
- threshold: number;
1528
- /**
1529
- * Expected type of the property value
1530
- */
1531
- valueType: string;
1532
- /**
1533
- * Weight of this block in the overall evaluation score (0-100)
1534
- */
1535
- weight: number;
1536
- }
1537
- interface UnionMember2 {
1538
- /**
1539
- * Unique identifier for the block
1540
- */
1541
- id: string;
1542
- /**
1543
- * Block type identifier
1544
- */
1545
- blockType: 'EMOTION';
1546
- /**
1547
- * Optional description of what this block evaluates
1548
- */
1549
- description: string | null;
1550
- /**
1551
- * Display name of the evaluation block
1552
- */
1553
- name: string;
1554
- /**
1555
- * Order in which this block is executed
1556
- */
1557
- orderIndex: number;
1558
- /**
1559
- * The emotion to detect (e.g., "joy", "anger", "sadness")
1560
- */
1561
- selectedEmotion: string;
1562
- /**
1563
- * Minimum confidence threshold for emotion detection (0-1)
1564
- */
1565
- threshold: number;
1566
- /**
1567
- * Weight of this block in the overall evaluation score (0-100)
1568
- */
1569
- weight: number;
1570
- }
1571
- interface UnionMember3 {
1572
- /**
1573
- * Unique identifier for the block
1574
- */
1575
- id: string;
1576
- /**
1577
- * Block type identifier
1578
- */
1579
- blockType: 'LATENCY';
1580
- /**
1581
- * Optional description of what this block evaluates
1582
- */
1583
- description: string | null;
1584
- /**
1585
- * Maximum number of silence periods allowed
1586
- */
1587
- maxAllowedSilences: number;
1588
- /**
1589
- * Minimum duration of silence in milliseconds to be considered
1590
- */
1591
- minSilenceDuration: number;
1592
- /**
1593
- * Display name of the evaluation block
1594
- */
1595
- name: string;
1596
- /**
1597
- * Order in which this block is executed
1598
- */
1599
- orderIndex: number;
1600
- /**
1601
- * Maximum allowed latency score
1602
- */
1603
- threshold: number;
1604
- /**
1605
- * Weight of this block in the overall evaluation score (0-100)
1606
- */
1607
- weight: number;
1608
- }
1609
- interface UnionMember4 {
1610
- /**
1611
- * Unique identifier for the block
1612
- */
1613
- id: string;
1614
- /**
1615
- * Block type identifier
1616
- */
1617
- blockType: 'POLITENESS';
1618
- /**
1619
- * Optional description of what this block evaluates
1620
- */
1621
- description: string | null;
1622
- /**
1623
- * Display name of the evaluation block
1624
- */
1625
- name: string;
1626
- /**
1627
- * Order in which this block is executed
1628
- */
1629
- orderIndex: number;
1630
- /**
1631
- * Minimum politeness score threshold (0-1)
1632
- */
1633
- threshold: number;
1634
- /**
1635
- * Weight of this block in the overall evaluation score (0-100)
1636
- */
1637
- weight: number;
1638
- }
1639
- interface UnionMember5 {
1640
- /**
1641
- * Unique identifier for the block
1642
- */
1643
- id: string;
1644
- /**
1645
- * Block type identifier
1646
- */
1647
- blockType: 'SENTIMENT';
1648
- /**
1649
- * Optional description of what this block evaluates
1650
- */
1651
- description: string | null;
1652
- /**
1653
- * Display name of the evaluation block
1654
- */
1655
- name: string;
1656
- /**
1657
- * Order in which this block is executed
1658
- */
1659
- orderIndex: number;
1660
- /**
1661
- * Minimum sentiment score threshold (0-1)
1662
- */
1663
- threshold: number;
1664
- /**
1665
- * Weight of this block in the overall evaluation score (0-100)
1666
- */
1667
- weight: number;
1668
- }
1669
- interface UnionMember6 {
1670
- /**
1671
- * Unique identifier for the block
1672
- */
1673
- id: string;
1674
- /**
1675
- * Block type identifier
1676
- */
1677
- blockType: 'TOOL_CALLS';
1678
- /**
1679
- * Optional description of what this block evaluates
1680
- */
1681
- description: string | null;
1682
- /**
1683
- * Condition that must be met for tool invocation
1684
- */
1685
- invocationCondition: string | null;
1686
- /**
1687
- * Minimum number of times the tool should be invoked
1688
- */
1689
- minInvocationCount: number | null;
1690
- /**
1691
- * Display name of the evaluation block
1692
- */
1693
- name: string;
1694
- /**
1695
- * Order in which this block is executed
1696
- */
1697
- orderIndex: number;
1698
- /**
1699
- * Whether the tool should be invoked
1700
- */
1701
- shouldBeInvoked: boolean;
1702
- /**
1703
- * ID of the tool definition
1704
- */
1705
- toolDefinitionId: string;
1706
- /**
1707
- * Weight of this block in the overall evaluation score (0-100)
1708
- */
1709
- weight: number;
1710
- }
1711
- interface UnionMember7 {
1712
- /**
1713
- * Unique identifier for the block
1714
- */
1715
- id: string;
1716
- /**
1717
- * Block type identifier
1718
- */
1719
- blockType: 'TOXICITY';
1720
- /**
1721
- * Optional description of what this block evaluates
1722
- */
1723
- description: string | null;
1724
- /**
1725
- * Display name of the evaluation block
1726
- */
1727
- name: string;
1728
- /**
1729
- * Order in which this block is executed
1730
- */
1731
- orderIndex: number;
1732
- /**
1733
- * Maximum allowed toxicity score (0-1)
1734
- */
1735
- threshold: number;
1736
- /**
1737
- * Weight of this block in the overall evaluation score (0-100)
1738
- */
1739
- weight: number;
1740
- }
1741
- interface UnionMember8 {
1742
- /**
1743
- * Unique identifier for the block
1744
- */
1745
- id: string;
1746
- /**
1747
- * Block type identifier
1748
- */
1749
- blockType: 'VOCAL_CUE';
1750
- /**
1751
- * Optional description of what this block evaluates
1752
- */
1753
- description: string | null;
1754
- /**
1755
- * Display name of the evaluation block
1756
- */
1757
- name: string;
1758
- /**
1759
- * Order in which this block is executed
1760
- */
1761
- orderIndex: number;
1762
- /**
1763
- * The vocal cue to detect (e.g., "pace", "tone", "volume")
1764
- */
1765
- selectedCue: string;
1766
- /**
1767
- * Minimum confidence threshold for vocal cue detection (0-1)
1768
- */
1769
- threshold: number;
1770
- /**
1771
- * Weight of this block in the overall evaluation score (0-100)
1772
- */
1773
- weight: number;
1774
- }
1775
- }
1776
- }
1777
- export interface EvaluationCreateEvaluatorParams {
1778
- /**
1779
- * Array of evaluation blocks (at least one required)
1780
- */
1781
- blocks: Array<EvaluationCreateEvaluatorParams.CreateCustomPromptBlockInput | EvaluationCreateEvaluatorParams.CreateDatafieldCheckBlockInput | EvaluationCreateEvaluatorParams.CreateEmotionBlockInput | EvaluationCreateEvaluatorParams.CreateLatencyBlockInput | EvaluationCreateEvaluatorParams.CreatePolitenessBlockInput | EvaluationCreateEvaluatorParams.CreateSentimentBlockInput | EvaluationCreateEvaluatorParams.CreateToolCallsBlockInput | EvaluationCreateEvaluatorParams.CreateToxicityBlockInput | EvaluationCreateEvaluatorParams.CreateVocalCueBlockInput>;
1782
- /**
1783
- * Name of the evaluator
1784
- */
1785
- name: string;
1786
- /**
1787
- * Optional description of the evaluator
1788
- */
1789
- description?: string | null;
1790
- }
1791
- export declare namespace EvaluationCreateEvaluatorParams {
1792
- interface CreateCustomPromptBlockInput {
1793
- blockType: 'CUSTOM_PROMPT';
1794
- /**
1795
- * Name of the metric this prompt evaluates
1796
- */
1797
- metricName: string;
1798
- /**
1799
- * Display name of the evaluation block
1800
- */
1801
- name: string;
1802
- /**
1803
- * The prompt to evaluate the call against
1804
- */
1805
- prompt: string;
1806
- /**
1807
- * Optional description of what this block evaluates
1808
- */
1809
- description?: string | null;
1810
- /**
1811
- * Input dimensions for the block (auto-assigned if not provided)
1812
- */
1813
- inputDimensions?: Array<string>;
1814
- /**
1815
- * Order in which this block is executed (defaults to array position)
1816
- */
1817
- orderIndex?: number;
1818
- /**
1819
- * Condition to skip this block evaluation
1820
- */
1821
- skipCondition?: string | null;
1822
- /**
1823
- * Minimum score threshold to pass evaluation (0-1, default: 0.7)
1824
- */
1825
- threshold?: number;
1826
- /**
1827
- * Weight of this block in the overall evaluation score (0-100, default: 50)
1828
- */
1829
- weight?: number;
1830
- }
1831
- interface CreateDatafieldCheckBlockInput {
1832
- blockType: 'DATAFIELD_CHECK';
1833
- /**
1834
- * Criteria for evaluating the property
1835
- */
1836
- evaluationCriteria: string;
1837
- /**
1838
- * Display name of the evaluation block
1839
- */
1840
- name: string;
1841
- /**
1842
- * Name of the property to check
1843
- */
1844
- propertyName: string;
1845
- /**
1846
- * Optional description of what this block evaluates
1847
- */
1848
- description?: string | null;
1849
- /**
1850
- * Input dimensions for the block (auto-assigned if not provided)
1851
- */
1852
- inputDimensions?: Array<string>;
1853
- /**
1854
- * Whether this property must be present
1855
- */
1856
- isRequired?: boolean;
1857
- /**
1858
- * Order in which this block is executed (defaults to array position)
1859
- */
1860
- orderIndex?: number;
1861
- /**
1862
- * Condition to skip this block evaluation
1863
- */
1864
- skipCondition?: string | null;
1865
- /**
1866
- * Minimum score threshold to pass evaluation (0-1, default: 0.8)
1867
- */
1868
- threshold?: number;
1869
- /**
1870
- * Expected type of the property value
1871
- */
1872
- valueType?: string;
1873
- /**
1874
- * Weight of this block in the overall evaluation score (0-100, default: 50)
1875
- */
1876
- weight?: number;
1877
- }
1878
- interface CreateEmotionBlockInput {
1879
- blockType: 'EMOTION';
1880
- /**
1881
- * Display name of the evaluation block
1882
- */
1883
- name: string;
1884
- /**
1885
- * Optional description of what this block evaluates
1886
- */
1887
- description?: string | null;
1888
- /**
1889
- * Input dimensions for the block (auto-assigned if not provided)
1890
- */
1891
- inputDimensions?: Array<string>;
1892
- /**
1893
- * Order in which this block is executed (defaults to array position)
1894
- */
1895
- orderIndex?: number;
1896
- /**
1897
- * The emotion to detect (e.g., "joy", "anger", "sadness")
1898
- */
1899
- selectedEmotion?: string;
1900
- /**
1901
- * Condition to skip this block evaluation
1902
- */
1903
- skipCondition?: string | null;
1904
- /**
1905
- * Minimum confidence threshold for emotion detection (0-1, default: 0.7)
1906
- */
1907
- threshold?: number;
1908
- /**
1909
- * Weight of this block in the overall evaluation score (0-100, default: 50)
1910
- */
1911
- weight?: number;
1912
- }
1913
- interface CreateLatencyBlockInput {
1914
- blockType: 'LATENCY';
1915
- /**
1916
- * Display name of the evaluation block
1917
- */
1918
- name: string;
1919
- /**
1920
- * Optional description of what this block evaluates
1921
- */
1922
- description?: string | null;
1923
- /**
1924
- * Input dimensions for the block (auto-assigned if not provided)
1925
- */
1926
- inputDimensions?: Array<string>;
1927
- /**
1928
- * Maximum number of silence periods allowed
1929
- */
1930
- maxAllowedSilences?: number;
1931
- /**
1932
- * Minimum duration of silence in milliseconds to be considered
1933
- */
1934
- minSilenceDuration?: number;
1935
- /**
1936
- * Order in which this block is executed (defaults to array position)
1937
- */
1938
- orderIndex?: number;
1939
- /**
1940
- * Condition to skip this block evaluation
1941
- */
1942
- skipCondition?: string | null;
1943
- /**
1944
- * Maximum allowed latency score
1945
- */
1946
- threshold?: number;
1947
- /**
1948
- * Weight of this block in the overall evaluation score (0-100, default: 50)
1949
- */
1950
- weight?: number;
1951
- }
1952
- interface CreatePolitenessBlockInput {
1953
- blockType: 'POLITENESS';
1954
- /**
1955
- * Display name of the evaluation block
1956
- */
1957
- name: string;
1958
- /**
1959
- * Optional description of what this block evaluates
1960
- */
1961
- description?: string | null;
1962
- /**
1963
- * Input dimensions for the block (auto-assigned if not provided)
1964
- */
1965
- inputDimensions?: Array<string>;
1966
- /**
1967
- * Order in which this block is executed (defaults to array position)
1968
- */
1969
- orderIndex?: number;
1970
- /**
1971
- * Condition to skip this block evaluation
1972
- */
1973
- skipCondition?: string | null;
1974
- /**
1975
- * Minimum politeness score threshold (0-1, default: 0.7)
1976
- */
1977
- threshold?: number;
1978
- /**
1979
- * Weight of this block in the overall evaluation score (0-100, default: 50)
1980
- */
1981
- weight?: number;
1982
- }
1983
- interface CreateSentimentBlockInput {
1984
- blockType: 'SENTIMENT';
1985
- /**
1986
- * Display name of the evaluation block
1987
- */
1988
- name: string;
1989
- /**
1990
- * Optional description of what this block evaluates
1991
- */
1992
- description?: string | null;
1993
- /**
1994
- * Input dimensions for the block (auto-assigned if not provided)
1995
- */
1996
- inputDimensions?: Array<string>;
1997
- /**
1998
- * Order in which this block is executed (defaults to array position)
1999
- */
2000
- orderIndex?: number;
2001
- /**
2002
- * Condition to skip this block evaluation
2003
- */
2004
- skipCondition?: string | null;
2005
- /**
2006
- * Minimum sentiment score threshold (0-1, default: 0.7)
2007
- */
2008
- threshold?: number;
2009
- /**
2010
- * Weight of this block in the overall evaluation score (0-100, default: 50)
2011
- */
2012
- weight?: number;
2013
- }
2014
- interface CreateToolCallsBlockInput {
2015
- blockType: 'TOOL_CALLS';
2016
- /**
2017
- * Display name of the evaluation block
2018
- */
2019
- name: string;
2020
- /**
2021
- * ID of the tool definition
2022
- */
2023
- toolDefinitionId: string;
2024
- /**
2025
- * Optional description of what this block evaluates
2026
- */
2027
- description?: string | null;
2028
- /**
2029
- * Input dimensions for the block (auto-assigned if not provided)
2030
- */
2031
- inputDimensions?: Array<string>;
2032
- /**
2033
- * Condition that must be met for tool invocation
2034
- */
2035
- invocationCondition?: string | null;
2036
- /**
2037
- * Minimum number of times the tool should be invoked
2038
- */
2039
- minInvocationCount?: number | null;
2040
- /**
2041
- * Order in which this block is executed (defaults to array position)
2042
- */
2043
- orderIndex?: number;
2044
- /**
2045
- * Whether the tool should be invoked
2046
- */
2047
- shouldBeInvoked?: boolean;
2048
- /**
2049
- * Condition to skip this block evaluation
2050
- */
2051
- skipCondition?: string | null;
2052
- /**
2053
- * Weight of this block in the overall evaluation score (0-100, default: 50)
2054
- */
2055
- weight?: number;
2056
- }
2057
- interface CreateToxicityBlockInput {
2058
- blockType: 'TOXICITY';
2059
- /**
2060
- * Display name of the evaluation block
2061
- */
2062
- name: string;
2063
- /**
2064
- * Optional description of what this block evaluates
2065
- */
2066
- description?: string | null;
2067
- /**
2068
- * Input dimensions for the block (auto-assigned if not provided)
2069
- */
2070
- inputDimensions?: Array<string>;
2071
- /**
2072
- * Order in which this block is executed (defaults to array position)
2073
- */
2074
- orderIndex?: number;
2075
- /**
2076
- * Condition to skip this block evaluation
2077
- */
2078
- skipCondition?: string | null;
2079
- /**
2080
- * Maximum allowed toxicity score (0-1, default: 0.7)
2081
- */
2082
- threshold?: number;
2083
- /**
2084
- * Weight of this block in the overall evaluation score (0-100, default: 50)
2085
- */
2086
- weight?: number;
2087
- }
2088
- interface CreateVocalCueBlockInput {
2089
- blockType: 'VOCAL_CUE';
2090
- /**
2091
- * Display name of the evaluation block
2092
- */
2093
- name: string;
2094
- /**
2095
- * Optional description of what this block evaluates
2096
- */
2097
- description?: string | null;
2098
- /**
2099
- * Input dimensions for the block (auto-assigned if not provided)
2100
- */
2101
- inputDimensions?: Array<string>;
2102
- /**
2103
- * Order in which this block is executed (defaults to array position)
2104
- */
2105
- orderIndex?: number;
2106
- /**
2107
- * The vocal cue to detect (e.g., "pace", "tone", "volume")
2108
- */
2109
- selectedCue?: string;
2110
- /**
2111
- * Condition to skip this block evaluation
2112
- */
2113
- skipCondition?: string | null;
2114
- /**
2115
- * Minimum confidence threshold for vocal cue detection (0-1, default: 0.7)
2116
- */
2117
- threshold?: number;
2118
- /**
2119
- * Weight of this block in the overall evaluation score (0-100, default: 50)
2120
- */
2121
- weight?: number;
2122
- }
2123
- }
2124
- export interface EvaluationCreateJobParams {
2125
- /**
2126
- * List of evaluators slugs to evaluate the calls or "all" to evaluate all
2127
- * evaluators
2128
- */
2129
- evaluators: Array<string> | 'all';
2130
- /**
2131
- * Call input to evaluate
2132
- */
2133
- call?: EvaluationCreateJobParams.Call;
2134
- /**
2135
- * ID of an existing call to evaluate
2136
- */
2137
- callId?: string;
2138
- dataset?: EvaluationCreateJobParams.Dataset;
2139
- }
2140
- export declare namespace EvaluationCreateJobParams {
2141
- /**
2142
- * Call input to evaluate
2143
- */
2144
- interface Call {
2145
- /**
2146
- * Direction of the call (INBOUND or OUTBOUND)
2147
- */
2148
- callDirection: 'INBOUND' | 'OUTBOUND';
2149
- /**
2150
- * Interface type of the call (PHONE or WEB)
2151
- */
2152
- interfaceType: 'PHONE' | 'WEB';
2153
- /**
2154
- * Exactly two participants in the call
2155
- */
2156
- participants: Array<Call.Participant>;
2157
- /**
2158
- * URL of source recording (must be an accessible WAV, MP3, or MP4 file). Can be a
2159
- * signed URL.
2160
- */
2161
- recordingUrl: string;
2162
- /**
2163
- * When the call started (ISO 8601 format)
2164
- */
2165
- startedAt: string;
2166
- /**
2167
- * Additional context on why the call terminated with the endedStatus
2168
- */
2169
- endedReason?: string;
2170
- /**
2171
- * High-level call end status, indicating how the call terminated
2172
- */
2173
- endedStatus?: 'PARTICIPANTS_DID_NOT_SPEAK' | 'AGENT_DID_NOT_ANSWER' | 'AGENT_DID_NOT_SPEAK' | 'AGENT_STOPPED_SPEAKING' | 'AGENT_ENDED_CALL' | 'AGENT_TRANSFERRED_CALL' | 'AGENT_BUSY' | 'AGENT_ERROR' | 'CUSTOMER_ENDED_CALL' | 'VOICE_MAIL_REACHED' | 'SILENCE_TIME_OUT' | 'PHONE_CALL_PROVIDER_CONNECTION_ERROR' | 'CUSTOMER_DID_NOT_ANSWER' | 'CUSTOMER_DID_NOT_SPEAK' | 'CUSTOMER_STOPPED_SPEAKING' | 'CUSTOMER_BUSY' | 'DIAL_ERROR' | 'MAX_DURATION_REACHED' | 'UNKNOWN';
2174
- /**
2175
- * Whether this is a test call
2176
- */
2177
- isTest?: boolean;
2178
- /**
2179
- * Custom properties to include with the call. These can be used for filtering and
2180
- * will show in the call details page
2181
- */
2182
- properties?: {
2183
- [key: string]: unknown;
2184
- };
2185
- /**
2186
- * Retell call ID if call is being imported from Retell
2187
- */
2188
- retellCallId?: string;
2189
- /**
2190
- * URL of source stereo recording. Must be accessible. Can be a signed URL. While
2191
- * optional it allows for a richer audio player. Supported formats: WAV, MP3, MP4.
2192
- */
2193
- stereoRecordingUrl?: string;
2194
- /**
2195
- * List of tool invocations made during the call
2196
- */
2197
- toolInvocations?: Array<Call.ToolInvocation>;
2198
- /**
2199
- * Vapi call ID if call is being imported from Vapi
2200
- */
2201
- vapiCallId?: string;
2202
- }
2203
- namespace Call {
2204
- interface Participant {
2205
- role: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER';
2206
- isSimulated?: boolean;
2207
- name?: string | null;
2208
- participantId?: string | null;
2209
- phoneNumber?: string | null;
2210
- spokeFirst?: boolean;
2211
- }
2212
- interface ToolInvocation {
2213
- /**
2214
- * Name of the tool that was invoked
2215
- */
2216
- name: string;
2217
- /**
2218
- * Parameters provided to the tool during invocation
2219
- */
2220
- parameters: {
2221
- [key: string]: ToolInvocation.UnionMember0 | unknown;
2222
- };
2223
- /**
2224
- * Result returned by the tool after execution. Can be a string or a JSON object
2225
- */
2226
- result: string | {
2227
- [key: string]: unknown;
2228
- };
2229
- /**
2230
- * Offset in milliseconds from the start of the call when the tool was invoked
2231
- */
2232
- startOffsetMs: number;
2233
- /**
2234
- * Description of when the tool should be invoked
2235
- */
2236
- description?: string;
2237
- /**
2238
- * Offset in milliseconds from the start of the call when the tool execution
2239
- * completed. Used to calculate duration of the tool execution
2240
- */
2241
- endOffsetMs?: number;
2242
- }
2243
- namespace ToolInvocation {
2244
- interface UnionMember0 {
2245
- description?: string;
2246
- type?: 'string' | 'number' | 'boolean';
2247
- value?: unknown;
2248
- }
2249
- }
2250
- }
2251
- interface Dataset {
2252
- /**
2253
- * List of calls input to evaluate
2254
- */
2255
- calls: Array<Dataset.Call>;
2256
- /**
2257
- * Name of the dataset
2258
- */
2259
- name: string;
2260
- }
2261
- namespace Dataset {
2262
- interface Call {
2263
- /**
2264
- * Direction of the call (INBOUND or OUTBOUND)
2265
- */
2266
- callDirection: 'INBOUND' | 'OUTBOUND';
2267
- /**
2268
- * Interface type of the call (PHONE or WEB)
2269
- */
2270
- interfaceType: 'PHONE' | 'WEB';
2271
- /**
2272
- * Exactly two participants in the call
2273
- */
2274
- participants: Array<Call.Participant>;
2275
- /**
2276
- * URL of source recording (must be an accessible WAV, MP3, or MP4 file). Can be a
2277
- * signed URL.
2278
- */
2279
- recordingUrl: string;
2280
- /**
2281
- * When the call started (ISO 8601 format)
2282
- */
2283
- startedAt: string;
2284
- /**
2285
- * Additional context on why the call terminated with the endedStatus
2286
- */
2287
- endedReason?: string;
2288
- /**
2289
- * High-level call end status, indicating how the call terminated
2290
- */
2291
- endedStatus?: 'PARTICIPANTS_DID_NOT_SPEAK' | 'AGENT_DID_NOT_ANSWER' | 'AGENT_DID_NOT_SPEAK' | 'AGENT_STOPPED_SPEAKING' | 'AGENT_ENDED_CALL' | 'AGENT_TRANSFERRED_CALL' | 'AGENT_BUSY' | 'AGENT_ERROR' | 'CUSTOMER_ENDED_CALL' | 'VOICE_MAIL_REACHED' | 'SILENCE_TIME_OUT' | 'PHONE_CALL_PROVIDER_CONNECTION_ERROR' | 'CUSTOMER_DID_NOT_ANSWER' | 'CUSTOMER_DID_NOT_SPEAK' | 'CUSTOMER_STOPPED_SPEAKING' | 'CUSTOMER_BUSY' | 'DIAL_ERROR' | 'MAX_DURATION_REACHED' | 'UNKNOWN';
2292
- /**
2293
- * Whether this is a test call
2294
- */
2295
- isTest?: boolean;
2296
- /**
2297
- * Custom properties to include with the call. These can be used for filtering and
2298
- * will show in the call details page
2299
- */
2300
- properties?: {
2301
- [key: string]: unknown;
2302
- };
2303
- /**
2304
- * Retell call ID if call is being imported from Retell
2305
- */
2306
- retellCallId?: string;
2307
- /**
2308
- * URL of source stereo recording. Must be accessible. Can be a signed URL. While
2309
- * optional it allows for a richer audio player. Supported formats: WAV, MP3, MP4.
2310
- */
2311
- stereoRecordingUrl?: string;
2312
- /**
2313
- * List of tool invocations made during the call
2314
- */
2315
- toolInvocations?: Array<Call.ToolInvocation>;
2316
- /**
2317
- * Vapi call ID if call is being imported from Vapi
2318
- */
2319
- vapiCallId?: string;
2320
- }
2321
- namespace Call {
2322
- interface Participant {
2323
- role: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER';
2324
- isSimulated?: boolean;
2325
- name?: string | null;
2326
- participantId?: string | null;
2327
- phoneNumber?: string | null;
2328
- spokeFirst?: boolean;
2329
- }
2330
- interface ToolInvocation {
2331
- /**
2332
- * Name of the tool that was invoked
2333
- */
2334
- name: string;
2335
- /**
2336
- * Parameters provided to the tool during invocation
2337
- */
2338
- parameters: {
2339
- [key: string]: ToolInvocation.UnionMember0 | unknown;
2340
- };
2341
- /**
2342
- * Result returned by the tool after execution. Can be a string or a JSON object
2343
- */
2344
- result: string | {
2345
- [key: string]: unknown;
2346
- };
2347
- /**
2348
- * Offset in milliseconds from the start of the call when the tool was invoked
2349
- */
2350
- startOffsetMs: number;
2351
- /**
2352
- * Description of when the tool should be invoked
2353
- */
2354
- description?: string;
2355
- /**
2356
- * Offset in milliseconds from the start of the call when the tool execution
2357
- * completed. Used to calculate duration of the tool execution
2358
- */
2359
- endOffsetMs?: number;
2360
- }
2361
- namespace ToolInvocation {
2362
- interface UnionMember0 {
2363
- description?: string;
2364
- type?: 'string' | 'number' | 'boolean';
2365
- value?: unknown;
2366
- }
2367
- }
2368
- }
2369
- }
2370
- }
2371
- export interface EvaluationListEvaluatorsParams {
2372
- /**
2373
- * Cursor for pagination - evaluator ID to start after
2374
- */
2375
- after?: string;
2376
- /**
2377
- * Maximum number of evaluators to return (default: 20, max: 50)
2378
- */
2379
- limit?: string;
2380
- }
2381
- export interface EvaluationListJobRunsParams {
2382
- /**
2383
- * Number of items to return per page
2384
- */
2385
- limit?: string;
2386
- /**
2387
- * Cursor for the next page of items
2388
- */
2389
- nextCursor?: string;
2390
- }
2391
- export interface EvaluationUpdateEvaluatorParams {
2392
- /**
2393
- * Updated array of evaluation blocks. Include id to update, omit id to create.
2394
- * Existing blocks not in the array will be deleted.
2395
- */
2396
- blocks?: Array<EvaluationUpdateEvaluatorParams.CreateCustomPromptBlockInput | EvaluationUpdateEvaluatorParams.CreateDatafieldCheckBlockInput | EvaluationUpdateEvaluatorParams.CreateEmotionBlockInput | EvaluationUpdateEvaluatorParams.CreateLatencyBlockInput | EvaluationUpdateEvaluatorParams.CreatePolitenessBlockInput | EvaluationUpdateEvaluatorParams.CreateSentimentBlockInput | EvaluationUpdateEvaluatorParams.CreateToolCallsBlockInput | EvaluationUpdateEvaluatorParams.CreateToxicityBlockInput | EvaluationUpdateEvaluatorParams.CreateVocalCueBlockInput>;
2397
- /**
2398
- * New description for the evaluator
2399
- */
2400
- description?: string | null;
2401
- /**
2402
- * New name for the evaluator
2403
- */
2404
- name?: string;
2405
- }
2406
- export declare namespace EvaluationUpdateEvaluatorParams {
2407
- interface CreateCustomPromptBlockInput {
2408
- blockType: 'CUSTOM_PROMPT';
2409
- /**
2410
- * Name of the metric this prompt evaluates
2411
- */
2412
- metricName: string;
2413
- /**
2414
- * Display name of the evaluation block
2415
- */
2416
- name: string;
2417
- /**
2418
- * The prompt to evaluate the call against
2419
- */
2420
- prompt: string;
2421
- /**
2422
- * ID of an existing block to update. Omit to create a new block. Existing blocks
2423
- * not included will be deleted.
2424
- */
2425
- id?: string;
2426
- /**
2427
- * Optional description of what this block evaluates
2428
- */
2429
- description?: string | null;
2430
- /**
2431
- * Input dimensions for the block (auto-assigned if not provided)
2432
- */
2433
- inputDimensions?: Array<string>;
2434
- /**
2435
- * Order in which this block is executed (defaults to array position)
2436
- */
2437
- orderIndex?: number;
2438
- /**
2439
- * Condition to skip this block evaluation
2440
- */
2441
- skipCondition?: string | null;
2442
- /**
2443
- * Minimum score threshold to pass evaluation (0-1, default: 0.7)
2444
- */
2445
- threshold?: number;
2446
- /**
2447
- * Weight of this block in the overall evaluation score (0-100, default: 50)
2448
- */
2449
- weight?: number;
2450
- }
2451
- interface CreateDatafieldCheckBlockInput {
2452
- blockType: 'DATAFIELD_CHECK';
2453
- /**
2454
- * Criteria for evaluating the property
2455
- */
2456
- evaluationCriteria: string;
2457
- /**
2458
- * Display name of the evaluation block
2459
- */
2460
- name: string;
2461
- /**
2462
- * Name of the property to check
2463
- */
2464
- propertyName: string;
2465
- /**
2466
- * ID of an existing block to update. Omit to create a new block. Existing blocks
2467
- * not included will be deleted.
2468
- */
2469
- id?: string;
2470
- /**
2471
- * Optional description of what this block evaluates
2472
- */
2473
- description?: string | null;
2474
- /**
2475
- * Input dimensions for the block (auto-assigned if not provided)
2476
- */
2477
- inputDimensions?: Array<string>;
2478
- /**
2479
- * Whether this property must be present
2480
- */
2481
- isRequired?: boolean;
2482
- /**
2483
- * Order in which this block is executed (defaults to array position)
2484
- */
2485
- orderIndex?: number;
2486
- /**
2487
- * Condition to skip this block evaluation
2488
- */
2489
- skipCondition?: string | null;
2490
- /**
2491
- * Minimum score threshold to pass evaluation (0-1, default: 0.8)
2492
- */
2493
- threshold?: number;
2494
- /**
2495
- * Expected type of the property value
2496
- */
2497
- valueType?: string;
2498
- /**
2499
- * Weight of this block in the overall evaluation score (0-100, default: 50)
2500
- */
2501
- weight?: number;
2502
- }
2503
- interface CreateEmotionBlockInput {
2504
- blockType: 'EMOTION';
2505
- /**
2506
- * Display name of the evaluation block
2507
- */
2508
- name: string;
2509
- /**
2510
- * ID of an existing block to update. Omit to create a new block. Existing blocks
2511
- * not included will be deleted.
2512
- */
2513
- id?: string;
2514
- /**
2515
- * Optional description of what this block evaluates
2516
- */
2517
- description?: string | null;
2518
- /**
2519
- * Input dimensions for the block (auto-assigned if not provided)
2520
- */
2521
- inputDimensions?: Array<string>;
2522
- /**
2523
- * Order in which this block is executed (defaults to array position)
2524
- */
2525
- orderIndex?: number;
2526
- /**
2527
- * The emotion to detect (e.g., "joy", "anger", "sadness")
2528
- */
2529
- selectedEmotion?: string;
2530
- /**
2531
- * Condition to skip this block evaluation
2532
- */
2533
- skipCondition?: string | null;
2534
- /**
2535
- * Minimum confidence threshold for emotion detection (0-1, default: 0.7)
2536
- */
2537
- threshold?: number;
2538
- /**
2539
- * Weight of this block in the overall evaluation score (0-100, default: 50)
2540
- */
2541
- weight?: number;
2542
- }
2543
- interface CreateLatencyBlockInput {
2544
- blockType: 'LATENCY';
2545
- /**
2546
- * Display name of the evaluation block
2547
- */
2548
- name: string;
2549
- /**
2550
- * ID of an existing block to update. Omit to create a new block. Existing blocks
2551
- * not included will be deleted.
2552
- */
2553
- id?: string;
2554
- /**
2555
- * Optional description of what this block evaluates
2556
- */
2557
- description?: string | null;
2558
- /**
2559
- * Input dimensions for the block (auto-assigned if not provided)
2560
- */
2561
- inputDimensions?: Array<string>;
2562
- /**
2563
- * Maximum number of silence periods allowed
2564
- */
2565
- maxAllowedSilences?: number;
2566
- /**
2567
- * Minimum duration of silence in milliseconds to be considered
2568
- */
2569
- minSilenceDuration?: number;
2570
- /**
2571
- * Order in which this block is executed (defaults to array position)
2572
- */
2573
- orderIndex?: number;
2574
- /**
2575
- * Condition to skip this block evaluation
2576
- */
2577
- skipCondition?: string | null;
2578
- /**
2579
- * Maximum allowed latency score
2580
- */
2581
- threshold?: number;
2582
- /**
2583
- * Weight of this block in the overall evaluation score (0-100, default: 50)
2584
- */
2585
- weight?: number;
2586
- }
2587
- interface CreatePolitenessBlockInput {
2588
- blockType: 'POLITENESS';
2589
- /**
2590
- * Display name of the evaluation block
2591
- */
2592
- name: string;
2593
- /**
2594
- * ID of an existing block to update. Omit to create a new block. Existing blocks
2595
- * not included will be deleted.
2596
- */
2597
- id?: string;
2598
- /**
2599
- * Optional description of what this block evaluates
2600
- */
2601
- description?: string | null;
2602
- /**
2603
- * Input dimensions for the block (auto-assigned if not provided)
2604
- */
2605
- inputDimensions?: Array<string>;
2606
- /**
2607
- * Order in which this block is executed (defaults to array position)
2608
- */
2609
- orderIndex?: number;
2610
- /**
2611
- * Condition to skip this block evaluation
2612
- */
2613
- skipCondition?: string | null;
2614
- /**
2615
- * Minimum politeness score threshold (0-1, default: 0.7)
2616
- */
2617
- threshold?: number;
2618
- /**
2619
- * Weight of this block in the overall evaluation score (0-100, default: 50)
2620
- */
2621
- weight?: number;
2622
- }
2623
- interface CreateSentimentBlockInput {
2624
- blockType: 'SENTIMENT';
2625
- /**
2626
- * Display name of the evaluation block
2627
- */
2628
- name: string;
2629
- /**
2630
- * ID of an existing block to update. Omit to create a new block. Existing blocks
2631
- * not included will be deleted.
2632
- */
2633
- id?: string;
2634
- /**
2635
- * Optional description of what this block evaluates
2636
- */
2637
- description?: string | null;
2638
- /**
2639
- * Input dimensions for the block (auto-assigned if not provided)
2640
- */
2641
- inputDimensions?: Array<string>;
2642
- /**
2643
- * Order in which this block is executed (defaults to array position)
2644
- */
2645
- orderIndex?: number;
2646
- /**
2647
- * Condition to skip this block evaluation
2648
- */
2649
- skipCondition?: string | null;
2650
- /**
2651
- * Minimum sentiment score threshold (0-1, default: 0.7)
2652
- */
2653
- threshold?: number;
2654
- /**
2655
- * Weight of this block in the overall evaluation score (0-100, default: 50)
2656
- */
2657
- weight?: number;
2658
- }
2659
- interface CreateToolCallsBlockInput {
2660
- blockType: 'TOOL_CALLS';
2661
- /**
2662
- * Display name of the evaluation block
2663
- */
2664
- name: string;
2665
- /**
2666
- * ID of the tool definition
2667
- */
2668
- toolDefinitionId: string;
2669
- /**
2670
- * ID of an existing block to update. Omit to create a new block. Existing blocks
2671
- * not included will be deleted.
2672
- */
2673
- id?: string;
2674
- /**
2675
- * Optional description of what this block evaluates
2676
- */
2677
- description?: string | null;
2678
- /**
2679
- * Input dimensions for the block (auto-assigned if not provided)
2680
- */
2681
- inputDimensions?: Array<string>;
2682
- /**
2683
- * Condition that must be met for tool invocation
2684
- */
2685
- invocationCondition?: string | null;
2686
- /**
2687
- * Minimum number of times the tool should be invoked
2688
- */
2689
- minInvocationCount?: number | null;
2690
- /**
2691
- * Order in which this block is executed (defaults to array position)
2692
- */
2693
- orderIndex?: number;
2694
- /**
2695
- * Whether the tool should be invoked
2696
- */
2697
- shouldBeInvoked?: boolean;
2698
- /**
2699
- * Condition to skip this block evaluation
2700
- */
2701
- skipCondition?: string | null;
2702
- /**
2703
- * Weight of this block in the overall evaluation score (0-100, default: 50)
2704
- */
2705
- weight?: number;
2706
- }
2707
- interface CreateToxicityBlockInput {
2708
- blockType: 'TOXICITY';
2709
- /**
2710
- * Display name of the evaluation block
2711
- */
2712
- name: string;
2713
- /**
2714
- * ID of an existing block to update. Omit to create a new block. Existing blocks
2715
- * not included will be deleted.
2716
- */
2717
- id?: string;
2718
- /**
2719
- * Optional description of what this block evaluates
2720
- */
2721
- description?: string | null;
2722
- /**
2723
- * Input dimensions for the block (auto-assigned if not provided)
2724
- */
2725
- inputDimensions?: Array<string>;
2726
- /**
2727
- * Order in which this block is executed (defaults to array position)
2728
- */
2729
- orderIndex?: number;
2730
- /**
2731
- * Condition to skip this block evaluation
2732
- */
2733
- skipCondition?: string | null;
2734
- /**
2735
- * Maximum allowed toxicity score (0-1, default: 0.7)
2736
- */
2737
- threshold?: number;
2738
- /**
2739
- * Weight of this block in the overall evaluation score (0-100, default: 50)
2740
- */
2741
- weight?: number;
2742
- }
2743
- interface CreateVocalCueBlockInput {
2744
- blockType: 'VOCAL_CUE';
2745
- /**
2746
- * Display name of the evaluation block
2747
- */
2748
- name: string;
2749
- /**
2750
- * ID of an existing block to update. Omit to create a new block. Existing blocks
2751
- * not included will be deleted.
2752
- */
2753
- id?: string;
2754
- /**
2755
- * Optional description of what this block evaluates
2756
- */
2757
- description?: string | null;
2758
- /**
2759
- * Input dimensions for the block (auto-assigned if not provided)
2760
- */
2761
- inputDimensions?: Array<string>;
2762
- /**
2763
- * Order in which this block is executed (defaults to array position)
2764
- */
2765
- orderIndex?: number;
2766
- /**
2767
- * The vocal cue to detect (e.g., "pace", "tone", "volume")
2768
- */
2769
- selectedCue?: string;
2770
- /**
2771
- * Condition to skip this block evaluation
2772
- */
2773
- skipCondition?: string | null;
2774
- /**
2775
- * Minimum confidence threshold for vocal cue detection (0-1, default: 0.7)
2776
- */
2777
- threshold?: number;
2778
- /**
2779
- * Weight of this block in the overall evaluation score (0-100, default: 50)
2780
- */
2781
- weight?: number;
2782
- }
2783
- }
2784
- export declare namespace Evaluation {
2785
- export { type EvaluationCreateEvaluatorResponse as EvaluationCreateEvaluatorResponse, type EvaluationCreateJobResponse as EvaluationCreateJobResponse, type EvaluationGetEvaluatorByIDResponse as EvaluationGetEvaluatorByIDResponse, type EvaluationGetJobResponse as EvaluationGetJobResponse, type EvaluationListEvaluatorsResponse as EvaluationListEvaluatorsResponse, type EvaluationListJobRunsResponse as EvaluationListJobRunsResponse, type EvaluationUpdateEvaluatorResponse as EvaluationUpdateEvaluatorResponse, type EvaluationCreateEvaluatorParams as EvaluationCreateEvaluatorParams, type EvaluationCreateJobParams as EvaluationCreateJobParams, type EvaluationListEvaluatorsParams as EvaluationListEvaluatorsParams, type EvaluationListJobRunsParams as EvaluationListJobRunsParams, type EvaluationUpdateEvaluatorParams as EvaluationUpdateEvaluatorParams, };
2786
3
  }
2787
4
  //# sourceMappingURL=evaluation.d.mts.map