@roarkanalytics/sdk 2.24.0 → 2.26.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 +25 -0
- package/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +7 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +3 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -1
- package/resources/index.mjs.map +1 -1
- package/resources/metric-collection-job.d.mts +237 -0
- package/resources/metric-collection-job.d.mts.map +1 -0
- package/resources/metric-collection-job.d.ts +237 -0
- package/resources/metric-collection-job.d.ts.map +1 -0
- package/resources/metric-collection-job.js +29 -0
- package/resources/metric-collection-job.js.map +1 -0
- package/resources/metric-collection-job.mjs +25 -0
- package/resources/metric-collection-job.mjs.map +1 -0
- package/resources/metric-policy.d.mts +502 -0
- package/resources/metric-policy.d.mts.map +1 -0
- package/resources/metric-policy.d.ts +502 -0
- package/resources/metric-policy.d.ts.map +1 -0
- package/resources/metric-policy.js +76 -0
- package/resources/metric-policy.js.map +1 -0
- package/resources/metric-policy.mjs +72 -0
- package/resources/metric-policy.mjs.map +1 -0
- package/resources/metric.d.mts +187 -1
- package/resources/metric.d.mts.map +1 -1
- package/resources/metric.d.ts +187 -1
- package/resources/metric.d.ts.map +1 -1
- package/resources/metric.js +21 -0
- package/resources/metric.js.map +1 -1
- package/resources/metric.mjs +21 -0
- package/resources/metric.mjs.map +1 -1
- package/resources/simulation-job.d.mts +34 -2
- package/resources/simulation-job.d.mts.map +1 -1
- package/resources/simulation-job.d.ts +34 -2
- package/resources/simulation-job.d.ts.map +1 -1
- package/resources/simulation-persona.d.mts +102 -6
- package/resources/simulation-persona.d.mts.map +1 -1
- package/resources/simulation-persona.d.ts +102 -6
- package/resources/simulation-persona.d.ts.map +1 -1
- package/resources/simulation-run-plan-job.d.mts +24 -7
- package/resources/simulation-run-plan-job.d.mts.map +1 -1
- package/resources/simulation-run-plan-job.d.ts +24 -7
- package/resources/simulation-run-plan-job.d.ts.map +1 -1
- package/resources/simulation-run-plan.d.mts +31 -1
- package/resources/simulation-run-plan.d.mts.map +1 -1
- package/resources/simulation-run-plan.d.ts +31 -1
- package/resources/simulation-run-plan.d.ts.map +1 -1
- package/resources/webhook.d.mts +4 -4
- package/resources/webhook.d.mts.map +1 -1
- package/resources/webhook.d.ts +4 -4
- package/resources/webhook.d.ts.map +1 -1
- package/src/client.ts +56 -2
- package/src/resources/index.ts +25 -1
- package/src/resources/metric-collection-job.ts +307 -0
- package/src/resources/metric-policy.ts +679 -0
- package/src/resources/metric.ts +232 -1
- package/src/resources/simulation-job.ts +42 -2
- package/src/resources/simulation-persona.ts +126 -6
- package/src/resources/simulation-run-plan-job.ts +32 -6
- package/src/resources/simulation-run-plan.ts +38 -1
- package/src/resources/webhook.ts +4 -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/src/resources/metric.ts
CHANGED
|
@@ -5,16 +5,112 @@ import { APIPromise } from '../core/api-promise';
|
|
|
5
5
|
import { RequestOptions } from '../internal/request-options';
|
|
6
6
|
|
|
7
7
|
export class Metric extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create a new custom metric definition. The metric will be added to the specified
|
|
10
|
+
* analysis package and can be used for evaluating calls.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const response = await client.metric.createDefinition({
|
|
15
|
+
* analysisPackageId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
16
|
+
* name: 'Customer Satisfaction',
|
|
17
|
+
* outputType: 'BOOLEAN',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
createDefinition(
|
|
22
|
+
body: MetricCreateDefinitionParams,
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): APIPromise<MetricCreateDefinitionResponse> {
|
|
25
|
+
return this._client.post('/v1/metric/definitions', { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
|
|
8
28
|
/**
|
|
9
29
|
* Fetch all metric definitions available in the project, including both
|
|
10
30
|
* system-generated and custom metrics. Only returns metrics from enabled analysis
|
|
11
31
|
* packages.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const response = await client.metric.listDefinitions();
|
|
36
|
+
* ```
|
|
12
37
|
*/
|
|
13
38
|
listDefinitions(options?: RequestOptions): APIPromise<MetricListDefinitionsResponse> {
|
|
14
39
|
return this._client.get('/v1/metric/definitions', options);
|
|
15
40
|
}
|
|
16
41
|
}
|
|
17
42
|
|
|
43
|
+
export interface MetricCreateDefinitionResponse {
|
|
44
|
+
/**
|
|
45
|
+
* Metric definition data
|
|
46
|
+
*/
|
|
47
|
+
data: MetricCreateDefinitionResponse.Data;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export namespace MetricCreateDefinitionResponse {
|
|
51
|
+
/**
|
|
52
|
+
* Metric definition data
|
|
53
|
+
*/
|
|
54
|
+
export interface Data {
|
|
55
|
+
/**
|
|
56
|
+
* Unique identifier for the metric definition
|
|
57
|
+
*/
|
|
58
|
+
id: string;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Description of what the metric measures
|
|
62
|
+
*/
|
|
63
|
+
description: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Stable metric identifier (e.g. "call_reason", "customer_satisfaction")
|
|
67
|
+
*/
|
|
68
|
+
metricId: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Name of the metric
|
|
72
|
+
*/
|
|
73
|
+
name: string;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Whether metric is global or per-participant
|
|
77
|
+
*/
|
|
78
|
+
scope: 'GLOBAL' | 'PER_PARTICIPANT';
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Which levels this metric can produce values at
|
|
82
|
+
*/
|
|
83
|
+
supportedContexts: Array<'CALL' | 'SEGMENT' | 'TURN'>;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Type of value this metric produces
|
|
87
|
+
*/
|
|
88
|
+
type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET';
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Unit information if applicable
|
|
92
|
+
*/
|
|
93
|
+
unit?: Data.Unit;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export namespace Data {
|
|
97
|
+
/**
|
|
98
|
+
* Unit information if applicable
|
|
99
|
+
*/
|
|
100
|
+
export interface Unit {
|
|
101
|
+
/**
|
|
102
|
+
* Name of the unit
|
|
103
|
+
*/
|
|
104
|
+
name: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Symbol for the unit
|
|
108
|
+
*/
|
|
109
|
+
symbol: string | null;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
18
114
|
export interface MetricListDefinitionsResponse {
|
|
19
115
|
/**
|
|
20
116
|
* Metrics response payload
|
|
@@ -86,6 +182,141 @@ export namespace MetricListDefinitionsResponse {
|
|
|
86
182
|
}
|
|
87
183
|
}
|
|
88
184
|
|
|
185
|
+
export interface MetricCreateDefinitionParams {
|
|
186
|
+
/**
|
|
187
|
+
* ID of the analysis package to add this metric to
|
|
188
|
+
*/
|
|
189
|
+
analysisPackageId: string;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Name of the metric
|
|
193
|
+
*/
|
|
194
|
+
name: string;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Type of value this metric produces
|
|
198
|
+
*/
|
|
199
|
+
outputType: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET';
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Label for the false/negative case (only for BOOLEAN type)
|
|
203
|
+
*/
|
|
204
|
+
booleanFalseLabel?: string;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Label for the true/positive case (only for BOOLEAN type)
|
|
208
|
+
*/
|
|
209
|
+
booleanTrueLabel?: string;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Options for classification. Required for CLASSIFICATION type.
|
|
213
|
+
*/
|
|
214
|
+
classificationOptions?: Array<MetricCreateDefinitionParams.ClassificationOption>;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* LLM prompt/criteria for evaluating this metric. Used to instruct the model on
|
|
218
|
+
* how to score. Required for BOOLEAN, NUMERIC, TEXT, and SCALE types.
|
|
219
|
+
*/
|
|
220
|
+
llmPrompt?: string;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Maximum number of classifications that can be selected (only for CLASSIFICATION
|
|
224
|
+
* type)
|
|
225
|
+
*/
|
|
226
|
+
maxClassifications?: number;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Unique identifier for the metric (e.g. "customer_satisfaction"). Auto-generated
|
|
230
|
+
* from name if not provided.
|
|
231
|
+
*/
|
|
232
|
+
metricId?: string;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Participant role to evaluate. Required when scope is PER_PARTICIPANT.
|
|
236
|
+
*/
|
|
237
|
+
participantRole?: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER';
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Labels for scale ranges (only for SCALE type)
|
|
241
|
+
*/
|
|
242
|
+
scaleLabels?: Array<MetricCreateDefinitionParams.ScaleLabel>;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Maximum value for scale. Required for SCALE type.
|
|
246
|
+
*/
|
|
247
|
+
scaleMax?: number;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Minimum value for scale. Required for SCALE type.
|
|
251
|
+
*/
|
|
252
|
+
scaleMin?: number;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Whether metric is global or per-participant (default: GLOBAL)
|
|
256
|
+
*/
|
|
257
|
+
scope?: 'GLOBAL' | 'PER_PARTICIPANT';
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Which levels this metric can produce values at (default: ["CALL"])
|
|
261
|
+
*/
|
|
262
|
+
supportedContexts?: Array<'CALL' | 'SEGMENT' | 'TURN'>;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export namespace MetricCreateDefinitionParams {
|
|
266
|
+
export interface ClassificationOption {
|
|
267
|
+
/**
|
|
268
|
+
* Description of what this option means
|
|
269
|
+
*/
|
|
270
|
+
description: string;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Display order of this option
|
|
274
|
+
*/
|
|
275
|
+
displayOrder: number;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Label for this classification option
|
|
279
|
+
*/
|
|
280
|
+
label: string;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export interface ScaleLabel {
|
|
284
|
+
/**
|
|
285
|
+
* Display order of this label
|
|
286
|
+
*/
|
|
287
|
+
displayOrder: number;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Label for this range
|
|
291
|
+
*/
|
|
292
|
+
label: string;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Maximum value for this label range
|
|
296
|
+
*/
|
|
297
|
+
rangeMax: number;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Minimum value for this label range
|
|
301
|
+
*/
|
|
302
|
+
rangeMin: number;
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Hex color code for this label (e.g. "#FF0000")
|
|
306
|
+
*/
|
|
307
|
+
colorHex?: string;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Description of what this range means
|
|
311
|
+
*/
|
|
312
|
+
description?: string;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
89
316
|
export declare namespace Metric {
|
|
90
|
-
export {
|
|
317
|
+
export {
|
|
318
|
+
type MetricCreateDefinitionResponse as MetricCreateDefinitionResponse,
|
|
319
|
+
type MetricListDefinitionsResponse as MetricListDefinitionsResponse,
|
|
320
|
+
type MetricCreateDefinitionParams as MetricCreateDefinitionParams,
|
|
321
|
+
};
|
|
91
322
|
}
|
|
@@ -191,13 +191,33 @@ export namespace SimulationJobGetByIDResponse {
|
|
|
191
191
|
/**
|
|
192
192
|
* Gender of the persona
|
|
193
193
|
*/
|
|
194
|
-
gender: 'MALE' | 'FEMALE'
|
|
194
|
+
gender: 'MALE' | 'FEMALE';
|
|
195
195
|
|
|
196
196
|
/**
|
|
197
197
|
* Whether the persona uses filler words like "um" and "uh"
|
|
198
198
|
*/
|
|
199
199
|
hasDisfluencies: boolean;
|
|
200
200
|
|
|
201
|
+
/**
|
|
202
|
+
* Maximum number of idle messages the persona will send before giving up
|
|
203
|
+
*/
|
|
204
|
+
idleMessageMaxSpokenCount: number;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Whether the idle message counter resets when the agent speaks
|
|
208
|
+
*/
|
|
209
|
+
idleMessageResetCountOnUserSpeechEnabled: boolean;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Messages the persona will say when the agent goes silent during a call
|
|
213
|
+
*/
|
|
214
|
+
idleMessages: Array<string>;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Seconds of silence before the persona sends an idle message
|
|
218
|
+
*/
|
|
219
|
+
idleTimeoutSeconds: number;
|
|
220
|
+
|
|
201
221
|
/**
|
|
202
222
|
* How clearly the persona expresses their intentions
|
|
203
223
|
*/
|
|
@@ -428,13 +448,33 @@ export namespace SimulationJobLookupResponse {
|
|
|
428
448
|
/**
|
|
429
449
|
* Gender of the persona
|
|
430
450
|
*/
|
|
431
|
-
gender: 'MALE' | 'FEMALE'
|
|
451
|
+
gender: 'MALE' | 'FEMALE';
|
|
432
452
|
|
|
433
453
|
/**
|
|
434
454
|
* Whether the persona uses filler words like "um" and "uh"
|
|
435
455
|
*/
|
|
436
456
|
hasDisfluencies: boolean;
|
|
437
457
|
|
|
458
|
+
/**
|
|
459
|
+
* Maximum number of idle messages the persona will send before giving up
|
|
460
|
+
*/
|
|
461
|
+
idleMessageMaxSpokenCount: number;
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Whether the idle message counter resets when the agent speaks
|
|
465
|
+
*/
|
|
466
|
+
idleMessageResetCountOnUserSpeechEnabled: boolean;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Messages the persona will say when the agent goes silent during a call
|
|
470
|
+
*/
|
|
471
|
+
idleMessages: Array<string>;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Seconds of silence before the persona sends an idle message
|
|
475
|
+
*/
|
|
476
|
+
idleTimeoutSeconds: number;
|
|
477
|
+
|
|
438
478
|
/**
|
|
439
479
|
* How clearly the persona expresses their intentions
|
|
440
480
|
*/
|
|
@@ -138,13 +138,33 @@ export namespace SimulationPersonaCreateResponse {
|
|
|
138
138
|
/**
|
|
139
139
|
* Gender of the persona
|
|
140
140
|
*/
|
|
141
|
-
gender: 'MALE' | 'FEMALE'
|
|
141
|
+
gender: 'MALE' | 'FEMALE';
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
144
|
* Whether the persona uses filler words like "um" and "uh"
|
|
145
145
|
*/
|
|
146
146
|
hasDisfluencies: boolean;
|
|
147
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Maximum number of idle messages the persona will send before giving up
|
|
150
|
+
*/
|
|
151
|
+
idleMessageMaxSpokenCount: number;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Whether the idle message counter resets when the agent speaks
|
|
155
|
+
*/
|
|
156
|
+
idleMessageResetCountOnUserSpeechEnabled: boolean;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Messages the persona will say when the agent goes silent during a call
|
|
160
|
+
*/
|
|
161
|
+
idleMessages: Array<string>;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Seconds of silence before the persona sends an idle message
|
|
165
|
+
*/
|
|
166
|
+
idleTimeoutSeconds: number;
|
|
167
|
+
|
|
148
168
|
/**
|
|
149
169
|
* How clearly the persona expresses their intentions
|
|
150
170
|
*/
|
|
@@ -271,13 +291,33 @@ export namespace SimulationPersonaUpdateResponse {
|
|
|
271
291
|
/**
|
|
272
292
|
* Gender of the persona
|
|
273
293
|
*/
|
|
274
|
-
gender: 'MALE' | 'FEMALE'
|
|
294
|
+
gender: 'MALE' | 'FEMALE';
|
|
275
295
|
|
|
276
296
|
/**
|
|
277
297
|
* Whether the persona uses filler words like "um" and "uh"
|
|
278
298
|
*/
|
|
279
299
|
hasDisfluencies: boolean;
|
|
280
300
|
|
|
301
|
+
/**
|
|
302
|
+
* Maximum number of idle messages the persona will send before giving up
|
|
303
|
+
*/
|
|
304
|
+
idleMessageMaxSpokenCount: number;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Whether the idle message counter resets when the agent speaks
|
|
308
|
+
*/
|
|
309
|
+
idleMessageResetCountOnUserSpeechEnabled: boolean;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Messages the persona will say when the agent goes silent during a call
|
|
313
|
+
*/
|
|
314
|
+
idleMessages: Array<string>;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Seconds of silence before the persona sends an idle message
|
|
318
|
+
*/
|
|
319
|
+
idleTimeoutSeconds: number;
|
|
320
|
+
|
|
281
321
|
/**
|
|
282
322
|
* How clearly the persona expresses their intentions
|
|
283
323
|
*/
|
|
@@ -406,13 +446,33 @@ export namespace SimulationPersonaListResponse {
|
|
|
406
446
|
/**
|
|
407
447
|
* Gender of the persona
|
|
408
448
|
*/
|
|
409
|
-
gender: 'MALE' | 'FEMALE'
|
|
449
|
+
gender: 'MALE' | 'FEMALE';
|
|
410
450
|
|
|
411
451
|
/**
|
|
412
452
|
* Whether the persona uses filler words like "um" and "uh"
|
|
413
453
|
*/
|
|
414
454
|
hasDisfluencies: boolean;
|
|
415
455
|
|
|
456
|
+
/**
|
|
457
|
+
* Maximum number of idle messages the persona will send before giving up
|
|
458
|
+
*/
|
|
459
|
+
idleMessageMaxSpokenCount: number;
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Whether the idle message counter resets when the agent speaks
|
|
463
|
+
*/
|
|
464
|
+
idleMessageResetCountOnUserSpeechEnabled: boolean;
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Messages the persona will say when the agent goes silent during a call
|
|
468
|
+
*/
|
|
469
|
+
idleMessages: Array<string>;
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Seconds of silence before the persona sends an idle message
|
|
473
|
+
*/
|
|
474
|
+
idleTimeoutSeconds: number;
|
|
475
|
+
|
|
416
476
|
/**
|
|
417
477
|
* How clearly the persona expresses their intentions
|
|
418
478
|
*/
|
|
@@ -556,13 +616,33 @@ export namespace SimulationPersonaGetByIDResponse {
|
|
|
556
616
|
/**
|
|
557
617
|
* Gender of the persona
|
|
558
618
|
*/
|
|
559
|
-
gender: 'MALE' | 'FEMALE'
|
|
619
|
+
gender: 'MALE' | 'FEMALE';
|
|
560
620
|
|
|
561
621
|
/**
|
|
562
622
|
* Whether the persona uses filler words like "um" and "uh"
|
|
563
623
|
*/
|
|
564
624
|
hasDisfluencies: boolean;
|
|
565
625
|
|
|
626
|
+
/**
|
|
627
|
+
* Maximum number of idle messages the persona will send before giving up
|
|
628
|
+
*/
|
|
629
|
+
idleMessageMaxSpokenCount: number;
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* Whether the idle message counter resets when the agent speaks
|
|
633
|
+
*/
|
|
634
|
+
idleMessageResetCountOnUserSpeechEnabled: boolean;
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* Messages the persona will say when the agent goes silent during a call
|
|
638
|
+
*/
|
|
639
|
+
idleMessages: Array<string>;
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Seconds of silence before the persona sends an idle message
|
|
643
|
+
*/
|
|
644
|
+
idleTimeoutSeconds: number;
|
|
645
|
+
|
|
566
646
|
/**
|
|
567
647
|
* How clearly the persona expresses their intentions
|
|
568
648
|
*/
|
|
@@ -651,7 +731,7 @@ export interface SimulationPersonaCreateParams {
|
|
|
651
731
|
/**
|
|
652
732
|
* Gender of the persona
|
|
653
733
|
*/
|
|
654
|
-
gender: 'MALE' | 'FEMALE'
|
|
734
|
+
gender: 'MALE' | 'FEMALE';
|
|
655
735
|
|
|
656
736
|
/**
|
|
657
737
|
* Primary language ISO 639-1 code for the persona
|
|
@@ -701,6 +781,26 @@ export interface SimulationPersonaCreateParams {
|
|
|
701
781
|
*/
|
|
702
782
|
hasDisfluencies?: boolean;
|
|
703
783
|
|
|
784
|
+
/**
|
|
785
|
+
* Maximum number of idle messages the persona will send before giving up
|
|
786
|
+
*/
|
|
787
|
+
idleMessageMaxSpokenCount?: number;
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* Whether the idle message counter resets when the agent speaks
|
|
791
|
+
*/
|
|
792
|
+
idleMessageResetCountOnUserSpeechEnabled?: boolean;
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* Messages the persona will say when the agent goes silent during a call
|
|
796
|
+
*/
|
|
797
|
+
idleMessages?: Array<string>;
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Seconds of silence before the persona sends an idle message
|
|
801
|
+
*/
|
|
802
|
+
idleTimeoutSeconds?: number;
|
|
803
|
+
|
|
704
804
|
/**
|
|
705
805
|
* How clearly the persona expresses their intentions
|
|
706
806
|
*/
|
|
@@ -796,13 +896,33 @@ export interface SimulationPersonaUpdateParams {
|
|
|
796
896
|
/**
|
|
797
897
|
* Gender of the persona
|
|
798
898
|
*/
|
|
799
|
-
gender?: 'MALE' | 'FEMALE'
|
|
899
|
+
gender?: 'MALE' | 'FEMALE';
|
|
800
900
|
|
|
801
901
|
/**
|
|
802
902
|
* Whether the persona uses filler words like "um" and "uh"
|
|
803
903
|
*/
|
|
804
904
|
hasDisfluencies?: boolean;
|
|
805
905
|
|
|
906
|
+
/**
|
|
907
|
+
* Maximum number of idle messages the persona will send before giving up
|
|
908
|
+
*/
|
|
909
|
+
idleMessageMaxSpokenCount?: number;
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* Whether the idle message counter resets when the agent speaks
|
|
913
|
+
*/
|
|
914
|
+
idleMessageResetCountOnUserSpeechEnabled?: boolean;
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* Messages the persona will say when the agent goes silent during a call
|
|
918
|
+
*/
|
|
919
|
+
idleMessages?: Array<string>;
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* Seconds of silence before the persona sends an idle message
|
|
923
|
+
*/
|
|
924
|
+
idleTimeoutSeconds?: number;
|
|
925
|
+
|
|
806
926
|
/**
|
|
807
927
|
* How clearly the persona expresses their intentions
|
|
808
928
|
*/
|
|
@@ -97,7 +97,8 @@ export namespace SimulationRunPlanJobListResponse {
|
|
|
97
97
|
| 'FAILED'
|
|
98
98
|
| 'TIMED_OUT'
|
|
99
99
|
| 'CANCELLED'
|
|
100
|
-
| 'CANCELLING'
|
|
100
|
+
| 'CANCELLING'
|
|
101
|
+
| 'ENDING_SIMULATIONS';
|
|
101
102
|
|
|
102
103
|
/**
|
|
103
104
|
* How the job was triggered (SCHEDULED, USER_TRIGGERED_FROM_UI,
|
|
@@ -179,7 +180,8 @@ export namespace SimulationRunPlanJobGetByIDResponse {
|
|
|
179
180
|
| 'FAILED'
|
|
180
181
|
| 'TIMED_OUT'
|
|
181
182
|
| 'CANCELLED'
|
|
182
|
-
| 'CANCELLING'
|
|
183
|
+
| 'CANCELLING'
|
|
184
|
+
| 'ENDING_SIMULATIONS';
|
|
183
185
|
|
|
184
186
|
/**
|
|
185
187
|
* When the job ended
|
|
@@ -213,6 +215,7 @@ export namespace SimulationRunPlanJobGetByIDResponse {
|
|
|
213
215
|
| 'CONNECTING'
|
|
214
216
|
| 'WAITING_FOR_OUTBOUND_CALL'
|
|
215
217
|
| 'SIMULATING'
|
|
218
|
+
| 'ENDING'
|
|
216
219
|
| 'ANALYZING'
|
|
217
220
|
| 'EVALUATING'
|
|
218
221
|
| 'COLLECTING_METRICS'
|
|
@@ -348,13 +351,33 @@ export namespace SimulationRunPlanJobGetByIDResponse {
|
|
|
348
351
|
/**
|
|
349
352
|
* Gender of the persona
|
|
350
353
|
*/
|
|
351
|
-
gender: 'MALE' | 'FEMALE'
|
|
354
|
+
gender: 'MALE' | 'FEMALE';
|
|
352
355
|
|
|
353
356
|
/**
|
|
354
357
|
* Whether the persona uses filler words like "um" and "uh"
|
|
355
358
|
*/
|
|
356
359
|
hasDisfluencies: boolean;
|
|
357
360
|
|
|
361
|
+
/**
|
|
362
|
+
* Maximum number of idle messages the persona will send before giving up
|
|
363
|
+
*/
|
|
364
|
+
idleMessageMaxSpokenCount: number;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Whether the idle message counter resets when the agent speaks
|
|
368
|
+
*/
|
|
369
|
+
idleMessageResetCountOnUserSpeechEnabled: boolean;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Messages the persona will say when the agent goes silent during a call
|
|
373
|
+
*/
|
|
374
|
+
idleMessages: Array<string>;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Seconds of silence before the persona sends an idle message
|
|
378
|
+
*/
|
|
379
|
+
idleTimeoutSeconds: number;
|
|
380
|
+
|
|
358
381
|
/**
|
|
359
382
|
* How clearly the persona expresses their intentions
|
|
360
383
|
*/
|
|
@@ -475,7 +498,8 @@ export namespace SimulationRunPlanJobStartResponse {
|
|
|
475
498
|
| 'FAILED'
|
|
476
499
|
| 'TIMED_OUT'
|
|
477
500
|
| 'CANCELLED'
|
|
478
|
-
| 'CANCELLING'
|
|
501
|
+
| 'CANCELLING'
|
|
502
|
+
| 'ENDING_SIMULATIONS';
|
|
479
503
|
}
|
|
480
504
|
}
|
|
481
505
|
|
|
@@ -508,7 +532,8 @@ export interface SimulationRunPlanJobListParams {
|
|
|
508
532
|
|
|
509
533
|
/**
|
|
510
534
|
* Filter by plan job status (PENDING, CREATING_SNAPSHOTS, CREATING_SIMULATIONS,
|
|
511
|
-
* RUNNING_SIMULATIONS, COMPLETED, FAILED, TIMED_OUT,
|
|
535
|
+
* RUNNING_SIMULATIONS, ENDING_SIMULATIONS, COMPLETED, FAILED, TIMED_OUT,
|
|
536
|
+
* CANCELLED, CANCELLING)
|
|
512
537
|
*/
|
|
513
538
|
status?:
|
|
514
539
|
| 'PENDING'
|
|
@@ -520,7 +545,8 @@ export interface SimulationRunPlanJobListParams {
|
|
|
520
545
|
| 'FAILED'
|
|
521
546
|
| 'TIMED_OUT'
|
|
522
547
|
| 'CANCELLED'
|
|
523
|
-
| 'CANCELLING'
|
|
548
|
+
| 'CANCELLING'
|
|
549
|
+
| 'ENDING_SIMULATIONS';
|
|
524
550
|
}
|
|
525
551
|
|
|
526
552
|
export interface SimulationRunPlanJobStartParams {
|
|
@@ -158,6 +158,12 @@ export namespace SimulationRunPlanCreateResponse {
|
|
|
158
158
|
*/
|
|
159
159
|
endCallPhrases: Array<string>;
|
|
160
160
|
|
|
161
|
+
/**
|
|
162
|
+
* Semantic conditions that trigger end of call. The LLM evaluates the conversation
|
|
163
|
+
* against these conditions. Empty array means disabled.
|
|
164
|
+
*/
|
|
165
|
+
endCallReasons: Array<string>;
|
|
166
|
+
|
|
161
167
|
/**
|
|
162
168
|
* Deprecated: Use metrics instead. Evaluators included in this run plan.
|
|
163
169
|
*/
|
|
@@ -278,7 +284,8 @@ export namespace SimulationRunPlanCreateResponse {
|
|
|
278
284
|
| 'FAILED'
|
|
279
285
|
| 'TIMED_OUT'
|
|
280
286
|
| 'CANCELLED'
|
|
281
|
-
| 'CANCELLING'
|
|
287
|
+
| 'CANCELLING'
|
|
288
|
+
| 'ENDING_SIMULATIONS';
|
|
282
289
|
}
|
|
283
290
|
}
|
|
284
291
|
}
|
|
@@ -320,6 +327,12 @@ export namespace SimulationRunPlanUpdateResponse {
|
|
|
320
327
|
*/
|
|
321
328
|
endCallPhrases: Array<string>;
|
|
322
329
|
|
|
330
|
+
/**
|
|
331
|
+
* Semantic conditions that trigger end of call. The LLM evaluates the conversation
|
|
332
|
+
* against these conditions. Empty array means disabled.
|
|
333
|
+
*/
|
|
334
|
+
endCallReasons: Array<string>;
|
|
335
|
+
|
|
323
336
|
/**
|
|
324
337
|
* Deprecated: Use metrics instead. Evaluators included in this run plan.
|
|
325
338
|
*/
|
|
@@ -448,6 +461,12 @@ export namespace SimulationRunPlanListResponse {
|
|
|
448
461
|
*/
|
|
449
462
|
endCallPhrases: Array<string>;
|
|
450
463
|
|
|
464
|
+
/**
|
|
465
|
+
* Semantic conditions that trigger end of call. The LLM evaluates the conversation
|
|
466
|
+
* against these conditions. Empty array means disabled.
|
|
467
|
+
*/
|
|
468
|
+
endCallReasons: Array<string>;
|
|
469
|
+
|
|
451
470
|
/**
|
|
452
471
|
* Deprecated: Use metrics instead. Evaluators included in this run plan.
|
|
453
472
|
*/
|
|
@@ -604,6 +623,12 @@ export namespace SimulationRunPlanGetByIDResponse {
|
|
|
604
623
|
*/
|
|
605
624
|
endCallPhrases: Array<string>;
|
|
606
625
|
|
|
626
|
+
/**
|
|
627
|
+
* Semantic conditions that trigger end of call. The LLM evaluates the conversation
|
|
628
|
+
* against these conditions. Empty array means disabled.
|
|
629
|
+
*/
|
|
630
|
+
endCallReasons: Array<string>;
|
|
631
|
+
|
|
607
632
|
/**
|
|
608
633
|
* Deprecated: Use metrics instead. Evaluators included in this run plan.
|
|
609
634
|
*/
|
|
@@ -745,6 +770,12 @@ export interface SimulationRunPlanCreateParams {
|
|
|
745
770
|
*/
|
|
746
771
|
endCallPhrases?: Array<string>;
|
|
747
772
|
|
|
773
|
+
/**
|
|
774
|
+
* Semantic conditions that trigger end of call. The LLM evaluates the conversation
|
|
775
|
+
* against these conditions. Empty array disables the feature.
|
|
776
|
+
*/
|
|
777
|
+
endCallReasons?: Array<string>;
|
|
778
|
+
|
|
748
779
|
/**
|
|
749
780
|
* Execution mode (PARALLEL or SEQUENTIAL)
|
|
750
781
|
*/
|
|
@@ -815,6 +846,12 @@ export interface SimulationRunPlanUpdateParams {
|
|
|
815
846
|
*/
|
|
816
847
|
endCallPhrases?: Array<string>;
|
|
817
848
|
|
|
849
|
+
/**
|
|
850
|
+
* Semantic conditions that trigger end of call. The LLM evaluates the conversation
|
|
851
|
+
* against these conditions. Empty array disables the feature.
|
|
852
|
+
*/
|
|
853
|
+
endCallReasons?: Array<string>;
|
|
854
|
+
|
|
818
855
|
/**
|
|
819
856
|
* Execution mode (PARALLEL or SEQUENTIAL)
|
|
820
857
|
*/
|