@roarkanalytics/sdk 2.22.0 → 2.23.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.
- package/CHANGELOG.md +19 -0
- package/client.d.mts +31 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +31 -10
- package/client.d.ts.map +1 -1
- package/client.js +34 -6
- package/client.js.map +1 -1
- package/client.mjs +34 -6
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent-endpoint.d.mts +309 -0
- package/resources/agent-endpoint.d.mts.map +1 -0
- package/resources/agent-endpoint.d.ts +309 -0
- package/resources/agent-endpoint.d.ts.map +1 -0
- package/resources/agent-endpoint.js +35 -0
- package/resources/agent-endpoint.js.map +1 -0
- package/resources/agent-endpoint.mjs +31 -0
- package/resources/agent-endpoint.mjs.map +1 -0
- package/resources/agent.d.mts +193 -0
- package/resources/agent.d.mts.map +1 -0
- package/resources/agent.d.ts +193 -0
- package/resources/agent.d.ts.map +1 -0
- package/resources/agent.js +34 -0
- package/resources/agent.js.map +1 -0
- package/resources/agent.mjs +30 -0
- package/resources/agent.mjs.map +1 -0
- package/resources/call.d.mts +120 -1
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +120 -1
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +7 -0
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +7 -0
- package/resources/call.mjs.map +1 -1
- package/resources/evaluation.d.mts +2097 -617
- package/resources/evaluation.d.mts.map +1 -1
- package/resources/evaluation.d.ts +2097 -617
- package/resources/evaluation.d.ts.map +1 -1
- package/resources/evaluation.js +14 -0
- package/resources/evaluation.js.map +1 -1
- package/resources/evaluation.mjs +14 -0
- package/resources/evaluation.mjs.map +1 -1
- package/resources/http-request-definition.d.mts +339 -0
- package/resources/http-request-definition.d.mts.map +1 -0
- package/resources/http-request-definition.d.ts +339 -0
- package/resources/http-request-definition.d.ts.map +1 -0
- package/resources/http-request-definition.js +36 -0
- package/resources/http-request-definition.js.map +1 -0
- package/resources/http-request-definition.mjs +32 -0
- package/resources/http-request-definition.mjs.map +1 -0
- package/resources/index.d.mts +11 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +11 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +19 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +9 -2
- package/resources/index.mjs.map +1 -1
- package/resources/simulation-job.d.mts +393 -0
- package/resources/simulation-job.d.mts.map +1 -0
- package/resources/simulation-job.d.ts +393 -0
- package/resources/simulation-job.d.ts.map +1 -0
- package/resources/simulation-job.js +38 -0
- package/resources/simulation-job.js.map +1 -0
- package/resources/simulation-job.mjs +34 -0
- package/resources/simulation-job.mjs.map +1 -0
- package/resources/{persona.d.mts → simulation-persona.d.mts} +62 -33
- package/resources/simulation-persona.d.mts.map +1 -0
- package/resources/{persona.d.ts → simulation-persona.d.ts} +62 -33
- package/resources/simulation-persona.d.ts.map +1 -0
- package/resources/{persona.js → simulation-persona.js} +18 -13
- package/resources/simulation-persona.js.map +1 -0
- package/resources/{persona.mjs → simulation-persona.mjs} +16 -11
- package/resources/simulation-persona.mjs.map +1 -0
- package/resources/simulation-run-plan-job.d.mts +359 -0
- package/resources/simulation-run-plan-job.d.mts.map +1 -0
- package/resources/simulation-run-plan-job.d.ts +359 -0
- package/resources/simulation-run-plan-job.d.ts.map +1 -0
- package/resources/simulation-run-plan-job.js +50 -0
- package/resources/simulation-run-plan-job.js.map +1 -0
- package/resources/simulation-run-plan-job.mjs +46 -0
- package/resources/simulation-run-plan-job.mjs.map +1 -0
- package/resources/simulation-run-plan.d.mts +660 -0
- package/resources/simulation-run-plan.d.mts.map +1 -0
- package/resources/simulation-run-plan.d.ts +660 -0
- package/resources/simulation-run-plan.d.ts.map +1 -0
- package/resources/simulation-run-plan.js +93 -0
- package/resources/simulation-run-plan.js.map +1 -0
- package/resources/simulation-run-plan.mjs +89 -0
- package/resources/simulation-run-plan.mjs.map +1 -0
- package/resources/simulation-scenario.d.mts +335 -0
- package/resources/simulation-scenario.d.mts.map +1 -0
- package/resources/simulation-scenario.d.ts +335 -0
- package/resources/simulation-scenario.d.ts.map +1 -0
- package/resources/simulation-scenario.js +40 -0
- package/resources/simulation-scenario.js.map +1 -0
- package/resources/simulation-scenario.mjs +36 -0
- package/resources/simulation-scenario.mjs.map +1 -0
- package/resources/webhook.d.mts +212 -0
- package/resources/webhook.d.mts.map +1 -0
- package/resources/webhook.d.ts +212 -0
- package/resources/webhook.d.ts.map +1 -0
- package/resources/webhook.js +35 -0
- package/resources/webhook.js.map +1 -0
- package/resources/webhook.mjs +31 -0
- package/resources/webhook.mjs.map +1 -0
- package/src/client.ts +208 -43
- package/src/resources/agent-endpoint.ts +400 -0
- package/src/resources/agent.ts +263 -0
- package/src/resources/call.ts +149 -0
- package/src/resources/evaluation.ts +3044 -1154
- package/src/resources/http-request-definition.ts +410 -0
- package/src/resources/index.ts +89 -21
- package/src/resources/simulation-job.ts +527 -0
- package/src/resources/{persona.ts → simulation-persona.ts} +78 -40
- package/src/resources/simulation-run-plan-job.ts +521 -0
- package/src/resources/simulation-run-plan.ts +840 -0
- package/src/resources/simulation-scenario.ts +463 -0
- package/src/resources/webhook.ts +318 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/persona.d.mts.map +0 -1
- package/resources/persona.d.ts.map +0 -1
- package/resources/persona.js.map +0 -1
- package/resources/persona.mjs.map +0 -1
- package/resources/simulation.d.mts +0 -802
- package/resources/simulation.d.mts.map +0 -1
- package/resources/simulation.d.ts +0 -802
- package/resources/simulation.d.ts.map +0 -1
- package/resources/simulation.js +0 -90
- package/resources/simulation.js.map +0 -1
- package/resources/simulation.mjs +0 -86
- package/resources/simulation.mjs.map +0 -1
- package/src/resources/simulation.ts +0 -1069
|
@@ -2,6 +2,10 @@ import { APIResource } from "../core/resource.js";
|
|
|
2
2
|
import { APIPromise } from "../core/api-promise.js";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
4
|
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>;
|
|
5
9
|
/**
|
|
6
10
|
* Create a evaluation job for a single call or dataset of calls
|
|
7
11
|
*/
|
|
@@ -23,490 +27,52 @@ export declare class Evaluation extends APIResource {
|
|
|
23
27
|
* Retrieve paginated details of a specific evaluation job runs
|
|
24
28
|
*/
|
|
25
29
|
listJobRuns(jobID: string, query?: EvaluationListJobRunsParams | null | undefined, options?: RequestOptions): APIPromise<EvaluationListJobRunsResponse>;
|
|
26
|
-
}
|
|
27
|
-
export interface EvaluationCreateJobResponse {
|
|
28
|
-
data: EvaluationCreateJobResponse.Data;
|
|
29
|
-
}
|
|
30
|
-
export declare namespace EvaluationCreateJobResponse {
|
|
31
|
-
interface Data {
|
|
32
|
-
/**
|
|
33
|
-
* ID of the evaluation job
|
|
34
|
-
*/
|
|
35
|
-
jobId: string;
|
|
36
|
-
/**
|
|
37
|
-
* Status of the evaluation job
|
|
38
|
-
*/
|
|
39
|
-
status: 'PENDING' | 'PROCESSING' | 'SUCCESS' | 'FAILURE';
|
|
40
|
-
/**
|
|
41
|
-
* ID of the call being evaluated (only present for single call evaluations)
|
|
42
|
-
*/
|
|
43
|
-
callId?: string;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Evaluator with its configured blocks
|
|
48
|
-
*/
|
|
49
|
-
export interface EvaluationGetEvaluatorByIDResponse {
|
|
50
|
-
/**
|
|
51
|
-
* Unique identifier for the evaluator
|
|
52
|
-
*/
|
|
53
|
-
id: string;
|
|
54
|
-
/**
|
|
55
|
-
* Array of evaluation blocks configured for this evaluator
|
|
56
|
-
*/
|
|
57
|
-
blocks: Array<EvaluationGetEvaluatorByIDResponse.UnionMember0 | EvaluationGetEvaluatorByIDResponse.UnionMember1 | EvaluationGetEvaluatorByIDResponse.UnionMember2 | EvaluationGetEvaluatorByIDResponse.UnionMember3 | EvaluationGetEvaluatorByIDResponse.UnionMember4 | EvaluationGetEvaluatorByIDResponse.UnionMember5 | EvaluationGetEvaluatorByIDResponse.UnionMember6 | EvaluationGetEvaluatorByIDResponse.UnionMember7 | EvaluationGetEvaluatorByIDResponse.UnionMember8>;
|
|
58
|
-
/**
|
|
59
|
-
* ISO timestamp when the evaluator was created
|
|
60
|
-
*/
|
|
61
|
-
createdAt: string;
|
|
62
|
-
/**
|
|
63
|
-
* Optional description of the evaluator
|
|
64
|
-
*/
|
|
65
|
-
description: string | null;
|
|
66
30
|
/**
|
|
67
|
-
*
|
|
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.
|
|
68
34
|
*/
|
|
69
|
-
|
|
35
|
+
updateEvaluator(evaluatorID: string, body?: EvaluationUpdateEvaluatorParams | null | undefined, options?: RequestOptions): APIPromise<EvaluationUpdateEvaluatorResponse>;
|
|
36
|
+
}
|
|
37
|
+
export interface EvaluationCreateEvaluatorResponse {
|
|
70
38
|
/**
|
|
71
|
-
*
|
|
39
|
+
* Evaluator with its configured blocks
|
|
72
40
|
*/
|
|
73
|
-
|
|
41
|
+
data: EvaluationCreateEvaluatorResponse.Data;
|
|
42
|
+
}
|
|
43
|
+
export declare namespace EvaluationCreateEvaluatorResponse {
|
|
74
44
|
/**
|
|
75
|
-
*
|
|
45
|
+
* Evaluator with its configured blocks
|
|
76
46
|
*/
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
export declare namespace EvaluationGetEvaluatorByIDResponse {
|
|
80
|
-
interface UnionMember0 {
|
|
81
|
-
/**
|
|
82
|
-
* Unique identifier for the block
|
|
83
|
-
*/
|
|
84
|
-
id: string;
|
|
85
|
-
/**
|
|
86
|
-
* Block type identifier
|
|
87
|
-
*/
|
|
88
|
-
blockType: 'CUSTOM_PROMPT';
|
|
89
|
-
/**
|
|
90
|
-
* Optional description of what this block evaluates
|
|
91
|
-
*/
|
|
92
|
-
description: string | null;
|
|
93
|
-
/**
|
|
94
|
-
* Name of the metric this prompt evaluates
|
|
95
|
-
*/
|
|
96
|
-
metricName: string;
|
|
97
|
-
/**
|
|
98
|
-
* Display name of the evaluation block
|
|
99
|
-
*/
|
|
100
|
-
name: string;
|
|
101
|
-
/**
|
|
102
|
-
* Order in which this block is executed
|
|
103
|
-
*/
|
|
104
|
-
orderIndex: number;
|
|
105
|
-
/**
|
|
106
|
-
* The prompt to evaluate the call against
|
|
107
|
-
*/
|
|
108
|
-
prompt: string;
|
|
109
|
-
/**
|
|
110
|
-
* Minimum score threshold to pass evaluation (0-1)
|
|
111
|
-
*/
|
|
112
|
-
threshold: number;
|
|
113
|
-
/**
|
|
114
|
-
* Weight of this block in the overall evaluation score (0-100)
|
|
115
|
-
*/
|
|
116
|
-
weight: number;
|
|
117
|
-
}
|
|
118
|
-
interface UnionMember1 {
|
|
119
|
-
/**
|
|
120
|
-
* Unique identifier for the block
|
|
121
|
-
*/
|
|
122
|
-
id: string;
|
|
123
|
-
/**
|
|
124
|
-
* Block type identifier
|
|
125
|
-
*/
|
|
126
|
-
blockType: 'DATAFIELD_CHECK';
|
|
127
|
-
/**
|
|
128
|
-
* Optional description of what this block evaluates
|
|
129
|
-
*/
|
|
130
|
-
description: string | null;
|
|
131
|
-
/**
|
|
132
|
-
* Criteria for evaluating the property
|
|
133
|
-
*/
|
|
134
|
-
evaluationCriteria: string;
|
|
135
|
-
/**
|
|
136
|
-
* Whether this property must be present
|
|
137
|
-
*/
|
|
138
|
-
isRequired: boolean;
|
|
139
|
-
/**
|
|
140
|
-
* Display name of the evaluation block
|
|
141
|
-
*/
|
|
142
|
-
name: string;
|
|
143
|
-
/**
|
|
144
|
-
* Order in which this block is executed
|
|
145
|
-
*/
|
|
146
|
-
orderIndex: number;
|
|
147
|
-
/**
|
|
148
|
-
* Name of the property to check
|
|
149
|
-
*/
|
|
150
|
-
propertyName: string;
|
|
151
|
-
/**
|
|
152
|
-
* Minimum score threshold to pass evaluation (0-1)
|
|
153
|
-
*/
|
|
154
|
-
threshold: number;
|
|
155
|
-
/**
|
|
156
|
-
* Expected type of the property value
|
|
157
|
-
*/
|
|
158
|
-
valueType: string;
|
|
159
|
-
/**
|
|
160
|
-
* Weight of this block in the overall evaluation score (0-100)
|
|
161
|
-
*/
|
|
162
|
-
weight: number;
|
|
163
|
-
}
|
|
164
|
-
interface UnionMember2 {
|
|
165
|
-
/**
|
|
166
|
-
* Unique identifier for the block
|
|
167
|
-
*/
|
|
168
|
-
id: string;
|
|
169
|
-
/**
|
|
170
|
-
* Block type identifier
|
|
171
|
-
*/
|
|
172
|
-
blockType: 'EMOTION';
|
|
173
|
-
/**
|
|
174
|
-
* Optional description of what this block evaluates
|
|
175
|
-
*/
|
|
176
|
-
description: string | null;
|
|
177
|
-
/**
|
|
178
|
-
* Display name of the evaluation block
|
|
179
|
-
*/
|
|
180
|
-
name: string;
|
|
181
|
-
/**
|
|
182
|
-
* Order in which this block is executed
|
|
183
|
-
*/
|
|
184
|
-
orderIndex: number;
|
|
185
|
-
/**
|
|
186
|
-
* The emotion to detect (e.g., "joy", "anger", "sadness")
|
|
187
|
-
*/
|
|
188
|
-
selectedEmotion: string;
|
|
189
|
-
/**
|
|
190
|
-
* Minimum confidence threshold for emotion detection (0-1)
|
|
191
|
-
*/
|
|
192
|
-
threshold: number;
|
|
193
|
-
/**
|
|
194
|
-
* Weight of this block in the overall evaluation score (0-100)
|
|
195
|
-
*/
|
|
196
|
-
weight: number;
|
|
197
|
-
}
|
|
198
|
-
interface UnionMember3 {
|
|
47
|
+
interface Data {
|
|
199
48
|
/**
|
|
200
|
-
* Unique identifier for the
|
|
49
|
+
* Unique identifier for the evaluator
|
|
201
50
|
*/
|
|
202
51
|
id: string;
|
|
203
52
|
/**
|
|
204
|
-
*
|
|
205
|
-
*/
|
|
206
|
-
blockType: 'LATENCY';
|
|
207
|
-
/**
|
|
208
|
-
* Optional description of what this block evaluates
|
|
209
|
-
*/
|
|
210
|
-
description: string | null;
|
|
211
|
-
/**
|
|
212
|
-
* Maximum number of silence periods allowed
|
|
213
|
-
*/
|
|
214
|
-
maxAllowedSilences: number;
|
|
215
|
-
/**
|
|
216
|
-
* Minimum duration of silence in milliseconds to be considered
|
|
217
|
-
*/
|
|
218
|
-
minSilenceDuration: number;
|
|
219
|
-
/**
|
|
220
|
-
* Display name of the evaluation block
|
|
221
|
-
*/
|
|
222
|
-
name: string;
|
|
223
|
-
/**
|
|
224
|
-
* Order in which this block is executed
|
|
225
|
-
*/
|
|
226
|
-
orderIndex: number;
|
|
227
|
-
/**
|
|
228
|
-
* Maximum allowed latency score
|
|
229
|
-
*/
|
|
230
|
-
threshold: number;
|
|
231
|
-
/**
|
|
232
|
-
* Weight of this block in the overall evaluation score (0-100)
|
|
233
|
-
*/
|
|
234
|
-
weight: number;
|
|
235
|
-
}
|
|
236
|
-
interface UnionMember4 {
|
|
237
|
-
/**
|
|
238
|
-
* Unique identifier for the block
|
|
53
|
+
* Array of evaluation blocks configured for this evaluator
|
|
239
54
|
*/
|
|
240
|
-
|
|
55
|
+
blocks: Array<Data.UnionMember0 | Data.UnionMember1 | Data.UnionMember2 | Data.UnionMember3 | Data.UnionMember4 | Data.UnionMember5 | Data.UnionMember6 | Data.UnionMember7 | Data.UnionMember8>;
|
|
241
56
|
/**
|
|
242
|
-
*
|
|
57
|
+
* ISO timestamp when the evaluator was created
|
|
243
58
|
*/
|
|
244
|
-
|
|
59
|
+
createdAt: string;
|
|
245
60
|
/**
|
|
246
|
-
* Optional description of
|
|
61
|
+
* Optional description of the evaluator
|
|
247
62
|
*/
|
|
248
63
|
description: string | null;
|
|
249
64
|
/**
|
|
250
|
-
*
|
|
65
|
+
* Name of the evaluator
|
|
251
66
|
*/
|
|
252
67
|
name: string;
|
|
253
68
|
/**
|
|
254
|
-
*
|
|
255
|
-
*/
|
|
256
|
-
orderIndex: number;
|
|
257
|
-
/**
|
|
258
|
-
* Minimum politeness score threshold (0-1)
|
|
69
|
+
* Unique slug identifier for the evaluator
|
|
259
70
|
*/
|
|
260
|
-
|
|
71
|
+
slug: string;
|
|
261
72
|
/**
|
|
262
|
-
*
|
|
73
|
+
* ISO timestamp when the evaluator was last updated
|
|
263
74
|
*/
|
|
264
|
-
|
|
265
|
-
}
|
|
266
|
-
interface UnionMember5 {
|
|
267
|
-
/**
|
|
268
|
-
* Unique identifier for the block
|
|
269
|
-
*/
|
|
270
|
-
id: string;
|
|
271
|
-
/**
|
|
272
|
-
* Block type identifier
|
|
273
|
-
*/
|
|
274
|
-
blockType: 'SENTIMENT';
|
|
275
|
-
/**
|
|
276
|
-
* Optional description of what this block evaluates
|
|
277
|
-
*/
|
|
278
|
-
description: string | null;
|
|
279
|
-
/**
|
|
280
|
-
* Display name of the evaluation block
|
|
281
|
-
*/
|
|
282
|
-
name: string;
|
|
283
|
-
/**
|
|
284
|
-
* Order in which this block is executed
|
|
285
|
-
*/
|
|
286
|
-
orderIndex: number;
|
|
287
|
-
/**
|
|
288
|
-
* Minimum sentiment score threshold (0-1)
|
|
289
|
-
*/
|
|
290
|
-
threshold: number;
|
|
291
|
-
/**
|
|
292
|
-
* Weight of this block in the overall evaluation score (0-100)
|
|
293
|
-
*/
|
|
294
|
-
weight: number;
|
|
295
|
-
}
|
|
296
|
-
interface UnionMember6 {
|
|
297
|
-
/**
|
|
298
|
-
* Unique identifier for the block
|
|
299
|
-
*/
|
|
300
|
-
id: string;
|
|
301
|
-
/**
|
|
302
|
-
* Block type identifier
|
|
303
|
-
*/
|
|
304
|
-
blockType: 'TOOL_CALLS';
|
|
305
|
-
/**
|
|
306
|
-
* Optional description of what this block evaluates
|
|
307
|
-
*/
|
|
308
|
-
description: string | null;
|
|
309
|
-
/**
|
|
310
|
-
* Condition that must be met for tool invocation
|
|
311
|
-
*/
|
|
312
|
-
invocationCondition: string | null;
|
|
313
|
-
/**
|
|
314
|
-
* Minimum number of times the tool should be invoked
|
|
315
|
-
*/
|
|
316
|
-
minInvocationCount: number | null;
|
|
317
|
-
/**
|
|
318
|
-
* Display name of the evaluation block
|
|
319
|
-
*/
|
|
320
|
-
name: string;
|
|
321
|
-
/**
|
|
322
|
-
* Order in which this block is executed
|
|
323
|
-
*/
|
|
324
|
-
orderIndex: number;
|
|
325
|
-
/**
|
|
326
|
-
* Whether the tool should be invoked
|
|
327
|
-
*/
|
|
328
|
-
shouldBeInvoked: boolean;
|
|
329
|
-
/**
|
|
330
|
-
* ID of the tool definition
|
|
331
|
-
*/
|
|
332
|
-
toolDefinitionId: string;
|
|
333
|
-
/**
|
|
334
|
-
* Weight of this block in the overall evaluation score (0-100)
|
|
335
|
-
*/
|
|
336
|
-
weight: number;
|
|
337
|
-
}
|
|
338
|
-
interface UnionMember7 {
|
|
339
|
-
/**
|
|
340
|
-
* Unique identifier for the block
|
|
341
|
-
*/
|
|
342
|
-
id: string;
|
|
343
|
-
/**
|
|
344
|
-
* Block type identifier
|
|
345
|
-
*/
|
|
346
|
-
blockType: 'TOXICITY';
|
|
347
|
-
/**
|
|
348
|
-
* Optional description of what this block evaluates
|
|
349
|
-
*/
|
|
350
|
-
description: string | null;
|
|
351
|
-
/**
|
|
352
|
-
* Display name of the evaluation block
|
|
353
|
-
*/
|
|
354
|
-
name: string;
|
|
355
|
-
/**
|
|
356
|
-
* Order in which this block is executed
|
|
357
|
-
*/
|
|
358
|
-
orderIndex: number;
|
|
359
|
-
/**
|
|
360
|
-
* Maximum allowed toxicity score (0-1)
|
|
361
|
-
*/
|
|
362
|
-
threshold: number;
|
|
363
|
-
/**
|
|
364
|
-
* Weight of this block in the overall evaluation score (0-100)
|
|
365
|
-
*/
|
|
366
|
-
weight: number;
|
|
367
|
-
}
|
|
368
|
-
interface UnionMember8 {
|
|
369
|
-
/**
|
|
370
|
-
* Unique identifier for the block
|
|
371
|
-
*/
|
|
372
|
-
id: string;
|
|
373
|
-
/**
|
|
374
|
-
* Block type identifier
|
|
375
|
-
*/
|
|
376
|
-
blockType: 'VOCAL_CUE';
|
|
377
|
-
/**
|
|
378
|
-
* Optional description of what this block evaluates
|
|
379
|
-
*/
|
|
380
|
-
description: string | null;
|
|
381
|
-
/**
|
|
382
|
-
* Display name of the evaluation block
|
|
383
|
-
*/
|
|
384
|
-
name: string;
|
|
385
|
-
/**
|
|
386
|
-
* Order in which this block is executed
|
|
387
|
-
*/
|
|
388
|
-
orderIndex: number;
|
|
389
|
-
/**
|
|
390
|
-
* The vocal cue to detect (e.g., "pace", "tone", "volume")
|
|
391
|
-
*/
|
|
392
|
-
selectedCue: string;
|
|
393
|
-
/**
|
|
394
|
-
* Minimum confidence threshold for vocal cue detection (0-1)
|
|
395
|
-
*/
|
|
396
|
-
threshold: number;
|
|
397
|
-
/**
|
|
398
|
-
* Weight of this block in the overall evaluation score (0-100)
|
|
399
|
-
*/
|
|
400
|
-
weight: number;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
export interface EvaluationGetJobResponse {
|
|
404
|
-
/**
|
|
405
|
-
* Evaluation job response payload
|
|
406
|
-
*/
|
|
407
|
-
data: EvaluationGetJobResponse.Data;
|
|
408
|
-
}
|
|
409
|
-
export declare namespace EvaluationGetJobResponse {
|
|
410
|
-
/**
|
|
411
|
-
* Evaluation job response payload
|
|
412
|
-
*/
|
|
413
|
-
interface Data {
|
|
414
|
-
/**
|
|
415
|
-
* ID of the evaluation job
|
|
416
|
-
*/
|
|
417
|
-
id: string;
|
|
418
|
-
/**
|
|
419
|
-
* Status of the evaluation job
|
|
420
|
-
*/
|
|
421
|
-
status: 'PENDING' | 'PROCESSING' | 'SUCCESS' | 'FAILURE';
|
|
422
|
-
/**
|
|
423
|
-
* Call being evaluated
|
|
424
|
-
*/
|
|
425
|
-
call?: Data.Call;
|
|
426
|
-
/**
|
|
427
|
-
* Dataset being evaluated
|
|
428
|
-
*/
|
|
429
|
-
dataset?: Data.Dataset;
|
|
430
|
-
}
|
|
431
|
-
namespace Data {
|
|
432
|
-
/**
|
|
433
|
-
* Call being evaluated
|
|
434
|
-
*/
|
|
435
|
-
interface Call {
|
|
436
|
-
/**
|
|
437
|
-
* ID of the call being evaluated
|
|
438
|
-
*/
|
|
439
|
-
id: string | null;
|
|
440
|
-
}
|
|
441
|
-
/**
|
|
442
|
-
* Dataset being evaluated
|
|
443
|
-
*/
|
|
444
|
-
interface Dataset {
|
|
445
|
-
/**
|
|
446
|
-
* ID of the dataset
|
|
447
|
-
*/
|
|
448
|
-
id: string | null;
|
|
449
|
-
/**
|
|
450
|
-
* Calls in the dataset
|
|
451
|
-
*/
|
|
452
|
-
calls: Array<Dataset.Call>;
|
|
453
|
-
}
|
|
454
|
-
namespace Dataset {
|
|
455
|
-
interface Call {
|
|
456
|
-
/**
|
|
457
|
-
* ID of the call
|
|
458
|
-
*/
|
|
459
|
-
id: string | null;
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
/**
|
|
465
|
-
* Response containing evaluators and pagination info
|
|
466
|
-
*/
|
|
467
|
-
export interface EvaluationListEvaluatorsResponse {
|
|
468
|
-
/**
|
|
469
|
-
* Array of evaluators with their blocks
|
|
470
|
-
*/
|
|
471
|
-
data: Array<EvaluationListEvaluatorsResponse.Data>;
|
|
472
|
-
/**
|
|
473
|
-
* Pagination information
|
|
474
|
-
*/
|
|
475
|
-
pagination: EvaluationListEvaluatorsResponse.Pagination;
|
|
476
|
-
}
|
|
477
|
-
export declare namespace EvaluationListEvaluatorsResponse {
|
|
478
|
-
/**
|
|
479
|
-
* Evaluator with its configured blocks
|
|
480
|
-
*/
|
|
481
|
-
interface Data {
|
|
482
|
-
/**
|
|
483
|
-
* Unique identifier for the evaluator
|
|
484
|
-
*/
|
|
485
|
-
id: string;
|
|
486
|
-
/**
|
|
487
|
-
* Array of evaluation blocks configured for this evaluator
|
|
488
|
-
*/
|
|
489
|
-
blocks: Array<Data.UnionMember0 | Data.UnionMember1 | Data.UnionMember2 | Data.UnionMember3 | Data.UnionMember4 | Data.UnionMember5 | Data.UnionMember6 | Data.UnionMember7 | Data.UnionMember8>;
|
|
490
|
-
/**
|
|
491
|
-
* ISO timestamp when the evaluator was created
|
|
492
|
-
*/
|
|
493
|
-
createdAt: string;
|
|
494
|
-
/**
|
|
495
|
-
* Optional description of the evaluator
|
|
496
|
-
*/
|
|
497
|
-
description: string | null;
|
|
498
|
-
/**
|
|
499
|
-
* Name of the evaluator
|
|
500
|
-
*/
|
|
501
|
-
name: string;
|
|
502
|
-
/**
|
|
503
|
-
* Unique slug identifier for the evaluator
|
|
504
|
-
*/
|
|
505
|
-
slug: string;
|
|
506
|
-
/**
|
|
507
|
-
* ISO timestamp when the evaluator was last updated
|
|
508
|
-
*/
|
|
509
|
-
updatedAt: string;
|
|
75
|
+
updatedAt: string;
|
|
510
76
|
}
|
|
511
77
|
namespace Data {
|
|
512
78
|
interface UnionMember0 {
|
|
@@ -832,208 +398,1729 @@ export declare namespace EvaluationListEvaluatorsResponse {
|
|
|
832
398
|
weight: number;
|
|
833
399
|
}
|
|
834
400
|
}
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
401
|
+
}
|
|
402
|
+
export interface EvaluationCreateJobResponse {
|
|
403
|
+
data: EvaluationCreateJobResponse.Data;
|
|
404
|
+
}
|
|
405
|
+
export declare namespace EvaluationCreateJobResponse {
|
|
406
|
+
interface Data {
|
|
839
407
|
/**
|
|
840
|
-
*
|
|
408
|
+
* ID of the evaluation job
|
|
841
409
|
*/
|
|
842
|
-
|
|
410
|
+
jobId: string;
|
|
843
411
|
/**
|
|
844
|
-
*
|
|
412
|
+
* Status of the evaluation job
|
|
845
413
|
*/
|
|
846
|
-
|
|
414
|
+
status: 'PENDING' | 'PROCESSING' | 'SUCCESS' | 'FAILURE';
|
|
847
415
|
/**
|
|
848
|
-
*
|
|
416
|
+
* ID of the call being evaluated (only present for single call evaluations)
|
|
849
417
|
*/
|
|
850
|
-
|
|
418
|
+
callId?: string;
|
|
851
419
|
}
|
|
852
420
|
}
|
|
853
|
-
|
|
421
|
+
/**
|
|
422
|
+
* Evaluator with its configured blocks
|
|
423
|
+
*/
|
|
424
|
+
export interface EvaluationGetEvaluatorByIDResponse {
|
|
854
425
|
/**
|
|
855
|
-
*
|
|
426
|
+
* Unique identifier for the evaluator
|
|
856
427
|
*/
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
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 {
|
|
860
1235
|
/**
|
|
861
1236
|
* Evaluation job runs response payload
|
|
862
1237
|
*/
|
|
863
1238
|
interface Data {
|
|
864
1239
|
/**
|
|
865
|
-
* Evaluator runs of the evaluation job
|
|
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
|
|
866
1425
|
*/
|
|
867
|
-
|
|
1426
|
+
id: string;
|
|
868
1427
|
/**
|
|
869
|
-
*
|
|
1428
|
+
* Array of evaluation blocks configured for this evaluator
|
|
870
1429
|
*/
|
|
871
|
-
|
|
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;
|
|
872
1451
|
}
|
|
873
1452
|
namespace Data {
|
|
874
|
-
interface
|
|
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;
|
|
875
1588
|
/**
|
|
876
|
-
*
|
|
1589
|
+
* Minimum duration of silence in milliseconds to be considered
|
|
877
1590
|
*/
|
|
878
|
-
|
|
879
|
-
evaluator: Data.Evaluator;
|
|
880
|
-
evidence: Array<Data.Evidence>;
|
|
881
|
-
metrics: Array<Data.Metric>;
|
|
1591
|
+
minSilenceDuration: number;
|
|
882
1592
|
/**
|
|
883
|
-
*
|
|
1593
|
+
* Display name of the evaluation block
|
|
884
1594
|
*/
|
|
885
|
-
|
|
1595
|
+
name: string;
|
|
886
1596
|
/**
|
|
887
|
-
*
|
|
1597
|
+
* Order in which this block is executed
|
|
888
1598
|
*/
|
|
889
|
-
|
|
1599
|
+
orderIndex: number;
|
|
890
1600
|
/**
|
|
891
|
-
*
|
|
1601
|
+
* Maximum allowed latency score
|
|
892
1602
|
*/
|
|
893
|
-
|
|
1603
|
+
threshold: number;
|
|
894
1604
|
/**
|
|
895
|
-
*
|
|
896
|
-
* SKIPPED)
|
|
1605
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
897
1606
|
*/
|
|
898
|
-
|
|
1607
|
+
weight: number;
|
|
1608
|
+
}
|
|
1609
|
+
interface UnionMember4 {
|
|
899
1610
|
/**
|
|
900
|
-
*
|
|
1611
|
+
* Unique identifier for the block
|
|
901
1612
|
*/
|
|
902
|
-
|
|
1613
|
+
id: string;
|
|
903
1614
|
/**
|
|
904
|
-
*
|
|
1615
|
+
* Block type identifier
|
|
905
1616
|
*/
|
|
906
|
-
|
|
1617
|
+
blockType: 'POLITENESS';
|
|
907
1618
|
/**
|
|
908
|
-
*
|
|
1619
|
+
* Optional description of what this block evaluates
|
|
909
1620
|
*/
|
|
910
|
-
|
|
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;
|
|
911
1638
|
}
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
* Value type of the metric
|
|
1014
|
-
*/
|
|
1015
|
-
valueType: string;
|
|
1016
|
-
}
|
|
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;
|
|
1017
1740
|
}
|
|
1018
|
-
|
|
1019
|
-
* Pagination information
|
|
1020
|
-
*/
|
|
1021
|
-
interface Pagination {
|
|
1741
|
+
interface UnionMember8 {
|
|
1022
1742
|
/**
|
|
1023
|
-
*
|
|
1743
|
+
* Unique identifier for the block
|
|
1024
1744
|
*/
|
|
1025
|
-
|
|
1745
|
+
id: string;
|
|
1026
1746
|
/**
|
|
1027
|
-
*
|
|
1747
|
+
* Block type identifier
|
|
1028
1748
|
*/
|
|
1029
|
-
|
|
1749
|
+
blockType: 'VOCAL_CUE';
|
|
1030
1750
|
/**
|
|
1031
|
-
*
|
|
1751
|
+
* Optional description of what this block evaluates
|
|
1032
1752
|
*/
|
|
1033
|
-
|
|
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;
|
|
1034
1774
|
}
|
|
1035
1775
|
}
|
|
1036
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
|
+
}
|
|
1037
2124
|
export interface EvaluationCreateJobParams {
|
|
1038
2125
|
/**
|
|
1039
2126
|
* List of evaluators slugs to evaluate the calls or "all" to evaluate all
|
|
@@ -1301,7 +2388,400 @@ export interface EvaluationListJobRunsParams {
|
|
|
1301
2388
|
*/
|
|
1302
2389
|
nextCursor?: string;
|
|
1303
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
|
+
}
|
|
1304
2784
|
export declare namespace Evaluation {
|
|
1305
|
-
export { type EvaluationCreateJobResponse as EvaluationCreateJobResponse, type EvaluationGetEvaluatorByIDResponse as EvaluationGetEvaluatorByIDResponse, type EvaluationGetJobResponse as EvaluationGetJobResponse, type EvaluationListEvaluatorsResponse as EvaluationListEvaluatorsResponse, type EvaluationListJobRunsResponse as EvaluationListJobRunsResponse, type EvaluationCreateJobParams as EvaluationCreateJobParams, type EvaluationListEvaluatorsParams as EvaluationListEvaluatorsParams, type EvaluationListJobRunsParams as EvaluationListJobRunsParams, };
|
|
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, };
|
|
1306
2786
|
}
|
|
1307
2787
|
//# sourceMappingURL=evaluation.d.ts.map
|