retell-sdk 4.8.0 → 4.10.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 +33 -0
- package/README.md +26 -8
- package/core.d.ts +3 -3
- package/core.d.ts.map +1 -1
- package/core.js.map +1 -1
- package/core.mjs.map +1 -1
- package/error.d.ts.map +1 -1
- package/index.d.mts +19 -40
- package/index.d.ts +19 -40
- package/index.d.ts.map +1 -1
- package/index.js +33 -14
- package/index.js.map +1 -1
- package/index.mjs +17 -13
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent.d.ts +69 -19
- package/resources/agent.d.ts.map +1 -1
- package/resources/agent.js +0 -2
- package/resources/agent.js.map +1 -1
- package/resources/agent.mjs +0 -2
- package/resources/agent.mjs.map +1 -1
- package/resources/call.d.ts +503 -199
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +0 -2
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +0 -2
- package/resources/call.mjs.map +1 -1
- package/resources/concurrency.d.ts +22 -5
- package/resources/concurrency.d.ts.map +1 -1
- package/resources/concurrency.js +1 -3
- package/resources/concurrency.js.map +1 -1
- package/resources/concurrency.mjs +1 -3
- package/resources/concurrency.mjs.map +1 -1
- package/resources/index.d.ts +7 -7
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/knowledge-base.d.ts +1 -4
- package/resources/knowledge-base.d.ts.map +1 -1
- package/resources/knowledge-base.js +0 -2
- package/resources/knowledge-base.js.map +1 -1
- package/resources/knowledge-base.mjs +0 -2
- package/resources/knowledge-base.mjs.map +1 -1
- package/resources/llm.d.ts +37 -10
- package/resources/llm.d.ts.map +1 -1
- package/resources/llm.js +0 -2
- package/resources/llm.js.map +1 -1
- package/resources/llm.mjs +0 -2
- package/resources/llm.mjs.map +1 -1
- package/resources/phone-number.d.ts +1 -6
- package/resources/phone-number.d.ts.map +1 -1
- package/resources/phone-number.js +0 -2
- package/resources/phone-number.js.map +1 -1
- package/resources/phone-number.mjs +0 -2
- package/resources/phone-number.mjs.map +1 -1
- package/resources/voice.d.ts +1 -3
- package/resources/voice.d.ts.map +1 -1
- package/resources/voice.js +0 -2
- package/resources/voice.js.map +1 -1
- package/resources/voice.mjs +0 -2
- package/resources/voice.mjs.map +1 -1
- package/src/core.ts +5 -5
- package/src/error.ts +1 -1
- package/src/index.ts +99 -52
- package/src/resources/agent.ts +88 -21
- package/src/resources/call.ts +581 -206
- package/src/resources/concurrency.ts +27 -6
- package/src/resources/index.ts +32 -20
- package/src/resources/knowledge-base.ts +6 -5
- package/src/resources/llm.ts +49 -12
- package/src/resources/phone-number.ts +8 -7
- package/src/resources/voice.ts +2 -4
- package/src/uploads.ts +8 -4
- package/src/version.ts +1 -1
- package/uploads.js +9 -2
- package/uploads.js.map +1 -1
- package/uploads.mjs +9 -2
- package/uploads.mjs.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
package/resources/voice.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { APIResource } from "../resource.js";
|
|
2
2
|
import * as Core from "../core.js";
|
|
3
|
-
import * as VoiceAPI from "./voice.js";
|
|
4
3
|
export declare class Voice extends APIResource {
|
|
5
4
|
/**
|
|
6
5
|
* Retrieve details of a specific voice
|
|
@@ -43,7 +42,6 @@ export interface VoiceResponse {
|
|
|
43
42
|
}
|
|
44
43
|
export type VoiceListResponse = Array<VoiceResponse>;
|
|
45
44
|
export declare namespace Voice {
|
|
46
|
-
export
|
|
47
|
-
export import VoiceListResponse = VoiceAPI.VoiceListResponse;
|
|
45
|
+
export { type VoiceResponse as VoiceResponse, type VoiceListResponse as VoiceListResponse };
|
|
48
46
|
}
|
|
49
47
|
//# sourceMappingURL=voice.d.ts.map
|
package/resources/voice.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../src/resources/voice.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../src/resources/voice.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;IAIxF;;OAEG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC;CAGxE;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC;IAE1B;;OAEG;IACH,QAAQ,EAAE,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC;IAE/C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC;AAErD,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,aAAa,IAAI,aAAa,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CAC7F"}
|
package/resources/voice.js
CHANGED
package/resources/voice.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voice.js","sourceRoot":"","sources":["../src/resources/voice.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;
|
|
1
|
+
{"version":3,"file":"voice.js","sourceRoot":"","sources":["../src/resources/voice.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,QAAQ,CAAC,OAAe,EAAE,OAA6B;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,OAA6B;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;CACF;AAdD,sBAcC"}
|
package/resources/voice.mjs
CHANGED
package/resources/voice.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voice.mjs","sourceRoot":"","sources":["../src/resources/voice.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"voice.mjs","sourceRoot":"","sources":["../src/resources/voice.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,QAAQ,CAAC,OAAe,EAAE,OAA6B;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,OAA6B;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;CACF"}
|
package/src/core.ts
CHANGED
|
@@ -396,7 +396,7 @@ export abstract class APIClient {
|
|
|
396
396
|
error: Object | undefined,
|
|
397
397
|
message: string | undefined,
|
|
398
398
|
headers: Headers | undefined,
|
|
399
|
-
) {
|
|
399
|
+
): APIError {
|
|
400
400
|
return APIError.generate(status, error, message, headers);
|
|
401
401
|
}
|
|
402
402
|
|
|
@@ -668,9 +668,9 @@ export abstract class AbstractPage<Item> implements AsyncIterable<Item> {
|
|
|
668
668
|
return await this.#client.requestAPIList(this.constructor as any, nextOptions);
|
|
669
669
|
}
|
|
670
670
|
|
|
671
|
-
async *iterPages() {
|
|
671
|
+
async *iterPages(): AsyncGenerator<this> {
|
|
672
672
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
673
|
-
let page:
|
|
673
|
+
let page: this = this;
|
|
674
674
|
yield page;
|
|
675
675
|
while (page.hasNextPage()) {
|
|
676
676
|
page = await page.getNextPage();
|
|
@@ -678,7 +678,7 @@ export abstract class AbstractPage<Item> implements AsyncIterable<Item> {
|
|
|
678
678
|
}
|
|
679
679
|
}
|
|
680
680
|
|
|
681
|
-
async *[Symbol.asyncIterator]() {
|
|
681
|
+
async *[Symbol.asyncIterator](): AsyncGenerator<Item> {
|
|
682
682
|
for await (const page of this.iterPages()) {
|
|
683
683
|
for (const item of page.getPaginatedItems()) {
|
|
684
684
|
yield item;
|
|
@@ -721,7 +721,7 @@ export class PagePromise<
|
|
|
721
721
|
* console.log(item)
|
|
722
722
|
* }
|
|
723
723
|
*/
|
|
724
|
-
async *[Symbol.asyncIterator]() {
|
|
724
|
+
async *[Symbol.asyncIterator](): AsyncGenerator<Item> {
|
|
725
725
|
const page = await this;
|
|
726
726
|
for await (const item of page) {
|
|
727
727
|
yield item;
|
package/src/error.ts
CHANGED
|
@@ -47,7 +47,7 @@ export class APIError extends RetellError {
|
|
|
47
47
|
errorResponse: Object | undefined,
|
|
48
48
|
message: string | undefined,
|
|
49
49
|
headers: Headers | undefined,
|
|
50
|
-
) {
|
|
50
|
+
): APIError {
|
|
51
51
|
if (!status) {
|
|
52
52
|
return new APIConnectionError({ message, cause: castToError(errorResponse) });
|
|
53
53
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,10 +1,45 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Errors from './error';
|
|
4
|
-
import * as Uploads from './uploads';
|
|
5
3
|
import { type Agent } from './_shims/index';
|
|
6
4
|
import * as Core from './core';
|
|
5
|
+
import * as Errors from './error';
|
|
6
|
+
import * as Uploads from './uploads';
|
|
7
7
|
import * as API from './resources/index';
|
|
8
|
+
import {
|
|
9
|
+
Agent as AgentAPIAgent,
|
|
10
|
+
AgentCreateParams,
|
|
11
|
+
AgentListResponse,
|
|
12
|
+
AgentResponse,
|
|
13
|
+
AgentUpdateParams,
|
|
14
|
+
} from './resources/agent';
|
|
15
|
+
import {
|
|
16
|
+
Call,
|
|
17
|
+
CallCreatePhoneCallParams,
|
|
18
|
+
CallCreateWebCallParams,
|
|
19
|
+
CallListParams,
|
|
20
|
+
CallListResponse,
|
|
21
|
+
CallRegisterPhoneCallParams,
|
|
22
|
+
CallResponse,
|
|
23
|
+
PhoneCallResponse,
|
|
24
|
+
WebCallResponse,
|
|
25
|
+
} from './resources/call';
|
|
26
|
+
import { Concurrency, ConcurrencyRetrieveResponse } from './resources/concurrency';
|
|
27
|
+
import {
|
|
28
|
+
KnowledgeBase,
|
|
29
|
+
KnowledgeBaseCreateParams,
|
|
30
|
+
KnowledgeBaseListResponse,
|
|
31
|
+
KnowledgeBaseResponse,
|
|
32
|
+
} from './resources/knowledge-base';
|
|
33
|
+
import { Llm, LlmCreateParams, LlmListResponse, LlmResponse, LlmUpdateParams } from './resources/llm';
|
|
34
|
+
import {
|
|
35
|
+
PhoneNumber,
|
|
36
|
+
PhoneNumberCreateParams,
|
|
37
|
+
PhoneNumberImportParams,
|
|
38
|
+
PhoneNumberListResponse,
|
|
39
|
+
PhoneNumberResponse,
|
|
40
|
+
PhoneNumberUpdateParams,
|
|
41
|
+
} from './resources/phone-number';
|
|
42
|
+
import { Voice, VoiceListResponse, VoiceResponse } from './resources/voice';
|
|
8
43
|
import * as Webhooks from "./lib/webhook_auth";
|
|
9
44
|
|
|
10
45
|
export interface ClientOptions {
|
|
@@ -160,7 +195,67 @@ export class Retell extends Core.APIClient {
|
|
|
160
195
|
static sign = Webhooks.sign;
|
|
161
196
|
}
|
|
162
197
|
|
|
163
|
-
|
|
198
|
+
Retell.Call = Call;
|
|
199
|
+
Retell.PhoneNumber = PhoneNumber;
|
|
200
|
+
Retell.Agent = AgentAPIAgent;
|
|
201
|
+
Retell.Llm = Llm;
|
|
202
|
+
Retell.KnowledgeBase = KnowledgeBase;
|
|
203
|
+
Retell.Voice = Voice;
|
|
204
|
+
Retell.Concurrency = Concurrency;
|
|
205
|
+
export declare namespace Retell {
|
|
206
|
+
export type RequestOptions = Core.RequestOptions;
|
|
207
|
+
|
|
208
|
+
export {
|
|
209
|
+
Call as Call,
|
|
210
|
+
type CallResponse as CallResponse,
|
|
211
|
+
type PhoneCallResponse as PhoneCallResponse,
|
|
212
|
+
type WebCallResponse as WebCallResponse,
|
|
213
|
+
type CallListResponse as CallListResponse,
|
|
214
|
+
type CallListParams as CallListParams,
|
|
215
|
+
type CallCreatePhoneCallParams as CallCreatePhoneCallParams,
|
|
216
|
+
type CallCreateWebCallParams as CallCreateWebCallParams,
|
|
217
|
+
type CallRegisterPhoneCallParams as CallRegisterPhoneCallParams,
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
export {
|
|
221
|
+
PhoneNumber as PhoneNumber,
|
|
222
|
+
type PhoneNumberResponse as PhoneNumberResponse,
|
|
223
|
+
type PhoneNumberListResponse as PhoneNumberListResponse,
|
|
224
|
+
type PhoneNumberCreateParams as PhoneNumberCreateParams,
|
|
225
|
+
type PhoneNumberUpdateParams as PhoneNumberUpdateParams,
|
|
226
|
+
type PhoneNumberImportParams as PhoneNumberImportParams,
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
export {
|
|
230
|
+
AgentAPIAgent as Agent,
|
|
231
|
+
type AgentResponse as AgentResponse,
|
|
232
|
+
type AgentListResponse as AgentListResponse,
|
|
233
|
+
type AgentCreateParams as AgentCreateParams,
|
|
234
|
+
type AgentUpdateParams as AgentUpdateParams,
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
export {
|
|
238
|
+
Llm as Llm,
|
|
239
|
+
type LlmResponse as LlmResponse,
|
|
240
|
+
type LlmListResponse as LlmListResponse,
|
|
241
|
+
type LlmCreateParams as LlmCreateParams,
|
|
242
|
+
type LlmUpdateParams as LlmUpdateParams,
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
export {
|
|
246
|
+
KnowledgeBase as KnowledgeBase,
|
|
247
|
+
type KnowledgeBaseResponse as KnowledgeBaseResponse,
|
|
248
|
+
type KnowledgeBaseListResponse as KnowledgeBaseListResponse,
|
|
249
|
+
type KnowledgeBaseCreateParams as KnowledgeBaseCreateParams,
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
export { Voice as Voice, type VoiceResponse as VoiceResponse, type VoiceListResponse as VoiceListResponse };
|
|
253
|
+
|
|
254
|
+
export { Concurrency as Concurrency, type ConcurrencyRetrieveResponse as ConcurrencyRetrieveResponse };
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export { toFile, fileFromPath } from './uploads';
|
|
258
|
+
export {
|
|
164
259
|
RetellError,
|
|
165
260
|
APIError,
|
|
166
261
|
APIConnectionError,
|
|
@@ -174,54 +269,6 @@ export const {
|
|
|
174
269
|
InternalServerError,
|
|
175
270
|
PermissionDeniedError,
|
|
176
271
|
UnprocessableEntityError,
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export import toFile = Uploads.toFile;
|
|
180
|
-
export import fileFromPath = Uploads.fileFromPath;
|
|
181
|
-
|
|
182
|
-
export namespace Retell {
|
|
183
|
-
export import RequestOptions = Core.RequestOptions;
|
|
184
|
-
|
|
185
|
-
export import Call = API.Call;
|
|
186
|
-
export import CallResponse = API.CallResponse;
|
|
187
|
-
export import PhoneCallResponse = API.PhoneCallResponse;
|
|
188
|
-
export import WebCallResponse = API.WebCallResponse;
|
|
189
|
-
export import CallListResponse = API.CallListResponse;
|
|
190
|
-
export import CallListParams = API.CallListParams;
|
|
191
|
-
export import CallCreatePhoneCallParams = API.CallCreatePhoneCallParams;
|
|
192
|
-
export import CallCreateWebCallParams = API.CallCreateWebCallParams;
|
|
193
|
-
export import CallRegisterPhoneCallParams = API.CallRegisterPhoneCallParams;
|
|
194
|
-
|
|
195
|
-
export import PhoneNumber = API.PhoneNumber;
|
|
196
|
-
export import PhoneNumberResponse = API.PhoneNumberResponse;
|
|
197
|
-
export import PhoneNumberListResponse = API.PhoneNumberListResponse;
|
|
198
|
-
export import PhoneNumberCreateParams = API.PhoneNumberCreateParams;
|
|
199
|
-
export import PhoneNumberUpdateParams = API.PhoneNumberUpdateParams;
|
|
200
|
-
export import PhoneNumberImportParams = API.PhoneNumberImportParams;
|
|
201
|
-
|
|
202
|
-
export import Agent = API.Agent;
|
|
203
|
-
export import AgentResponse = API.AgentResponse;
|
|
204
|
-
export import AgentListResponse = API.AgentListResponse;
|
|
205
|
-
export import AgentCreateParams = API.AgentCreateParams;
|
|
206
|
-
export import AgentUpdateParams = API.AgentUpdateParams;
|
|
207
|
-
|
|
208
|
-
export import Llm = API.Llm;
|
|
209
|
-
export import LlmResponse = API.LlmResponse;
|
|
210
|
-
export import LlmListResponse = API.LlmListResponse;
|
|
211
|
-
export import LlmCreateParams = API.LlmCreateParams;
|
|
212
|
-
export import LlmUpdateParams = API.LlmUpdateParams;
|
|
213
|
-
|
|
214
|
-
export import KnowledgeBase = API.KnowledgeBase;
|
|
215
|
-
export import KnowledgeBaseResponse = API.KnowledgeBaseResponse;
|
|
216
|
-
export import KnowledgeBaseListResponse = API.KnowledgeBaseListResponse;
|
|
217
|
-
export import KnowledgeBaseCreateParams = API.KnowledgeBaseCreateParams;
|
|
218
|
-
|
|
219
|
-
export import Voice = API.Voice;
|
|
220
|
-
export import VoiceResponse = API.VoiceResponse;
|
|
221
|
-
export import VoiceListResponse = API.VoiceListResponse;
|
|
222
|
-
|
|
223
|
-
export import Concurrency = API.Concurrency;
|
|
224
|
-
export import ConcurrencyRetrieveResponse = API.ConcurrencyRetrieveResponse;
|
|
225
|
-
}
|
|
272
|
+
} from './error';
|
|
226
273
|
|
|
227
274
|
export default Retell;
|
package/src/resources/agent.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../resource';
|
|
4
4
|
import * as Core from '../core';
|
|
5
|
-
import * as AgentAPI from './agent';
|
|
6
5
|
|
|
7
6
|
export class Agent extends APIResource {
|
|
8
7
|
/**
|
|
@@ -61,11 +60,9 @@ export interface AgentResponse {
|
|
|
61
60
|
last_modification_timestamp: number;
|
|
62
61
|
|
|
63
62
|
/**
|
|
64
|
-
* The
|
|
65
|
-
* server. Check out [LLM WebSocket](/api-references/llm-websocket) for more about
|
|
66
|
-
* request format (sent from us) and response format (send to us).
|
|
63
|
+
* The response engine to use for the agent.
|
|
67
64
|
*/
|
|
68
|
-
|
|
65
|
+
response_engine: AgentResponse.ResponseEngineRetellLm | AgentResponse.ResponseEngineCustomLm;
|
|
69
66
|
|
|
70
67
|
/**
|
|
71
68
|
* Unique voice id used for the agent. Find list of available voices and their
|
|
@@ -344,6 +341,30 @@ export interface AgentResponse {
|
|
|
344
341
|
}
|
|
345
342
|
|
|
346
343
|
export namespace AgentResponse {
|
|
344
|
+
export interface ResponseEngineRetellLm {
|
|
345
|
+
/**
|
|
346
|
+
* id of the Retell LLM to use.
|
|
347
|
+
*/
|
|
348
|
+
llm_id: string;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* type of the response engine.
|
|
352
|
+
*/
|
|
353
|
+
type: 'retell-llm';
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export interface ResponseEngineCustomLm {
|
|
357
|
+
/**
|
|
358
|
+
* LLM websocket url of the custom LLM.
|
|
359
|
+
*/
|
|
360
|
+
llm_websocket_url: string;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* type of the response engine.
|
|
364
|
+
*/
|
|
365
|
+
type: 'custom-llm';
|
|
366
|
+
}
|
|
367
|
+
|
|
347
368
|
export interface StringAnalysisData {
|
|
348
369
|
/**
|
|
349
370
|
* Description of the variable.
|
|
@@ -444,11 +465,9 @@ export type AgentListResponse = Array<AgentResponse>;
|
|
|
444
465
|
|
|
445
466
|
export interface AgentCreateParams {
|
|
446
467
|
/**
|
|
447
|
-
* The
|
|
448
|
-
* server. Check out [LLM WebSocket](/api-references/llm-websocket) for more about
|
|
449
|
-
* request format (sent from us) and response format (send to us).
|
|
468
|
+
* The response engine to use for the agent.
|
|
450
469
|
*/
|
|
451
|
-
|
|
470
|
+
response_engine: AgentCreateParams.ResponseEngineRetellLm | AgentCreateParams.ResponseEngineCustomLm;
|
|
452
471
|
|
|
453
472
|
/**
|
|
454
473
|
* Unique voice id used for the agent. Find list of available voices and their
|
|
@@ -727,6 +746,30 @@ export interface AgentCreateParams {
|
|
|
727
746
|
}
|
|
728
747
|
|
|
729
748
|
export namespace AgentCreateParams {
|
|
749
|
+
export interface ResponseEngineRetellLm {
|
|
750
|
+
/**
|
|
751
|
+
* id of the Retell LLM to use.
|
|
752
|
+
*/
|
|
753
|
+
llm_id: string;
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* type of the response engine.
|
|
757
|
+
*/
|
|
758
|
+
type: 'retell-llm';
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
export interface ResponseEngineCustomLm {
|
|
762
|
+
/**
|
|
763
|
+
* LLM websocket url of the custom LLM.
|
|
764
|
+
*/
|
|
765
|
+
llm_websocket_url: string;
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* type of the response engine.
|
|
769
|
+
*/
|
|
770
|
+
type: 'custom-llm';
|
|
771
|
+
}
|
|
772
|
+
|
|
730
773
|
export interface StringAnalysisData {
|
|
731
774
|
/**
|
|
732
775
|
* Description of the variable.
|
|
@@ -968,13 +1011,6 @@ export interface AgentUpdateParams {
|
|
|
968
1011
|
| 'vi-VN'
|
|
969
1012
|
| 'multi';
|
|
970
1013
|
|
|
971
|
-
/**
|
|
972
|
-
* The URL we will establish LLM websocket for getting response, usually your
|
|
973
|
-
* server. Check out [LLM WebSocket](/api-references/llm-websocket) for more about
|
|
974
|
-
* request format (sent from us) and response format (send to us).
|
|
975
|
-
*/
|
|
976
|
-
llm_websocket_url?: string;
|
|
977
|
-
|
|
978
1014
|
/**
|
|
979
1015
|
* Maximum allowed length for the call, will force end the call if reached. The
|
|
980
1016
|
* minimum value allowed is 60,000 ms (1 min), and maximum value allowed is
|
|
@@ -1033,6 +1069,11 @@ export interface AgentUpdateParams {
|
|
|
1033
1069
|
*/
|
|
1034
1070
|
reminder_trigger_ms?: number;
|
|
1035
1071
|
|
|
1072
|
+
/**
|
|
1073
|
+
* The response engine to use for the agent.
|
|
1074
|
+
*/
|
|
1075
|
+
response_engine?: AgentUpdateParams.ResponseEngineRetellLm | AgentUpdateParams.ResponseEngineCustomLm;
|
|
1076
|
+
|
|
1036
1077
|
/**
|
|
1037
1078
|
* Controls how responsive is the agent. Value ranging from [0,1]. Lower value
|
|
1038
1079
|
* means less responsive agent (wait more, respond slower), while higher value
|
|
@@ -1202,11 +1243,37 @@ export namespace AgentUpdateParams {
|
|
|
1202
1243
|
*/
|
|
1203
1244
|
word: string;
|
|
1204
1245
|
}
|
|
1246
|
+
|
|
1247
|
+
export interface ResponseEngineRetellLm {
|
|
1248
|
+
/**
|
|
1249
|
+
* id of the Retell LLM to use.
|
|
1250
|
+
*/
|
|
1251
|
+
llm_id: string;
|
|
1252
|
+
|
|
1253
|
+
/**
|
|
1254
|
+
* type of the response engine.
|
|
1255
|
+
*/
|
|
1256
|
+
type: 'retell-llm';
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
export interface ResponseEngineCustomLm {
|
|
1260
|
+
/**
|
|
1261
|
+
* LLM websocket url of the custom LLM.
|
|
1262
|
+
*/
|
|
1263
|
+
llm_websocket_url: string;
|
|
1264
|
+
|
|
1265
|
+
/**
|
|
1266
|
+
* type of the response engine.
|
|
1267
|
+
*/
|
|
1268
|
+
type: 'custom-llm';
|
|
1269
|
+
}
|
|
1205
1270
|
}
|
|
1206
1271
|
|
|
1207
|
-
export namespace Agent {
|
|
1208
|
-
export
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1272
|
+
export declare namespace Agent {
|
|
1273
|
+
export {
|
|
1274
|
+
type AgentResponse as AgentResponse,
|
|
1275
|
+
type AgentListResponse as AgentListResponse,
|
|
1276
|
+
type AgentCreateParams as AgentCreateParams,
|
|
1277
|
+
type AgentUpdateParams as AgentUpdateParams,
|
|
1278
|
+
};
|
|
1212
1279
|
}
|