@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
|
@@ -6,6 +6,16 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
6
6
|
import { path } from '../internal/utils/path';
|
|
7
7
|
|
|
8
8
|
export class Evaluation extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new evaluator with the specified blocks and configuration.
|
|
11
|
+
*/
|
|
12
|
+
createEvaluator(
|
|
13
|
+
body: EvaluationCreateEvaluatorParams,
|
|
14
|
+
options?: RequestOptions,
|
|
15
|
+
): APIPromise<EvaluationCreateEvaluatorResponse> {
|
|
16
|
+
return this._client.post('/v1/evaluation/evaluators', { body, ...options });
|
|
17
|
+
}
|
|
18
|
+
|
|
9
19
|
/**
|
|
10
20
|
* Create a evaluation job for a single call or dataset of calls
|
|
11
21
|
*/
|
|
@@ -54,327 +64,2229 @@ export class Evaluation extends APIResource {
|
|
|
54
64
|
): APIPromise<EvaluationListJobRunsResponse> {
|
|
55
65
|
return this._client.get(path`/v1/evaluation/job/${jobID}/runs`, { query, ...options });
|
|
56
66
|
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface EvaluationCreateJobResponse {
|
|
60
|
-
data: EvaluationCreateJobResponse.Data;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export namespace EvaluationCreateJobResponse {
|
|
64
|
-
export interface Data {
|
|
65
|
-
/**
|
|
66
|
-
* ID of the evaluation job
|
|
67
|
-
*/
|
|
68
|
-
jobId: string;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Status of the evaluation job
|
|
72
|
-
*/
|
|
73
|
-
status: 'PENDING' | 'PROCESSING' | 'SUCCESS' | 'FAILURE';
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* ID of the call being evaluated (only present for single call evaluations)
|
|
77
|
-
*/
|
|
78
|
-
callId?: string;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Evaluator with its configured blocks
|
|
84
|
-
*/
|
|
85
|
-
export interface EvaluationGetEvaluatorByIDResponse {
|
|
86
|
-
/**
|
|
87
|
-
* Unique identifier for the evaluator
|
|
88
|
-
*/
|
|
89
|
-
id: string;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Array of evaluation blocks configured for this evaluator
|
|
93
|
-
*/
|
|
94
|
-
blocks: Array<
|
|
95
|
-
| EvaluationGetEvaluatorByIDResponse.UnionMember0
|
|
96
|
-
| EvaluationGetEvaluatorByIDResponse.UnionMember1
|
|
97
|
-
| EvaluationGetEvaluatorByIDResponse.UnionMember2
|
|
98
|
-
| EvaluationGetEvaluatorByIDResponse.UnionMember3
|
|
99
|
-
| EvaluationGetEvaluatorByIDResponse.UnionMember4
|
|
100
|
-
| EvaluationGetEvaluatorByIDResponse.UnionMember5
|
|
101
|
-
| EvaluationGetEvaluatorByIDResponse.UnionMember6
|
|
102
|
-
| EvaluationGetEvaluatorByIDResponse.UnionMember7
|
|
103
|
-
| EvaluationGetEvaluatorByIDResponse.UnionMember8
|
|
104
|
-
>;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* ISO timestamp when the evaluator was created
|
|
108
|
-
*/
|
|
109
|
-
createdAt: string;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Optional description of the evaluator
|
|
113
|
-
*/
|
|
114
|
-
description: string | null;
|
|
115
67
|
|
|
116
68
|
/**
|
|
117
|
-
*
|
|
69
|
+
* Updates an existing evaluator. When blocks are provided: blocks with an id
|
|
70
|
+
* update existing blocks, blocks without an id create new blocks, and existing
|
|
71
|
+
* blocks not included in the array are deleted.
|
|
118
72
|
*/
|
|
119
|
-
|
|
73
|
+
updateEvaluator(
|
|
74
|
+
evaluatorID: string,
|
|
75
|
+
body: EvaluationUpdateEvaluatorParams | null | undefined = {},
|
|
76
|
+
options?: RequestOptions,
|
|
77
|
+
): APIPromise<EvaluationUpdateEvaluatorResponse> {
|
|
78
|
+
return this._client.put(path`/v1/evaluation/evaluators/${evaluatorID}`, { body, ...options });
|
|
79
|
+
}
|
|
80
|
+
}
|
|
120
81
|
|
|
82
|
+
export interface EvaluationCreateEvaluatorResponse {
|
|
121
83
|
/**
|
|
122
|
-
*
|
|
84
|
+
* Evaluator with its configured blocks
|
|
123
85
|
*/
|
|
124
|
-
|
|
86
|
+
data: EvaluationCreateEvaluatorResponse.Data;
|
|
87
|
+
}
|
|
125
88
|
|
|
89
|
+
export namespace EvaluationCreateEvaluatorResponse {
|
|
126
90
|
/**
|
|
127
|
-
*
|
|
91
|
+
* Evaluator with its configured blocks
|
|
128
92
|
*/
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export namespace EvaluationGetEvaluatorByIDResponse {
|
|
133
|
-
export interface UnionMember0 {
|
|
93
|
+
export interface Data {
|
|
134
94
|
/**
|
|
135
|
-
* Unique identifier for the
|
|
95
|
+
* Unique identifier for the evaluator
|
|
136
96
|
*/
|
|
137
97
|
id: string;
|
|
138
98
|
|
|
139
99
|
/**
|
|
140
|
-
*
|
|
100
|
+
* Array of evaluation blocks configured for this evaluator
|
|
141
101
|
*/
|
|
142
|
-
|
|
102
|
+
blocks: Array<
|
|
103
|
+
| Data.UnionMember0
|
|
104
|
+
| Data.UnionMember1
|
|
105
|
+
| Data.UnionMember2
|
|
106
|
+
| Data.UnionMember3
|
|
107
|
+
| Data.UnionMember4
|
|
108
|
+
| Data.UnionMember5
|
|
109
|
+
| Data.UnionMember6
|
|
110
|
+
| Data.UnionMember7
|
|
111
|
+
| Data.UnionMember8
|
|
112
|
+
>;
|
|
143
113
|
|
|
144
114
|
/**
|
|
145
|
-
*
|
|
115
|
+
* ISO timestamp when the evaluator was created
|
|
146
116
|
*/
|
|
147
|
-
|
|
117
|
+
createdAt: string;
|
|
148
118
|
|
|
149
119
|
/**
|
|
150
|
-
*
|
|
120
|
+
* Optional description of the evaluator
|
|
151
121
|
*/
|
|
152
|
-
|
|
122
|
+
description: string | null;
|
|
153
123
|
|
|
154
124
|
/**
|
|
155
|
-
*
|
|
125
|
+
* Name of the evaluator
|
|
156
126
|
*/
|
|
157
127
|
name: string;
|
|
158
128
|
|
|
159
129
|
/**
|
|
160
|
-
*
|
|
161
|
-
*/
|
|
162
|
-
orderIndex: number;
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* The prompt to evaluate the call against
|
|
166
|
-
*/
|
|
167
|
-
prompt: string;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Minimum score threshold to pass evaluation (0-1)
|
|
130
|
+
* Unique slug identifier for the evaluator
|
|
171
131
|
*/
|
|
172
|
-
|
|
132
|
+
slug: string;
|
|
173
133
|
|
|
174
134
|
/**
|
|
175
|
-
*
|
|
135
|
+
* ISO timestamp when the evaluator was last updated
|
|
176
136
|
*/
|
|
177
|
-
|
|
137
|
+
updatedAt: string;
|
|
178
138
|
}
|
|
179
139
|
|
|
180
|
-
export
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
140
|
+
export namespace Data {
|
|
141
|
+
export interface UnionMember0 {
|
|
142
|
+
/**
|
|
143
|
+
* Unique identifier for the block
|
|
144
|
+
*/
|
|
145
|
+
id: string;
|
|
185
146
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
147
|
+
/**
|
|
148
|
+
* Block type identifier
|
|
149
|
+
*/
|
|
150
|
+
blockType: 'CUSTOM_PROMPT';
|
|
190
151
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
152
|
+
/**
|
|
153
|
+
* Optional description of what this block evaluates
|
|
154
|
+
*/
|
|
155
|
+
description: string | null;
|
|
195
156
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
157
|
+
/**
|
|
158
|
+
* Name of the metric this prompt evaluates
|
|
159
|
+
*/
|
|
160
|
+
metricName: string;
|
|
200
161
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
162
|
+
/**
|
|
163
|
+
* Display name of the evaluation block
|
|
164
|
+
*/
|
|
165
|
+
name: string;
|
|
205
166
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
167
|
+
/**
|
|
168
|
+
* Order in which this block is executed
|
|
169
|
+
*/
|
|
170
|
+
orderIndex: number;
|
|
210
171
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
172
|
+
/**
|
|
173
|
+
* The prompt to evaluate the call against
|
|
174
|
+
*/
|
|
175
|
+
prompt: string;
|
|
215
176
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
177
|
+
/**
|
|
178
|
+
* Minimum score threshold to pass evaluation (0-1)
|
|
179
|
+
*/
|
|
180
|
+
threshold: number;
|
|
220
181
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
182
|
+
/**
|
|
183
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
184
|
+
*/
|
|
185
|
+
weight: number;
|
|
186
|
+
}
|
|
225
187
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
188
|
+
export interface UnionMember1 {
|
|
189
|
+
/**
|
|
190
|
+
* Unique identifier for the block
|
|
191
|
+
*/
|
|
192
|
+
id: string;
|
|
230
193
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}
|
|
194
|
+
/**
|
|
195
|
+
* Block type identifier
|
|
196
|
+
*/
|
|
197
|
+
blockType: 'DATAFIELD_CHECK';
|
|
236
198
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
id: string;
|
|
199
|
+
/**
|
|
200
|
+
* Optional description of what this block evaluates
|
|
201
|
+
*/
|
|
202
|
+
description: string | null;
|
|
242
203
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
204
|
+
/**
|
|
205
|
+
* Criteria for evaluating the property
|
|
206
|
+
*/
|
|
207
|
+
evaluationCriteria: string;
|
|
247
208
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
209
|
+
/**
|
|
210
|
+
* Whether this property must be present
|
|
211
|
+
*/
|
|
212
|
+
isRequired: boolean;
|
|
252
213
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
214
|
+
/**
|
|
215
|
+
* Display name of the evaluation block
|
|
216
|
+
*/
|
|
217
|
+
name: string;
|
|
257
218
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
219
|
+
/**
|
|
220
|
+
* Order in which this block is executed
|
|
221
|
+
*/
|
|
222
|
+
orderIndex: number;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Name of the property to check
|
|
226
|
+
*/
|
|
227
|
+
propertyName: string;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Minimum score threshold to pass evaluation (0-1)
|
|
231
|
+
*/
|
|
232
|
+
threshold: number;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Expected type of the property value
|
|
236
|
+
*/
|
|
237
|
+
valueType: string;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
241
|
+
*/
|
|
242
|
+
weight: number;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export interface UnionMember2 {
|
|
246
|
+
/**
|
|
247
|
+
* Unique identifier for the block
|
|
248
|
+
*/
|
|
249
|
+
id: string;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Block type identifier
|
|
253
|
+
*/
|
|
254
|
+
blockType: 'EMOTION';
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Optional description of what this block evaluates
|
|
258
|
+
*/
|
|
259
|
+
description: string | null;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Display name of the evaluation block
|
|
263
|
+
*/
|
|
264
|
+
name: string;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Order in which this block is executed
|
|
268
|
+
*/
|
|
269
|
+
orderIndex: number;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* The emotion to detect (e.g., "joy", "anger", "sadness")
|
|
273
|
+
*/
|
|
274
|
+
selectedEmotion: string;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Minimum confidence threshold for emotion detection (0-1)
|
|
278
|
+
*/
|
|
279
|
+
threshold: number;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
283
|
+
*/
|
|
284
|
+
weight: number;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export interface UnionMember3 {
|
|
288
|
+
/**
|
|
289
|
+
* Unique identifier for the block
|
|
290
|
+
*/
|
|
291
|
+
id: string;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Block type identifier
|
|
295
|
+
*/
|
|
296
|
+
blockType: 'LATENCY';
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Optional description of what this block evaluates
|
|
300
|
+
*/
|
|
301
|
+
description: string | null;
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Maximum number of silence periods allowed
|
|
305
|
+
*/
|
|
306
|
+
maxAllowedSilences: number;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Minimum duration of silence in milliseconds to be considered
|
|
310
|
+
*/
|
|
311
|
+
minSilenceDuration: number;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Display name of the evaluation block
|
|
315
|
+
*/
|
|
316
|
+
name: string;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Order in which this block is executed
|
|
320
|
+
*/
|
|
321
|
+
orderIndex: number;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Maximum allowed latency score
|
|
325
|
+
*/
|
|
326
|
+
threshold: number;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
330
|
+
*/
|
|
331
|
+
weight: number;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export interface UnionMember4 {
|
|
335
|
+
/**
|
|
336
|
+
* Unique identifier for the block
|
|
337
|
+
*/
|
|
338
|
+
id: string;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Block type identifier
|
|
342
|
+
*/
|
|
343
|
+
blockType: 'POLITENESS';
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Optional description of what this block evaluates
|
|
347
|
+
*/
|
|
348
|
+
description: string | null;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Display name of the evaluation block
|
|
352
|
+
*/
|
|
353
|
+
name: string;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Order in which this block is executed
|
|
357
|
+
*/
|
|
358
|
+
orderIndex: number;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Minimum politeness score threshold (0-1)
|
|
362
|
+
*/
|
|
363
|
+
threshold: number;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
367
|
+
*/
|
|
368
|
+
weight: number;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export interface UnionMember5 {
|
|
372
|
+
/**
|
|
373
|
+
* Unique identifier for the block
|
|
374
|
+
*/
|
|
375
|
+
id: string;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Block type identifier
|
|
379
|
+
*/
|
|
380
|
+
blockType: 'SENTIMENT';
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Optional description of what this block evaluates
|
|
384
|
+
*/
|
|
385
|
+
description: string | null;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Display name of the evaluation block
|
|
389
|
+
*/
|
|
390
|
+
name: string;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Order in which this block is executed
|
|
394
|
+
*/
|
|
395
|
+
orderIndex: number;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Minimum sentiment score threshold (0-1)
|
|
399
|
+
*/
|
|
400
|
+
threshold: number;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
404
|
+
*/
|
|
405
|
+
weight: number;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
export interface UnionMember6 {
|
|
409
|
+
/**
|
|
410
|
+
* Unique identifier for the block
|
|
411
|
+
*/
|
|
412
|
+
id: string;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Block type identifier
|
|
416
|
+
*/
|
|
417
|
+
blockType: 'TOOL_CALLS';
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Optional description of what this block evaluates
|
|
421
|
+
*/
|
|
422
|
+
description: string | null;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Condition that must be met for tool invocation
|
|
426
|
+
*/
|
|
427
|
+
invocationCondition: string | null;
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Minimum number of times the tool should be invoked
|
|
431
|
+
*/
|
|
432
|
+
minInvocationCount: number | null;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Display name of the evaluation block
|
|
436
|
+
*/
|
|
437
|
+
name: string;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Order in which this block is executed
|
|
441
|
+
*/
|
|
442
|
+
orderIndex: number;
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Whether the tool should be invoked
|
|
446
|
+
*/
|
|
447
|
+
shouldBeInvoked: boolean;
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* ID of the tool definition
|
|
451
|
+
*/
|
|
452
|
+
toolDefinitionId: string;
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
456
|
+
*/
|
|
457
|
+
weight: number;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export interface UnionMember7 {
|
|
461
|
+
/**
|
|
462
|
+
* Unique identifier for the block
|
|
463
|
+
*/
|
|
464
|
+
id: string;
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Block type identifier
|
|
468
|
+
*/
|
|
469
|
+
blockType: 'TOXICITY';
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Optional description of what this block evaluates
|
|
473
|
+
*/
|
|
474
|
+
description: string | null;
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Display name of the evaluation block
|
|
478
|
+
*/
|
|
479
|
+
name: string;
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Order in which this block is executed
|
|
483
|
+
*/
|
|
484
|
+
orderIndex: number;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Maximum allowed toxicity score (0-1)
|
|
488
|
+
*/
|
|
489
|
+
threshold: number;
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
493
|
+
*/
|
|
494
|
+
weight: number;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
export interface UnionMember8 {
|
|
498
|
+
/**
|
|
499
|
+
* Unique identifier for the block
|
|
500
|
+
*/
|
|
501
|
+
id: string;
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Block type identifier
|
|
505
|
+
*/
|
|
506
|
+
blockType: 'VOCAL_CUE';
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Optional description of what this block evaluates
|
|
510
|
+
*/
|
|
511
|
+
description: string | null;
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Display name of the evaluation block
|
|
515
|
+
*/
|
|
516
|
+
name: string;
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* Order in which this block is executed
|
|
520
|
+
*/
|
|
521
|
+
orderIndex: number;
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* The vocal cue to detect (e.g., "pace", "tone", "volume")
|
|
525
|
+
*/
|
|
526
|
+
selectedCue: string;
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Minimum confidence threshold for vocal cue detection (0-1)
|
|
530
|
+
*/
|
|
531
|
+
threshold: number;
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
535
|
+
*/
|
|
536
|
+
weight: number;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
export interface EvaluationCreateJobResponse {
|
|
542
|
+
data: EvaluationCreateJobResponse.Data;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
export namespace EvaluationCreateJobResponse {
|
|
546
|
+
export interface Data {
|
|
547
|
+
/**
|
|
548
|
+
* ID of the evaluation job
|
|
549
|
+
*/
|
|
550
|
+
jobId: string;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Status of the evaluation job
|
|
554
|
+
*/
|
|
555
|
+
status: 'PENDING' | 'PROCESSING' | 'SUCCESS' | 'FAILURE';
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* ID of the call being evaluated (only present for single call evaluations)
|
|
559
|
+
*/
|
|
560
|
+
callId?: string;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Evaluator with its configured blocks
|
|
566
|
+
*/
|
|
567
|
+
export interface EvaluationGetEvaluatorByIDResponse {
|
|
568
|
+
/**
|
|
569
|
+
* Unique identifier for the evaluator
|
|
570
|
+
*/
|
|
571
|
+
id: string;
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* Array of evaluation blocks configured for this evaluator
|
|
575
|
+
*/
|
|
576
|
+
blocks: Array<
|
|
577
|
+
| EvaluationGetEvaluatorByIDResponse.UnionMember0
|
|
578
|
+
| EvaluationGetEvaluatorByIDResponse.UnionMember1
|
|
579
|
+
| EvaluationGetEvaluatorByIDResponse.UnionMember2
|
|
580
|
+
| EvaluationGetEvaluatorByIDResponse.UnionMember3
|
|
581
|
+
| EvaluationGetEvaluatorByIDResponse.UnionMember4
|
|
582
|
+
| EvaluationGetEvaluatorByIDResponse.UnionMember5
|
|
583
|
+
| EvaluationGetEvaluatorByIDResponse.UnionMember6
|
|
584
|
+
| EvaluationGetEvaluatorByIDResponse.UnionMember7
|
|
585
|
+
| EvaluationGetEvaluatorByIDResponse.UnionMember8
|
|
586
|
+
>;
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* ISO timestamp when the evaluator was created
|
|
590
|
+
*/
|
|
591
|
+
createdAt: string;
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Optional description of the evaluator
|
|
595
|
+
*/
|
|
596
|
+
description: string | null;
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* Name of the evaluator
|
|
600
|
+
*/
|
|
601
|
+
name: string;
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* Unique slug identifier for the evaluator
|
|
605
|
+
*/
|
|
606
|
+
slug: string;
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* ISO timestamp when the evaluator was last updated
|
|
610
|
+
*/
|
|
611
|
+
updatedAt: string;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
export namespace EvaluationGetEvaluatorByIDResponse {
|
|
615
|
+
export interface UnionMember0 {
|
|
616
|
+
/**
|
|
617
|
+
* Unique identifier for the block
|
|
618
|
+
*/
|
|
619
|
+
id: string;
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Block type identifier
|
|
623
|
+
*/
|
|
624
|
+
blockType: 'CUSTOM_PROMPT';
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* Optional description of what this block evaluates
|
|
628
|
+
*/
|
|
629
|
+
description: string | null;
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* Name of the metric this prompt evaluates
|
|
633
|
+
*/
|
|
634
|
+
metricName: string;
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* Display name of the evaluation block
|
|
638
|
+
*/
|
|
639
|
+
name: string;
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Order in which this block is executed
|
|
643
|
+
*/
|
|
644
|
+
orderIndex: number;
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* The prompt to evaluate the call against
|
|
648
|
+
*/
|
|
649
|
+
prompt: string;
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* Minimum score threshold to pass evaluation (0-1)
|
|
653
|
+
*/
|
|
654
|
+
threshold: number;
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
658
|
+
*/
|
|
659
|
+
weight: number;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
export interface UnionMember1 {
|
|
663
|
+
/**
|
|
664
|
+
* Unique identifier for the block
|
|
665
|
+
*/
|
|
666
|
+
id: string;
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* Block type identifier
|
|
670
|
+
*/
|
|
671
|
+
blockType: 'DATAFIELD_CHECK';
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* Optional description of what this block evaluates
|
|
675
|
+
*/
|
|
676
|
+
description: string | null;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Criteria for evaluating the property
|
|
680
|
+
*/
|
|
681
|
+
evaluationCriteria: string;
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* Whether this property must be present
|
|
685
|
+
*/
|
|
686
|
+
isRequired: boolean;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Display name of the evaluation block
|
|
690
|
+
*/
|
|
691
|
+
name: string;
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Order in which this block is executed
|
|
695
|
+
*/
|
|
696
|
+
orderIndex: number;
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Name of the property to check
|
|
700
|
+
*/
|
|
701
|
+
propertyName: string;
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Minimum score threshold to pass evaluation (0-1)
|
|
705
|
+
*/
|
|
706
|
+
threshold: number;
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* Expected type of the property value
|
|
710
|
+
*/
|
|
711
|
+
valueType: string;
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
715
|
+
*/
|
|
716
|
+
weight: number;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
export interface UnionMember2 {
|
|
720
|
+
/**
|
|
721
|
+
* Unique identifier for the block
|
|
722
|
+
*/
|
|
723
|
+
id: string;
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* Block type identifier
|
|
727
|
+
*/
|
|
728
|
+
blockType: 'EMOTION';
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Optional description of what this block evaluates
|
|
732
|
+
*/
|
|
733
|
+
description: string | null;
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* Display name of the evaluation block
|
|
737
|
+
*/
|
|
738
|
+
name: string;
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Order in which this block is executed
|
|
742
|
+
*/
|
|
743
|
+
orderIndex: number;
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* The emotion to detect (e.g., "joy", "anger", "sadness")
|
|
747
|
+
*/
|
|
748
|
+
selectedEmotion: string;
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* Minimum confidence threshold for emotion detection (0-1)
|
|
752
|
+
*/
|
|
753
|
+
threshold: number;
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
757
|
+
*/
|
|
758
|
+
weight: number;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
export interface UnionMember3 {
|
|
762
|
+
/**
|
|
763
|
+
* Unique identifier for the block
|
|
764
|
+
*/
|
|
765
|
+
id: string;
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* Block type identifier
|
|
769
|
+
*/
|
|
770
|
+
blockType: 'LATENCY';
|
|
771
|
+
|
|
772
|
+
/**
|
|
773
|
+
* Optional description of what this block evaluates
|
|
774
|
+
*/
|
|
775
|
+
description: string | null;
|
|
776
|
+
|
|
777
|
+
/**
|
|
778
|
+
* Maximum number of silence periods allowed
|
|
779
|
+
*/
|
|
780
|
+
maxAllowedSilences: number;
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* Minimum duration of silence in milliseconds to be considered
|
|
784
|
+
*/
|
|
785
|
+
minSilenceDuration: number;
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Display name of the evaluation block
|
|
789
|
+
*/
|
|
790
|
+
name: string;
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* Order in which this block is executed
|
|
794
|
+
*/
|
|
795
|
+
orderIndex: number;
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* Maximum allowed latency score
|
|
799
|
+
*/
|
|
800
|
+
threshold: number;
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
804
|
+
*/
|
|
805
|
+
weight: number;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
export interface UnionMember4 {
|
|
809
|
+
/**
|
|
810
|
+
* Unique identifier for the block
|
|
811
|
+
*/
|
|
812
|
+
id: string;
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* Block type identifier
|
|
816
|
+
*/
|
|
817
|
+
blockType: 'POLITENESS';
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* Optional description of what this block evaluates
|
|
821
|
+
*/
|
|
822
|
+
description: string | null;
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* Display name of the evaluation block
|
|
826
|
+
*/
|
|
827
|
+
name: string;
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* Order in which this block is executed
|
|
831
|
+
*/
|
|
832
|
+
orderIndex: number;
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* Minimum politeness score threshold (0-1)
|
|
836
|
+
*/
|
|
837
|
+
threshold: number;
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
841
|
+
*/
|
|
842
|
+
weight: number;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
export interface UnionMember5 {
|
|
846
|
+
/**
|
|
847
|
+
* Unique identifier for the block
|
|
848
|
+
*/
|
|
849
|
+
id: string;
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Block type identifier
|
|
853
|
+
*/
|
|
854
|
+
blockType: 'SENTIMENT';
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* Optional description of what this block evaluates
|
|
858
|
+
*/
|
|
859
|
+
description: string | null;
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* Display name of the evaluation block
|
|
863
|
+
*/
|
|
864
|
+
name: string;
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* Order in which this block is executed
|
|
868
|
+
*/
|
|
869
|
+
orderIndex: number;
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* Minimum sentiment score threshold (0-1)
|
|
873
|
+
*/
|
|
874
|
+
threshold: number;
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
878
|
+
*/
|
|
879
|
+
weight: number;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
export interface UnionMember6 {
|
|
883
|
+
/**
|
|
884
|
+
* Unique identifier for the block
|
|
885
|
+
*/
|
|
886
|
+
id: string;
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* Block type identifier
|
|
890
|
+
*/
|
|
891
|
+
blockType: 'TOOL_CALLS';
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* Optional description of what this block evaluates
|
|
895
|
+
*/
|
|
896
|
+
description: string | null;
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* Condition that must be met for tool invocation
|
|
900
|
+
*/
|
|
901
|
+
invocationCondition: string | null;
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* Minimum number of times the tool should be invoked
|
|
905
|
+
*/
|
|
906
|
+
minInvocationCount: number | null;
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* Display name of the evaluation block
|
|
910
|
+
*/
|
|
911
|
+
name: string;
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* Order in which this block is executed
|
|
915
|
+
*/
|
|
916
|
+
orderIndex: number;
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* Whether the tool should be invoked
|
|
920
|
+
*/
|
|
921
|
+
shouldBeInvoked: boolean;
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* ID of the tool definition
|
|
925
|
+
*/
|
|
926
|
+
toolDefinitionId: string;
|
|
927
|
+
|
|
928
|
+
/**
|
|
929
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
930
|
+
*/
|
|
931
|
+
weight: number;
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
export interface UnionMember7 {
|
|
935
|
+
/**
|
|
936
|
+
* Unique identifier for the block
|
|
937
|
+
*/
|
|
938
|
+
id: string;
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* Block type identifier
|
|
942
|
+
*/
|
|
943
|
+
blockType: 'TOXICITY';
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* Optional description of what this block evaluates
|
|
947
|
+
*/
|
|
948
|
+
description: string | null;
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
* Display name of the evaluation block
|
|
952
|
+
*/
|
|
953
|
+
name: string;
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Order in which this block is executed
|
|
957
|
+
*/
|
|
958
|
+
orderIndex: number;
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* Maximum allowed toxicity score (0-1)
|
|
962
|
+
*/
|
|
963
|
+
threshold: number;
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
967
|
+
*/
|
|
968
|
+
weight: number;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
export interface UnionMember8 {
|
|
972
|
+
/**
|
|
973
|
+
* Unique identifier for the block
|
|
974
|
+
*/
|
|
975
|
+
id: string;
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* Block type identifier
|
|
979
|
+
*/
|
|
980
|
+
blockType: 'VOCAL_CUE';
|
|
981
|
+
|
|
982
|
+
/**
|
|
983
|
+
* Optional description of what this block evaluates
|
|
984
|
+
*/
|
|
985
|
+
description: string | null;
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* Display name of the evaluation block
|
|
989
|
+
*/
|
|
990
|
+
name: string;
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* Order in which this block is executed
|
|
994
|
+
*/
|
|
995
|
+
orderIndex: number;
|
|
996
|
+
|
|
997
|
+
/**
|
|
998
|
+
* The vocal cue to detect (e.g., "pace", "tone", "volume")
|
|
999
|
+
*/
|
|
1000
|
+
selectedCue: string;
|
|
1001
|
+
|
|
1002
|
+
/**
|
|
1003
|
+
* Minimum confidence threshold for vocal cue detection (0-1)
|
|
1004
|
+
*/
|
|
1005
|
+
threshold: number;
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
1009
|
+
*/
|
|
1010
|
+
weight: number;
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
export interface EvaluationGetJobResponse {
|
|
1015
|
+
/**
|
|
1016
|
+
* Evaluation job response payload
|
|
1017
|
+
*/
|
|
1018
|
+
data: EvaluationGetJobResponse.Data;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
export namespace EvaluationGetJobResponse {
|
|
1022
|
+
/**
|
|
1023
|
+
* Evaluation job response payload
|
|
1024
|
+
*/
|
|
1025
|
+
export interface Data {
|
|
1026
|
+
/**
|
|
1027
|
+
* ID of the evaluation job
|
|
1028
|
+
*/
|
|
1029
|
+
id: string;
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* Status of the evaluation job
|
|
1033
|
+
*/
|
|
1034
|
+
status: 'PENDING' | 'PROCESSING' | 'SUCCESS' | 'FAILURE';
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* Call being evaluated
|
|
1038
|
+
*/
|
|
1039
|
+
call?: Data.Call;
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* Dataset being evaluated
|
|
1043
|
+
*/
|
|
1044
|
+
dataset?: Data.Dataset;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
export namespace Data {
|
|
1048
|
+
/**
|
|
1049
|
+
* Call being evaluated
|
|
1050
|
+
*/
|
|
1051
|
+
export interface Call {
|
|
1052
|
+
/**
|
|
1053
|
+
* ID of the call being evaluated
|
|
1054
|
+
*/
|
|
1055
|
+
id: string | null;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
/**
|
|
1059
|
+
* Dataset being evaluated
|
|
1060
|
+
*/
|
|
1061
|
+
export interface Dataset {
|
|
1062
|
+
/**
|
|
1063
|
+
* ID of the dataset
|
|
1064
|
+
*/
|
|
1065
|
+
id: string | null;
|
|
1066
|
+
|
|
1067
|
+
/**
|
|
1068
|
+
* Calls in the dataset
|
|
1069
|
+
*/
|
|
1070
|
+
calls: Array<Dataset.Call>;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
export namespace Dataset {
|
|
1074
|
+
export interface Call {
|
|
1075
|
+
/**
|
|
1076
|
+
* ID of the call
|
|
1077
|
+
*/
|
|
1078
|
+
id: string | null;
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Response containing evaluators and pagination info
|
|
1086
|
+
*/
|
|
1087
|
+
export interface EvaluationListEvaluatorsResponse {
|
|
1088
|
+
/**
|
|
1089
|
+
* Array of evaluators with their blocks
|
|
1090
|
+
*/
|
|
1091
|
+
data: Array<EvaluationListEvaluatorsResponse.Data>;
|
|
1092
|
+
|
|
1093
|
+
/**
|
|
1094
|
+
* Pagination information
|
|
1095
|
+
*/
|
|
1096
|
+
pagination: EvaluationListEvaluatorsResponse.Pagination;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
export namespace EvaluationListEvaluatorsResponse {
|
|
1100
|
+
/**
|
|
1101
|
+
* Evaluator with its configured blocks
|
|
1102
|
+
*/
|
|
1103
|
+
export interface Data {
|
|
1104
|
+
/**
|
|
1105
|
+
* Unique identifier for the evaluator
|
|
1106
|
+
*/
|
|
1107
|
+
id: string;
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* Array of evaluation blocks configured for this evaluator
|
|
1111
|
+
*/
|
|
1112
|
+
blocks: Array<
|
|
1113
|
+
| Data.UnionMember0
|
|
1114
|
+
| Data.UnionMember1
|
|
1115
|
+
| Data.UnionMember2
|
|
1116
|
+
| Data.UnionMember3
|
|
1117
|
+
| Data.UnionMember4
|
|
1118
|
+
| Data.UnionMember5
|
|
1119
|
+
| Data.UnionMember6
|
|
1120
|
+
| Data.UnionMember7
|
|
1121
|
+
| Data.UnionMember8
|
|
1122
|
+
>;
|
|
1123
|
+
|
|
1124
|
+
/**
|
|
1125
|
+
* ISO timestamp when the evaluator was created
|
|
1126
|
+
*/
|
|
1127
|
+
createdAt: string;
|
|
1128
|
+
|
|
1129
|
+
/**
|
|
1130
|
+
* Optional description of the evaluator
|
|
1131
|
+
*/
|
|
1132
|
+
description: string | null;
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* Name of the evaluator
|
|
1136
|
+
*/
|
|
1137
|
+
name: string;
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Unique slug identifier for the evaluator
|
|
1141
|
+
*/
|
|
1142
|
+
slug: string;
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* ISO timestamp when the evaluator was last updated
|
|
1146
|
+
*/
|
|
1147
|
+
updatedAt: string;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
export namespace Data {
|
|
1151
|
+
export interface UnionMember0 {
|
|
1152
|
+
/**
|
|
1153
|
+
* Unique identifier for the block
|
|
1154
|
+
*/
|
|
1155
|
+
id: string;
|
|
1156
|
+
|
|
1157
|
+
/**
|
|
1158
|
+
* Block type identifier
|
|
1159
|
+
*/
|
|
1160
|
+
blockType: 'CUSTOM_PROMPT';
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* Optional description of what this block evaluates
|
|
1164
|
+
*/
|
|
1165
|
+
description: string | null;
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* Name of the metric this prompt evaluates
|
|
1169
|
+
*/
|
|
1170
|
+
metricName: string;
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* Display name of the evaluation block
|
|
1174
|
+
*/
|
|
1175
|
+
name: string;
|
|
1176
|
+
|
|
1177
|
+
/**
|
|
1178
|
+
* Order in which this block is executed
|
|
1179
|
+
*/
|
|
1180
|
+
orderIndex: number;
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* The prompt to evaluate the call against
|
|
1184
|
+
*/
|
|
1185
|
+
prompt: string;
|
|
1186
|
+
|
|
1187
|
+
/**
|
|
1188
|
+
* Minimum score threshold to pass evaluation (0-1)
|
|
1189
|
+
*/
|
|
1190
|
+
threshold: number;
|
|
1191
|
+
|
|
1192
|
+
/**
|
|
1193
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
1194
|
+
*/
|
|
1195
|
+
weight: number;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
export interface UnionMember1 {
|
|
1199
|
+
/**
|
|
1200
|
+
* Unique identifier for the block
|
|
1201
|
+
*/
|
|
1202
|
+
id: string;
|
|
1203
|
+
|
|
1204
|
+
/**
|
|
1205
|
+
* Block type identifier
|
|
1206
|
+
*/
|
|
1207
|
+
blockType: 'DATAFIELD_CHECK';
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
* Optional description of what this block evaluates
|
|
1211
|
+
*/
|
|
1212
|
+
description: string | null;
|
|
1213
|
+
|
|
1214
|
+
/**
|
|
1215
|
+
* Criteria for evaluating the property
|
|
1216
|
+
*/
|
|
1217
|
+
evaluationCriteria: string;
|
|
1218
|
+
|
|
1219
|
+
/**
|
|
1220
|
+
* Whether this property must be present
|
|
1221
|
+
*/
|
|
1222
|
+
isRequired: boolean;
|
|
1223
|
+
|
|
1224
|
+
/**
|
|
1225
|
+
* Display name of the evaluation block
|
|
1226
|
+
*/
|
|
1227
|
+
name: string;
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* Order in which this block is executed
|
|
1231
|
+
*/
|
|
1232
|
+
orderIndex: number;
|
|
1233
|
+
|
|
1234
|
+
/**
|
|
1235
|
+
* Name of the property to check
|
|
1236
|
+
*/
|
|
1237
|
+
propertyName: string;
|
|
1238
|
+
|
|
1239
|
+
/**
|
|
1240
|
+
* Minimum score threshold to pass evaluation (0-1)
|
|
1241
|
+
*/
|
|
1242
|
+
threshold: number;
|
|
1243
|
+
|
|
1244
|
+
/**
|
|
1245
|
+
* Expected type of the property value
|
|
1246
|
+
*/
|
|
1247
|
+
valueType: string;
|
|
1248
|
+
|
|
1249
|
+
/**
|
|
1250
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
1251
|
+
*/
|
|
1252
|
+
weight: number;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
export interface UnionMember2 {
|
|
1256
|
+
/**
|
|
1257
|
+
* Unique identifier for the block
|
|
1258
|
+
*/
|
|
1259
|
+
id: string;
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* Block type identifier
|
|
1263
|
+
*/
|
|
1264
|
+
blockType: 'EMOTION';
|
|
1265
|
+
|
|
1266
|
+
/**
|
|
1267
|
+
* Optional description of what this block evaluates
|
|
1268
|
+
*/
|
|
1269
|
+
description: string | null;
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* Display name of the evaluation block
|
|
1273
|
+
*/
|
|
1274
|
+
name: string;
|
|
1275
|
+
|
|
1276
|
+
/**
|
|
1277
|
+
* Order in which this block is executed
|
|
1278
|
+
*/
|
|
1279
|
+
orderIndex: number;
|
|
1280
|
+
|
|
1281
|
+
/**
|
|
1282
|
+
* The emotion to detect (e.g., "joy", "anger", "sadness")
|
|
1283
|
+
*/
|
|
1284
|
+
selectedEmotion: string;
|
|
1285
|
+
|
|
1286
|
+
/**
|
|
1287
|
+
* Minimum confidence threshold for emotion detection (0-1)
|
|
1288
|
+
*/
|
|
1289
|
+
threshold: number;
|
|
1290
|
+
|
|
1291
|
+
/**
|
|
1292
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
1293
|
+
*/
|
|
1294
|
+
weight: number;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
export interface UnionMember3 {
|
|
1298
|
+
/**
|
|
1299
|
+
* Unique identifier for the block
|
|
1300
|
+
*/
|
|
1301
|
+
id: string;
|
|
1302
|
+
|
|
1303
|
+
/**
|
|
1304
|
+
* Block type identifier
|
|
1305
|
+
*/
|
|
1306
|
+
blockType: 'LATENCY';
|
|
1307
|
+
|
|
1308
|
+
/**
|
|
1309
|
+
* Optional description of what this block evaluates
|
|
1310
|
+
*/
|
|
1311
|
+
description: string | null;
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* Maximum number of silence periods allowed
|
|
1315
|
+
*/
|
|
1316
|
+
maxAllowedSilences: number;
|
|
1317
|
+
|
|
1318
|
+
/**
|
|
1319
|
+
* Minimum duration of silence in milliseconds to be considered
|
|
1320
|
+
*/
|
|
1321
|
+
minSilenceDuration: number;
|
|
1322
|
+
|
|
1323
|
+
/**
|
|
1324
|
+
* Display name of the evaluation block
|
|
1325
|
+
*/
|
|
1326
|
+
name: string;
|
|
1327
|
+
|
|
1328
|
+
/**
|
|
1329
|
+
* Order in which this block is executed
|
|
1330
|
+
*/
|
|
1331
|
+
orderIndex: number;
|
|
1332
|
+
|
|
1333
|
+
/**
|
|
1334
|
+
* Maximum allowed latency score
|
|
1335
|
+
*/
|
|
1336
|
+
threshold: number;
|
|
1337
|
+
|
|
1338
|
+
/**
|
|
1339
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
1340
|
+
*/
|
|
1341
|
+
weight: number;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
export interface UnionMember4 {
|
|
1345
|
+
/**
|
|
1346
|
+
* Unique identifier for the block
|
|
1347
|
+
*/
|
|
1348
|
+
id: string;
|
|
1349
|
+
|
|
1350
|
+
/**
|
|
1351
|
+
* Block type identifier
|
|
1352
|
+
*/
|
|
1353
|
+
blockType: 'POLITENESS';
|
|
1354
|
+
|
|
1355
|
+
/**
|
|
1356
|
+
* Optional description of what this block evaluates
|
|
1357
|
+
*/
|
|
1358
|
+
description: string | null;
|
|
1359
|
+
|
|
1360
|
+
/**
|
|
1361
|
+
* Display name of the evaluation block
|
|
1362
|
+
*/
|
|
1363
|
+
name: string;
|
|
1364
|
+
|
|
1365
|
+
/**
|
|
1366
|
+
* Order in which this block is executed
|
|
1367
|
+
*/
|
|
1368
|
+
orderIndex: number;
|
|
1369
|
+
|
|
1370
|
+
/**
|
|
1371
|
+
* Minimum politeness score threshold (0-1)
|
|
1372
|
+
*/
|
|
1373
|
+
threshold: number;
|
|
1374
|
+
|
|
1375
|
+
/**
|
|
1376
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
1377
|
+
*/
|
|
1378
|
+
weight: number;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
export interface UnionMember5 {
|
|
1382
|
+
/**
|
|
1383
|
+
* Unique identifier for the block
|
|
1384
|
+
*/
|
|
1385
|
+
id: string;
|
|
1386
|
+
|
|
1387
|
+
/**
|
|
1388
|
+
* Block type identifier
|
|
1389
|
+
*/
|
|
1390
|
+
blockType: 'SENTIMENT';
|
|
1391
|
+
|
|
1392
|
+
/**
|
|
1393
|
+
* Optional description of what this block evaluates
|
|
1394
|
+
*/
|
|
1395
|
+
description: string | null;
|
|
1396
|
+
|
|
1397
|
+
/**
|
|
1398
|
+
* Display name of the evaluation block
|
|
1399
|
+
*/
|
|
1400
|
+
name: string;
|
|
1401
|
+
|
|
1402
|
+
/**
|
|
1403
|
+
* Order in which this block is executed
|
|
1404
|
+
*/
|
|
1405
|
+
orderIndex: number;
|
|
1406
|
+
|
|
1407
|
+
/**
|
|
1408
|
+
* Minimum sentiment score threshold (0-1)
|
|
1409
|
+
*/
|
|
1410
|
+
threshold: number;
|
|
1411
|
+
|
|
1412
|
+
/**
|
|
1413
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
1414
|
+
*/
|
|
1415
|
+
weight: number;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
export interface UnionMember6 {
|
|
1419
|
+
/**
|
|
1420
|
+
* Unique identifier for the block
|
|
1421
|
+
*/
|
|
1422
|
+
id: string;
|
|
1423
|
+
|
|
1424
|
+
/**
|
|
1425
|
+
* Block type identifier
|
|
1426
|
+
*/
|
|
1427
|
+
blockType: 'TOOL_CALLS';
|
|
1428
|
+
|
|
1429
|
+
/**
|
|
1430
|
+
* Optional description of what this block evaluates
|
|
1431
|
+
*/
|
|
1432
|
+
description: string | null;
|
|
1433
|
+
|
|
1434
|
+
/**
|
|
1435
|
+
* Condition that must be met for tool invocation
|
|
1436
|
+
*/
|
|
1437
|
+
invocationCondition: string | null;
|
|
1438
|
+
|
|
1439
|
+
/**
|
|
1440
|
+
* Minimum number of times the tool should be invoked
|
|
1441
|
+
*/
|
|
1442
|
+
minInvocationCount: number | null;
|
|
1443
|
+
|
|
1444
|
+
/**
|
|
1445
|
+
* Display name of the evaluation block
|
|
1446
|
+
*/
|
|
1447
|
+
name: string;
|
|
1448
|
+
|
|
1449
|
+
/**
|
|
1450
|
+
* Order in which this block is executed
|
|
1451
|
+
*/
|
|
1452
|
+
orderIndex: number;
|
|
1453
|
+
|
|
1454
|
+
/**
|
|
1455
|
+
* Whether the tool should be invoked
|
|
1456
|
+
*/
|
|
1457
|
+
shouldBeInvoked: boolean;
|
|
1458
|
+
|
|
1459
|
+
/**
|
|
1460
|
+
* ID of the tool definition
|
|
1461
|
+
*/
|
|
1462
|
+
toolDefinitionId: string;
|
|
1463
|
+
|
|
1464
|
+
/**
|
|
1465
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
1466
|
+
*/
|
|
1467
|
+
weight: number;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
export interface UnionMember7 {
|
|
1471
|
+
/**
|
|
1472
|
+
* Unique identifier for the block
|
|
1473
|
+
*/
|
|
1474
|
+
id: string;
|
|
1475
|
+
|
|
1476
|
+
/**
|
|
1477
|
+
* Block type identifier
|
|
1478
|
+
*/
|
|
1479
|
+
blockType: 'TOXICITY';
|
|
1480
|
+
|
|
1481
|
+
/**
|
|
1482
|
+
* Optional description of what this block evaluates
|
|
1483
|
+
*/
|
|
1484
|
+
description: string | null;
|
|
1485
|
+
|
|
1486
|
+
/**
|
|
1487
|
+
* Display name of the evaluation block
|
|
1488
|
+
*/
|
|
1489
|
+
name: string;
|
|
1490
|
+
|
|
1491
|
+
/**
|
|
1492
|
+
* Order in which this block is executed
|
|
1493
|
+
*/
|
|
1494
|
+
orderIndex: number;
|
|
1495
|
+
|
|
1496
|
+
/**
|
|
1497
|
+
* Maximum allowed toxicity score (0-1)
|
|
1498
|
+
*/
|
|
1499
|
+
threshold: number;
|
|
1500
|
+
|
|
1501
|
+
/**
|
|
1502
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
1503
|
+
*/
|
|
1504
|
+
weight: number;
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
export interface UnionMember8 {
|
|
1508
|
+
/**
|
|
1509
|
+
* Unique identifier for the block
|
|
1510
|
+
*/
|
|
1511
|
+
id: string;
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* Block type identifier
|
|
1515
|
+
*/
|
|
1516
|
+
blockType: 'VOCAL_CUE';
|
|
1517
|
+
|
|
1518
|
+
/**
|
|
1519
|
+
* Optional description of what this block evaluates
|
|
1520
|
+
*/
|
|
1521
|
+
description: string | null;
|
|
1522
|
+
|
|
1523
|
+
/**
|
|
1524
|
+
* Display name of the evaluation block
|
|
1525
|
+
*/
|
|
1526
|
+
name: string;
|
|
1527
|
+
|
|
1528
|
+
/**
|
|
1529
|
+
* Order in which this block is executed
|
|
1530
|
+
*/
|
|
1531
|
+
orderIndex: number;
|
|
1532
|
+
|
|
1533
|
+
/**
|
|
1534
|
+
* The vocal cue to detect (e.g., "pace", "tone", "volume")
|
|
1535
|
+
*/
|
|
1536
|
+
selectedCue: string;
|
|
1537
|
+
|
|
1538
|
+
/**
|
|
1539
|
+
* Minimum confidence threshold for vocal cue detection (0-1)
|
|
1540
|
+
*/
|
|
1541
|
+
threshold: number;
|
|
1542
|
+
|
|
1543
|
+
/**
|
|
1544
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
1545
|
+
*/
|
|
1546
|
+
weight: number;
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
/**
|
|
1551
|
+
* Pagination information
|
|
1552
|
+
*/
|
|
1553
|
+
export interface Pagination {
|
|
1554
|
+
/**
|
|
1555
|
+
* Whether there are more evaluators to fetch
|
|
1556
|
+
*/
|
|
1557
|
+
hasMore: boolean;
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
* Cursor for the next page, null if no more pages
|
|
1561
|
+
*/
|
|
1562
|
+
nextCursor: string | null;
|
|
1563
|
+
|
|
1564
|
+
/**
|
|
1565
|
+
* Total number of evaluators
|
|
1566
|
+
*/
|
|
1567
|
+
total: number;
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
export interface EvaluationListJobRunsResponse {
|
|
1572
|
+
/**
|
|
1573
|
+
* Evaluation job runs response payload
|
|
1574
|
+
*/
|
|
1575
|
+
data: EvaluationListJobRunsResponse.Data;
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
export namespace EvaluationListJobRunsResponse {
|
|
1579
|
+
/**
|
|
1580
|
+
* Evaluation job runs response payload
|
|
1581
|
+
*/
|
|
1582
|
+
export interface Data {
|
|
1583
|
+
/**
|
|
1584
|
+
* Evaluator runs of the evaluation job
|
|
1585
|
+
*/
|
|
1586
|
+
data: Array<Data.Data> | null;
|
|
1587
|
+
|
|
1588
|
+
/**
|
|
1589
|
+
* Pagination information
|
|
1590
|
+
*/
|
|
1591
|
+
pagination: Data.Pagination | null;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
export namespace Data {
|
|
1595
|
+
export interface Data {
|
|
1596
|
+
/**
|
|
1597
|
+
* All block runs for this evaluator, including skipped ones
|
|
1598
|
+
*/
|
|
1599
|
+
blockRuns: Array<Data.BlockRun>;
|
|
1600
|
+
|
|
1601
|
+
evaluator: Data.Evaluator;
|
|
1602
|
+
|
|
1603
|
+
evidence: Array<Data.Evidence>;
|
|
1604
|
+
|
|
1605
|
+
metrics: Array<Data.Metric>;
|
|
1606
|
+
|
|
1607
|
+
/**
|
|
1608
|
+
* Status of the evaluator run
|
|
1609
|
+
*/
|
|
1610
|
+
status: 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED';
|
|
1611
|
+
|
|
1612
|
+
/**
|
|
1613
|
+
* ID of the evaluator run
|
|
1614
|
+
*/
|
|
1615
|
+
id?: string;
|
|
1616
|
+
|
|
1617
|
+
/**
|
|
1618
|
+
* When the evaluator run completed
|
|
1619
|
+
*/
|
|
1620
|
+
completedAt?: string | null;
|
|
1621
|
+
|
|
1622
|
+
/**
|
|
1623
|
+
* Result of the evaluator run based on score threshold (IRRELEVANT is mapped to
|
|
1624
|
+
* SKIPPED)
|
|
1625
|
+
*/
|
|
1626
|
+
result?: 'SUCCESS' | 'FAILURE' | 'SKIPPED' | null;
|
|
1627
|
+
|
|
1628
|
+
/**
|
|
1629
|
+
* Score of the evaluation run (0-1)
|
|
1630
|
+
*/
|
|
1631
|
+
score?: number | null;
|
|
1632
|
+
|
|
1633
|
+
/**
|
|
1634
|
+
* When the evaluator run started
|
|
1635
|
+
*/
|
|
1636
|
+
startedAt?: string | null;
|
|
1637
|
+
|
|
1638
|
+
/**
|
|
1639
|
+
* Summary of the evaluation run
|
|
1640
|
+
*/
|
|
1641
|
+
summary?: string | null;
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
export namespace Data {
|
|
1645
|
+
export interface BlockRun {
|
|
1646
|
+
/**
|
|
1647
|
+
* ID of the block definition
|
|
1648
|
+
*/
|
|
1649
|
+
blockDefinitionId: string;
|
|
1650
|
+
|
|
1651
|
+
/**
|
|
1652
|
+
* Name of the evaluation block
|
|
1653
|
+
*/
|
|
1654
|
+
blockName: string;
|
|
1655
|
+
|
|
1656
|
+
/**
|
|
1657
|
+
* ID of the block run instance
|
|
1658
|
+
*/
|
|
1659
|
+
blockRunId: string;
|
|
1660
|
+
|
|
1661
|
+
/**
|
|
1662
|
+
* When the block run was created
|
|
1663
|
+
*/
|
|
1664
|
+
createdAt: string;
|
|
1665
|
+
|
|
1666
|
+
/**
|
|
1667
|
+
* Reason for the outcome (pass/fail explanation or skip reason)
|
|
1668
|
+
*/
|
|
1669
|
+
reason: string | null;
|
|
1670
|
+
|
|
1671
|
+
/**
|
|
1672
|
+
* Result of the block run
|
|
1673
|
+
*/
|
|
1674
|
+
result: 'PASSED' | 'FAILED' | 'SKIPPED' | null;
|
|
1675
|
+
|
|
1676
|
+
/**
|
|
1677
|
+
* Score of the block run (0-1)
|
|
1678
|
+
*/
|
|
1679
|
+
score: number | null;
|
|
1680
|
+
|
|
1681
|
+
/**
|
|
1682
|
+
* Status of the block run
|
|
1683
|
+
*/
|
|
1684
|
+
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
export interface Evaluator {
|
|
1688
|
+
/**
|
|
1689
|
+
* ID of the evaluator
|
|
1690
|
+
*/
|
|
1691
|
+
id: string;
|
|
1692
|
+
|
|
1693
|
+
/**
|
|
1694
|
+
* Name of the evaluator
|
|
1695
|
+
*/
|
|
1696
|
+
name: string;
|
|
1697
|
+
|
|
1698
|
+
/**
|
|
1699
|
+
* Weight of the evaluator
|
|
1700
|
+
*/
|
|
1701
|
+
weight?: number;
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
export interface Evidence {
|
|
1705
|
+
/**
|
|
1706
|
+
* Comment text of the evidence
|
|
1707
|
+
*/
|
|
1708
|
+
commentText: string | null;
|
|
1709
|
+
|
|
1710
|
+
/**
|
|
1711
|
+
* Created at of the evidence
|
|
1712
|
+
*/
|
|
1713
|
+
createdAt: string;
|
|
1714
|
+
|
|
1715
|
+
/**
|
|
1716
|
+
* Is positive of the evidence
|
|
1717
|
+
*/
|
|
1718
|
+
isPositive: boolean;
|
|
1719
|
+
|
|
1720
|
+
/**
|
|
1721
|
+
* Snippet text of the evidence
|
|
1722
|
+
*/
|
|
1723
|
+
snippetText: string;
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
export interface Metric {
|
|
1727
|
+
/**
|
|
1728
|
+
* Boolean value of the metric
|
|
1729
|
+
*/
|
|
1730
|
+
booleanValue: boolean | null;
|
|
1731
|
+
|
|
1732
|
+
/**
|
|
1733
|
+
* Confidence level of the metric (0-1)
|
|
1734
|
+
*/
|
|
1735
|
+
confidence: number | null;
|
|
1736
|
+
|
|
1737
|
+
/**
|
|
1738
|
+
* Created at of the metric
|
|
1739
|
+
*/
|
|
1740
|
+
createdAt: string;
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* Name of the metric
|
|
1744
|
+
*/
|
|
1745
|
+
name: string;
|
|
1746
|
+
|
|
1747
|
+
/**
|
|
1748
|
+
* Numeric value of the metric
|
|
1749
|
+
*/
|
|
1750
|
+
numericValue: number | null;
|
|
1751
|
+
|
|
1752
|
+
/**
|
|
1753
|
+
* Reasoning of the metric
|
|
1754
|
+
*/
|
|
1755
|
+
reasoning: string | null;
|
|
1756
|
+
|
|
1757
|
+
/**
|
|
1758
|
+
* Role of the metric
|
|
1759
|
+
*/
|
|
1760
|
+
role: string;
|
|
1761
|
+
|
|
1762
|
+
/**
|
|
1763
|
+
* Text value of the metric
|
|
1764
|
+
*/
|
|
1765
|
+
textValue: string | null;
|
|
1766
|
+
|
|
1767
|
+
/**
|
|
1768
|
+
* Value type of the metric
|
|
1769
|
+
*/
|
|
1770
|
+
valueType: string;
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
/**
|
|
1775
|
+
* Pagination information
|
|
1776
|
+
*/
|
|
1777
|
+
export interface Pagination {
|
|
1778
|
+
/**
|
|
1779
|
+
* Whether there are more items to fetch
|
|
1780
|
+
*/
|
|
1781
|
+
hasMore: boolean;
|
|
1782
|
+
|
|
1783
|
+
/**
|
|
1784
|
+
* Cursor for the next page of items
|
|
1785
|
+
*/
|
|
1786
|
+
nextCursor: string | null;
|
|
1787
|
+
|
|
1788
|
+
/**
|
|
1789
|
+
* Total number of items
|
|
1790
|
+
*/
|
|
1791
|
+
total: number;
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
export interface EvaluationUpdateEvaluatorResponse {
|
|
1797
|
+
/**
|
|
1798
|
+
* Evaluator with its configured blocks
|
|
1799
|
+
*/
|
|
1800
|
+
data: EvaluationUpdateEvaluatorResponse.Data;
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
export namespace EvaluationUpdateEvaluatorResponse {
|
|
1804
|
+
/**
|
|
1805
|
+
* Evaluator with its configured blocks
|
|
1806
|
+
*/
|
|
1807
|
+
export interface Data {
|
|
1808
|
+
/**
|
|
1809
|
+
* Unique identifier for the evaluator
|
|
1810
|
+
*/
|
|
1811
|
+
id: string;
|
|
1812
|
+
|
|
1813
|
+
/**
|
|
1814
|
+
* Array of evaluation blocks configured for this evaluator
|
|
1815
|
+
*/
|
|
1816
|
+
blocks: Array<
|
|
1817
|
+
| Data.UnionMember0
|
|
1818
|
+
| Data.UnionMember1
|
|
1819
|
+
| Data.UnionMember2
|
|
1820
|
+
| Data.UnionMember3
|
|
1821
|
+
| Data.UnionMember4
|
|
1822
|
+
| Data.UnionMember5
|
|
1823
|
+
| Data.UnionMember6
|
|
1824
|
+
| Data.UnionMember7
|
|
1825
|
+
| Data.UnionMember8
|
|
1826
|
+
>;
|
|
1827
|
+
|
|
1828
|
+
/**
|
|
1829
|
+
* ISO timestamp when the evaluator was created
|
|
1830
|
+
*/
|
|
1831
|
+
createdAt: string;
|
|
1832
|
+
|
|
1833
|
+
/**
|
|
1834
|
+
* Optional description of the evaluator
|
|
1835
|
+
*/
|
|
1836
|
+
description: string | null;
|
|
1837
|
+
|
|
1838
|
+
/**
|
|
1839
|
+
* Name of the evaluator
|
|
1840
|
+
*/
|
|
1841
|
+
name: string;
|
|
1842
|
+
|
|
1843
|
+
/**
|
|
1844
|
+
* Unique slug identifier for the evaluator
|
|
1845
|
+
*/
|
|
1846
|
+
slug: string;
|
|
1847
|
+
|
|
1848
|
+
/**
|
|
1849
|
+
* ISO timestamp when the evaluator was last updated
|
|
1850
|
+
*/
|
|
1851
|
+
updatedAt: string;
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
export namespace Data {
|
|
1855
|
+
export interface UnionMember0 {
|
|
1856
|
+
/**
|
|
1857
|
+
* Unique identifier for the block
|
|
1858
|
+
*/
|
|
1859
|
+
id: string;
|
|
1860
|
+
|
|
1861
|
+
/**
|
|
1862
|
+
* Block type identifier
|
|
1863
|
+
*/
|
|
1864
|
+
blockType: 'CUSTOM_PROMPT';
|
|
1865
|
+
|
|
1866
|
+
/**
|
|
1867
|
+
* Optional description of what this block evaluates
|
|
1868
|
+
*/
|
|
1869
|
+
description: string | null;
|
|
1870
|
+
|
|
1871
|
+
/**
|
|
1872
|
+
* Name of the metric this prompt evaluates
|
|
1873
|
+
*/
|
|
1874
|
+
metricName: string;
|
|
1875
|
+
|
|
1876
|
+
/**
|
|
1877
|
+
* Display name of the evaluation block
|
|
1878
|
+
*/
|
|
1879
|
+
name: string;
|
|
1880
|
+
|
|
1881
|
+
/**
|
|
1882
|
+
* Order in which this block is executed
|
|
1883
|
+
*/
|
|
1884
|
+
orderIndex: number;
|
|
1885
|
+
|
|
1886
|
+
/**
|
|
1887
|
+
* The prompt to evaluate the call against
|
|
1888
|
+
*/
|
|
1889
|
+
prompt: string;
|
|
1890
|
+
|
|
1891
|
+
/**
|
|
1892
|
+
* Minimum score threshold to pass evaluation (0-1)
|
|
1893
|
+
*/
|
|
1894
|
+
threshold: number;
|
|
1895
|
+
|
|
1896
|
+
/**
|
|
1897
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
1898
|
+
*/
|
|
1899
|
+
weight: number;
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
export interface UnionMember1 {
|
|
1903
|
+
/**
|
|
1904
|
+
* Unique identifier for the block
|
|
1905
|
+
*/
|
|
1906
|
+
id: string;
|
|
1907
|
+
|
|
1908
|
+
/**
|
|
1909
|
+
* Block type identifier
|
|
1910
|
+
*/
|
|
1911
|
+
blockType: 'DATAFIELD_CHECK';
|
|
1912
|
+
|
|
1913
|
+
/**
|
|
1914
|
+
* Optional description of what this block evaluates
|
|
1915
|
+
*/
|
|
1916
|
+
description: string | null;
|
|
1917
|
+
|
|
1918
|
+
/**
|
|
1919
|
+
* Criteria for evaluating the property
|
|
1920
|
+
*/
|
|
1921
|
+
evaluationCriteria: string;
|
|
1922
|
+
|
|
1923
|
+
/**
|
|
1924
|
+
* Whether this property must be present
|
|
1925
|
+
*/
|
|
1926
|
+
isRequired: boolean;
|
|
1927
|
+
|
|
1928
|
+
/**
|
|
1929
|
+
* Display name of the evaluation block
|
|
1930
|
+
*/
|
|
1931
|
+
name: string;
|
|
1932
|
+
|
|
1933
|
+
/**
|
|
1934
|
+
* Order in which this block is executed
|
|
1935
|
+
*/
|
|
1936
|
+
orderIndex: number;
|
|
1937
|
+
|
|
1938
|
+
/**
|
|
1939
|
+
* Name of the property to check
|
|
1940
|
+
*/
|
|
1941
|
+
propertyName: string;
|
|
1942
|
+
|
|
1943
|
+
/**
|
|
1944
|
+
* Minimum score threshold to pass evaluation (0-1)
|
|
1945
|
+
*/
|
|
1946
|
+
threshold: number;
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* Expected type of the property value
|
|
1950
|
+
*/
|
|
1951
|
+
valueType: string;
|
|
1952
|
+
|
|
1953
|
+
/**
|
|
1954
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
1955
|
+
*/
|
|
1956
|
+
weight: number;
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
export interface UnionMember2 {
|
|
1960
|
+
/**
|
|
1961
|
+
* Unique identifier for the block
|
|
1962
|
+
*/
|
|
1963
|
+
id: string;
|
|
1964
|
+
|
|
1965
|
+
/**
|
|
1966
|
+
* Block type identifier
|
|
1967
|
+
*/
|
|
1968
|
+
blockType: 'EMOTION';
|
|
1969
|
+
|
|
1970
|
+
/**
|
|
1971
|
+
* Optional description of what this block evaluates
|
|
1972
|
+
*/
|
|
1973
|
+
description: string | null;
|
|
1974
|
+
|
|
1975
|
+
/**
|
|
1976
|
+
* Display name of the evaluation block
|
|
1977
|
+
*/
|
|
1978
|
+
name: string;
|
|
1979
|
+
|
|
1980
|
+
/**
|
|
1981
|
+
* Order in which this block is executed
|
|
1982
|
+
*/
|
|
1983
|
+
orderIndex: number;
|
|
1984
|
+
|
|
1985
|
+
/**
|
|
1986
|
+
* The emotion to detect (e.g., "joy", "anger", "sadness")
|
|
1987
|
+
*/
|
|
1988
|
+
selectedEmotion: string;
|
|
1989
|
+
|
|
1990
|
+
/**
|
|
1991
|
+
* Minimum confidence threshold for emotion detection (0-1)
|
|
1992
|
+
*/
|
|
1993
|
+
threshold: number;
|
|
1994
|
+
|
|
1995
|
+
/**
|
|
1996
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
1997
|
+
*/
|
|
1998
|
+
weight: number;
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
export interface UnionMember3 {
|
|
2002
|
+
/**
|
|
2003
|
+
* Unique identifier for the block
|
|
2004
|
+
*/
|
|
2005
|
+
id: string;
|
|
2006
|
+
|
|
2007
|
+
/**
|
|
2008
|
+
* Block type identifier
|
|
2009
|
+
*/
|
|
2010
|
+
blockType: 'LATENCY';
|
|
2011
|
+
|
|
2012
|
+
/**
|
|
2013
|
+
* Optional description of what this block evaluates
|
|
2014
|
+
*/
|
|
2015
|
+
description: string | null;
|
|
2016
|
+
|
|
2017
|
+
/**
|
|
2018
|
+
* Maximum number of silence periods allowed
|
|
2019
|
+
*/
|
|
2020
|
+
maxAllowedSilences: number;
|
|
2021
|
+
|
|
2022
|
+
/**
|
|
2023
|
+
* Minimum duration of silence in milliseconds to be considered
|
|
2024
|
+
*/
|
|
2025
|
+
minSilenceDuration: number;
|
|
2026
|
+
|
|
2027
|
+
/**
|
|
2028
|
+
* Display name of the evaluation block
|
|
2029
|
+
*/
|
|
2030
|
+
name: string;
|
|
2031
|
+
|
|
2032
|
+
/**
|
|
2033
|
+
* Order in which this block is executed
|
|
2034
|
+
*/
|
|
2035
|
+
orderIndex: number;
|
|
2036
|
+
|
|
2037
|
+
/**
|
|
2038
|
+
* Maximum allowed latency score
|
|
2039
|
+
*/
|
|
2040
|
+
threshold: number;
|
|
2041
|
+
|
|
2042
|
+
/**
|
|
2043
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
2044
|
+
*/
|
|
2045
|
+
weight: number;
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
export interface UnionMember4 {
|
|
2049
|
+
/**
|
|
2050
|
+
* Unique identifier for the block
|
|
2051
|
+
*/
|
|
2052
|
+
id: string;
|
|
2053
|
+
|
|
2054
|
+
/**
|
|
2055
|
+
* Block type identifier
|
|
2056
|
+
*/
|
|
2057
|
+
blockType: 'POLITENESS';
|
|
2058
|
+
|
|
2059
|
+
/**
|
|
2060
|
+
* Optional description of what this block evaluates
|
|
2061
|
+
*/
|
|
2062
|
+
description: string | null;
|
|
2063
|
+
|
|
2064
|
+
/**
|
|
2065
|
+
* Display name of the evaluation block
|
|
2066
|
+
*/
|
|
2067
|
+
name: string;
|
|
262
2068
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
2069
|
+
/**
|
|
2070
|
+
* Order in which this block is executed
|
|
2071
|
+
*/
|
|
2072
|
+
orderIndex: number;
|
|
267
2073
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
2074
|
+
/**
|
|
2075
|
+
* Minimum politeness score threshold (0-1)
|
|
2076
|
+
*/
|
|
2077
|
+
threshold: number;
|
|
272
2078
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
2079
|
+
/**
|
|
2080
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
2081
|
+
*/
|
|
2082
|
+
weight: number;
|
|
2083
|
+
}
|
|
278
2084
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
2085
|
+
export interface UnionMember5 {
|
|
2086
|
+
/**
|
|
2087
|
+
* Unique identifier for the block
|
|
2088
|
+
*/
|
|
2089
|
+
id: string;
|
|
284
2090
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
2091
|
+
/**
|
|
2092
|
+
* Block type identifier
|
|
2093
|
+
*/
|
|
2094
|
+
blockType: 'SENTIMENT';
|
|
289
2095
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
2096
|
+
/**
|
|
2097
|
+
* Optional description of what this block evaluates
|
|
2098
|
+
*/
|
|
2099
|
+
description: string | null;
|
|
294
2100
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
2101
|
+
/**
|
|
2102
|
+
* Display name of the evaluation block
|
|
2103
|
+
*/
|
|
2104
|
+
name: string;
|
|
299
2105
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
2106
|
+
/**
|
|
2107
|
+
* Order in which this block is executed
|
|
2108
|
+
*/
|
|
2109
|
+
orderIndex: number;
|
|
304
2110
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
2111
|
+
/**
|
|
2112
|
+
* Minimum sentiment score threshold (0-1)
|
|
2113
|
+
*/
|
|
2114
|
+
threshold: number;
|
|
309
2115
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
2116
|
+
/**
|
|
2117
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
2118
|
+
*/
|
|
2119
|
+
weight: number;
|
|
2120
|
+
}
|
|
314
2121
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
2122
|
+
export interface UnionMember6 {
|
|
2123
|
+
/**
|
|
2124
|
+
* Unique identifier for the block
|
|
2125
|
+
*/
|
|
2126
|
+
id: string;
|
|
319
2127
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
}
|
|
2128
|
+
/**
|
|
2129
|
+
* Block type identifier
|
|
2130
|
+
*/
|
|
2131
|
+
blockType: 'TOOL_CALLS';
|
|
325
2132
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
id: string;
|
|
2133
|
+
/**
|
|
2134
|
+
* Optional description of what this block evaluates
|
|
2135
|
+
*/
|
|
2136
|
+
description: string | null;
|
|
331
2137
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
2138
|
+
/**
|
|
2139
|
+
* Condition that must be met for tool invocation
|
|
2140
|
+
*/
|
|
2141
|
+
invocationCondition: string | null;
|
|
336
2142
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
2143
|
+
/**
|
|
2144
|
+
* Minimum number of times the tool should be invoked
|
|
2145
|
+
*/
|
|
2146
|
+
minInvocationCount: number | null;
|
|
341
2147
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
2148
|
+
/**
|
|
2149
|
+
* Display name of the evaluation block
|
|
2150
|
+
*/
|
|
2151
|
+
name: string;
|
|
346
2152
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
2153
|
+
/**
|
|
2154
|
+
* Order in which this block is executed
|
|
2155
|
+
*/
|
|
2156
|
+
orderIndex: number;
|
|
351
2157
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
2158
|
+
/**
|
|
2159
|
+
* Whether the tool should be invoked
|
|
2160
|
+
*/
|
|
2161
|
+
shouldBeInvoked: boolean;
|
|
356
2162
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
2163
|
+
/**
|
|
2164
|
+
* ID of the tool definition
|
|
2165
|
+
*/
|
|
2166
|
+
toolDefinitionId: string;
|
|
2167
|
+
|
|
2168
|
+
/**
|
|
2169
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
2170
|
+
*/
|
|
2171
|
+
weight: number;
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
export interface UnionMember7 {
|
|
2175
|
+
/**
|
|
2176
|
+
* Unique identifier for the block
|
|
2177
|
+
*/
|
|
2178
|
+
id: string;
|
|
2179
|
+
|
|
2180
|
+
/**
|
|
2181
|
+
* Block type identifier
|
|
2182
|
+
*/
|
|
2183
|
+
blockType: 'TOXICITY';
|
|
2184
|
+
|
|
2185
|
+
/**
|
|
2186
|
+
* Optional description of what this block evaluates
|
|
2187
|
+
*/
|
|
2188
|
+
description: string | null;
|
|
2189
|
+
|
|
2190
|
+
/**
|
|
2191
|
+
* Display name of the evaluation block
|
|
2192
|
+
*/
|
|
2193
|
+
name: string;
|
|
2194
|
+
|
|
2195
|
+
/**
|
|
2196
|
+
* Order in which this block is executed
|
|
2197
|
+
*/
|
|
2198
|
+
orderIndex: number;
|
|
2199
|
+
|
|
2200
|
+
/**
|
|
2201
|
+
* Maximum allowed toxicity score (0-1)
|
|
2202
|
+
*/
|
|
2203
|
+
threshold: number;
|
|
2204
|
+
|
|
2205
|
+
/**
|
|
2206
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
2207
|
+
*/
|
|
2208
|
+
weight: number;
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
export interface UnionMember8 {
|
|
2212
|
+
/**
|
|
2213
|
+
* Unique identifier for the block
|
|
2214
|
+
*/
|
|
2215
|
+
id: string;
|
|
2216
|
+
|
|
2217
|
+
/**
|
|
2218
|
+
* Block type identifier
|
|
2219
|
+
*/
|
|
2220
|
+
blockType: 'VOCAL_CUE';
|
|
2221
|
+
|
|
2222
|
+
/**
|
|
2223
|
+
* Optional description of what this block evaluates
|
|
2224
|
+
*/
|
|
2225
|
+
description: string | null;
|
|
2226
|
+
|
|
2227
|
+
/**
|
|
2228
|
+
* Display name of the evaluation block
|
|
2229
|
+
*/
|
|
2230
|
+
name: string;
|
|
2231
|
+
|
|
2232
|
+
/**
|
|
2233
|
+
* Order in which this block is executed
|
|
2234
|
+
*/
|
|
2235
|
+
orderIndex: number;
|
|
2236
|
+
|
|
2237
|
+
/**
|
|
2238
|
+
* The vocal cue to detect (e.g., "pace", "tone", "volume")
|
|
2239
|
+
*/
|
|
2240
|
+
selectedCue: string;
|
|
2241
|
+
|
|
2242
|
+
/**
|
|
2243
|
+
* Minimum confidence threshold for vocal cue detection (0-1)
|
|
2244
|
+
*/
|
|
2245
|
+
threshold: number;
|
|
2246
|
+
|
|
2247
|
+
/**
|
|
2248
|
+
* Weight of this block in the overall evaluation score (0-100)
|
|
2249
|
+
*/
|
|
2250
|
+
weight: number;
|
|
2251
|
+
}
|
|
361
2252
|
}
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
export interface EvaluationCreateEvaluatorParams {
|
|
2256
|
+
/**
|
|
2257
|
+
* Array of evaluation blocks (at least one required)
|
|
2258
|
+
*/
|
|
2259
|
+
blocks: Array<
|
|
2260
|
+
| EvaluationCreateEvaluatorParams.CreateCustomPromptBlockInput
|
|
2261
|
+
| EvaluationCreateEvaluatorParams.CreateDatafieldCheckBlockInput
|
|
2262
|
+
| EvaluationCreateEvaluatorParams.CreateEmotionBlockInput
|
|
2263
|
+
| EvaluationCreateEvaluatorParams.CreateLatencyBlockInput
|
|
2264
|
+
| EvaluationCreateEvaluatorParams.CreatePolitenessBlockInput
|
|
2265
|
+
| EvaluationCreateEvaluatorParams.CreateSentimentBlockInput
|
|
2266
|
+
| EvaluationCreateEvaluatorParams.CreateToolCallsBlockInput
|
|
2267
|
+
| EvaluationCreateEvaluatorParams.CreateToxicityBlockInput
|
|
2268
|
+
| EvaluationCreateEvaluatorParams.CreateVocalCueBlockInput
|
|
2269
|
+
>;
|
|
2270
|
+
|
|
2271
|
+
/**
|
|
2272
|
+
* Name of the evaluator
|
|
2273
|
+
*/
|
|
2274
|
+
name: string;
|
|
362
2275
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
2276
|
+
/**
|
|
2277
|
+
* Optional description of the evaluator
|
|
2278
|
+
*/
|
|
2279
|
+
description?: string | null;
|
|
2280
|
+
}
|
|
368
2281
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
blockType: 'SENTIMENT';
|
|
2282
|
+
export namespace EvaluationCreateEvaluatorParams {
|
|
2283
|
+
export interface CreateCustomPromptBlockInput {
|
|
2284
|
+
blockType: 'CUSTOM_PROMPT';
|
|
373
2285
|
|
|
374
2286
|
/**
|
|
375
|
-
*
|
|
2287
|
+
* Name of the metric this prompt evaluates
|
|
376
2288
|
*/
|
|
377
|
-
|
|
2289
|
+
metricName: string;
|
|
378
2290
|
|
|
379
2291
|
/**
|
|
380
2292
|
* Display name of the evaluation block
|
|
@@ -382,46 +2294,48 @@ export namespace EvaluationGetEvaluatorByIDResponse {
|
|
|
382
2294
|
name: string;
|
|
383
2295
|
|
|
384
2296
|
/**
|
|
385
|
-
*
|
|
2297
|
+
* The prompt to evaluate the call against
|
|
386
2298
|
*/
|
|
387
|
-
|
|
2299
|
+
prompt: string;
|
|
388
2300
|
|
|
389
2301
|
/**
|
|
390
|
-
*
|
|
2302
|
+
* Optional description of what this block evaluates
|
|
391
2303
|
*/
|
|
392
|
-
|
|
2304
|
+
description?: string | null;
|
|
393
2305
|
|
|
394
2306
|
/**
|
|
395
|
-
*
|
|
2307
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
396
2308
|
*/
|
|
397
|
-
|
|
398
|
-
}
|
|
2309
|
+
inputDimensions?: Array<string>;
|
|
399
2310
|
|
|
400
|
-
export interface UnionMember6 {
|
|
401
2311
|
/**
|
|
402
|
-
*
|
|
2312
|
+
* Order in which this block is executed (defaults to array position)
|
|
403
2313
|
*/
|
|
404
|
-
|
|
2314
|
+
orderIndex?: number;
|
|
405
2315
|
|
|
406
2316
|
/**
|
|
407
|
-
*
|
|
2317
|
+
* Condition to skip this block evaluation
|
|
408
2318
|
*/
|
|
409
|
-
|
|
2319
|
+
skipCondition?: string | null;
|
|
410
2320
|
|
|
411
2321
|
/**
|
|
412
|
-
*
|
|
2322
|
+
* Minimum score threshold to pass evaluation (0-1, default: 0.7)
|
|
413
2323
|
*/
|
|
414
|
-
|
|
2324
|
+
threshold?: number;
|
|
415
2325
|
|
|
416
2326
|
/**
|
|
417
|
-
*
|
|
2327
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
418
2328
|
*/
|
|
419
|
-
|
|
2329
|
+
weight?: number;
|
|
2330
|
+
}
|
|
2331
|
+
|
|
2332
|
+
export interface CreateDatafieldCheckBlockInput {
|
|
2333
|
+
blockType: 'DATAFIELD_CHECK';
|
|
420
2334
|
|
|
421
2335
|
/**
|
|
422
|
-
*
|
|
2336
|
+
* Criteria for evaluating the property
|
|
423
2337
|
*/
|
|
424
|
-
|
|
2338
|
+
evaluationCriteria: string;
|
|
425
2339
|
|
|
426
2340
|
/**
|
|
427
2341
|
* Display name of the evaluation block
|
|
@@ -429,1256 +2343,1232 @@ export namespace EvaluationGetEvaluatorByIDResponse {
|
|
|
429
2343
|
name: string;
|
|
430
2344
|
|
|
431
2345
|
/**
|
|
432
|
-
*
|
|
433
|
-
*/
|
|
434
|
-
orderIndex: number;
|
|
435
|
-
|
|
436
|
-
/**
|
|
437
|
-
* Whether the tool should be invoked
|
|
438
|
-
*/
|
|
439
|
-
shouldBeInvoked: boolean;
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* ID of the tool definition
|
|
2346
|
+
* Name of the property to check
|
|
443
2347
|
*/
|
|
444
|
-
|
|
2348
|
+
propertyName: string;
|
|
445
2349
|
|
|
446
2350
|
/**
|
|
447
|
-
*
|
|
2351
|
+
* Optional description of what this block evaluates
|
|
448
2352
|
*/
|
|
449
|
-
|
|
450
|
-
}
|
|
2353
|
+
description?: string | null;
|
|
451
2354
|
|
|
452
|
-
export interface UnionMember7 {
|
|
453
2355
|
/**
|
|
454
|
-
*
|
|
2356
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
455
2357
|
*/
|
|
456
|
-
|
|
2358
|
+
inputDimensions?: Array<string>;
|
|
457
2359
|
|
|
458
2360
|
/**
|
|
459
|
-
*
|
|
2361
|
+
* Whether this property must be present
|
|
460
2362
|
*/
|
|
461
|
-
|
|
2363
|
+
isRequired?: boolean;
|
|
462
2364
|
|
|
463
2365
|
/**
|
|
464
|
-
*
|
|
2366
|
+
* Order in which this block is executed (defaults to array position)
|
|
465
2367
|
*/
|
|
466
|
-
|
|
2368
|
+
orderIndex?: number;
|
|
467
2369
|
|
|
468
2370
|
/**
|
|
469
|
-
*
|
|
2371
|
+
* Condition to skip this block evaluation
|
|
470
2372
|
*/
|
|
471
|
-
|
|
2373
|
+
skipCondition?: string | null;
|
|
472
2374
|
|
|
473
2375
|
/**
|
|
474
|
-
*
|
|
2376
|
+
* Minimum score threshold to pass evaluation (0-1, default: 0.8)
|
|
475
2377
|
*/
|
|
476
|
-
|
|
2378
|
+
threshold?: number;
|
|
477
2379
|
|
|
478
2380
|
/**
|
|
479
|
-
*
|
|
2381
|
+
* Expected type of the property value
|
|
480
2382
|
*/
|
|
481
|
-
|
|
2383
|
+
valueType?: string;
|
|
482
2384
|
|
|
483
2385
|
/**
|
|
484
|
-
* Weight of this block in the overall evaluation score (0-100)
|
|
2386
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
485
2387
|
*/
|
|
486
|
-
weight
|
|
2388
|
+
weight?: number;
|
|
487
2389
|
}
|
|
488
2390
|
|
|
489
|
-
export interface
|
|
2391
|
+
export interface CreateEmotionBlockInput {
|
|
2392
|
+
blockType: 'EMOTION';
|
|
2393
|
+
|
|
490
2394
|
/**
|
|
491
|
-
*
|
|
2395
|
+
* Display name of the evaluation block
|
|
492
2396
|
*/
|
|
493
|
-
|
|
2397
|
+
name: string;
|
|
494
2398
|
|
|
495
2399
|
/**
|
|
496
|
-
*
|
|
2400
|
+
* Optional description of what this block evaluates
|
|
497
2401
|
*/
|
|
498
|
-
|
|
2402
|
+
description?: string | null;
|
|
499
2403
|
|
|
500
2404
|
/**
|
|
501
|
-
*
|
|
2405
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
502
2406
|
*/
|
|
503
|
-
|
|
2407
|
+
inputDimensions?: Array<string>;
|
|
504
2408
|
|
|
505
2409
|
/**
|
|
506
|
-
*
|
|
2410
|
+
* Order in which this block is executed (defaults to array position)
|
|
507
2411
|
*/
|
|
508
|
-
|
|
2412
|
+
orderIndex?: number;
|
|
509
2413
|
|
|
510
2414
|
/**
|
|
511
|
-
*
|
|
2415
|
+
* The emotion to detect (e.g., "joy", "anger", "sadness")
|
|
512
2416
|
*/
|
|
513
|
-
|
|
2417
|
+
selectedEmotion?: string;
|
|
514
2418
|
|
|
515
2419
|
/**
|
|
516
|
-
*
|
|
2420
|
+
* Condition to skip this block evaluation
|
|
517
2421
|
*/
|
|
518
|
-
|
|
2422
|
+
skipCondition?: string | null;
|
|
519
2423
|
|
|
520
2424
|
/**
|
|
521
|
-
* Minimum confidence threshold for
|
|
2425
|
+
* Minimum confidence threshold for emotion detection (0-1, default: 0.7)
|
|
522
2426
|
*/
|
|
523
|
-
threshold
|
|
2427
|
+
threshold?: number;
|
|
524
2428
|
|
|
525
2429
|
/**
|
|
526
|
-
* Weight of this block in the overall evaluation score (0-100)
|
|
2430
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
527
2431
|
*/
|
|
528
|
-
weight
|
|
2432
|
+
weight?: number;
|
|
529
2433
|
}
|
|
530
|
-
}
|
|
531
2434
|
|
|
532
|
-
export interface
|
|
533
|
-
|
|
534
|
-
* Evaluation job response payload
|
|
535
|
-
*/
|
|
536
|
-
data: EvaluationGetJobResponse.Data;
|
|
537
|
-
}
|
|
2435
|
+
export interface CreateLatencyBlockInput {
|
|
2436
|
+
blockType: 'LATENCY';
|
|
538
2437
|
|
|
539
|
-
export namespace EvaluationGetJobResponse {
|
|
540
|
-
/**
|
|
541
|
-
* Evaluation job response payload
|
|
542
|
-
*/
|
|
543
|
-
export interface Data {
|
|
544
2438
|
/**
|
|
545
|
-
*
|
|
2439
|
+
* Display name of the evaluation block
|
|
546
2440
|
*/
|
|
547
|
-
|
|
2441
|
+
name: string;
|
|
548
2442
|
|
|
549
2443
|
/**
|
|
550
|
-
*
|
|
2444
|
+
* Optional description of what this block evaluates
|
|
551
2445
|
*/
|
|
552
|
-
|
|
2446
|
+
description?: string | null;
|
|
553
2447
|
|
|
554
2448
|
/**
|
|
555
|
-
*
|
|
2449
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
556
2450
|
*/
|
|
557
|
-
|
|
2451
|
+
inputDimensions?: Array<string>;
|
|
558
2452
|
|
|
559
2453
|
/**
|
|
560
|
-
*
|
|
2454
|
+
* Maximum number of silence periods allowed
|
|
561
2455
|
*/
|
|
562
|
-
|
|
563
|
-
}
|
|
2456
|
+
maxAllowedSilences?: number;
|
|
564
2457
|
|
|
565
|
-
export namespace Data {
|
|
566
2458
|
/**
|
|
567
|
-
*
|
|
2459
|
+
* Minimum duration of silence in milliseconds to be considered
|
|
568
2460
|
*/
|
|
569
|
-
|
|
570
|
-
/**
|
|
571
|
-
* ID of the call being evaluated
|
|
572
|
-
*/
|
|
573
|
-
id: string | null;
|
|
574
|
-
}
|
|
2461
|
+
minSilenceDuration?: number;
|
|
575
2462
|
|
|
576
2463
|
/**
|
|
577
|
-
*
|
|
2464
|
+
* Order in which this block is executed (defaults to array position)
|
|
578
2465
|
*/
|
|
579
|
-
|
|
580
|
-
/**
|
|
581
|
-
* ID of the dataset
|
|
582
|
-
*/
|
|
583
|
-
id: string | null;
|
|
584
|
-
|
|
585
|
-
/**
|
|
586
|
-
* Calls in the dataset
|
|
587
|
-
*/
|
|
588
|
-
calls: Array<Dataset.Call>;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
export namespace Dataset {
|
|
592
|
-
export interface Call {
|
|
593
|
-
/**
|
|
594
|
-
* ID of the call
|
|
595
|
-
*/
|
|
596
|
-
id: string | null;
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
/**
|
|
603
|
-
* Response containing evaluators and pagination info
|
|
604
|
-
*/
|
|
605
|
-
export interface EvaluationListEvaluatorsResponse {
|
|
606
|
-
/**
|
|
607
|
-
* Array of evaluators with their blocks
|
|
608
|
-
*/
|
|
609
|
-
data: Array<EvaluationListEvaluatorsResponse.Data>;
|
|
610
|
-
|
|
611
|
-
/**
|
|
612
|
-
* Pagination information
|
|
613
|
-
*/
|
|
614
|
-
pagination: EvaluationListEvaluatorsResponse.Pagination;
|
|
615
|
-
}
|
|
2466
|
+
orderIndex?: number;
|
|
616
2467
|
|
|
617
|
-
export namespace EvaluationListEvaluatorsResponse {
|
|
618
|
-
/**
|
|
619
|
-
* Evaluator with its configured blocks
|
|
620
|
-
*/
|
|
621
|
-
export interface Data {
|
|
622
2468
|
/**
|
|
623
|
-
*
|
|
2469
|
+
* Condition to skip this block evaluation
|
|
624
2470
|
*/
|
|
625
|
-
|
|
2471
|
+
skipCondition?: string | null;
|
|
626
2472
|
|
|
627
2473
|
/**
|
|
628
|
-
*
|
|
2474
|
+
* Maximum allowed latency score
|
|
629
2475
|
*/
|
|
630
|
-
|
|
631
|
-
| Data.UnionMember0
|
|
632
|
-
| Data.UnionMember1
|
|
633
|
-
| Data.UnionMember2
|
|
634
|
-
| Data.UnionMember3
|
|
635
|
-
| Data.UnionMember4
|
|
636
|
-
| Data.UnionMember5
|
|
637
|
-
| Data.UnionMember6
|
|
638
|
-
| Data.UnionMember7
|
|
639
|
-
| Data.UnionMember8
|
|
640
|
-
>;
|
|
2476
|
+
threshold?: number;
|
|
641
2477
|
|
|
642
2478
|
/**
|
|
643
|
-
*
|
|
2479
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
644
2480
|
*/
|
|
645
|
-
|
|
2481
|
+
weight?: number;
|
|
2482
|
+
}
|
|
646
2483
|
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
*/
|
|
650
|
-
description: string | null;
|
|
2484
|
+
export interface CreatePolitenessBlockInput {
|
|
2485
|
+
blockType: 'POLITENESS';
|
|
651
2486
|
|
|
652
2487
|
/**
|
|
653
|
-
*
|
|
2488
|
+
* Display name of the evaluation block
|
|
654
2489
|
*/
|
|
655
2490
|
name: string;
|
|
656
2491
|
|
|
657
2492
|
/**
|
|
658
|
-
*
|
|
2493
|
+
* Optional description of what this block evaluates
|
|
659
2494
|
*/
|
|
660
|
-
|
|
2495
|
+
description?: string | null;
|
|
661
2496
|
|
|
662
2497
|
/**
|
|
663
|
-
*
|
|
2498
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
664
2499
|
*/
|
|
665
|
-
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
export namespace Data {
|
|
669
|
-
export interface UnionMember0 {
|
|
670
|
-
/**
|
|
671
|
-
* Unique identifier for the block
|
|
672
|
-
*/
|
|
673
|
-
id: string;
|
|
674
|
-
|
|
675
|
-
/**
|
|
676
|
-
* Block type identifier
|
|
677
|
-
*/
|
|
678
|
-
blockType: 'CUSTOM_PROMPT';
|
|
679
|
-
|
|
680
|
-
/**
|
|
681
|
-
* Optional description of what this block evaluates
|
|
682
|
-
*/
|
|
683
|
-
description: string | null;
|
|
684
|
-
|
|
685
|
-
/**
|
|
686
|
-
* Name of the metric this prompt evaluates
|
|
687
|
-
*/
|
|
688
|
-
metricName: string;
|
|
689
|
-
|
|
690
|
-
/**
|
|
691
|
-
* Display name of the evaluation block
|
|
692
|
-
*/
|
|
693
|
-
name: string;
|
|
694
|
-
|
|
695
|
-
/**
|
|
696
|
-
* Order in which this block is executed
|
|
697
|
-
*/
|
|
698
|
-
orderIndex: number;
|
|
699
|
-
|
|
700
|
-
/**
|
|
701
|
-
* The prompt to evaluate the call against
|
|
702
|
-
*/
|
|
703
|
-
prompt: string;
|
|
2500
|
+
inputDimensions?: Array<string>;
|
|
704
2501
|
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
2502
|
+
/**
|
|
2503
|
+
* Order in which this block is executed (defaults to array position)
|
|
2504
|
+
*/
|
|
2505
|
+
orderIndex?: number;
|
|
709
2506
|
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
}
|
|
2507
|
+
/**
|
|
2508
|
+
* Condition to skip this block evaluation
|
|
2509
|
+
*/
|
|
2510
|
+
skipCondition?: string | null;
|
|
715
2511
|
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
id: string;
|
|
2512
|
+
/**
|
|
2513
|
+
* Minimum politeness score threshold (0-1, default: 0.7)
|
|
2514
|
+
*/
|
|
2515
|
+
threshold?: number;
|
|
721
2516
|
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
2517
|
+
/**
|
|
2518
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
2519
|
+
*/
|
|
2520
|
+
weight?: number;
|
|
2521
|
+
}
|
|
726
2522
|
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
*/
|
|
730
|
-
description: string | null;
|
|
2523
|
+
export interface CreateSentimentBlockInput {
|
|
2524
|
+
blockType: 'SENTIMENT';
|
|
731
2525
|
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
2526
|
+
/**
|
|
2527
|
+
* Display name of the evaluation block
|
|
2528
|
+
*/
|
|
2529
|
+
name: string;
|
|
736
2530
|
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
2531
|
+
/**
|
|
2532
|
+
* Optional description of what this block evaluates
|
|
2533
|
+
*/
|
|
2534
|
+
description?: string | null;
|
|
741
2535
|
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
2536
|
+
/**
|
|
2537
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
2538
|
+
*/
|
|
2539
|
+
inputDimensions?: Array<string>;
|
|
746
2540
|
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
2541
|
+
/**
|
|
2542
|
+
* Order in which this block is executed (defaults to array position)
|
|
2543
|
+
*/
|
|
2544
|
+
orderIndex?: number;
|
|
751
2545
|
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
2546
|
+
/**
|
|
2547
|
+
* Condition to skip this block evaluation
|
|
2548
|
+
*/
|
|
2549
|
+
skipCondition?: string | null;
|
|
756
2550
|
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
2551
|
+
/**
|
|
2552
|
+
* Minimum sentiment score threshold (0-1, default: 0.7)
|
|
2553
|
+
*/
|
|
2554
|
+
threshold?: number;
|
|
761
2555
|
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
2556
|
+
/**
|
|
2557
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
2558
|
+
*/
|
|
2559
|
+
weight?: number;
|
|
2560
|
+
}
|
|
766
2561
|
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
*/
|
|
770
|
-
weight: number;
|
|
771
|
-
}
|
|
2562
|
+
export interface CreateToolCallsBlockInput {
|
|
2563
|
+
blockType: 'TOOL_CALLS';
|
|
772
2564
|
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
id: string;
|
|
2565
|
+
/**
|
|
2566
|
+
* Display name of the evaluation block
|
|
2567
|
+
*/
|
|
2568
|
+
name: string;
|
|
778
2569
|
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
2570
|
+
/**
|
|
2571
|
+
* ID of the tool definition
|
|
2572
|
+
*/
|
|
2573
|
+
toolDefinitionId: string;
|
|
783
2574
|
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
2575
|
+
/**
|
|
2576
|
+
* Optional description of what this block evaluates
|
|
2577
|
+
*/
|
|
2578
|
+
description?: string | null;
|
|
788
2579
|
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
2580
|
+
/**
|
|
2581
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
2582
|
+
*/
|
|
2583
|
+
inputDimensions?: Array<string>;
|
|
793
2584
|
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
2585
|
+
/**
|
|
2586
|
+
* Condition that must be met for tool invocation
|
|
2587
|
+
*/
|
|
2588
|
+
invocationCondition?: string | null;
|
|
798
2589
|
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
2590
|
+
/**
|
|
2591
|
+
* Minimum number of times the tool should be invoked
|
|
2592
|
+
*/
|
|
2593
|
+
minInvocationCount?: number | null;
|
|
803
2594
|
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
2595
|
+
/**
|
|
2596
|
+
* Order in which this block is executed (defaults to array position)
|
|
2597
|
+
*/
|
|
2598
|
+
orderIndex?: number;
|
|
808
2599
|
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
}
|
|
2600
|
+
/**
|
|
2601
|
+
* Whether the tool should be invoked
|
|
2602
|
+
*/
|
|
2603
|
+
shouldBeInvoked?: boolean;
|
|
814
2604
|
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
id: string;
|
|
2605
|
+
/**
|
|
2606
|
+
* Condition to skip this block evaluation
|
|
2607
|
+
*/
|
|
2608
|
+
skipCondition?: string | null;
|
|
820
2609
|
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
2610
|
+
/**
|
|
2611
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
2612
|
+
*/
|
|
2613
|
+
weight?: number;
|
|
2614
|
+
}
|
|
825
2615
|
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
*/
|
|
829
|
-
description: string | null;
|
|
2616
|
+
export interface CreateToxicityBlockInput {
|
|
2617
|
+
blockType: 'TOXICITY';
|
|
830
2618
|
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
2619
|
+
/**
|
|
2620
|
+
* Display name of the evaluation block
|
|
2621
|
+
*/
|
|
2622
|
+
name: string;
|
|
835
2623
|
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
2624
|
+
/**
|
|
2625
|
+
* Optional description of what this block evaluates
|
|
2626
|
+
*/
|
|
2627
|
+
description?: string | null;
|
|
840
2628
|
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
2629
|
+
/**
|
|
2630
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
2631
|
+
*/
|
|
2632
|
+
inputDimensions?: Array<string>;
|
|
845
2633
|
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
2634
|
+
/**
|
|
2635
|
+
* Order in which this block is executed (defaults to array position)
|
|
2636
|
+
*/
|
|
2637
|
+
orderIndex?: number;
|
|
850
2638
|
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
2639
|
+
/**
|
|
2640
|
+
* Condition to skip this block evaluation
|
|
2641
|
+
*/
|
|
2642
|
+
skipCondition?: string | null;
|
|
855
2643
|
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
}
|
|
2644
|
+
/**
|
|
2645
|
+
* Maximum allowed toxicity score (0-1, default: 0.7)
|
|
2646
|
+
*/
|
|
2647
|
+
threshold?: number;
|
|
861
2648
|
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
2649
|
+
/**
|
|
2650
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
2651
|
+
*/
|
|
2652
|
+
weight?: number;
|
|
2653
|
+
}
|
|
867
2654
|
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
*/
|
|
871
|
-
blockType: 'POLITENESS';
|
|
2655
|
+
export interface CreateVocalCueBlockInput {
|
|
2656
|
+
blockType: 'VOCAL_CUE';
|
|
872
2657
|
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
2658
|
+
/**
|
|
2659
|
+
* Display name of the evaluation block
|
|
2660
|
+
*/
|
|
2661
|
+
name: string;
|
|
877
2662
|
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
2663
|
+
/**
|
|
2664
|
+
* Optional description of what this block evaluates
|
|
2665
|
+
*/
|
|
2666
|
+
description?: string | null;
|
|
882
2667
|
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
2668
|
+
/**
|
|
2669
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
2670
|
+
*/
|
|
2671
|
+
inputDimensions?: Array<string>;
|
|
887
2672
|
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
2673
|
+
/**
|
|
2674
|
+
* Order in which this block is executed (defaults to array position)
|
|
2675
|
+
*/
|
|
2676
|
+
orderIndex?: number;
|
|
892
2677
|
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
}
|
|
2678
|
+
/**
|
|
2679
|
+
* The vocal cue to detect (e.g., "pace", "tone", "volume")
|
|
2680
|
+
*/
|
|
2681
|
+
selectedCue?: string;
|
|
898
2682
|
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
id: string;
|
|
2683
|
+
/**
|
|
2684
|
+
* Condition to skip this block evaluation
|
|
2685
|
+
*/
|
|
2686
|
+
skipCondition?: string | null;
|
|
904
2687
|
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
2688
|
+
/**
|
|
2689
|
+
* Minimum confidence threshold for vocal cue detection (0-1, default: 0.7)
|
|
2690
|
+
*/
|
|
2691
|
+
threshold?: number;
|
|
909
2692
|
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
2693
|
+
/**
|
|
2694
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
2695
|
+
*/
|
|
2696
|
+
weight?: number;
|
|
2697
|
+
}
|
|
2698
|
+
}
|
|
914
2699
|
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
2700
|
+
export interface EvaluationCreateJobParams {
|
|
2701
|
+
/**
|
|
2702
|
+
* List of evaluators slugs to evaluate the calls or "all" to evaluate all
|
|
2703
|
+
* evaluators
|
|
2704
|
+
*/
|
|
2705
|
+
evaluators: Array<string> | 'all';
|
|
919
2706
|
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
2707
|
+
/**
|
|
2708
|
+
* Call input to evaluate
|
|
2709
|
+
*/
|
|
2710
|
+
call?: EvaluationCreateJobParams.Call;
|
|
924
2711
|
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
2712
|
+
/**
|
|
2713
|
+
* ID of an existing call to evaluate
|
|
2714
|
+
*/
|
|
2715
|
+
callId?: string;
|
|
929
2716
|
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
*/
|
|
933
|
-
weight: number;
|
|
934
|
-
}
|
|
2717
|
+
dataset?: EvaluationCreateJobParams.Dataset;
|
|
2718
|
+
}
|
|
935
2719
|
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
2720
|
+
export namespace EvaluationCreateJobParams {
|
|
2721
|
+
/**
|
|
2722
|
+
* Call input to evaluate
|
|
2723
|
+
*/
|
|
2724
|
+
export interface Call {
|
|
2725
|
+
/**
|
|
2726
|
+
* Direction of the call (INBOUND or OUTBOUND)
|
|
2727
|
+
*/
|
|
2728
|
+
callDirection: 'INBOUND' | 'OUTBOUND';
|
|
941
2729
|
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
2730
|
+
/**
|
|
2731
|
+
* Interface type of the call (PHONE or WEB)
|
|
2732
|
+
*/
|
|
2733
|
+
interfaceType: 'PHONE' | 'WEB';
|
|
946
2734
|
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
2735
|
+
/**
|
|
2736
|
+
* Exactly two participants in the call
|
|
2737
|
+
*/
|
|
2738
|
+
participants: Array<Call.Participant>;
|
|
951
2739
|
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
2740
|
+
/**
|
|
2741
|
+
* URL of source recording (must be an accessible WAV, MP3, or MP4 file). Can be a
|
|
2742
|
+
* signed URL.
|
|
2743
|
+
*/
|
|
2744
|
+
recordingUrl: string;
|
|
956
2745
|
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
2746
|
+
/**
|
|
2747
|
+
* When the call started (ISO 8601 format)
|
|
2748
|
+
*/
|
|
2749
|
+
startedAt: string;
|
|
961
2750
|
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
2751
|
+
/**
|
|
2752
|
+
* Additional context on why the call terminated with the endedStatus
|
|
2753
|
+
*/
|
|
2754
|
+
endedReason?: string;
|
|
966
2755
|
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
2756
|
+
/**
|
|
2757
|
+
* High-level call end status, indicating how the call terminated
|
|
2758
|
+
*/
|
|
2759
|
+
endedStatus?:
|
|
2760
|
+
| 'PARTICIPANTS_DID_NOT_SPEAK'
|
|
2761
|
+
| 'AGENT_DID_NOT_ANSWER'
|
|
2762
|
+
| 'AGENT_DID_NOT_SPEAK'
|
|
2763
|
+
| 'AGENT_STOPPED_SPEAKING'
|
|
2764
|
+
| 'AGENT_ENDED_CALL'
|
|
2765
|
+
| 'AGENT_TRANSFERRED_CALL'
|
|
2766
|
+
| 'AGENT_BUSY'
|
|
2767
|
+
| 'AGENT_ERROR'
|
|
2768
|
+
| 'CUSTOMER_ENDED_CALL'
|
|
2769
|
+
| 'VOICE_MAIL_REACHED'
|
|
2770
|
+
| 'SILENCE_TIME_OUT'
|
|
2771
|
+
| 'PHONE_CALL_PROVIDER_CONNECTION_ERROR'
|
|
2772
|
+
| 'CUSTOMER_DID_NOT_ANSWER'
|
|
2773
|
+
| 'CUSTOMER_DID_NOT_SPEAK'
|
|
2774
|
+
| 'CUSTOMER_STOPPED_SPEAKING'
|
|
2775
|
+
| 'CUSTOMER_BUSY'
|
|
2776
|
+
| 'DIAL_ERROR'
|
|
2777
|
+
| 'MAX_DURATION_REACHED'
|
|
2778
|
+
| 'UNKNOWN';
|
|
971
2779
|
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
2780
|
+
/**
|
|
2781
|
+
* Whether this is a test call
|
|
2782
|
+
*/
|
|
2783
|
+
isTest?: boolean;
|
|
976
2784
|
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
2785
|
+
/**
|
|
2786
|
+
* Custom properties to include with the call. These can be used for filtering and
|
|
2787
|
+
* will show in the call details page
|
|
2788
|
+
*/
|
|
2789
|
+
properties?: { [key: string]: unknown };
|
|
981
2790
|
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
}
|
|
2791
|
+
/**
|
|
2792
|
+
* Retell call ID if call is being imported from Retell
|
|
2793
|
+
*/
|
|
2794
|
+
retellCallId?: string;
|
|
987
2795
|
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
2796
|
+
/**
|
|
2797
|
+
* URL of source stereo recording. Must be accessible. Can be a signed URL. While
|
|
2798
|
+
* optional it allows for a richer audio player. Supported formats: WAV, MP3, MP4.
|
|
2799
|
+
*/
|
|
2800
|
+
stereoRecordingUrl?: string;
|
|
993
2801
|
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
2802
|
+
/**
|
|
2803
|
+
* List of tool invocations made during the call
|
|
2804
|
+
*/
|
|
2805
|
+
toolInvocations?: Array<Call.ToolInvocation>;
|
|
998
2806
|
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
2807
|
+
/**
|
|
2808
|
+
* Vapi call ID if call is being imported from Vapi
|
|
2809
|
+
*/
|
|
2810
|
+
vapiCallId?: string;
|
|
2811
|
+
}
|
|
1003
2812
|
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
name: string;
|
|
2813
|
+
export namespace Call {
|
|
2814
|
+
export interface Participant {
|
|
2815
|
+
role: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER';
|
|
1008
2816
|
|
|
1009
|
-
|
|
1010
|
-
* Order in which this block is executed
|
|
1011
|
-
*/
|
|
1012
|
-
orderIndex: number;
|
|
2817
|
+
isSimulated?: boolean;
|
|
1013
2818
|
|
|
1014
|
-
|
|
1015
|
-
* Maximum allowed toxicity score (0-1)
|
|
1016
|
-
*/
|
|
1017
|
-
threshold: number;
|
|
2819
|
+
name?: string | null;
|
|
1018
2820
|
|
|
1019
|
-
|
|
1020
|
-
* Weight of this block in the overall evaluation score (0-100)
|
|
1021
|
-
*/
|
|
1022
|
-
weight: number;
|
|
1023
|
-
}
|
|
2821
|
+
participantId?: string | null;
|
|
1024
2822
|
|
|
1025
|
-
|
|
1026
|
-
/**
|
|
1027
|
-
* Unique identifier for the block
|
|
1028
|
-
*/
|
|
1029
|
-
id: string;
|
|
2823
|
+
phoneNumber?: string | null;
|
|
1030
2824
|
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
*/
|
|
1034
|
-
blockType: 'VOCAL_CUE';
|
|
2825
|
+
spokeFirst?: boolean;
|
|
2826
|
+
}
|
|
1035
2827
|
|
|
2828
|
+
export interface ToolInvocation {
|
|
1036
2829
|
/**
|
|
1037
|
-
*
|
|
2830
|
+
* Name of the tool that was invoked
|
|
1038
2831
|
*/
|
|
1039
|
-
|
|
2832
|
+
name: string;
|
|
1040
2833
|
|
|
1041
2834
|
/**
|
|
1042
|
-
*
|
|
2835
|
+
* Parameters provided to the tool during invocation
|
|
1043
2836
|
*/
|
|
1044
|
-
|
|
2837
|
+
parameters: { [key: string]: ToolInvocation.UnionMember0 | unknown };
|
|
1045
2838
|
|
|
1046
2839
|
/**
|
|
1047
|
-
*
|
|
2840
|
+
* Result returned by the tool after execution. Can be a string or a JSON object
|
|
1048
2841
|
*/
|
|
1049
|
-
|
|
2842
|
+
result: string | { [key: string]: unknown };
|
|
1050
2843
|
|
|
1051
2844
|
/**
|
|
1052
|
-
*
|
|
2845
|
+
* Offset in milliseconds from the start of the call when the tool was invoked
|
|
1053
2846
|
*/
|
|
1054
|
-
|
|
2847
|
+
startOffsetMs: number;
|
|
1055
2848
|
|
|
1056
2849
|
/**
|
|
1057
|
-
*
|
|
2850
|
+
* Description of when the tool should be invoked
|
|
1058
2851
|
*/
|
|
1059
|
-
|
|
2852
|
+
description?: string;
|
|
1060
2853
|
|
|
1061
2854
|
/**
|
|
1062
|
-
*
|
|
2855
|
+
* Offset in milliseconds from the start of the call when the tool execution
|
|
2856
|
+
* completed. Used to calculate duration of the tool execution
|
|
1063
2857
|
*/
|
|
1064
|
-
|
|
2858
|
+
endOffsetMs?: number;
|
|
1065
2859
|
}
|
|
1066
|
-
}
|
|
1067
2860
|
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
export interface Pagination {
|
|
1072
|
-
/**
|
|
1073
|
-
* Whether there are more evaluators to fetch
|
|
1074
|
-
*/
|
|
1075
|
-
hasMore: boolean;
|
|
1076
|
-
|
|
1077
|
-
/**
|
|
1078
|
-
* Cursor for the next page, null if no more pages
|
|
1079
|
-
*/
|
|
1080
|
-
nextCursor: string | null;
|
|
2861
|
+
export namespace ToolInvocation {
|
|
2862
|
+
export interface UnionMember0 {
|
|
2863
|
+
description?: string;
|
|
1081
2864
|
|
|
1082
|
-
|
|
1083
|
-
* Total number of evaluators
|
|
1084
|
-
*/
|
|
1085
|
-
total: number;
|
|
1086
|
-
}
|
|
1087
|
-
}
|
|
2865
|
+
type?: 'string' | 'number' | 'boolean';
|
|
1088
2866
|
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
data: EvaluationListJobRunsResponse.Data;
|
|
1094
|
-
}
|
|
2867
|
+
value?: unknown;
|
|
2868
|
+
}
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
1095
2871
|
|
|
1096
|
-
export
|
|
1097
|
-
/**
|
|
1098
|
-
* Evaluation job runs response payload
|
|
1099
|
-
*/
|
|
1100
|
-
export interface Data {
|
|
2872
|
+
export interface Dataset {
|
|
1101
2873
|
/**
|
|
1102
|
-
*
|
|
2874
|
+
* List of calls input to evaluate
|
|
1103
2875
|
*/
|
|
1104
|
-
|
|
2876
|
+
calls: Array<Dataset.Call>;
|
|
1105
2877
|
|
|
1106
2878
|
/**
|
|
1107
|
-
*
|
|
2879
|
+
* Name of the dataset
|
|
1108
2880
|
*/
|
|
1109
|
-
|
|
2881
|
+
name: string;
|
|
1110
2882
|
}
|
|
1111
2883
|
|
|
1112
|
-
export namespace
|
|
1113
|
-
export interface
|
|
2884
|
+
export namespace Dataset {
|
|
2885
|
+
export interface Call {
|
|
1114
2886
|
/**
|
|
1115
|
-
*
|
|
2887
|
+
* Direction of the call (INBOUND or OUTBOUND)
|
|
1116
2888
|
*/
|
|
1117
|
-
|
|
2889
|
+
callDirection: 'INBOUND' | 'OUTBOUND';
|
|
1118
2890
|
|
|
1119
|
-
|
|
2891
|
+
/**
|
|
2892
|
+
* Interface type of the call (PHONE or WEB)
|
|
2893
|
+
*/
|
|
2894
|
+
interfaceType: 'PHONE' | 'WEB';
|
|
1120
2895
|
|
|
1121
|
-
|
|
2896
|
+
/**
|
|
2897
|
+
* Exactly two participants in the call
|
|
2898
|
+
*/
|
|
2899
|
+
participants: Array<Call.Participant>;
|
|
1122
2900
|
|
|
1123
|
-
|
|
2901
|
+
/**
|
|
2902
|
+
* URL of source recording (must be an accessible WAV, MP3, or MP4 file). Can be a
|
|
2903
|
+
* signed URL.
|
|
2904
|
+
*/
|
|
2905
|
+
recordingUrl: string;
|
|
1124
2906
|
|
|
1125
2907
|
/**
|
|
1126
|
-
*
|
|
2908
|
+
* When the call started (ISO 8601 format)
|
|
1127
2909
|
*/
|
|
1128
|
-
|
|
2910
|
+
startedAt: string;
|
|
1129
2911
|
|
|
1130
2912
|
/**
|
|
1131
|
-
*
|
|
2913
|
+
* Additional context on why the call terminated with the endedStatus
|
|
1132
2914
|
*/
|
|
1133
|
-
|
|
2915
|
+
endedReason?: string;
|
|
1134
2916
|
|
|
1135
2917
|
/**
|
|
1136
|
-
*
|
|
2918
|
+
* High-level call end status, indicating how the call terminated
|
|
1137
2919
|
*/
|
|
1138
|
-
|
|
2920
|
+
endedStatus?:
|
|
2921
|
+
| 'PARTICIPANTS_DID_NOT_SPEAK'
|
|
2922
|
+
| 'AGENT_DID_NOT_ANSWER'
|
|
2923
|
+
| 'AGENT_DID_NOT_SPEAK'
|
|
2924
|
+
| 'AGENT_STOPPED_SPEAKING'
|
|
2925
|
+
| 'AGENT_ENDED_CALL'
|
|
2926
|
+
| 'AGENT_TRANSFERRED_CALL'
|
|
2927
|
+
| 'AGENT_BUSY'
|
|
2928
|
+
| 'AGENT_ERROR'
|
|
2929
|
+
| 'CUSTOMER_ENDED_CALL'
|
|
2930
|
+
| 'VOICE_MAIL_REACHED'
|
|
2931
|
+
| 'SILENCE_TIME_OUT'
|
|
2932
|
+
| 'PHONE_CALL_PROVIDER_CONNECTION_ERROR'
|
|
2933
|
+
| 'CUSTOMER_DID_NOT_ANSWER'
|
|
2934
|
+
| 'CUSTOMER_DID_NOT_SPEAK'
|
|
2935
|
+
| 'CUSTOMER_STOPPED_SPEAKING'
|
|
2936
|
+
| 'CUSTOMER_BUSY'
|
|
2937
|
+
| 'DIAL_ERROR'
|
|
2938
|
+
| 'MAX_DURATION_REACHED'
|
|
2939
|
+
| 'UNKNOWN';
|
|
1139
2940
|
|
|
1140
2941
|
/**
|
|
1141
|
-
*
|
|
1142
|
-
* SKIPPED)
|
|
2942
|
+
* Whether this is a test call
|
|
1143
2943
|
*/
|
|
1144
|
-
|
|
2944
|
+
isTest?: boolean;
|
|
1145
2945
|
|
|
1146
2946
|
/**
|
|
1147
|
-
*
|
|
2947
|
+
* Custom properties to include with the call. These can be used for filtering and
|
|
2948
|
+
* will show in the call details page
|
|
1148
2949
|
*/
|
|
1149
|
-
|
|
2950
|
+
properties?: { [key: string]: unknown };
|
|
1150
2951
|
|
|
1151
2952
|
/**
|
|
1152
|
-
*
|
|
2953
|
+
* Retell call ID if call is being imported from Retell
|
|
1153
2954
|
*/
|
|
1154
|
-
|
|
2955
|
+
retellCallId?: string;
|
|
1155
2956
|
|
|
1156
2957
|
/**
|
|
1157
|
-
*
|
|
2958
|
+
* URL of source stereo recording. Must be accessible. Can be a signed URL. While
|
|
2959
|
+
* optional it allows for a richer audio player. Supported formats: WAV, MP3, MP4.
|
|
1158
2960
|
*/
|
|
1159
|
-
|
|
2961
|
+
stereoRecordingUrl?: string;
|
|
2962
|
+
|
|
2963
|
+
/**
|
|
2964
|
+
* List of tool invocations made during the call
|
|
2965
|
+
*/
|
|
2966
|
+
toolInvocations?: Array<Call.ToolInvocation>;
|
|
2967
|
+
|
|
2968
|
+
/**
|
|
2969
|
+
* Vapi call ID if call is being imported from Vapi
|
|
2970
|
+
*/
|
|
2971
|
+
vapiCallId?: string;
|
|
1160
2972
|
}
|
|
1161
2973
|
|
|
1162
|
-
export namespace
|
|
1163
|
-
export interface
|
|
1164
|
-
|
|
1165
|
-
* ID of the block definition
|
|
1166
|
-
*/
|
|
1167
|
-
blockDefinitionId: string;
|
|
2974
|
+
export namespace Call {
|
|
2975
|
+
export interface Participant {
|
|
2976
|
+
role: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER';
|
|
1168
2977
|
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
2978
|
+
isSimulated?: boolean;
|
|
2979
|
+
|
|
2980
|
+
name?: string | null;
|
|
2981
|
+
|
|
2982
|
+
participantId?: string | null;
|
|
2983
|
+
|
|
2984
|
+
phoneNumber?: string | null;
|
|
2985
|
+
|
|
2986
|
+
spokeFirst?: boolean;
|
|
2987
|
+
}
|
|
1173
2988
|
|
|
2989
|
+
export interface ToolInvocation {
|
|
1174
2990
|
/**
|
|
1175
|
-
*
|
|
2991
|
+
* Name of the tool that was invoked
|
|
1176
2992
|
*/
|
|
1177
|
-
|
|
2993
|
+
name: string;
|
|
1178
2994
|
|
|
1179
2995
|
/**
|
|
1180
|
-
*
|
|
2996
|
+
* Parameters provided to the tool during invocation
|
|
1181
2997
|
*/
|
|
1182
|
-
|
|
2998
|
+
parameters: { [key: string]: ToolInvocation.UnionMember0 | unknown };
|
|
1183
2999
|
|
|
1184
3000
|
/**
|
|
1185
|
-
*
|
|
3001
|
+
* Result returned by the tool after execution. Can be a string or a JSON object
|
|
1186
3002
|
*/
|
|
1187
|
-
|
|
3003
|
+
result: string | { [key: string]: unknown };
|
|
1188
3004
|
|
|
1189
3005
|
/**
|
|
1190
|
-
*
|
|
3006
|
+
* Offset in milliseconds from the start of the call when the tool was invoked
|
|
1191
3007
|
*/
|
|
1192
|
-
|
|
3008
|
+
startOffsetMs: number;
|
|
1193
3009
|
|
|
1194
3010
|
/**
|
|
1195
|
-
*
|
|
3011
|
+
* Description of when the tool should be invoked
|
|
1196
3012
|
*/
|
|
1197
|
-
|
|
3013
|
+
description?: string;
|
|
1198
3014
|
|
|
1199
3015
|
/**
|
|
1200
|
-
*
|
|
3016
|
+
* Offset in milliseconds from the start of the call when the tool execution
|
|
3017
|
+
* completed. Used to calculate duration of the tool execution
|
|
1201
3018
|
*/
|
|
1202
|
-
|
|
3019
|
+
endOffsetMs?: number;
|
|
1203
3020
|
}
|
|
1204
3021
|
|
|
1205
|
-
export
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
*/
|
|
1209
|
-
id: string;
|
|
3022
|
+
export namespace ToolInvocation {
|
|
3023
|
+
export interface UnionMember0 {
|
|
3024
|
+
description?: string;
|
|
1210
3025
|
|
|
1211
|
-
|
|
1212
|
-
* Name of the evaluator
|
|
1213
|
-
*/
|
|
1214
|
-
name: string;
|
|
3026
|
+
type?: 'string' | 'number' | 'boolean';
|
|
1215
3027
|
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
*/
|
|
1219
|
-
weight?: number;
|
|
3028
|
+
value?: unknown;
|
|
3029
|
+
}
|
|
1220
3030
|
}
|
|
3031
|
+
}
|
|
3032
|
+
}
|
|
3033
|
+
}
|
|
1221
3034
|
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
3035
|
+
export interface EvaluationListEvaluatorsParams {
|
|
3036
|
+
/**
|
|
3037
|
+
* Cursor for pagination - evaluator ID to start after
|
|
3038
|
+
*/
|
|
3039
|
+
after?: string;
|
|
3040
|
+
|
|
3041
|
+
/**
|
|
3042
|
+
* Maximum number of evaluators to return (default: 20, max: 50)
|
|
3043
|
+
*/
|
|
3044
|
+
limit?: string;
|
|
3045
|
+
}
|
|
3046
|
+
|
|
3047
|
+
export interface EvaluationListJobRunsParams {
|
|
3048
|
+
/**
|
|
3049
|
+
* Number of items to return per page
|
|
3050
|
+
*/
|
|
3051
|
+
limit?: string;
|
|
3052
|
+
|
|
3053
|
+
/**
|
|
3054
|
+
* Cursor for the next page of items
|
|
3055
|
+
*/
|
|
3056
|
+
nextCursor?: string;
|
|
3057
|
+
}
|
|
3058
|
+
|
|
3059
|
+
export interface EvaluationUpdateEvaluatorParams {
|
|
3060
|
+
/**
|
|
3061
|
+
* Updated array of evaluation blocks. Include id to update, omit id to create.
|
|
3062
|
+
* Existing blocks not in the array will be deleted.
|
|
3063
|
+
*/
|
|
3064
|
+
blocks?: Array<
|
|
3065
|
+
| EvaluationUpdateEvaluatorParams.CreateCustomPromptBlockInput
|
|
3066
|
+
| EvaluationUpdateEvaluatorParams.CreateDatafieldCheckBlockInput
|
|
3067
|
+
| EvaluationUpdateEvaluatorParams.CreateEmotionBlockInput
|
|
3068
|
+
| EvaluationUpdateEvaluatorParams.CreateLatencyBlockInput
|
|
3069
|
+
| EvaluationUpdateEvaluatorParams.CreatePolitenessBlockInput
|
|
3070
|
+
| EvaluationUpdateEvaluatorParams.CreateSentimentBlockInput
|
|
3071
|
+
| EvaluationUpdateEvaluatorParams.CreateToolCallsBlockInput
|
|
3072
|
+
| EvaluationUpdateEvaluatorParams.CreateToxicityBlockInput
|
|
3073
|
+
| EvaluationUpdateEvaluatorParams.CreateVocalCueBlockInput
|
|
3074
|
+
>;
|
|
3075
|
+
|
|
3076
|
+
/**
|
|
3077
|
+
* New description for the evaluator
|
|
3078
|
+
*/
|
|
3079
|
+
description?: string | null;
|
|
3080
|
+
|
|
3081
|
+
/**
|
|
3082
|
+
* New name for the evaluator
|
|
3083
|
+
*/
|
|
3084
|
+
name?: string;
|
|
3085
|
+
}
|
|
3086
|
+
|
|
3087
|
+
export namespace EvaluationUpdateEvaluatorParams {
|
|
3088
|
+
export interface CreateCustomPromptBlockInput {
|
|
3089
|
+
blockType: 'CUSTOM_PROMPT';
|
|
3090
|
+
|
|
3091
|
+
/**
|
|
3092
|
+
* Name of the metric this prompt evaluates
|
|
3093
|
+
*/
|
|
3094
|
+
metricName: string;
|
|
3095
|
+
|
|
3096
|
+
/**
|
|
3097
|
+
* Display name of the evaluation block
|
|
3098
|
+
*/
|
|
3099
|
+
name: string;
|
|
3100
|
+
|
|
3101
|
+
/**
|
|
3102
|
+
* The prompt to evaluate the call against
|
|
3103
|
+
*/
|
|
3104
|
+
prompt: string;
|
|
3105
|
+
|
|
3106
|
+
/**
|
|
3107
|
+
* ID of an existing block to update. Omit to create a new block. Existing blocks
|
|
3108
|
+
* not included will be deleted.
|
|
3109
|
+
*/
|
|
3110
|
+
id?: string;
|
|
3111
|
+
|
|
3112
|
+
/**
|
|
3113
|
+
* Optional description of what this block evaluates
|
|
3114
|
+
*/
|
|
3115
|
+
description?: string | null;
|
|
3116
|
+
|
|
3117
|
+
/**
|
|
3118
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
3119
|
+
*/
|
|
3120
|
+
inputDimensions?: Array<string>;
|
|
3121
|
+
|
|
3122
|
+
/**
|
|
3123
|
+
* Order in which this block is executed (defaults to array position)
|
|
3124
|
+
*/
|
|
3125
|
+
orderIndex?: number;
|
|
3126
|
+
|
|
3127
|
+
/**
|
|
3128
|
+
* Condition to skip this block evaluation
|
|
3129
|
+
*/
|
|
3130
|
+
skipCondition?: string | null;
|
|
1227
3131
|
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
3132
|
+
/**
|
|
3133
|
+
* Minimum score threshold to pass evaluation (0-1, default: 0.7)
|
|
3134
|
+
*/
|
|
3135
|
+
threshold?: number;
|
|
1232
3136
|
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
3137
|
+
/**
|
|
3138
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
3139
|
+
*/
|
|
3140
|
+
weight?: number;
|
|
3141
|
+
}
|
|
1237
3142
|
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
*/
|
|
1241
|
-
snippetText: string;
|
|
1242
|
-
}
|
|
3143
|
+
export interface CreateDatafieldCheckBlockInput {
|
|
3144
|
+
blockType: 'DATAFIELD_CHECK';
|
|
1243
3145
|
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
booleanValue: boolean | null;
|
|
3146
|
+
/**
|
|
3147
|
+
* Criteria for evaluating the property
|
|
3148
|
+
*/
|
|
3149
|
+
evaluationCriteria: string;
|
|
1249
3150
|
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
3151
|
+
/**
|
|
3152
|
+
* Display name of the evaluation block
|
|
3153
|
+
*/
|
|
3154
|
+
name: string;
|
|
1254
3155
|
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
3156
|
+
/**
|
|
3157
|
+
* Name of the property to check
|
|
3158
|
+
*/
|
|
3159
|
+
propertyName: string;
|
|
1259
3160
|
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
3161
|
+
/**
|
|
3162
|
+
* ID of an existing block to update. Omit to create a new block. Existing blocks
|
|
3163
|
+
* not included will be deleted.
|
|
3164
|
+
*/
|
|
3165
|
+
id?: string;
|
|
1264
3166
|
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
3167
|
+
/**
|
|
3168
|
+
* Optional description of what this block evaluates
|
|
3169
|
+
*/
|
|
3170
|
+
description?: string | null;
|
|
1269
3171
|
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
3172
|
+
/**
|
|
3173
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
3174
|
+
*/
|
|
3175
|
+
inputDimensions?: Array<string>;
|
|
1274
3176
|
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
3177
|
+
/**
|
|
3178
|
+
* Whether this property must be present
|
|
3179
|
+
*/
|
|
3180
|
+
isRequired?: boolean;
|
|
1279
3181
|
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
3182
|
+
/**
|
|
3183
|
+
* Order in which this block is executed (defaults to array position)
|
|
3184
|
+
*/
|
|
3185
|
+
orderIndex?: number;
|
|
1284
3186
|
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
3187
|
+
/**
|
|
3188
|
+
* Condition to skip this block evaluation
|
|
3189
|
+
*/
|
|
3190
|
+
skipCondition?: string | null;
|
|
1291
3191
|
|
|
1292
3192
|
/**
|
|
1293
|
-
*
|
|
3193
|
+
* Minimum score threshold to pass evaluation (0-1, default: 0.8)
|
|
1294
3194
|
*/
|
|
1295
|
-
|
|
1296
|
-
/**
|
|
1297
|
-
* Whether there are more items to fetch
|
|
1298
|
-
*/
|
|
1299
|
-
hasMore: boolean;
|
|
3195
|
+
threshold?: number;
|
|
1300
3196
|
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
3197
|
+
/**
|
|
3198
|
+
* Expected type of the property value
|
|
3199
|
+
*/
|
|
3200
|
+
valueType?: string;
|
|
1305
3201
|
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
}
|
|
3202
|
+
/**
|
|
3203
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
3204
|
+
*/
|
|
3205
|
+
weight?: number;
|
|
1311
3206
|
}
|
|
1312
|
-
}
|
|
1313
3207
|
|
|
1314
|
-
export interface
|
|
1315
|
-
|
|
1316
|
-
* List of evaluators slugs to evaluate the calls or "all" to evaluate all
|
|
1317
|
-
* evaluators
|
|
1318
|
-
*/
|
|
1319
|
-
evaluators: Array<string> | 'all';
|
|
3208
|
+
export interface CreateEmotionBlockInput {
|
|
3209
|
+
blockType: 'EMOTION';
|
|
1320
3210
|
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
3211
|
+
/**
|
|
3212
|
+
* Display name of the evaluation block
|
|
3213
|
+
*/
|
|
3214
|
+
name: string;
|
|
1325
3215
|
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
3216
|
+
/**
|
|
3217
|
+
* ID of an existing block to update. Omit to create a new block. Existing blocks
|
|
3218
|
+
* not included will be deleted.
|
|
3219
|
+
*/
|
|
3220
|
+
id?: string;
|
|
1330
3221
|
|
|
1331
|
-
|
|
1332
|
-
|
|
3222
|
+
/**
|
|
3223
|
+
* Optional description of what this block evaluates
|
|
3224
|
+
*/
|
|
3225
|
+
description?: string | null;
|
|
1333
3226
|
|
|
1334
|
-
export namespace EvaluationCreateJobParams {
|
|
1335
|
-
/**
|
|
1336
|
-
* Call input to evaluate
|
|
1337
|
-
*/
|
|
1338
|
-
export interface Call {
|
|
1339
3227
|
/**
|
|
1340
|
-
*
|
|
3228
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
1341
3229
|
*/
|
|
1342
|
-
|
|
3230
|
+
inputDimensions?: Array<string>;
|
|
1343
3231
|
|
|
1344
3232
|
/**
|
|
1345
|
-
*
|
|
3233
|
+
* Order in which this block is executed (defaults to array position)
|
|
1346
3234
|
*/
|
|
1347
|
-
|
|
3235
|
+
orderIndex?: number;
|
|
1348
3236
|
|
|
1349
3237
|
/**
|
|
1350
|
-
*
|
|
3238
|
+
* The emotion to detect (e.g., "joy", "anger", "sadness")
|
|
1351
3239
|
*/
|
|
1352
|
-
|
|
3240
|
+
selectedEmotion?: string;
|
|
1353
3241
|
|
|
1354
3242
|
/**
|
|
1355
|
-
*
|
|
1356
|
-
* signed URL.
|
|
3243
|
+
* Condition to skip this block evaluation
|
|
1357
3244
|
*/
|
|
1358
|
-
|
|
3245
|
+
skipCondition?: string | null;
|
|
1359
3246
|
|
|
1360
3247
|
/**
|
|
1361
|
-
*
|
|
3248
|
+
* Minimum confidence threshold for emotion detection (0-1, default: 0.7)
|
|
1362
3249
|
*/
|
|
1363
|
-
|
|
3250
|
+
threshold?: number;
|
|
1364
3251
|
|
|
1365
3252
|
/**
|
|
1366
|
-
*
|
|
3253
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
1367
3254
|
*/
|
|
1368
|
-
|
|
3255
|
+
weight?: number;
|
|
3256
|
+
}
|
|
3257
|
+
|
|
3258
|
+
export interface CreateLatencyBlockInput {
|
|
3259
|
+
blockType: 'LATENCY';
|
|
1369
3260
|
|
|
1370
3261
|
/**
|
|
1371
|
-
*
|
|
3262
|
+
* Display name of the evaluation block
|
|
1372
3263
|
*/
|
|
1373
|
-
|
|
1374
|
-
| 'PARTICIPANTS_DID_NOT_SPEAK'
|
|
1375
|
-
| 'AGENT_DID_NOT_ANSWER'
|
|
1376
|
-
| 'AGENT_DID_NOT_SPEAK'
|
|
1377
|
-
| 'AGENT_STOPPED_SPEAKING'
|
|
1378
|
-
| 'AGENT_ENDED_CALL'
|
|
1379
|
-
| 'AGENT_TRANSFERRED_CALL'
|
|
1380
|
-
| 'AGENT_BUSY'
|
|
1381
|
-
| 'AGENT_ERROR'
|
|
1382
|
-
| 'CUSTOMER_ENDED_CALL'
|
|
1383
|
-
| 'VOICE_MAIL_REACHED'
|
|
1384
|
-
| 'SILENCE_TIME_OUT'
|
|
1385
|
-
| 'PHONE_CALL_PROVIDER_CONNECTION_ERROR'
|
|
1386
|
-
| 'CUSTOMER_DID_NOT_ANSWER'
|
|
1387
|
-
| 'CUSTOMER_DID_NOT_SPEAK'
|
|
1388
|
-
| 'CUSTOMER_STOPPED_SPEAKING'
|
|
1389
|
-
| 'CUSTOMER_BUSY'
|
|
1390
|
-
| 'DIAL_ERROR'
|
|
1391
|
-
| 'MAX_DURATION_REACHED'
|
|
1392
|
-
| 'UNKNOWN';
|
|
3264
|
+
name: string;
|
|
1393
3265
|
|
|
1394
3266
|
/**
|
|
1395
|
-
*
|
|
3267
|
+
* ID of an existing block to update. Omit to create a new block. Existing blocks
|
|
3268
|
+
* not included will be deleted.
|
|
1396
3269
|
*/
|
|
1397
|
-
|
|
3270
|
+
id?: string;
|
|
1398
3271
|
|
|
1399
3272
|
/**
|
|
1400
|
-
*
|
|
1401
|
-
* will show in the call details page
|
|
3273
|
+
* Optional description of what this block evaluates
|
|
1402
3274
|
*/
|
|
1403
|
-
|
|
3275
|
+
description?: string | null;
|
|
1404
3276
|
|
|
1405
3277
|
/**
|
|
1406
|
-
*
|
|
3278
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
1407
3279
|
*/
|
|
1408
|
-
|
|
3280
|
+
inputDimensions?: Array<string>;
|
|
1409
3281
|
|
|
1410
3282
|
/**
|
|
1411
|
-
*
|
|
1412
|
-
* optional it allows for a richer audio player. Supported formats: WAV, MP3, MP4.
|
|
3283
|
+
* Maximum number of silence periods allowed
|
|
1413
3284
|
*/
|
|
1414
|
-
|
|
3285
|
+
maxAllowedSilences?: number;
|
|
1415
3286
|
|
|
1416
3287
|
/**
|
|
1417
|
-
*
|
|
3288
|
+
* Minimum duration of silence in milliseconds to be considered
|
|
1418
3289
|
*/
|
|
1419
|
-
|
|
3290
|
+
minSilenceDuration?: number;
|
|
1420
3291
|
|
|
1421
3292
|
/**
|
|
1422
|
-
*
|
|
3293
|
+
* Order in which this block is executed (defaults to array position)
|
|
1423
3294
|
*/
|
|
1424
|
-
|
|
3295
|
+
orderIndex?: number;
|
|
3296
|
+
|
|
3297
|
+
/**
|
|
3298
|
+
* Condition to skip this block evaluation
|
|
3299
|
+
*/
|
|
3300
|
+
skipCondition?: string | null;
|
|
3301
|
+
|
|
3302
|
+
/**
|
|
3303
|
+
* Maximum allowed latency score
|
|
3304
|
+
*/
|
|
3305
|
+
threshold?: number;
|
|
3306
|
+
|
|
3307
|
+
/**
|
|
3308
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
3309
|
+
*/
|
|
3310
|
+
weight?: number;
|
|
1425
3311
|
}
|
|
1426
3312
|
|
|
1427
|
-
export
|
|
1428
|
-
|
|
1429
|
-
role: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER';
|
|
3313
|
+
export interface CreatePolitenessBlockInput {
|
|
3314
|
+
blockType: 'POLITENESS';
|
|
1430
3315
|
|
|
1431
|
-
|
|
3316
|
+
/**
|
|
3317
|
+
* Display name of the evaluation block
|
|
3318
|
+
*/
|
|
3319
|
+
name: string;
|
|
1432
3320
|
|
|
1433
|
-
|
|
3321
|
+
/**
|
|
3322
|
+
* ID of an existing block to update. Omit to create a new block. Existing blocks
|
|
3323
|
+
* not included will be deleted.
|
|
3324
|
+
*/
|
|
3325
|
+
id?: string;
|
|
1434
3326
|
|
|
1435
|
-
|
|
3327
|
+
/**
|
|
3328
|
+
* Optional description of what this block evaluates
|
|
3329
|
+
*/
|
|
3330
|
+
description?: string | null;
|
|
1436
3331
|
|
|
1437
|
-
|
|
3332
|
+
/**
|
|
3333
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
3334
|
+
*/
|
|
3335
|
+
inputDimensions?: Array<string>;
|
|
1438
3336
|
|
|
1439
|
-
|
|
1440
|
-
|
|
3337
|
+
/**
|
|
3338
|
+
* Order in which this block is executed (defaults to array position)
|
|
3339
|
+
*/
|
|
3340
|
+
orderIndex?: number;
|
|
1441
3341
|
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
name: string;
|
|
3342
|
+
/**
|
|
3343
|
+
* Condition to skip this block evaluation
|
|
3344
|
+
*/
|
|
3345
|
+
skipCondition?: string | null;
|
|
1447
3346
|
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
3347
|
+
/**
|
|
3348
|
+
* Minimum politeness score threshold (0-1, default: 0.7)
|
|
3349
|
+
*/
|
|
3350
|
+
threshold?: number;
|
|
1452
3351
|
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
3352
|
+
/**
|
|
3353
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
3354
|
+
*/
|
|
3355
|
+
weight?: number;
|
|
3356
|
+
}
|
|
1457
3357
|
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
3358
|
+
export interface CreateSentimentBlockInput {
|
|
3359
|
+
blockType: 'SENTIMENT';
|
|
3360
|
+
|
|
3361
|
+
/**
|
|
3362
|
+
* Display name of the evaluation block
|
|
3363
|
+
*/
|
|
3364
|
+
name: string;
|
|
1462
3365
|
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
3366
|
+
/**
|
|
3367
|
+
* ID of an existing block to update. Omit to create a new block. Existing blocks
|
|
3368
|
+
* not included will be deleted.
|
|
3369
|
+
*/
|
|
3370
|
+
id?: string;
|
|
1467
3371
|
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
endOffsetMs?: number;
|
|
1473
|
-
}
|
|
3372
|
+
/**
|
|
3373
|
+
* Optional description of what this block evaluates
|
|
3374
|
+
*/
|
|
3375
|
+
description?: string | null;
|
|
1474
3376
|
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
3377
|
+
/**
|
|
3378
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
3379
|
+
*/
|
|
3380
|
+
inputDimensions?: Array<string>;
|
|
1478
3381
|
|
|
1479
|
-
|
|
3382
|
+
/**
|
|
3383
|
+
* Order in which this block is executed (defaults to array position)
|
|
3384
|
+
*/
|
|
3385
|
+
orderIndex?: number;
|
|
1480
3386
|
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
3387
|
+
/**
|
|
3388
|
+
* Condition to skip this block evaluation
|
|
3389
|
+
*/
|
|
3390
|
+
skipCondition?: string | null;
|
|
1485
3391
|
|
|
1486
|
-
export interface Dataset {
|
|
1487
3392
|
/**
|
|
1488
|
-
*
|
|
3393
|
+
* Minimum sentiment score threshold (0-1, default: 0.7)
|
|
1489
3394
|
*/
|
|
1490
|
-
|
|
3395
|
+
threshold?: number;
|
|
1491
3396
|
|
|
1492
3397
|
/**
|
|
1493
|
-
*
|
|
3398
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
1494
3399
|
*/
|
|
1495
|
-
|
|
3400
|
+
weight?: number;
|
|
1496
3401
|
}
|
|
1497
3402
|
|
|
1498
|
-
export
|
|
1499
|
-
|
|
1500
|
-
/**
|
|
1501
|
-
* Direction of the call (INBOUND or OUTBOUND)
|
|
1502
|
-
*/
|
|
1503
|
-
callDirection: 'INBOUND' | 'OUTBOUND';
|
|
1504
|
-
|
|
1505
|
-
/**
|
|
1506
|
-
* Interface type of the call (PHONE or WEB)
|
|
1507
|
-
*/
|
|
1508
|
-
interfaceType: 'PHONE' | 'WEB';
|
|
3403
|
+
export interface CreateToolCallsBlockInput {
|
|
3404
|
+
blockType: 'TOOL_CALLS';
|
|
1509
3405
|
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
3406
|
+
/**
|
|
3407
|
+
* Display name of the evaluation block
|
|
3408
|
+
*/
|
|
3409
|
+
name: string;
|
|
1514
3410
|
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
recordingUrl: string;
|
|
3411
|
+
/**
|
|
3412
|
+
* ID of the tool definition
|
|
3413
|
+
*/
|
|
3414
|
+
toolDefinitionId: string;
|
|
1520
3415
|
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
3416
|
+
/**
|
|
3417
|
+
* ID of an existing block to update. Omit to create a new block. Existing blocks
|
|
3418
|
+
* not included will be deleted.
|
|
3419
|
+
*/
|
|
3420
|
+
id?: string;
|
|
1525
3421
|
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
3422
|
+
/**
|
|
3423
|
+
* Optional description of what this block evaluates
|
|
3424
|
+
*/
|
|
3425
|
+
description?: string | null;
|
|
1530
3426
|
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
| 'PARTICIPANTS_DID_NOT_SPEAK'
|
|
1536
|
-
| 'AGENT_DID_NOT_ANSWER'
|
|
1537
|
-
| 'AGENT_DID_NOT_SPEAK'
|
|
1538
|
-
| 'AGENT_STOPPED_SPEAKING'
|
|
1539
|
-
| 'AGENT_ENDED_CALL'
|
|
1540
|
-
| 'AGENT_TRANSFERRED_CALL'
|
|
1541
|
-
| 'AGENT_BUSY'
|
|
1542
|
-
| 'AGENT_ERROR'
|
|
1543
|
-
| 'CUSTOMER_ENDED_CALL'
|
|
1544
|
-
| 'VOICE_MAIL_REACHED'
|
|
1545
|
-
| 'SILENCE_TIME_OUT'
|
|
1546
|
-
| 'PHONE_CALL_PROVIDER_CONNECTION_ERROR'
|
|
1547
|
-
| 'CUSTOMER_DID_NOT_ANSWER'
|
|
1548
|
-
| 'CUSTOMER_DID_NOT_SPEAK'
|
|
1549
|
-
| 'CUSTOMER_STOPPED_SPEAKING'
|
|
1550
|
-
| 'CUSTOMER_BUSY'
|
|
1551
|
-
| 'DIAL_ERROR'
|
|
1552
|
-
| 'MAX_DURATION_REACHED'
|
|
1553
|
-
| 'UNKNOWN';
|
|
3427
|
+
/**
|
|
3428
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
3429
|
+
*/
|
|
3430
|
+
inputDimensions?: Array<string>;
|
|
1554
3431
|
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
3432
|
+
/**
|
|
3433
|
+
* Condition that must be met for tool invocation
|
|
3434
|
+
*/
|
|
3435
|
+
invocationCondition?: string | null;
|
|
1559
3436
|
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
properties?: { [key: string]: unknown };
|
|
3437
|
+
/**
|
|
3438
|
+
* Minimum number of times the tool should be invoked
|
|
3439
|
+
*/
|
|
3440
|
+
minInvocationCount?: number | null;
|
|
1565
3441
|
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
3442
|
+
/**
|
|
3443
|
+
* Order in which this block is executed (defaults to array position)
|
|
3444
|
+
*/
|
|
3445
|
+
orderIndex?: number;
|
|
1570
3446
|
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
stereoRecordingUrl?: string;
|
|
3447
|
+
/**
|
|
3448
|
+
* Whether the tool should be invoked
|
|
3449
|
+
*/
|
|
3450
|
+
shouldBeInvoked?: boolean;
|
|
1576
3451
|
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
3452
|
+
/**
|
|
3453
|
+
* Condition to skip this block evaluation
|
|
3454
|
+
*/
|
|
3455
|
+
skipCondition?: string | null;
|
|
1581
3456
|
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
3457
|
+
/**
|
|
3458
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
3459
|
+
*/
|
|
3460
|
+
weight?: number;
|
|
3461
|
+
}
|
|
1587
3462
|
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
role: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER';
|
|
3463
|
+
export interface CreateToxicityBlockInput {
|
|
3464
|
+
blockType: 'TOXICITY';
|
|
1591
3465
|
|
|
1592
|
-
|
|
3466
|
+
/**
|
|
3467
|
+
* Display name of the evaluation block
|
|
3468
|
+
*/
|
|
3469
|
+
name: string;
|
|
1593
3470
|
|
|
1594
|
-
|
|
3471
|
+
/**
|
|
3472
|
+
* ID of an existing block to update. Omit to create a new block. Existing blocks
|
|
3473
|
+
* not included will be deleted.
|
|
3474
|
+
*/
|
|
3475
|
+
id?: string;
|
|
1595
3476
|
|
|
1596
|
-
|
|
3477
|
+
/**
|
|
3478
|
+
* Optional description of what this block evaluates
|
|
3479
|
+
*/
|
|
3480
|
+
description?: string | null;
|
|
1597
3481
|
|
|
1598
|
-
|
|
3482
|
+
/**
|
|
3483
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
3484
|
+
*/
|
|
3485
|
+
inputDimensions?: Array<string>;
|
|
1599
3486
|
|
|
1600
|
-
|
|
1601
|
-
|
|
3487
|
+
/**
|
|
3488
|
+
* Order in which this block is executed (defaults to array position)
|
|
3489
|
+
*/
|
|
3490
|
+
orderIndex?: number;
|
|
1602
3491
|
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
name: string;
|
|
3492
|
+
/**
|
|
3493
|
+
* Condition to skip this block evaluation
|
|
3494
|
+
*/
|
|
3495
|
+
skipCondition?: string | null;
|
|
1608
3496
|
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
3497
|
+
/**
|
|
3498
|
+
* Maximum allowed toxicity score (0-1, default: 0.7)
|
|
3499
|
+
*/
|
|
3500
|
+
threshold?: number;
|
|
1613
3501
|
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
3502
|
+
/**
|
|
3503
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
3504
|
+
*/
|
|
3505
|
+
weight?: number;
|
|
3506
|
+
}
|
|
1618
3507
|
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
*/
|
|
1622
|
-
startOffsetMs: number;
|
|
3508
|
+
export interface CreateVocalCueBlockInput {
|
|
3509
|
+
blockType: 'VOCAL_CUE';
|
|
1623
3510
|
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
3511
|
+
/**
|
|
3512
|
+
* Display name of the evaluation block
|
|
3513
|
+
*/
|
|
3514
|
+
name: string;
|
|
1628
3515
|
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
}
|
|
3516
|
+
/**
|
|
3517
|
+
* ID of an existing block to update. Omit to create a new block. Existing blocks
|
|
3518
|
+
* not included will be deleted.
|
|
3519
|
+
*/
|
|
3520
|
+
id?: string;
|
|
1635
3521
|
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
3522
|
+
/**
|
|
3523
|
+
* Optional description of what this block evaluates
|
|
3524
|
+
*/
|
|
3525
|
+
description?: string | null;
|
|
1639
3526
|
|
|
1640
|
-
|
|
3527
|
+
/**
|
|
3528
|
+
* Input dimensions for the block (auto-assigned if not provided)
|
|
3529
|
+
*/
|
|
3530
|
+
inputDimensions?: Array<string>;
|
|
1641
3531
|
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
}
|
|
1647
|
-
}
|
|
3532
|
+
/**
|
|
3533
|
+
* Order in which this block is executed (defaults to array position)
|
|
3534
|
+
*/
|
|
3535
|
+
orderIndex?: number;
|
|
1648
3536
|
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
after?: string;
|
|
3537
|
+
/**
|
|
3538
|
+
* The vocal cue to detect (e.g., "pace", "tone", "volume")
|
|
3539
|
+
*/
|
|
3540
|
+
selectedCue?: string;
|
|
1654
3541
|
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
}
|
|
3542
|
+
/**
|
|
3543
|
+
* Condition to skip this block evaluation
|
|
3544
|
+
*/
|
|
3545
|
+
skipCondition?: string | null;
|
|
1660
3546
|
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
limit?: string;
|
|
3547
|
+
/**
|
|
3548
|
+
* Minimum confidence threshold for vocal cue detection (0-1, default: 0.7)
|
|
3549
|
+
*/
|
|
3550
|
+
threshold?: number;
|
|
1666
3551
|
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
3552
|
+
/**
|
|
3553
|
+
* Weight of this block in the overall evaluation score (0-100, default: 50)
|
|
3554
|
+
*/
|
|
3555
|
+
weight?: number;
|
|
3556
|
+
}
|
|
1671
3557
|
}
|
|
1672
3558
|
|
|
1673
3559
|
export declare namespace Evaluation {
|
|
1674
3560
|
export {
|
|
3561
|
+
type EvaluationCreateEvaluatorResponse as EvaluationCreateEvaluatorResponse,
|
|
1675
3562
|
type EvaluationCreateJobResponse as EvaluationCreateJobResponse,
|
|
1676
3563
|
type EvaluationGetEvaluatorByIDResponse as EvaluationGetEvaluatorByIDResponse,
|
|
1677
3564
|
type EvaluationGetJobResponse as EvaluationGetJobResponse,
|
|
1678
3565
|
type EvaluationListEvaluatorsResponse as EvaluationListEvaluatorsResponse,
|
|
1679
3566
|
type EvaluationListJobRunsResponse as EvaluationListJobRunsResponse,
|
|
3567
|
+
type EvaluationUpdateEvaluatorResponse as EvaluationUpdateEvaluatorResponse,
|
|
3568
|
+
type EvaluationCreateEvaluatorParams as EvaluationCreateEvaluatorParams,
|
|
1680
3569
|
type EvaluationCreateJobParams as EvaluationCreateJobParams,
|
|
1681
3570
|
type EvaluationListEvaluatorsParams as EvaluationListEvaluatorsParams,
|
|
1682
3571
|
type EvaluationListJobRunsParams as EvaluationListJobRunsParams,
|
|
3572
|
+
type EvaluationUpdateEvaluatorParams as EvaluationUpdateEvaluatorParams,
|
|
1683
3573
|
};
|
|
1684
3574
|
}
|