@roarkanalytics/sdk 5.24.0 → 6.1.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/call.d.mts +35 -11
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +35 -11
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +3 -1
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +3 -1
- package/resources/call.mjs.map +1 -1
- package/resources/config.d.mts +90 -6
- package/resources/config.d.mts.map +1 -1
- package/resources/config.d.ts +90 -6
- 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/call.ts +37 -11
- package/src/resources/config.ts +198 -0
- 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
|
@@ -27,22 +27,21 @@ export declare class AgentVersion extends APIResource {
|
|
|
27
27
|
*/
|
|
28
28
|
getByID(versionID: string, params: AgentVersionGetByIDParams, options?: RequestOptions): APIPromise<AgentVersionGetByIDResponse>;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* `
|
|
35
|
-
* another version went live since you read it.
|
|
30
|
+
* Publishes a new version, numbered after the latest, with this version's settings
|
|
31
|
+
* and makes it live. History stays append-only. An open draft started before this
|
|
32
|
+
* is kept but can no longer be published (409 `agent_draft_base_changed`); discard
|
|
33
|
+
* it or start a new one. Pass `expectedLiveVersionId` to be refused (409
|
|
34
|
+
* `agent_live_version_changed`) if another version went live since you read it.
|
|
36
35
|
*
|
|
37
36
|
* @example
|
|
38
37
|
* ```ts
|
|
39
|
-
* const response = await client.agentVersion.
|
|
38
|
+
* const response = await client.agentVersion.rollback(
|
|
40
39
|
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
41
40
|
* { agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
|
|
42
41
|
* );
|
|
43
42
|
* ```
|
|
44
43
|
*/
|
|
45
|
-
|
|
44
|
+
rollback(versionID: string, params: AgentVersionRollbackParams, options?: RequestOptions): APIPromise<AgentVersionRollbackResponse>;
|
|
46
45
|
}
|
|
47
46
|
export interface AgentVersionListResponse {
|
|
48
47
|
data: Array<AgentVersionListResponse.Data>;
|
|
@@ -109,24 +108,6 @@ export declare namespace AgentVersionListResponse {
|
|
|
109
108
|
* ISO 639-1, e.g. en.
|
|
110
109
|
*/
|
|
111
110
|
language: string | null;
|
|
112
|
-
/**
|
|
113
|
-
* OpenAI Live models only: the text model they delegate to.
|
|
114
|
-
*/
|
|
115
|
-
llmBackendModel: string | null;
|
|
116
|
-
llmMaxTokens: number | null;
|
|
117
|
-
/**
|
|
118
|
-
* Any model id the provider accepts. One model serves every speaker.
|
|
119
|
-
*/
|
|
120
|
-
llmModel: string | null;
|
|
121
|
-
llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
122
|
-
/**
|
|
123
|
-
* 0 to 2.
|
|
124
|
-
*/
|
|
125
|
-
llmTemperature: number | null;
|
|
126
|
-
/**
|
|
127
|
-
* Speech-to-speech models only: the model's own voice.
|
|
128
|
-
*/
|
|
129
|
-
llmVoice: string | null;
|
|
130
111
|
/**
|
|
131
112
|
* Whether the agent takes calls, chats, or both.
|
|
132
113
|
*/
|
|
@@ -137,28 +118,19 @@ export declare namespace AgentVersionListResponse {
|
|
|
137
118
|
publishedAt: string | null;
|
|
138
119
|
publishedById: string | null;
|
|
139
120
|
publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
|
|
140
|
-
/**
|
|
141
|
-
* Set when this version restores an older one.
|
|
142
|
-
*/
|
|
143
|
-
restoredFromVersionId: string | null;
|
|
144
121
|
/**
|
|
145
122
|
* Increases with every edit to a draft. Send it back as expectedRevision when you
|
|
146
123
|
* publish.
|
|
147
124
|
*/
|
|
148
125
|
revision: number;
|
|
149
126
|
/**
|
|
150
|
-
*
|
|
127
|
+
* Set when this version rolls the agent back to an older one.
|
|
151
128
|
*/
|
|
152
|
-
|
|
153
|
-
sttEndpointingMs: number | null;
|
|
129
|
+
rolledBackFromVersionId: string | null;
|
|
154
130
|
/**
|
|
155
|
-
*
|
|
131
|
+
* DRAFT while being edited, PUBLISHED once it has been live.
|
|
156
132
|
*/
|
|
157
|
-
|
|
158
|
-
sttModel: string | null;
|
|
159
|
-
sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
160
|
-
sttSmartFormat: boolean | null;
|
|
161
|
-
sttTurnDetection: 'pipeline' | 'provider' | null;
|
|
133
|
+
status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
|
|
162
134
|
/**
|
|
163
135
|
* The main agent (key `main`) first, then the sub-agents it can hand the call to.
|
|
164
136
|
*/
|
|
@@ -185,8 +157,8 @@ export declare namespace AgentVersionListResponse {
|
|
|
185
157
|
}
|
|
186
158
|
namespace Data {
|
|
187
159
|
/**
|
|
188
|
-
* A speaker in the conversation.
|
|
189
|
-
* agent's.
|
|
160
|
+
* A speaker in the conversation. A sub-agent without model configs runs on the
|
|
161
|
+
* main agent's.
|
|
190
162
|
*/
|
|
191
163
|
interface SubAgent {
|
|
192
164
|
handoffs: Array<SubAgent.Handoff>;
|
|
@@ -198,6 +170,11 @@ export declare namespace AgentVersionListResponse {
|
|
|
198
170
|
* `main` for the main agent; otherwise letters, digits, `_` or `-`.
|
|
199
171
|
*/
|
|
200
172
|
key: string;
|
|
173
|
+
/**
|
|
174
|
+
* Up to three, in the order a call tries them. Empty on a sub-agent: it runs on
|
|
175
|
+
* the main agent's. The main agent needs one.
|
|
176
|
+
*/
|
|
177
|
+
modelConfigs: Array<SubAgent.AgentCascadeModelConfig | SubAgent.AgentSpeechToSpeechModelConfig>;
|
|
201
178
|
/**
|
|
202
179
|
* How the agent refers to this speaker.
|
|
203
180
|
*/
|
|
@@ -207,24 +184,6 @@ export declare namespace AgentVersionListResponse {
|
|
|
207
184
|
*/
|
|
208
185
|
systemPrompt: string | null;
|
|
209
186
|
tools: Array<SubAgent.Tool>;
|
|
210
|
-
ttsModel: string | null;
|
|
211
|
-
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
212
|
-
/**
|
|
213
|
-
* 0 to 1, ElevenLabs.
|
|
214
|
-
*/
|
|
215
|
-
ttsSimilarityBoost: number | null;
|
|
216
|
-
/**
|
|
217
|
-
* 0.5 to 2.
|
|
218
|
-
*/
|
|
219
|
-
ttsSpeed: number | null;
|
|
220
|
-
/**
|
|
221
|
-
* 0 to 1, ElevenLabs.
|
|
222
|
-
*/
|
|
223
|
-
ttsStability: number | null;
|
|
224
|
-
/**
|
|
225
|
-
* Any voice id the provider accepts, including your own voices.
|
|
226
|
-
*/
|
|
227
|
-
ttsVoiceId: string | null;
|
|
228
187
|
}
|
|
229
188
|
namespace SubAgent {
|
|
230
189
|
interface Handoff {
|
|
@@ -249,6 +208,125 @@ export declare namespace AgentVersionListResponse {
|
|
|
249
208
|
*/
|
|
250
209
|
to: string;
|
|
251
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* A transcriber, a text model and a voice. A component that fails during a call
|
|
213
|
+
* moves to its next entry; the others stay.
|
|
214
|
+
*/
|
|
215
|
+
interface AgentCascadeModelConfig {
|
|
216
|
+
/**
|
|
217
|
+
* One to three text models, in the order a call tries them.
|
|
218
|
+
*/
|
|
219
|
+
llm: Array<AgentCascadeModelConfig.Llm>;
|
|
220
|
+
/**
|
|
221
|
+
* One to three transcribers, in the order a call tries them.
|
|
222
|
+
*/
|
|
223
|
+
stt: Array<AgentCascadeModelConfig.Stt>;
|
|
224
|
+
/**
|
|
225
|
+
* One to three voices, in the order a call tries them.
|
|
226
|
+
*/
|
|
227
|
+
tts: Array<AgentCascadeModelConfig.Tt>;
|
|
228
|
+
type: 'CASCADE';
|
|
229
|
+
}
|
|
230
|
+
namespace AgentCascadeModelConfig {
|
|
231
|
+
/**
|
|
232
|
+
* A text model. Null settings use the default.
|
|
233
|
+
*/
|
|
234
|
+
interface Llm {
|
|
235
|
+
maxTokens: number | null;
|
|
236
|
+
/**
|
|
237
|
+
* Any text model id the provider accepts.
|
|
238
|
+
*/
|
|
239
|
+
model: string;
|
|
240
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
241
|
+
/**
|
|
242
|
+
* 0 to 2.
|
|
243
|
+
*/
|
|
244
|
+
temperature: number | null;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* A transcriber. Null settings use the default.
|
|
248
|
+
*/
|
|
249
|
+
interface Stt {
|
|
250
|
+
/**
|
|
251
|
+
* How long the transcriber waits before it ends a turn.
|
|
252
|
+
*/
|
|
253
|
+
endpointingMs: number | null;
|
|
254
|
+
/**
|
|
255
|
+
* Words and phrases the transcriber should listen for.
|
|
256
|
+
*/
|
|
257
|
+
keyterms: Array<string>;
|
|
258
|
+
/**
|
|
259
|
+
* Any transcriber model id the provider accepts.
|
|
260
|
+
*/
|
|
261
|
+
model: string;
|
|
262
|
+
provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS';
|
|
263
|
+
smartFormat: boolean | null;
|
|
264
|
+
turnDetection: 'pipeline' | 'provider' | null;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* A voice. Null settings use the default.
|
|
268
|
+
*/
|
|
269
|
+
interface Tt {
|
|
270
|
+
/**
|
|
271
|
+
* Any voice model id the provider accepts.
|
|
272
|
+
*/
|
|
273
|
+
model: string;
|
|
274
|
+
provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME';
|
|
275
|
+
/**
|
|
276
|
+
* 0 to 1, ElevenLabs.
|
|
277
|
+
*/
|
|
278
|
+
similarityBoost: number | null;
|
|
279
|
+
/**
|
|
280
|
+
* 0.5 to 2.
|
|
281
|
+
*/
|
|
282
|
+
speed: number | null;
|
|
283
|
+
/**
|
|
284
|
+
* 0 to 1, ElevenLabs.
|
|
285
|
+
*/
|
|
286
|
+
stability: number | null;
|
|
287
|
+
/**
|
|
288
|
+
* Any voice id the provider accepts, including your own voices.
|
|
289
|
+
*/
|
|
290
|
+
voiceId: string;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* One model that hears the caller and speaks with its own voice.
|
|
295
|
+
*/
|
|
296
|
+
interface AgentSpeechToSpeechModelConfig {
|
|
297
|
+
/**
|
|
298
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
299
|
+
* the default.
|
|
300
|
+
*/
|
|
301
|
+
speechToSpeech: AgentSpeechToSpeechModelConfig.SpeechToSpeech;
|
|
302
|
+
type: 'SPEECH_TO_SPEECH';
|
|
303
|
+
}
|
|
304
|
+
namespace AgentSpeechToSpeechModelConfig {
|
|
305
|
+
/**
|
|
306
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
307
|
+
* the default.
|
|
308
|
+
*/
|
|
309
|
+
interface SpeechToSpeech {
|
|
310
|
+
/**
|
|
311
|
+
* OpenAI Live models only: the text model they delegate to.
|
|
312
|
+
*/
|
|
313
|
+
backendModel: string | null;
|
|
314
|
+
maxOutputTokens: number | null;
|
|
315
|
+
/**
|
|
316
|
+
* Any speech-to-speech model id the provider accepts.
|
|
317
|
+
*/
|
|
318
|
+
model: string;
|
|
319
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
320
|
+
/**
|
|
321
|
+
* 0 to 2.
|
|
322
|
+
*/
|
|
323
|
+
temperature: number | null;
|
|
324
|
+
/**
|
|
325
|
+
* The model's own voice.
|
|
326
|
+
*/
|
|
327
|
+
voice: string | null;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
252
330
|
interface Tool {
|
|
253
331
|
/**
|
|
254
332
|
* The tool version the agent runs; null runs the tool's latest declared version.
|
|
@@ -351,24 +429,6 @@ export declare namespace AgentVersionGetByIDResponse {
|
|
|
351
429
|
* ISO 639-1, e.g. en.
|
|
352
430
|
*/
|
|
353
431
|
language: string | null;
|
|
354
|
-
/**
|
|
355
|
-
* OpenAI Live models only: the text model they delegate to.
|
|
356
|
-
*/
|
|
357
|
-
llmBackendModel: string | null;
|
|
358
|
-
llmMaxTokens: number | null;
|
|
359
|
-
/**
|
|
360
|
-
* Any model id the provider accepts. One model serves every speaker.
|
|
361
|
-
*/
|
|
362
|
-
llmModel: string | null;
|
|
363
|
-
llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
364
|
-
/**
|
|
365
|
-
* 0 to 2.
|
|
366
|
-
*/
|
|
367
|
-
llmTemperature: number | null;
|
|
368
|
-
/**
|
|
369
|
-
* Speech-to-speech models only: the model's own voice.
|
|
370
|
-
*/
|
|
371
|
-
llmVoice: string | null;
|
|
372
432
|
/**
|
|
373
433
|
* Whether the agent takes calls, chats, or both.
|
|
374
434
|
*/
|
|
@@ -379,28 +439,19 @@ export declare namespace AgentVersionGetByIDResponse {
|
|
|
379
439
|
publishedAt: string | null;
|
|
380
440
|
publishedById: string | null;
|
|
381
441
|
publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
|
|
382
|
-
/**
|
|
383
|
-
* Set when this version restores an older one.
|
|
384
|
-
*/
|
|
385
|
-
restoredFromVersionId: string | null;
|
|
386
442
|
/**
|
|
387
443
|
* Increases with every edit to a draft. Send it back as expectedRevision when you
|
|
388
444
|
* publish.
|
|
389
445
|
*/
|
|
390
446
|
revision: number;
|
|
391
447
|
/**
|
|
392
|
-
*
|
|
448
|
+
* Set when this version rolls the agent back to an older one.
|
|
393
449
|
*/
|
|
394
|
-
|
|
395
|
-
sttEndpointingMs: number | null;
|
|
450
|
+
rolledBackFromVersionId: string | null;
|
|
396
451
|
/**
|
|
397
|
-
*
|
|
452
|
+
* DRAFT while being edited, PUBLISHED once it has been live.
|
|
398
453
|
*/
|
|
399
|
-
|
|
400
|
-
sttModel: string | null;
|
|
401
|
-
sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
402
|
-
sttSmartFormat: boolean | null;
|
|
403
|
-
sttTurnDetection: 'pipeline' | 'provider' | null;
|
|
454
|
+
status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
|
|
404
455
|
/**
|
|
405
456
|
* The main agent (key `main`) first, then the sub-agents it can hand the call to.
|
|
406
457
|
*/
|
|
@@ -427,8 +478,8 @@ export declare namespace AgentVersionGetByIDResponse {
|
|
|
427
478
|
}
|
|
428
479
|
namespace Data {
|
|
429
480
|
/**
|
|
430
|
-
* A speaker in the conversation.
|
|
431
|
-
* agent's.
|
|
481
|
+
* A speaker in the conversation. A sub-agent without model configs runs on the
|
|
482
|
+
* main agent's.
|
|
432
483
|
*/
|
|
433
484
|
interface SubAgent {
|
|
434
485
|
handoffs: Array<SubAgent.Handoff>;
|
|
@@ -440,6 +491,11 @@ export declare namespace AgentVersionGetByIDResponse {
|
|
|
440
491
|
* `main` for the main agent; otherwise letters, digits, `_` or `-`.
|
|
441
492
|
*/
|
|
442
493
|
key: string;
|
|
494
|
+
/**
|
|
495
|
+
* Up to three, in the order a call tries them. Empty on a sub-agent: it runs on
|
|
496
|
+
* the main agent's. The main agent needs one.
|
|
497
|
+
*/
|
|
498
|
+
modelConfigs: Array<SubAgent.AgentCascadeModelConfig | SubAgent.AgentSpeechToSpeechModelConfig>;
|
|
443
499
|
/**
|
|
444
500
|
* How the agent refers to this speaker.
|
|
445
501
|
*/
|
|
@@ -449,24 +505,6 @@ export declare namespace AgentVersionGetByIDResponse {
|
|
|
449
505
|
*/
|
|
450
506
|
systemPrompt: string | null;
|
|
451
507
|
tools: Array<SubAgent.Tool>;
|
|
452
|
-
ttsModel: string | null;
|
|
453
|
-
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
454
|
-
/**
|
|
455
|
-
* 0 to 1, ElevenLabs.
|
|
456
|
-
*/
|
|
457
|
-
ttsSimilarityBoost: number | null;
|
|
458
|
-
/**
|
|
459
|
-
* 0.5 to 2.
|
|
460
|
-
*/
|
|
461
|
-
ttsSpeed: number | null;
|
|
462
|
-
/**
|
|
463
|
-
* 0 to 1, ElevenLabs.
|
|
464
|
-
*/
|
|
465
|
-
ttsStability: number | null;
|
|
466
|
-
/**
|
|
467
|
-
* Any voice id the provider accepts, including your own voices.
|
|
468
|
-
*/
|
|
469
|
-
ttsVoiceId: string | null;
|
|
470
508
|
}
|
|
471
509
|
namespace SubAgent {
|
|
472
510
|
interface Handoff {
|
|
@@ -491,6 +529,125 @@ export declare namespace AgentVersionGetByIDResponse {
|
|
|
491
529
|
*/
|
|
492
530
|
to: string;
|
|
493
531
|
}
|
|
532
|
+
/**
|
|
533
|
+
* A transcriber, a text model and a voice. A component that fails during a call
|
|
534
|
+
* moves to its next entry; the others stay.
|
|
535
|
+
*/
|
|
536
|
+
interface AgentCascadeModelConfig {
|
|
537
|
+
/**
|
|
538
|
+
* One to three text models, in the order a call tries them.
|
|
539
|
+
*/
|
|
540
|
+
llm: Array<AgentCascadeModelConfig.Llm>;
|
|
541
|
+
/**
|
|
542
|
+
* One to three transcribers, in the order a call tries them.
|
|
543
|
+
*/
|
|
544
|
+
stt: Array<AgentCascadeModelConfig.Stt>;
|
|
545
|
+
/**
|
|
546
|
+
* One to three voices, in the order a call tries them.
|
|
547
|
+
*/
|
|
548
|
+
tts: Array<AgentCascadeModelConfig.Tt>;
|
|
549
|
+
type: 'CASCADE';
|
|
550
|
+
}
|
|
551
|
+
namespace AgentCascadeModelConfig {
|
|
552
|
+
/**
|
|
553
|
+
* A text model. Null settings use the default.
|
|
554
|
+
*/
|
|
555
|
+
interface Llm {
|
|
556
|
+
maxTokens: number | null;
|
|
557
|
+
/**
|
|
558
|
+
* Any text model id the provider accepts.
|
|
559
|
+
*/
|
|
560
|
+
model: string;
|
|
561
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
562
|
+
/**
|
|
563
|
+
* 0 to 2.
|
|
564
|
+
*/
|
|
565
|
+
temperature: number | null;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* A transcriber. Null settings use the default.
|
|
569
|
+
*/
|
|
570
|
+
interface Stt {
|
|
571
|
+
/**
|
|
572
|
+
* How long the transcriber waits before it ends a turn.
|
|
573
|
+
*/
|
|
574
|
+
endpointingMs: number | null;
|
|
575
|
+
/**
|
|
576
|
+
* Words and phrases the transcriber should listen for.
|
|
577
|
+
*/
|
|
578
|
+
keyterms: Array<string>;
|
|
579
|
+
/**
|
|
580
|
+
* Any transcriber model id the provider accepts.
|
|
581
|
+
*/
|
|
582
|
+
model: string;
|
|
583
|
+
provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS';
|
|
584
|
+
smartFormat: boolean | null;
|
|
585
|
+
turnDetection: 'pipeline' | 'provider' | null;
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* A voice. Null settings use the default.
|
|
589
|
+
*/
|
|
590
|
+
interface Tt {
|
|
591
|
+
/**
|
|
592
|
+
* Any voice model id the provider accepts.
|
|
593
|
+
*/
|
|
594
|
+
model: string;
|
|
595
|
+
provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME';
|
|
596
|
+
/**
|
|
597
|
+
* 0 to 1, ElevenLabs.
|
|
598
|
+
*/
|
|
599
|
+
similarityBoost: number | null;
|
|
600
|
+
/**
|
|
601
|
+
* 0.5 to 2.
|
|
602
|
+
*/
|
|
603
|
+
speed: number | null;
|
|
604
|
+
/**
|
|
605
|
+
* 0 to 1, ElevenLabs.
|
|
606
|
+
*/
|
|
607
|
+
stability: number | null;
|
|
608
|
+
/**
|
|
609
|
+
* Any voice id the provider accepts, including your own voices.
|
|
610
|
+
*/
|
|
611
|
+
voiceId: string;
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
/**
|
|
615
|
+
* One model that hears the caller and speaks with its own voice.
|
|
616
|
+
*/
|
|
617
|
+
interface AgentSpeechToSpeechModelConfig {
|
|
618
|
+
/**
|
|
619
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
620
|
+
* the default.
|
|
621
|
+
*/
|
|
622
|
+
speechToSpeech: AgentSpeechToSpeechModelConfig.SpeechToSpeech;
|
|
623
|
+
type: 'SPEECH_TO_SPEECH';
|
|
624
|
+
}
|
|
625
|
+
namespace AgentSpeechToSpeechModelConfig {
|
|
626
|
+
/**
|
|
627
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
628
|
+
* the default.
|
|
629
|
+
*/
|
|
630
|
+
interface SpeechToSpeech {
|
|
631
|
+
/**
|
|
632
|
+
* OpenAI Live models only: the text model they delegate to.
|
|
633
|
+
*/
|
|
634
|
+
backendModel: string | null;
|
|
635
|
+
maxOutputTokens: number | null;
|
|
636
|
+
/**
|
|
637
|
+
* Any speech-to-speech model id the provider accepts.
|
|
638
|
+
*/
|
|
639
|
+
model: string;
|
|
640
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
641
|
+
/**
|
|
642
|
+
* 0 to 2.
|
|
643
|
+
*/
|
|
644
|
+
temperature: number | null;
|
|
645
|
+
/**
|
|
646
|
+
* The model's own voice.
|
|
647
|
+
*/
|
|
648
|
+
voice: string | null;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
494
651
|
interface Tool {
|
|
495
652
|
/**
|
|
496
653
|
* The tool version the agent runs; null runs the tool's latest declared version.
|
|
@@ -511,14 +668,14 @@ export declare namespace AgentVersionGetByIDResponse {
|
|
|
511
668
|
}
|
|
512
669
|
}
|
|
513
670
|
}
|
|
514
|
-
export interface
|
|
671
|
+
export interface AgentVersionRollbackResponse {
|
|
515
672
|
/**
|
|
516
673
|
* One version of a Roark-hosted agent's configuration. Null settings use the
|
|
517
674
|
* runtime default.
|
|
518
675
|
*/
|
|
519
|
-
data:
|
|
676
|
+
data: AgentVersionRollbackResponse.Data;
|
|
520
677
|
}
|
|
521
|
-
export declare namespace
|
|
678
|
+
export declare namespace AgentVersionRollbackResponse {
|
|
522
679
|
/**
|
|
523
680
|
* One version of a Roark-hosted agent's configuration. Null settings use the
|
|
524
681
|
* runtime default.
|
|
@@ -579,24 +736,6 @@ export declare namespace AgentVersionRestoreResponse {
|
|
|
579
736
|
* ISO 639-1, e.g. en.
|
|
580
737
|
*/
|
|
581
738
|
language: string | null;
|
|
582
|
-
/**
|
|
583
|
-
* OpenAI Live models only: the text model they delegate to.
|
|
584
|
-
*/
|
|
585
|
-
llmBackendModel: string | null;
|
|
586
|
-
llmMaxTokens: number | null;
|
|
587
|
-
/**
|
|
588
|
-
* Any model id the provider accepts. One model serves every speaker.
|
|
589
|
-
*/
|
|
590
|
-
llmModel: string | null;
|
|
591
|
-
llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
592
|
-
/**
|
|
593
|
-
* 0 to 2.
|
|
594
|
-
*/
|
|
595
|
-
llmTemperature: number | null;
|
|
596
|
-
/**
|
|
597
|
-
* Speech-to-speech models only: the model's own voice.
|
|
598
|
-
*/
|
|
599
|
-
llmVoice: string | null;
|
|
600
739
|
/**
|
|
601
740
|
* Whether the agent takes calls, chats, or both.
|
|
602
741
|
*/
|
|
@@ -607,28 +746,19 @@ export declare namespace AgentVersionRestoreResponse {
|
|
|
607
746
|
publishedAt: string | null;
|
|
608
747
|
publishedById: string | null;
|
|
609
748
|
publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
|
|
610
|
-
/**
|
|
611
|
-
* Set when this version restores an older one.
|
|
612
|
-
*/
|
|
613
|
-
restoredFromVersionId: string | null;
|
|
614
749
|
/**
|
|
615
750
|
* Increases with every edit to a draft. Send it back as expectedRevision when you
|
|
616
751
|
* publish.
|
|
617
752
|
*/
|
|
618
753
|
revision: number;
|
|
619
754
|
/**
|
|
620
|
-
*
|
|
755
|
+
* Set when this version rolls the agent back to an older one.
|
|
621
756
|
*/
|
|
622
|
-
|
|
623
|
-
sttEndpointingMs: number | null;
|
|
757
|
+
rolledBackFromVersionId: string | null;
|
|
624
758
|
/**
|
|
625
|
-
*
|
|
759
|
+
* DRAFT while being edited, PUBLISHED once it has been live.
|
|
626
760
|
*/
|
|
627
|
-
|
|
628
|
-
sttModel: string | null;
|
|
629
|
-
sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
630
|
-
sttSmartFormat: boolean | null;
|
|
631
|
-
sttTurnDetection: 'pipeline' | 'provider' | null;
|
|
761
|
+
status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
|
|
632
762
|
/**
|
|
633
763
|
* The main agent (key `main`) first, then the sub-agents it can hand the call to.
|
|
634
764
|
*/
|
|
@@ -655,8 +785,8 @@ export declare namespace AgentVersionRestoreResponse {
|
|
|
655
785
|
}
|
|
656
786
|
namespace Data {
|
|
657
787
|
/**
|
|
658
|
-
* A speaker in the conversation.
|
|
659
|
-
* agent's.
|
|
788
|
+
* A speaker in the conversation. A sub-agent without model configs runs on the
|
|
789
|
+
* main agent's.
|
|
660
790
|
*/
|
|
661
791
|
interface SubAgent {
|
|
662
792
|
handoffs: Array<SubAgent.Handoff>;
|
|
@@ -668,6 +798,11 @@ export declare namespace AgentVersionRestoreResponse {
|
|
|
668
798
|
* `main` for the main agent; otherwise letters, digits, `_` or `-`.
|
|
669
799
|
*/
|
|
670
800
|
key: string;
|
|
801
|
+
/**
|
|
802
|
+
* Up to three, in the order a call tries them. Empty on a sub-agent: it runs on
|
|
803
|
+
* the main agent's. The main agent needs one.
|
|
804
|
+
*/
|
|
805
|
+
modelConfigs: Array<SubAgent.AgentCascadeModelConfig | SubAgent.AgentSpeechToSpeechModelConfig>;
|
|
671
806
|
/**
|
|
672
807
|
* How the agent refers to this speaker.
|
|
673
808
|
*/
|
|
@@ -677,24 +812,6 @@ export declare namespace AgentVersionRestoreResponse {
|
|
|
677
812
|
*/
|
|
678
813
|
systemPrompt: string | null;
|
|
679
814
|
tools: Array<SubAgent.Tool>;
|
|
680
|
-
ttsModel: string | null;
|
|
681
|
-
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
682
|
-
/**
|
|
683
|
-
* 0 to 1, ElevenLabs.
|
|
684
|
-
*/
|
|
685
|
-
ttsSimilarityBoost: number | null;
|
|
686
|
-
/**
|
|
687
|
-
* 0.5 to 2.
|
|
688
|
-
*/
|
|
689
|
-
ttsSpeed: number | null;
|
|
690
|
-
/**
|
|
691
|
-
* 0 to 1, ElevenLabs.
|
|
692
|
-
*/
|
|
693
|
-
ttsStability: number | null;
|
|
694
|
-
/**
|
|
695
|
-
* Any voice id the provider accepts, including your own voices.
|
|
696
|
-
*/
|
|
697
|
-
ttsVoiceId: string | null;
|
|
698
815
|
}
|
|
699
816
|
namespace SubAgent {
|
|
700
817
|
interface Handoff {
|
|
@@ -719,6 +836,125 @@ export declare namespace AgentVersionRestoreResponse {
|
|
|
719
836
|
*/
|
|
720
837
|
to: string;
|
|
721
838
|
}
|
|
839
|
+
/**
|
|
840
|
+
* A transcriber, a text model and a voice. A component that fails during a call
|
|
841
|
+
* moves to its next entry; the others stay.
|
|
842
|
+
*/
|
|
843
|
+
interface AgentCascadeModelConfig {
|
|
844
|
+
/**
|
|
845
|
+
* One to three text models, in the order a call tries them.
|
|
846
|
+
*/
|
|
847
|
+
llm: Array<AgentCascadeModelConfig.Llm>;
|
|
848
|
+
/**
|
|
849
|
+
* One to three transcribers, in the order a call tries them.
|
|
850
|
+
*/
|
|
851
|
+
stt: Array<AgentCascadeModelConfig.Stt>;
|
|
852
|
+
/**
|
|
853
|
+
* One to three voices, in the order a call tries them.
|
|
854
|
+
*/
|
|
855
|
+
tts: Array<AgentCascadeModelConfig.Tt>;
|
|
856
|
+
type: 'CASCADE';
|
|
857
|
+
}
|
|
858
|
+
namespace AgentCascadeModelConfig {
|
|
859
|
+
/**
|
|
860
|
+
* A text model. Null settings use the default.
|
|
861
|
+
*/
|
|
862
|
+
interface Llm {
|
|
863
|
+
maxTokens: number | null;
|
|
864
|
+
/**
|
|
865
|
+
* Any text model id the provider accepts.
|
|
866
|
+
*/
|
|
867
|
+
model: string;
|
|
868
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
869
|
+
/**
|
|
870
|
+
* 0 to 2.
|
|
871
|
+
*/
|
|
872
|
+
temperature: number | null;
|
|
873
|
+
}
|
|
874
|
+
/**
|
|
875
|
+
* A transcriber. Null settings use the default.
|
|
876
|
+
*/
|
|
877
|
+
interface Stt {
|
|
878
|
+
/**
|
|
879
|
+
* How long the transcriber waits before it ends a turn.
|
|
880
|
+
*/
|
|
881
|
+
endpointingMs: number | null;
|
|
882
|
+
/**
|
|
883
|
+
* Words and phrases the transcriber should listen for.
|
|
884
|
+
*/
|
|
885
|
+
keyterms: Array<string>;
|
|
886
|
+
/**
|
|
887
|
+
* Any transcriber model id the provider accepts.
|
|
888
|
+
*/
|
|
889
|
+
model: string;
|
|
890
|
+
provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS';
|
|
891
|
+
smartFormat: boolean | null;
|
|
892
|
+
turnDetection: 'pipeline' | 'provider' | null;
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* A voice. Null settings use the default.
|
|
896
|
+
*/
|
|
897
|
+
interface Tt {
|
|
898
|
+
/**
|
|
899
|
+
* Any voice model id the provider accepts.
|
|
900
|
+
*/
|
|
901
|
+
model: string;
|
|
902
|
+
provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME';
|
|
903
|
+
/**
|
|
904
|
+
* 0 to 1, ElevenLabs.
|
|
905
|
+
*/
|
|
906
|
+
similarityBoost: number | null;
|
|
907
|
+
/**
|
|
908
|
+
* 0.5 to 2.
|
|
909
|
+
*/
|
|
910
|
+
speed: number | null;
|
|
911
|
+
/**
|
|
912
|
+
* 0 to 1, ElevenLabs.
|
|
913
|
+
*/
|
|
914
|
+
stability: number | null;
|
|
915
|
+
/**
|
|
916
|
+
* Any voice id the provider accepts, including your own voices.
|
|
917
|
+
*/
|
|
918
|
+
voiceId: string;
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* One model that hears the caller and speaks with its own voice.
|
|
923
|
+
*/
|
|
924
|
+
interface AgentSpeechToSpeechModelConfig {
|
|
925
|
+
/**
|
|
926
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
927
|
+
* the default.
|
|
928
|
+
*/
|
|
929
|
+
speechToSpeech: AgentSpeechToSpeechModelConfig.SpeechToSpeech;
|
|
930
|
+
type: 'SPEECH_TO_SPEECH';
|
|
931
|
+
}
|
|
932
|
+
namespace AgentSpeechToSpeechModelConfig {
|
|
933
|
+
/**
|
|
934
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
935
|
+
* the default.
|
|
936
|
+
*/
|
|
937
|
+
interface SpeechToSpeech {
|
|
938
|
+
/**
|
|
939
|
+
* OpenAI Live models only: the text model they delegate to.
|
|
940
|
+
*/
|
|
941
|
+
backendModel: string | null;
|
|
942
|
+
maxOutputTokens: number | null;
|
|
943
|
+
/**
|
|
944
|
+
* Any speech-to-speech model id the provider accepts.
|
|
945
|
+
*/
|
|
946
|
+
model: string;
|
|
947
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
948
|
+
/**
|
|
949
|
+
* 0 to 2.
|
|
950
|
+
*/
|
|
951
|
+
temperature: number | null;
|
|
952
|
+
/**
|
|
953
|
+
* The model's own voice.
|
|
954
|
+
*/
|
|
955
|
+
voice: string | null;
|
|
956
|
+
}
|
|
957
|
+
}
|
|
722
958
|
interface Tool {
|
|
723
959
|
/**
|
|
724
960
|
* The tool version the agent runs; null runs the tool's latest declared version.
|
|
@@ -746,14 +982,14 @@ export interface AgentVersionListParams {
|
|
|
746
982
|
export interface AgentVersionGetByIDParams {
|
|
747
983
|
agentId: string;
|
|
748
984
|
}
|
|
749
|
-
export interface
|
|
985
|
+
export interface AgentVersionRollbackParams {
|
|
750
986
|
/**
|
|
751
987
|
* Path param
|
|
752
988
|
*/
|
|
753
989
|
agentId: string;
|
|
754
990
|
/**
|
|
755
|
-
* Body param: The live version when you decided to
|
|
756
|
-
* is refused with 409 if another version went live since.
|
|
991
|
+
* Body param: The live version when you decided to roll back. When sent, the
|
|
992
|
+
* rollback is refused with 409 if another version went live since.
|
|
757
993
|
*/
|
|
758
994
|
expectedLiveVersionId?: string;
|
|
759
995
|
/**
|
|
@@ -762,6 +998,6 @@ export interface AgentVersionRestoreParams {
|
|
|
762
998
|
summary?: string;
|
|
763
999
|
}
|
|
764
1000
|
export declare namespace AgentVersion {
|
|
765
|
-
export { type AgentVersionListResponse as AgentVersionListResponse, type AgentVersionGetByIDResponse as AgentVersionGetByIDResponse, type
|
|
1001
|
+
export { type AgentVersionListResponse as AgentVersionListResponse, type AgentVersionGetByIDResponse as AgentVersionGetByIDResponse, type AgentVersionRollbackResponse as AgentVersionRollbackResponse, type AgentVersionListParams as AgentVersionListParams, type AgentVersionGetByIDParams as AgentVersionGetByIDParams, type AgentVersionRollbackParams as AgentVersionRollbackParams, };
|
|
766
1002
|
}
|
|
767
1003
|
//# sourceMappingURL=agent-version.d.mts.map
|