@roarkanalytics/sdk 5.23.0 → 6.0.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 +28 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/lib/config.d.mts +2 -0
- package/lib/config.d.mts.map +1 -1
- package/lib/config.d.ts +2 -0
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +7 -1
- package/lib/config.js.map +1 -1
- package/lib/config.mjs +5 -0
- package/lib/config.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent-draft.d.mts +701 -275
- package/resources/agent-draft.d.mts.map +1 -1
- package/resources/agent-draft.d.ts +701 -275
- package/resources/agent-draft.d.ts.map +1 -1
- package/resources/agent-draft.js +1 -1
- package/resources/agent-draft.js.map +1 -1
- package/resources/agent-draft.mjs +1 -1
- package/resources/agent-draft.mjs.map +1 -1
- package/resources/agent-version.d.mts +404 -168
- package/resources/agent-version.d.mts.map +1 -1
- package/resources/agent-version.d.ts +404 -168
- package/resources/agent-version.d.ts.map +1 -1
- package/resources/agent-version.js +8 -9
- package/resources/agent-version.js.map +1 -1
- package/resources/agent-version.mjs +8 -9
- package/resources/agent-version.mjs.map +1 -1
- package/resources/agent.d.mts +39 -0
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +39 -0
- package/resources/agent.d.ts.map +1 -1
- package/resources/config.d.mts +114 -30
- package/resources/config.d.mts.map +1 -1
- package/resources/config.d.ts +114 -30
- package/resources/config.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/src/client.ts +4 -4
- package/src/lib/config.ts +9 -0
- package/src/resources/agent-draft.ts +876 -384
- package/src/resources/agent-version.ts +495 -226
- package/src/resources/agent.ts +46 -0
- package/src/resources/config.ts +390 -24
- package/src/resources/index.ts +2 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -46,28 +46,27 @@ export class AgentVersion extends APIResource {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* `
|
|
54
|
-
* another version went live since you read it.
|
|
49
|
+
* Publishes a new version, numbered after the latest, with this version's settings
|
|
50
|
+
* and makes it live. History stays append-only. An open draft started before this
|
|
51
|
+
* is kept but can no longer be published (409 `agent_draft_base_changed`); discard
|
|
52
|
+
* it or start a new one. Pass `expectedLiveVersionId` to be refused (409
|
|
53
|
+
* `agent_live_version_changed`) if another version went live since you read it.
|
|
55
54
|
*
|
|
56
55
|
* @example
|
|
57
56
|
* ```ts
|
|
58
|
-
* const response = await client.agentVersion.
|
|
57
|
+
* const response = await client.agentVersion.rollback(
|
|
59
58
|
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
60
59
|
* { agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
|
|
61
60
|
* );
|
|
62
61
|
* ```
|
|
63
62
|
*/
|
|
64
|
-
|
|
63
|
+
rollback(
|
|
65
64
|
versionID: string,
|
|
66
|
-
params:
|
|
65
|
+
params: AgentVersionRollbackParams,
|
|
67
66
|
options?: RequestOptions,
|
|
68
|
-
): APIPromise<
|
|
67
|
+
): APIPromise<AgentVersionRollbackResponse> {
|
|
69
68
|
const { agentId, ...body } = params;
|
|
70
|
-
return this._client.post(path`/v1/agent/${agentId}/versions/${versionID}/
|
|
69
|
+
return this._client.post(path`/v1/agent/${agentId}/versions/${versionID}/rollback`, { body, ...options });
|
|
71
70
|
}
|
|
72
71
|
}
|
|
73
72
|
|
|
@@ -175,30 +174,6 @@ export namespace AgentVersionListResponse {
|
|
|
175
174
|
*/
|
|
176
175
|
language: string | null;
|
|
177
176
|
|
|
178
|
-
/**
|
|
179
|
-
* OpenAI Live models only: the text model they delegate to.
|
|
180
|
-
*/
|
|
181
|
-
llmBackendModel: string | null;
|
|
182
|
-
|
|
183
|
-
llmMaxTokens: number | null;
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Any model id the provider accepts. One model serves every speaker.
|
|
187
|
-
*/
|
|
188
|
-
llmModel: string | null;
|
|
189
|
-
|
|
190
|
-
llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* 0 to 2.
|
|
194
|
-
*/
|
|
195
|
-
llmTemperature: number | null;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Speech-to-speech models only: the model's own voice.
|
|
199
|
-
*/
|
|
200
|
-
llmVoice: string | null;
|
|
201
|
-
|
|
202
177
|
/**
|
|
203
178
|
* Whether the agent takes calls, chats, or both.
|
|
204
179
|
*/
|
|
@@ -213,11 +188,6 @@ export namespace AgentVersionListResponse {
|
|
|
213
188
|
|
|
214
189
|
publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
|
|
215
190
|
|
|
216
|
-
/**
|
|
217
|
-
* Set when this version restores an older one.
|
|
218
|
-
*/
|
|
219
|
-
restoredFromVersionId: string | null;
|
|
220
|
-
|
|
221
191
|
/**
|
|
222
192
|
* Increases with every edit to a draft. Send it back as expectedRevision when you
|
|
223
193
|
* publish.
|
|
@@ -225,24 +195,14 @@ export namespace AgentVersionListResponse {
|
|
|
225
195
|
revision: number;
|
|
226
196
|
|
|
227
197
|
/**
|
|
228
|
-
*
|
|
198
|
+
* Set when this version rolls the agent back to an older one.
|
|
229
199
|
*/
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
sttEndpointingMs: number | null;
|
|
200
|
+
rolledBackFromVersionId: string | null;
|
|
233
201
|
|
|
234
202
|
/**
|
|
235
|
-
*
|
|
203
|
+
* DRAFT while being edited, PUBLISHED once it has been live.
|
|
236
204
|
*/
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
sttModel: string | null;
|
|
240
|
-
|
|
241
|
-
sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
242
|
-
|
|
243
|
-
sttSmartFormat: boolean | null;
|
|
244
|
-
|
|
245
|
-
sttTurnDetection: 'pipeline' | 'provider' | null;
|
|
205
|
+
status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
|
|
246
206
|
|
|
247
207
|
/**
|
|
248
208
|
* The main agent (key `main`) first, then the sub-agents it can hand the call to.
|
|
@@ -277,8 +237,8 @@ export namespace AgentVersionListResponse {
|
|
|
277
237
|
|
|
278
238
|
export namespace Data {
|
|
279
239
|
/**
|
|
280
|
-
* A speaker in the conversation.
|
|
281
|
-
* agent's.
|
|
240
|
+
* A speaker in the conversation. A sub-agent without model configs runs on the
|
|
241
|
+
* main agent's.
|
|
282
242
|
*/
|
|
283
243
|
export interface SubAgent {
|
|
284
244
|
handoffs: Array<SubAgent.Handoff>;
|
|
@@ -293,6 +253,12 @@ export namespace AgentVersionListResponse {
|
|
|
293
253
|
*/
|
|
294
254
|
key: string;
|
|
295
255
|
|
|
256
|
+
/**
|
|
257
|
+
* Up to three, in the order a call tries them. Empty on a sub-agent: it runs on
|
|
258
|
+
* the main agent's. The main agent needs one.
|
|
259
|
+
*/
|
|
260
|
+
modelConfigs: Array<SubAgent.AgentCascadeModelConfig | SubAgent.AgentSpeechToSpeechModelConfig>;
|
|
261
|
+
|
|
296
262
|
/**
|
|
297
263
|
* How the agent refers to this speaker.
|
|
298
264
|
*/
|
|
@@ -304,30 +270,6 @@ export namespace AgentVersionListResponse {
|
|
|
304
270
|
systemPrompt: string | null;
|
|
305
271
|
|
|
306
272
|
tools: Array<SubAgent.Tool>;
|
|
307
|
-
|
|
308
|
-
ttsModel: string | null;
|
|
309
|
-
|
|
310
|
-
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* 0 to 1, ElevenLabs.
|
|
314
|
-
*/
|
|
315
|
-
ttsSimilarityBoost: number | null;
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* 0.5 to 2.
|
|
319
|
-
*/
|
|
320
|
-
ttsSpeed: number | null;
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* 0 to 1, ElevenLabs.
|
|
324
|
-
*/
|
|
325
|
-
ttsStability: number | null;
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Any voice id the provider accepts, including your own voices.
|
|
329
|
-
*/
|
|
330
|
-
ttsVoiceId: string | null;
|
|
331
273
|
}
|
|
332
274
|
|
|
333
275
|
export namespace SubAgent {
|
|
@@ -358,6 +300,153 @@ export namespace AgentVersionListResponse {
|
|
|
358
300
|
to: string;
|
|
359
301
|
}
|
|
360
302
|
|
|
303
|
+
/**
|
|
304
|
+
* A transcriber, a text model and a voice. A component that fails during a call
|
|
305
|
+
* moves to its next entry; the others stay.
|
|
306
|
+
*/
|
|
307
|
+
export interface AgentCascadeModelConfig {
|
|
308
|
+
/**
|
|
309
|
+
* One to three text models, in the order a call tries them.
|
|
310
|
+
*/
|
|
311
|
+
llm: Array<AgentCascadeModelConfig.Llm>;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* One to three transcribers, in the order a call tries them.
|
|
315
|
+
*/
|
|
316
|
+
stt: Array<AgentCascadeModelConfig.Stt>;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* One to three voices, in the order a call tries them.
|
|
320
|
+
*/
|
|
321
|
+
tts: Array<AgentCascadeModelConfig.Tt>;
|
|
322
|
+
|
|
323
|
+
type: 'CASCADE';
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
export namespace AgentCascadeModelConfig {
|
|
327
|
+
/**
|
|
328
|
+
* A text model. Null settings use the default.
|
|
329
|
+
*/
|
|
330
|
+
export interface Llm {
|
|
331
|
+
maxTokens: number | null;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Any text model id the provider accepts.
|
|
335
|
+
*/
|
|
336
|
+
model: string;
|
|
337
|
+
|
|
338
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* 0 to 2.
|
|
342
|
+
*/
|
|
343
|
+
temperature: number | null;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* A transcriber. Null settings use the default.
|
|
348
|
+
*/
|
|
349
|
+
export interface Stt {
|
|
350
|
+
/**
|
|
351
|
+
* How long the transcriber waits before it ends a turn.
|
|
352
|
+
*/
|
|
353
|
+
endpointingMs: number | null;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Words and phrases the transcriber should listen for.
|
|
357
|
+
*/
|
|
358
|
+
keyterms: Array<string>;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Any transcriber model id the provider accepts.
|
|
362
|
+
*/
|
|
363
|
+
model: string;
|
|
364
|
+
|
|
365
|
+
provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS';
|
|
366
|
+
|
|
367
|
+
smartFormat: boolean | null;
|
|
368
|
+
|
|
369
|
+
turnDetection: 'pipeline' | 'provider' | null;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* A voice. Null settings use the default.
|
|
374
|
+
*/
|
|
375
|
+
export interface Tt {
|
|
376
|
+
/**
|
|
377
|
+
* Any voice model id the provider accepts.
|
|
378
|
+
*/
|
|
379
|
+
model: string;
|
|
380
|
+
|
|
381
|
+
provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME';
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* 0 to 1, ElevenLabs.
|
|
385
|
+
*/
|
|
386
|
+
similarityBoost: number | null;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* 0.5 to 2.
|
|
390
|
+
*/
|
|
391
|
+
speed: number | null;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* 0 to 1, ElevenLabs.
|
|
395
|
+
*/
|
|
396
|
+
stability: number | null;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Any voice id the provider accepts, including your own voices.
|
|
400
|
+
*/
|
|
401
|
+
voiceId: string;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* One model that hears the caller and speaks with its own voice.
|
|
407
|
+
*/
|
|
408
|
+
export interface AgentSpeechToSpeechModelConfig {
|
|
409
|
+
/**
|
|
410
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
411
|
+
* the default.
|
|
412
|
+
*/
|
|
413
|
+
speechToSpeech: AgentSpeechToSpeechModelConfig.SpeechToSpeech;
|
|
414
|
+
|
|
415
|
+
type: 'SPEECH_TO_SPEECH';
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export namespace AgentSpeechToSpeechModelConfig {
|
|
419
|
+
/**
|
|
420
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
421
|
+
* the default.
|
|
422
|
+
*/
|
|
423
|
+
export interface SpeechToSpeech {
|
|
424
|
+
/**
|
|
425
|
+
* OpenAI Live models only: the text model they delegate to.
|
|
426
|
+
*/
|
|
427
|
+
backendModel: string | null;
|
|
428
|
+
|
|
429
|
+
maxOutputTokens: number | null;
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* Any speech-to-speech model id the provider accepts.
|
|
433
|
+
*/
|
|
434
|
+
model: string;
|
|
435
|
+
|
|
436
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* 0 to 2.
|
|
440
|
+
*/
|
|
441
|
+
temperature: number | null;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* The model's own voice.
|
|
445
|
+
*/
|
|
446
|
+
voice: string | null;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
361
450
|
export interface Tool {
|
|
362
451
|
/**
|
|
363
452
|
* The tool version the agent runs; null runs the tool's latest declared version.
|
|
@@ -505,30 +594,6 @@ export namespace AgentVersionGetByIDResponse {
|
|
|
505
594
|
*/
|
|
506
595
|
language: string | null;
|
|
507
596
|
|
|
508
|
-
/**
|
|
509
|
-
* OpenAI Live models only: the text model they delegate to.
|
|
510
|
-
*/
|
|
511
|
-
llmBackendModel: string | null;
|
|
512
|
-
|
|
513
|
-
llmMaxTokens: number | null;
|
|
514
|
-
|
|
515
|
-
/**
|
|
516
|
-
* Any model id the provider accepts. One model serves every speaker.
|
|
517
|
-
*/
|
|
518
|
-
llmModel: string | null;
|
|
519
|
-
|
|
520
|
-
llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
521
|
-
|
|
522
|
-
/**
|
|
523
|
-
* 0 to 2.
|
|
524
|
-
*/
|
|
525
|
-
llmTemperature: number | null;
|
|
526
|
-
|
|
527
|
-
/**
|
|
528
|
-
* Speech-to-speech models only: the model's own voice.
|
|
529
|
-
*/
|
|
530
|
-
llmVoice: string | null;
|
|
531
|
-
|
|
532
597
|
/**
|
|
533
598
|
* Whether the agent takes calls, chats, or both.
|
|
534
599
|
*/
|
|
@@ -543,11 +608,6 @@ export namespace AgentVersionGetByIDResponse {
|
|
|
543
608
|
|
|
544
609
|
publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
|
|
545
610
|
|
|
546
|
-
/**
|
|
547
|
-
* Set when this version restores an older one.
|
|
548
|
-
*/
|
|
549
|
-
restoredFromVersionId: string | null;
|
|
550
|
-
|
|
551
611
|
/**
|
|
552
612
|
* Increases with every edit to a draft. Send it back as expectedRevision when you
|
|
553
613
|
* publish.
|
|
@@ -555,24 +615,14 @@ export namespace AgentVersionGetByIDResponse {
|
|
|
555
615
|
revision: number;
|
|
556
616
|
|
|
557
617
|
/**
|
|
558
|
-
*
|
|
618
|
+
* Set when this version rolls the agent back to an older one.
|
|
559
619
|
*/
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
sttEndpointingMs: number | null;
|
|
620
|
+
rolledBackFromVersionId: string | null;
|
|
563
621
|
|
|
564
622
|
/**
|
|
565
|
-
*
|
|
623
|
+
* DRAFT while being edited, PUBLISHED once it has been live.
|
|
566
624
|
*/
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
sttModel: string | null;
|
|
570
|
-
|
|
571
|
-
sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
572
|
-
|
|
573
|
-
sttSmartFormat: boolean | null;
|
|
574
|
-
|
|
575
|
-
sttTurnDetection: 'pipeline' | 'provider' | null;
|
|
625
|
+
status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
|
|
576
626
|
|
|
577
627
|
/**
|
|
578
628
|
* The main agent (key `main`) first, then the sub-agents it can hand the call to.
|
|
@@ -607,8 +657,8 @@ export namespace AgentVersionGetByIDResponse {
|
|
|
607
657
|
|
|
608
658
|
export namespace Data {
|
|
609
659
|
/**
|
|
610
|
-
* A speaker in the conversation.
|
|
611
|
-
* agent's.
|
|
660
|
+
* A speaker in the conversation. A sub-agent without model configs runs on the
|
|
661
|
+
* main agent's.
|
|
612
662
|
*/
|
|
613
663
|
export interface SubAgent {
|
|
614
664
|
handoffs: Array<SubAgent.Handoff>;
|
|
@@ -623,6 +673,12 @@ export namespace AgentVersionGetByIDResponse {
|
|
|
623
673
|
*/
|
|
624
674
|
key: string;
|
|
625
675
|
|
|
676
|
+
/**
|
|
677
|
+
* Up to three, in the order a call tries them. Empty on a sub-agent: it runs on
|
|
678
|
+
* the main agent's. The main agent needs one.
|
|
679
|
+
*/
|
|
680
|
+
modelConfigs: Array<SubAgent.AgentCascadeModelConfig | SubAgent.AgentSpeechToSpeechModelConfig>;
|
|
681
|
+
|
|
626
682
|
/**
|
|
627
683
|
* How the agent refers to this speaker.
|
|
628
684
|
*/
|
|
@@ -634,30 +690,6 @@ export namespace AgentVersionGetByIDResponse {
|
|
|
634
690
|
systemPrompt: string | null;
|
|
635
691
|
|
|
636
692
|
tools: Array<SubAgent.Tool>;
|
|
637
|
-
|
|
638
|
-
ttsModel: string | null;
|
|
639
|
-
|
|
640
|
-
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
* 0 to 1, ElevenLabs.
|
|
644
|
-
*/
|
|
645
|
-
ttsSimilarityBoost: number | null;
|
|
646
|
-
|
|
647
|
-
/**
|
|
648
|
-
* 0.5 to 2.
|
|
649
|
-
*/
|
|
650
|
-
ttsSpeed: number | null;
|
|
651
|
-
|
|
652
|
-
/**
|
|
653
|
-
* 0 to 1, ElevenLabs.
|
|
654
|
-
*/
|
|
655
|
-
ttsStability: number | null;
|
|
656
|
-
|
|
657
|
-
/**
|
|
658
|
-
* Any voice id the provider accepts, including your own voices.
|
|
659
|
-
*/
|
|
660
|
-
ttsVoiceId: string | null;
|
|
661
693
|
}
|
|
662
694
|
|
|
663
695
|
export namespace SubAgent {
|
|
@@ -688,6 +720,153 @@ export namespace AgentVersionGetByIDResponse {
|
|
|
688
720
|
to: string;
|
|
689
721
|
}
|
|
690
722
|
|
|
723
|
+
/**
|
|
724
|
+
* A transcriber, a text model and a voice. A component that fails during a call
|
|
725
|
+
* moves to its next entry; the others stay.
|
|
726
|
+
*/
|
|
727
|
+
export interface AgentCascadeModelConfig {
|
|
728
|
+
/**
|
|
729
|
+
* One to three text models, in the order a call tries them.
|
|
730
|
+
*/
|
|
731
|
+
llm: Array<AgentCascadeModelConfig.Llm>;
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* One to three transcribers, in the order a call tries them.
|
|
735
|
+
*/
|
|
736
|
+
stt: Array<AgentCascadeModelConfig.Stt>;
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* One to three voices, in the order a call tries them.
|
|
740
|
+
*/
|
|
741
|
+
tts: Array<AgentCascadeModelConfig.Tt>;
|
|
742
|
+
|
|
743
|
+
type: 'CASCADE';
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
export namespace AgentCascadeModelConfig {
|
|
747
|
+
/**
|
|
748
|
+
* A text model. Null settings use the default.
|
|
749
|
+
*/
|
|
750
|
+
export interface Llm {
|
|
751
|
+
maxTokens: number | null;
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* Any text model id the provider accepts.
|
|
755
|
+
*/
|
|
756
|
+
model: string;
|
|
757
|
+
|
|
758
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* 0 to 2.
|
|
762
|
+
*/
|
|
763
|
+
temperature: number | null;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* A transcriber. Null settings use the default.
|
|
768
|
+
*/
|
|
769
|
+
export interface Stt {
|
|
770
|
+
/**
|
|
771
|
+
* How long the transcriber waits before it ends a turn.
|
|
772
|
+
*/
|
|
773
|
+
endpointingMs: number | null;
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* Words and phrases the transcriber should listen for.
|
|
777
|
+
*/
|
|
778
|
+
keyterms: Array<string>;
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* Any transcriber model id the provider accepts.
|
|
782
|
+
*/
|
|
783
|
+
model: string;
|
|
784
|
+
|
|
785
|
+
provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS';
|
|
786
|
+
|
|
787
|
+
smartFormat: boolean | null;
|
|
788
|
+
|
|
789
|
+
turnDetection: 'pipeline' | 'provider' | null;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* A voice. Null settings use the default.
|
|
794
|
+
*/
|
|
795
|
+
export interface Tt {
|
|
796
|
+
/**
|
|
797
|
+
* Any voice model id the provider accepts.
|
|
798
|
+
*/
|
|
799
|
+
model: string;
|
|
800
|
+
|
|
801
|
+
provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME';
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* 0 to 1, ElevenLabs.
|
|
805
|
+
*/
|
|
806
|
+
similarityBoost: number | null;
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* 0.5 to 2.
|
|
810
|
+
*/
|
|
811
|
+
speed: number | null;
|
|
812
|
+
|
|
813
|
+
/**
|
|
814
|
+
* 0 to 1, ElevenLabs.
|
|
815
|
+
*/
|
|
816
|
+
stability: number | null;
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Any voice id the provider accepts, including your own voices.
|
|
820
|
+
*/
|
|
821
|
+
voiceId: string;
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* One model that hears the caller and speaks with its own voice.
|
|
827
|
+
*/
|
|
828
|
+
export interface AgentSpeechToSpeechModelConfig {
|
|
829
|
+
/**
|
|
830
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
831
|
+
* the default.
|
|
832
|
+
*/
|
|
833
|
+
speechToSpeech: AgentSpeechToSpeechModelConfig.SpeechToSpeech;
|
|
834
|
+
|
|
835
|
+
type: 'SPEECH_TO_SPEECH';
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
export namespace AgentSpeechToSpeechModelConfig {
|
|
839
|
+
/**
|
|
840
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
841
|
+
* the default.
|
|
842
|
+
*/
|
|
843
|
+
export interface SpeechToSpeech {
|
|
844
|
+
/**
|
|
845
|
+
* OpenAI Live models only: the text model they delegate to.
|
|
846
|
+
*/
|
|
847
|
+
backendModel: string | null;
|
|
848
|
+
|
|
849
|
+
maxOutputTokens: number | null;
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Any speech-to-speech model id the provider accepts.
|
|
853
|
+
*/
|
|
854
|
+
model: string;
|
|
855
|
+
|
|
856
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* 0 to 2.
|
|
860
|
+
*/
|
|
861
|
+
temperature: number | null;
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
* The model's own voice.
|
|
865
|
+
*/
|
|
866
|
+
voice: string | null;
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
|
|
691
870
|
export interface Tool {
|
|
692
871
|
/**
|
|
693
872
|
* The tool version the agent runs; null runs the tool's latest declared version.
|
|
@@ -712,15 +891,15 @@ export namespace AgentVersionGetByIDResponse {
|
|
|
712
891
|
}
|
|
713
892
|
}
|
|
714
893
|
|
|
715
|
-
export interface
|
|
894
|
+
export interface AgentVersionRollbackResponse {
|
|
716
895
|
/**
|
|
717
896
|
* One version of a Roark-hosted agent's configuration. Null settings use the
|
|
718
897
|
* runtime default.
|
|
719
898
|
*/
|
|
720
|
-
data:
|
|
899
|
+
data: AgentVersionRollbackResponse.Data;
|
|
721
900
|
}
|
|
722
901
|
|
|
723
|
-
export namespace
|
|
902
|
+
export namespace AgentVersionRollbackResponse {
|
|
724
903
|
/**
|
|
725
904
|
* One version of a Roark-hosted agent's configuration. Null settings use the
|
|
726
905
|
* runtime default.
|
|
@@ -818,30 +997,6 @@ export namespace AgentVersionRestoreResponse {
|
|
|
818
997
|
*/
|
|
819
998
|
language: string | null;
|
|
820
999
|
|
|
821
|
-
/**
|
|
822
|
-
* OpenAI Live models only: the text model they delegate to.
|
|
823
|
-
*/
|
|
824
|
-
llmBackendModel: string | null;
|
|
825
|
-
|
|
826
|
-
llmMaxTokens: number | null;
|
|
827
|
-
|
|
828
|
-
/**
|
|
829
|
-
* Any model id the provider accepts. One model serves every speaker.
|
|
830
|
-
*/
|
|
831
|
-
llmModel: string | null;
|
|
832
|
-
|
|
833
|
-
llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
834
|
-
|
|
835
|
-
/**
|
|
836
|
-
* 0 to 2.
|
|
837
|
-
*/
|
|
838
|
-
llmTemperature: number | null;
|
|
839
|
-
|
|
840
|
-
/**
|
|
841
|
-
* Speech-to-speech models only: the model's own voice.
|
|
842
|
-
*/
|
|
843
|
-
llmVoice: string | null;
|
|
844
|
-
|
|
845
1000
|
/**
|
|
846
1001
|
* Whether the agent takes calls, chats, or both.
|
|
847
1002
|
*/
|
|
@@ -856,11 +1011,6 @@ export namespace AgentVersionRestoreResponse {
|
|
|
856
1011
|
|
|
857
1012
|
publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
|
|
858
1013
|
|
|
859
|
-
/**
|
|
860
|
-
* Set when this version restores an older one.
|
|
861
|
-
*/
|
|
862
|
-
restoredFromVersionId: string | null;
|
|
863
|
-
|
|
864
1014
|
/**
|
|
865
1015
|
* Increases with every edit to a draft. Send it back as expectedRevision when you
|
|
866
1016
|
* publish.
|
|
@@ -868,24 +1018,14 @@ export namespace AgentVersionRestoreResponse {
|
|
|
868
1018
|
revision: number;
|
|
869
1019
|
|
|
870
1020
|
/**
|
|
871
|
-
*
|
|
1021
|
+
* Set when this version rolls the agent back to an older one.
|
|
872
1022
|
*/
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
sttEndpointingMs: number | null;
|
|
1023
|
+
rolledBackFromVersionId: string | null;
|
|
876
1024
|
|
|
877
1025
|
/**
|
|
878
|
-
*
|
|
1026
|
+
* DRAFT while being edited, PUBLISHED once it has been live.
|
|
879
1027
|
*/
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
sttModel: string | null;
|
|
883
|
-
|
|
884
|
-
sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
885
|
-
|
|
886
|
-
sttSmartFormat: boolean | null;
|
|
887
|
-
|
|
888
|
-
sttTurnDetection: 'pipeline' | 'provider' | null;
|
|
1028
|
+
status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
|
|
889
1029
|
|
|
890
1030
|
/**
|
|
891
1031
|
* The main agent (key `main`) first, then the sub-agents it can hand the call to.
|
|
@@ -920,8 +1060,8 @@ export namespace AgentVersionRestoreResponse {
|
|
|
920
1060
|
|
|
921
1061
|
export namespace Data {
|
|
922
1062
|
/**
|
|
923
|
-
* A speaker in the conversation.
|
|
924
|
-
* agent's.
|
|
1063
|
+
* A speaker in the conversation. A sub-agent without model configs runs on the
|
|
1064
|
+
* main agent's.
|
|
925
1065
|
*/
|
|
926
1066
|
export interface SubAgent {
|
|
927
1067
|
handoffs: Array<SubAgent.Handoff>;
|
|
@@ -936,6 +1076,12 @@ export namespace AgentVersionRestoreResponse {
|
|
|
936
1076
|
*/
|
|
937
1077
|
key: string;
|
|
938
1078
|
|
|
1079
|
+
/**
|
|
1080
|
+
* Up to three, in the order a call tries them. Empty on a sub-agent: it runs on
|
|
1081
|
+
* the main agent's. The main agent needs one.
|
|
1082
|
+
*/
|
|
1083
|
+
modelConfigs: Array<SubAgent.AgentCascadeModelConfig | SubAgent.AgentSpeechToSpeechModelConfig>;
|
|
1084
|
+
|
|
939
1085
|
/**
|
|
940
1086
|
* How the agent refers to this speaker.
|
|
941
1087
|
*/
|
|
@@ -947,30 +1093,6 @@ export namespace AgentVersionRestoreResponse {
|
|
|
947
1093
|
systemPrompt: string | null;
|
|
948
1094
|
|
|
949
1095
|
tools: Array<SubAgent.Tool>;
|
|
950
|
-
|
|
951
|
-
ttsModel: string | null;
|
|
952
|
-
|
|
953
|
-
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
954
|
-
|
|
955
|
-
/**
|
|
956
|
-
* 0 to 1, ElevenLabs.
|
|
957
|
-
*/
|
|
958
|
-
ttsSimilarityBoost: number | null;
|
|
959
|
-
|
|
960
|
-
/**
|
|
961
|
-
* 0.5 to 2.
|
|
962
|
-
*/
|
|
963
|
-
ttsSpeed: number | null;
|
|
964
|
-
|
|
965
|
-
/**
|
|
966
|
-
* 0 to 1, ElevenLabs.
|
|
967
|
-
*/
|
|
968
|
-
ttsStability: number | null;
|
|
969
|
-
|
|
970
|
-
/**
|
|
971
|
-
* Any voice id the provider accepts, including your own voices.
|
|
972
|
-
*/
|
|
973
|
-
ttsVoiceId: string | null;
|
|
974
1096
|
}
|
|
975
1097
|
|
|
976
1098
|
export namespace SubAgent {
|
|
@@ -1001,6 +1123,153 @@ export namespace AgentVersionRestoreResponse {
|
|
|
1001
1123
|
to: string;
|
|
1002
1124
|
}
|
|
1003
1125
|
|
|
1126
|
+
/**
|
|
1127
|
+
* A transcriber, a text model and a voice. A component that fails during a call
|
|
1128
|
+
* moves to its next entry; the others stay.
|
|
1129
|
+
*/
|
|
1130
|
+
export interface AgentCascadeModelConfig {
|
|
1131
|
+
/**
|
|
1132
|
+
* One to three text models, in the order a call tries them.
|
|
1133
|
+
*/
|
|
1134
|
+
llm: Array<AgentCascadeModelConfig.Llm>;
|
|
1135
|
+
|
|
1136
|
+
/**
|
|
1137
|
+
* One to three transcribers, in the order a call tries them.
|
|
1138
|
+
*/
|
|
1139
|
+
stt: Array<AgentCascadeModelConfig.Stt>;
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* One to three voices, in the order a call tries them.
|
|
1143
|
+
*/
|
|
1144
|
+
tts: Array<AgentCascadeModelConfig.Tt>;
|
|
1145
|
+
|
|
1146
|
+
type: 'CASCADE';
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
export namespace AgentCascadeModelConfig {
|
|
1150
|
+
/**
|
|
1151
|
+
* A text model. Null settings use the default.
|
|
1152
|
+
*/
|
|
1153
|
+
export interface Llm {
|
|
1154
|
+
maxTokens: number | null;
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Any text model id the provider accepts.
|
|
1158
|
+
*/
|
|
1159
|
+
model: string;
|
|
1160
|
+
|
|
1161
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
1162
|
+
|
|
1163
|
+
/**
|
|
1164
|
+
* 0 to 2.
|
|
1165
|
+
*/
|
|
1166
|
+
temperature: number | null;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
/**
|
|
1170
|
+
* A transcriber. Null settings use the default.
|
|
1171
|
+
*/
|
|
1172
|
+
export interface Stt {
|
|
1173
|
+
/**
|
|
1174
|
+
* How long the transcriber waits before it ends a turn.
|
|
1175
|
+
*/
|
|
1176
|
+
endpointingMs: number | null;
|
|
1177
|
+
|
|
1178
|
+
/**
|
|
1179
|
+
* Words and phrases the transcriber should listen for.
|
|
1180
|
+
*/
|
|
1181
|
+
keyterms: Array<string>;
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
* Any transcriber model id the provider accepts.
|
|
1185
|
+
*/
|
|
1186
|
+
model: string;
|
|
1187
|
+
|
|
1188
|
+
provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS';
|
|
1189
|
+
|
|
1190
|
+
smartFormat: boolean | null;
|
|
1191
|
+
|
|
1192
|
+
turnDetection: 'pipeline' | 'provider' | null;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
/**
|
|
1196
|
+
* A voice. Null settings use the default.
|
|
1197
|
+
*/
|
|
1198
|
+
export interface Tt {
|
|
1199
|
+
/**
|
|
1200
|
+
* Any voice model id the provider accepts.
|
|
1201
|
+
*/
|
|
1202
|
+
model: string;
|
|
1203
|
+
|
|
1204
|
+
provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME';
|
|
1205
|
+
|
|
1206
|
+
/**
|
|
1207
|
+
* 0 to 1, ElevenLabs.
|
|
1208
|
+
*/
|
|
1209
|
+
similarityBoost: number | null;
|
|
1210
|
+
|
|
1211
|
+
/**
|
|
1212
|
+
* 0.5 to 2.
|
|
1213
|
+
*/
|
|
1214
|
+
speed: number | null;
|
|
1215
|
+
|
|
1216
|
+
/**
|
|
1217
|
+
* 0 to 1, ElevenLabs.
|
|
1218
|
+
*/
|
|
1219
|
+
stability: number | null;
|
|
1220
|
+
|
|
1221
|
+
/**
|
|
1222
|
+
* Any voice id the provider accepts, including your own voices.
|
|
1223
|
+
*/
|
|
1224
|
+
voiceId: string;
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* One model that hears the caller and speaks with its own voice.
|
|
1230
|
+
*/
|
|
1231
|
+
export interface AgentSpeechToSpeechModelConfig {
|
|
1232
|
+
/**
|
|
1233
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
1234
|
+
* the default.
|
|
1235
|
+
*/
|
|
1236
|
+
speechToSpeech: AgentSpeechToSpeechModelConfig.SpeechToSpeech;
|
|
1237
|
+
|
|
1238
|
+
type: 'SPEECH_TO_SPEECH';
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
export namespace AgentSpeechToSpeechModelConfig {
|
|
1242
|
+
/**
|
|
1243
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
1244
|
+
* the default.
|
|
1245
|
+
*/
|
|
1246
|
+
export interface SpeechToSpeech {
|
|
1247
|
+
/**
|
|
1248
|
+
* OpenAI Live models only: the text model they delegate to.
|
|
1249
|
+
*/
|
|
1250
|
+
backendModel: string | null;
|
|
1251
|
+
|
|
1252
|
+
maxOutputTokens: number | null;
|
|
1253
|
+
|
|
1254
|
+
/**
|
|
1255
|
+
* Any speech-to-speech model id the provider accepts.
|
|
1256
|
+
*/
|
|
1257
|
+
model: string;
|
|
1258
|
+
|
|
1259
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* 0 to 2.
|
|
1263
|
+
*/
|
|
1264
|
+
temperature: number | null;
|
|
1265
|
+
|
|
1266
|
+
/**
|
|
1267
|
+
* The model's own voice.
|
|
1268
|
+
*/
|
|
1269
|
+
voice: string | null;
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1004
1273
|
export interface Tool {
|
|
1005
1274
|
/**
|
|
1006
1275
|
* The tool version the agent runs; null runs the tool's latest declared version.
|
|
@@ -1035,15 +1304,15 @@ export interface AgentVersionGetByIDParams {
|
|
|
1035
1304
|
agentId: string;
|
|
1036
1305
|
}
|
|
1037
1306
|
|
|
1038
|
-
export interface
|
|
1307
|
+
export interface AgentVersionRollbackParams {
|
|
1039
1308
|
/**
|
|
1040
1309
|
* Path param
|
|
1041
1310
|
*/
|
|
1042
1311
|
agentId: string;
|
|
1043
1312
|
|
|
1044
1313
|
/**
|
|
1045
|
-
* Body param: The live version when you decided to
|
|
1046
|
-
* is refused with 409 if another version went live since.
|
|
1314
|
+
* Body param: The live version when you decided to roll back. When sent, the
|
|
1315
|
+
* rollback is refused with 409 if another version went live since.
|
|
1047
1316
|
*/
|
|
1048
1317
|
expectedLiveVersionId?: string;
|
|
1049
1318
|
|
|
@@ -1057,9 +1326,9 @@ export declare namespace AgentVersion {
|
|
|
1057
1326
|
export {
|
|
1058
1327
|
type AgentVersionListResponse as AgentVersionListResponse,
|
|
1059
1328
|
type AgentVersionGetByIDResponse as AgentVersionGetByIDResponse,
|
|
1060
|
-
type
|
|
1329
|
+
type AgentVersionRollbackResponse as AgentVersionRollbackResponse,
|
|
1061
1330
|
type AgentVersionListParams as AgentVersionListParams,
|
|
1062
1331
|
type AgentVersionGetByIDParams as AgentVersionGetByIDParams,
|
|
1063
|
-
type
|
|
1332
|
+
type AgentVersionRollbackParams as AgentVersionRollbackParams,
|
|
1064
1333
|
};
|
|
1065
1334
|
}
|