agora-agents 2.14.0 → 2.16.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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/agentkit/Agent.d.ts +6 -4
- package/dist/cjs/agentkit/Agent.js +89 -29
- package/dist/cjs/agentkit/AgentSession.js +1 -5
- package/dist/cjs/agentkit/index.d.ts +9 -9
- package/dist/cjs/agentkit/index.js +8 -4
- package/dist/cjs/agentkit/preview/client.d.ts +10 -3
- package/dist/cjs/agentkit/preview/client.js +22 -13
- package/dist/cjs/agentkit/preview/index.d.ts +2 -2
- package/dist/cjs/agentkit/preview/index.js +3 -1
- package/dist/cjs/agentkit/preview/vendors.d.ts +2 -2
- package/dist/cjs/agentkit/preview/vendors.js +3 -1
- package/dist/cjs/agentkit/types.d.ts +51 -6
- package/dist/cjs/agentkit/vendors/cn.d.ts +12 -0
- package/dist/cjs/agentkit/vendors/cn.js +16 -1
- package/dist/cjs/agentkit/vendors/mllm.d.ts +56 -4
- package/dist/cjs/agentkit/vendors/mllm.js +62 -7
- package/dist/cjs/agentkit/vendors/stt.d.ts +24 -0
- package/dist/cjs/agentkit/vendors/stt.js +31 -1
- package/dist/cjs/agentkit/vendors/tts.d.ts +0 -38
- package/dist/cjs/agentkit/vendors/tts.js +1 -24
- package/dist/cjs/api/types/Asr.d.ts +10 -1
- package/dist/cjs/api/types/ElevenLabsAsr.d.ts +10 -0
- package/dist/cjs/api/types/ElevenLabsAsrParams.d.ts +9 -0
- package/dist/cjs/api/types/ElevenLabsAsrParams.js +3 -0
- package/dist/cjs/api/types/FishAudioAsr.d.ts +10 -0
- package/dist/cjs/api/types/FishAudioAsr.js +3 -0
- package/dist/cjs/api/types/FishAudioAsrParams.d.ts +9 -0
- package/dist/cjs/api/types/FishAudioAsrParams.js +3 -0
- package/dist/cjs/api/types/QwenAsr.d.ts +10 -0
- package/dist/cjs/api/types/QwenAsr.js +3 -0
- package/dist/cjs/api/types/QwenAsrParams.d.ts +9 -0
- package/dist/cjs/api/types/QwenAsrParams.js +3 -0
- package/dist/cjs/api/types/Tts.d.ts +1 -4
- package/dist/cjs/api/types/index.d.ts +6 -2
- package/dist/cjs/api/types/index.js +6 -2
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +9 -5
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/agentkit/Agent.d.mts +6 -4
- package/dist/esm/agentkit/Agent.mjs +89 -29
- package/dist/esm/agentkit/AgentSession.mjs +1 -5
- package/dist/esm/agentkit/index.d.mts +9 -9
- package/dist/esm/agentkit/index.mjs +4 -4
- package/dist/esm/agentkit/preview/client.d.mts +10 -3
- package/dist/esm/agentkit/preview/client.mjs +22 -13
- package/dist/esm/agentkit/preview/index.d.mts +2 -2
- package/dist/esm/agentkit/preview/index.mjs +1 -1
- package/dist/esm/agentkit/preview/vendors.d.mts +2 -2
- package/dist/esm/agentkit/preview/vendors.mjs +1 -1
- package/dist/esm/agentkit/types.d.mts +51 -6
- package/dist/esm/agentkit/vendors/cn.d.mts +12 -0
- package/dist/esm/agentkit/vendors/cn.mjs +14 -0
- package/dist/esm/agentkit/vendors/mllm.d.mts +56 -4
- package/dist/esm/agentkit/vendors/mllm.mjs +60 -6
- package/dist/esm/agentkit/vendors/stt.d.mts +24 -0
- package/dist/esm/agentkit/vendors/stt.mjs +28 -0
- package/dist/esm/agentkit/vendors/tts.d.mts +0 -38
- package/dist/esm/agentkit/vendors/tts.mjs +0 -22
- package/dist/esm/api/types/Asr.d.mts +10 -1
- package/dist/esm/api/types/ElevenLabsAsr.d.mts +10 -0
- package/dist/esm/api/types/ElevenLabsAsrParams.d.mts +9 -0
- package/dist/esm/api/types/ElevenLabsAsrParams.mjs +2 -0
- package/dist/esm/api/types/FishAudioAsr.d.mts +10 -0
- package/dist/esm/api/types/FishAudioAsr.mjs +2 -0
- package/dist/esm/api/types/FishAudioAsrParams.d.mts +9 -0
- package/dist/esm/api/types/FishAudioAsrParams.mjs +2 -0
- package/dist/esm/api/types/QwenAsr.d.mts +10 -0
- package/dist/esm/api/types/QwenAsr.mjs +2 -0
- package/dist/esm/api/types/QwenAsrParams.d.mts +9 -0
- package/dist/esm/api/types/QwenAsrParams.mjs +2 -0
- package/dist/esm/api/types/Tts.d.mts +1 -4
- package/dist/esm/api/types/index.d.mts +6 -2
- package/dist/esm/api/types/index.mjs +6 -2
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/dist/cjs/api/types/HumeAiTts.d.ts +0 -9
- package/dist/cjs/api/types/HumeAiTtsParams.d.ts +0 -29
- package/dist/cjs/api/types/HumeAiTtsParams.js +0 -12
- package/dist/esm/api/types/HumeAiTts.d.mts +0 -9
- package/dist/esm/api/types/HumeAiTtsParams.d.mts +0 -29
- package/dist/esm/api/types/HumeAiTtsParams.mjs +0 -9
- /package/dist/cjs/api/types/{HumeAiTts.js → ElevenLabsAsr.js} +0 -0
- /package/dist/esm/api/types/{HumeAiTts.mjs → ElevenLabsAsr.mjs} +0 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -41,8 +41,8 @@ function normalizeClientOptions(options) {
|
|
|
41
41
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
42
42
|
"X-Fern-Language": "JavaScript",
|
|
43
43
|
"X-Fern-SDK-Name": "agora-agents",
|
|
44
|
-
"X-Fern-SDK-Version": "v2.
|
|
45
|
-
"User-Agent": "agora-agents/v2.
|
|
44
|
+
"X-Fern-SDK-Version": "v2.16.0",
|
|
45
|
+
"User-Agent": "agora-agents/v2.16.0",
|
|
46
46
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
47
47
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
48
48
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -155,9 +155,12 @@ export declare class Agent<TTSSampleRate extends number = number, TArea extends
|
|
|
155
155
|
* Returns a new Agent with the specified MLLM vendor.
|
|
156
156
|
*
|
|
157
157
|
* MLLM vendors handle real-time audio end-to-end, bypassing the standard
|
|
158
|
-
* ASR → LLM → TTS pipeline. Calling this method
|
|
159
|
-
* `
|
|
160
|
-
* are not
|
|
158
|
+
* ASR → LLM → TTS pipeline. Calling this method makes the start request
|
|
159
|
+
* send `advanced_features.enable_mllm: true` (merged with any other
|
|
160
|
+
* advanced features), so `withLlm()`, `withTts()`, and `withStt()` are not
|
|
161
|
+
* needed. `mllm.enable` is never sent: when it is present the backend does
|
|
162
|
+
* not deliver RTM `message.metrics`. A vendor config that sets it has it
|
|
163
|
+
* removed.
|
|
161
164
|
*
|
|
162
165
|
* Note: avatars are not supported with MLLM. The avatar publisher requires
|
|
163
166
|
* the cascading ASR + LLM + TTS pipeline. Combining `withMllm()` and
|
|
@@ -457,5 +460,4 @@ export declare class Agent<TTSSampleRate extends number = number, TArea extends
|
|
|
457
460
|
*/
|
|
458
461
|
private _clone;
|
|
459
462
|
private _resolveAsrConfig;
|
|
460
|
-
private _resolveTurnDetectionConfig;
|
|
461
463
|
}
|
|
@@ -6,6 +6,17 @@
|
|
|
6
6
|
* multiple sessions. Set the unique agent instance `name` in
|
|
7
7
|
* {@link Agent.createSession}, not on the Agent itself.
|
|
8
8
|
*/
|
|
9
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
10
|
+
var t = {};
|
|
11
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
12
|
+
t[p] = s[p];
|
|
13
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
14
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
15
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
16
|
+
t[p[i]] = s[p[i]];
|
|
17
|
+
}
|
|
18
|
+
return t;
|
|
19
|
+
};
|
|
9
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
21
|
exports.Agent = void 0;
|
|
11
22
|
const index_js_1 = require("../core/domain/index.js");
|
|
@@ -19,6 +30,28 @@ function toGeneratedMllm(config) {
|
|
|
19
30
|
// this wire boundary so the public and builder APIs remain accurately typed.
|
|
20
31
|
return config;
|
|
21
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Returns a copy of an MLLM config without `mllm.enable`.
|
|
35
|
+
*
|
|
36
|
+
* The SDK enables MLLM with `advanced_features.enable_mllm`, never with
|
|
37
|
+
* `mllm.enable`. When `mllm.enable` is present in the start body the backend
|
|
38
|
+
* does not send RTM `message.metrics` (ttfb), even if
|
|
39
|
+
* `advanced_features.enable_mllm` is also set. Audio and transcripts are not
|
|
40
|
+
* affected, so the problem is easy to miss. A value set by a custom vendor or a
|
|
41
|
+
* hand-written config is dropped for the same reason.
|
|
42
|
+
*/
|
|
43
|
+
function withoutMllmEnable(config) {
|
|
44
|
+
const { enable: _dropped } = config, rest = __rest(config, ["enable"]);
|
|
45
|
+
return rest;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Merges `enable_mllm: true` into the caller's advanced features (for example
|
|
49
|
+
* `enable_rtm`). Used only for MLLM sessions; the cascading pipeline never
|
|
50
|
+
* gets `enable_mllm`.
|
|
51
|
+
*/
|
|
52
|
+
function withEnableMllm(features) {
|
|
53
|
+
return Object.assign(Object.assign({}, features), { enable_mllm: true });
|
|
54
|
+
}
|
|
22
55
|
const INTERACTION_LANGUAGES = new Set([
|
|
23
56
|
"ar-EG",
|
|
24
57
|
"ar-JO",
|
|
@@ -61,6 +94,41 @@ function assertTurnDetectionLanguage(value) {
|
|
|
61
94
|
throw new Error(`Invalid turnDetection.language: ${value}`);
|
|
62
95
|
}
|
|
63
96
|
}
|
|
97
|
+
/** Joins a language list into the comma-separated string the API expects. */
|
|
98
|
+
function toWireLanguage(language) {
|
|
99
|
+
return typeof language === "string" ? language : [...new Set(language)].join(",");
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Validates `turnDetection` and resolves `language` to the wire string.
|
|
103
|
+
*
|
|
104
|
+
* - Defaults `language` to en-US.
|
|
105
|
+
* - Semantic EoS takes only one English or Chinese language. The types already
|
|
106
|
+
* enforce this; the runtime check covers untyped callers.
|
|
107
|
+
* - Several languages with no EoS mode set fall back to silence VAD.
|
|
108
|
+
*/
|
|
109
|
+
function resolveTurnDetectionConfig(config) {
|
|
110
|
+
var _a, _b;
|
|
111
|
+
const language = (_a = config === null || config === void 0 ? void 0 : config.language) !== null && _a !== void 0 ? _a : DEFAULT_TURN_DETECTION_LANGUAGE;
|
|
112
|
+
const languages = typeof language === "string" ? [language] : [...new Set(language)];
|
|
113
|
+
if (languages.length === 0) {
|
|
114
|
+
throw new Error("turnDetection.language must not be an empty list");
|
|
115
|
+
}
|
|
116
|
+
languages.forEach(assertTurnDetectionLanguage);
|
|
117
|
+
const endOfSpeech = (_b = config === null || config === void 0 ? void 0 : config.config) === null || _b === void 0 ? void 0 : _b.end_of_speech;
|
|
118
|
+
if ((endOfSpeech === null || endOfSpeech === void 0 ? void 0 : endOfSpeech.mode) === "semantic") {
|
|
119
|
+
if (typeof language !== "string") {
|
|
120
|
+
throw new Error("turnDetection.language cannot be a list when end_of_speech.mode is semantic; use one English or Chinese language, or use end_of_speech.mode vad. Otherwise the service silently uses VAD instead of semantic end of speech");
|
|
121
|
+
}
|
|
122
|
+
if (!/^(en|zh)-/.test(language)) {
|
|
123
|
+
throw new Error(`Semantic end_of_speech supports only English and Chinese languages; got turnDetection.language: ${language}. Otherwise the service silently uses VAD instead of semantic end of speech`);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
const resolved = Object.assign(Object.assign({}, config), { language: languages.join(",") });
|
|
127
|
+
if (languages.length > 1 && (endOfSpeech === null || endOfSpeech === void 0 ? void 0 : endOfSpeech.mode) === undefined) {
|
|
128
|
+
resolved.config = Object.assign(Object.assign({}, config === null || config === void 0 ? void 0 : config.config), { end_of_speech: Object.assign(Object.assign({}, endOfSpeech), { mode: "vad" }) });
|
|
129
|
+
}
|
|
130
|
+
return resolved;
|
|
131
|
+
}
|
|
64
132
|
/**
|
|
65
133
|
* Agent class representing a reusable agent configuration.
|
|
66
134
|
*
|
|
@@ -177,9 +245,12 @@ class Agent {
|
|
|
177
245
|
* Returns a new Agent with the specified MLLM vendor.
|
|
178
246
|
*
|
|
179
247
|
* MLLM vendors handle real-time audio end-to-end, bypassing the standard
|
|
180
|
-
* ASR → LLM → TTS pipeline. Calling this method
|
|
181
|
-
* `
|
|
182
|
-
* are not
|
|
248
|
+
* ASR → LLM → TTS pipeline. Calling this method makes the start request
|
|
249
|
+
* send `advanced_features.enable_mllm: true` (merged with any other
|
|
250
|
+
* advanced features), so `withLlm()`, `withTts()`, and `withStt()` are not
|
|
251
|
+
* needed. `mllm.enable` is never sent: when it is present the backend does
|
|
252
|
+
* not deliver RTM `message.metrics`. A vendor config that sets it has it
|
|
253
|
+
* removed.
|
|
183
254
|
*
|
|
184
255
|
* Note: avatars are not supported with MLLM. The avatar publisher requires
|
|
185
256
|
* the cascading ASR + LLM + TTS pipeline. Combining `withMllm()` and
|
|
@@ -188,14 +259,8 @@ class Agent {
|
|
|
188
259
|
* @param vendor - MLLM vendor instance (e.g., new VertexAI({ model: '...', projectId: '...', ... }))
|
|
189
260
|
*/
|
|
190
261
|
withMllm(vendor) {
|
|
191
|
-
var _a;
|
|
192
262
|
const newAgent = this._clone();
|
|
193
|
-
newAgent._mllm =
|
|
194
|
-
if (((_a = newAgent._advancedFeatures) === null || _a === void 0 ? void 0 : _a.enable_mllm) !== undefined) {
|
|
195
|
-
const advancedFeatures = Object.assign({}, newAgent._advancedFeatures);
|
|
196
|
-
delete advancedFeatures.enable_mllm;
|
|
197
|
-
newAgent._advancedFeatures = Object.keys(advancedFeatures).length > 0 ? advancedFeatures : undefined;
|
|
198
|
-
}
|
|
263
|
+
newAgent._mllm = withoutMllmEnable(vendor.toConfig());
|
|
199
264
|
return newAgent;
|
|
200
265
|
}
|
|
201
266
|
/**
|
|
@@ -586,10 +651,10 @@ class Agent {
|
|
|
586
651
|
* and RTM privileges (required for RTM-enabled sessions).
|
|
587
652
|
*/
|
|
588
653
|
toProperties(opts) {
|
|
589
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
654
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
590
655
|
// In MLLM mode the backend handles audio end-to-end; LLM, TTS, and ASR
|
|
591
656
|
// are not required.
|
|
592
|
-
const isMllmMode =
|
|
657
|
+
const isMllmMode = this._mllm !== undefined;
|
|
593
658
|
// Reject incompatible combinations before any work (token generation, etc.).
|
|
594
659
|
// Avatars are currently supported only with the cascading ASR/LLM/TTS pipeline;
|
|
595
660
|
// the MLLM pipeline does not flow through the avatar publisher, so combining
|
|
@@ -619,7 +684,7 @@ class Agent {
|
|
|
619
684
|
// to receive transcripts and state events. Default it automatically so
|
|
620
685
|
// callers only need to set advancedFeatures.enable_rtm: true.
|
|
621
686
|
let resolvedParameters = this._parameters;
|
|
622
|
-
if (((
|
|
687
|
+
if (((_a = this._advancedFeatures) === null || _a === void 0 ? void 0 : _a.enable_rtm) && !(resolvedParameters === null || resolvedParameters === void 0 ? void 0 : resolvedParameters.data_channel)) {
|
|
623
688
|
resolvedParameters = Object.assign(Object.assign({}, resolvedParameters), { data_channel: "rtm" });
|
|
624
689
|
}
|
|
625
690
|
if ((resolvedParameters === null || resolvedParameters === void 0 ? void 0 : resolvedParameters.audio_scenario) === undefined) {
|
|
@@ -644,7 +709,9 @@ class Agent {
|
|
|
644
709
|
filler_words: this._fillerWords,
|
|
645
710
|
};
|
|
646
711
|
if (isMllmMode) {
|
|
647
|
-
|
|
712
|
+
// `mllm.enable` is never sent; `advanced_features.enable_mllm` enables MLLM.
|
|
713
|
+
// See withoutMllmEnable() for why.
|
|
714
|
+
const mllmConfig = toGeneratedMllm(this._mllm ? withoutMllmEnable(this._mllm) : undefined);
|
|
648
715
|
if (mllmConfig) {
|
|
649
716
|
// Vendor config wins: only apply agent-level values when the vendor hasn't already set them.
|
|
650
717
|
// Consistent with Python (setdefault) and Go (!exists) semantics.
|
|
@@ -661,13 +728,15 @@ class Agent {
|
|
|
661
728
|
if (isOpenAIGPTLive && this._turnDetection !== undefined) {
|
|
662
729
|
console.warn("GPT Live v3 ignores agent-level turn_detection; endpointing is internal");
|
|
663
730
|
}
|
|
664
|
-
return Object.assign(Object.assign(Object.assign({}, base), { mllm: mllmConfig }), (!isOpenAIGPTLive &&
|
|
731
|
+
return Object.assign(Object.assign(Object.assign({}, base), { advanced_features: withEnableMllm(this._advancedFeatures), mllm: mllmConfig }), (!isOpenAIGPTLive &&
|
|
665
732
|
this._turnDetection !== undefined && {
|
|
666
|
-
turn_detection: this._turnDetection,
|
|
733
|
+
turn_detection: Object.assign(Object.assign({}, this._turnDetection), (this._turnDetection.language !== undefined && {
|
|
734
|
+
language: toWireLanguage(this._turnDetection.language),
|
|
735
|
+
})),
|
|
667
736
|
}));
|
|
668
737
|
}
|
|
669
|
-
const skipCategories = new Set((
|
|
670
|
-
const allowMissingCategories = new Set((
|
|
738
|
+
const skipCategories = new Set((_b = opts.skipVendorValidationCategories) !== null && _b !== void 0 ? _b : []);
|
|
739
|
+
const allowMissingCategories = new Set((_c = opts.allowMissingVendorCategories) !== null && _c !== void 0 ? _c : []);
|
|
671
740
|
if (opts.skipVendorValidation) {
|
|
672
741
|
for (const category of ["asr", "llm", "tts"]) {
|
|
673
742
|
skipCategories.add(category);
|
|
@@ -690,8 +759,8 @@ class Agent {
|
|
|
690
759
|
? this._llm.system_messages
|
|
691
760
|
: this._instructions
|
|
692
761
|
? [{ role: "system", content: this._instructions }]
|
|
693
|
-
: undefined, greeting_message: (
|
|
694
|
-
const turnDetectionConfig = this.
|
|
762
|
+
: undefined, greeting_message: (_d = this._llm.greeting_message) !== null && _d !== void 0 ? _d : this._greeting, greeting_configs: (_e = this._llm.greeting_configs) !== null && _e !== void 0 ? _e : this._greetingConfigs, failure_message: (_f = this._llm.failure_message) !== null && _f !== void 0 ? _f : this._failureMessage, max_history: (_g = this._llm.max_history) !== null && _g !== void 0 ? _g : this._maxHistory }) : undefined;
|
|
763
|
+
const turnDetectionConfig = resolveTurnDetectionConfig(this._turnDetection);
|
|
695
764
|
const asrConfig = this._stt !== undefined || !allowMissingAsr
|
|
696
765
|
? this._resolveAsrConfig(turnDetectionConfig)
|
|
697
766
|
: undefined;
|
|
@@ -759,15 +828,6 @@ class Agent {
|
|
|
759
828
|
asrConfig.language = turnDetectionConfig.language;
|
|
760
829
|
return Object.keys(asrConfig).length > 0 ? asrConfig : undefined;
|
|
761
830
|
}
|
|
762
|
-
_resolveTurnDetectionConfig() {
|
|
763
|
-
var _a;
|
|
764
|
-
const turnDetection = Object.assign({}, ((_a = this._turnDetection) !== null && _a !== void 0 ? _a : {}));
|
|
765
|
-
const existingTurnDetectionLanguage = turnDetection.language;
|
|
766
|
-
const language = existingTurnDetectionLanguage !== null && existingTurnDetectionLanguage !== void 0 ? existingTurnDetectionLanguage : DEFAULT_TURN_DETECTION_LANGUAGE;
|
|
767
|
-
assertTurnDetectionLanguage(language);
|
|
768
|
-
turnDetection.language = language;
|
|
769
|
-
return turnDetection;
|
|
770
|
-
}
|
|
771
831
|
}
|
|
772
832
|
exports.Agent = Agent;
|
|
773
833
|
function _parseNumericUid(uid, label) {
|
|
@@ -197,11 +197,7 @@ class AgentSession {
|
|
|
197
197
|
* Returns true when the agent is configured for MLLM (multimodal end-to-end audio).
|
|
198
198
|
*/
|
|
199
199
|
_isMllmMode() {
|
|
200
|
-
|
|
201
|
-
if ((mllm === null || mllm === void 0 ? void 0 : mllm.enable) === true) {
|
|
202
|
-
return true;
|
|
203
|
-
}
|
|
204
|
-
return mllm !== undefined;
|
|
200
|
+
return this._agent.mllm !== undefined;
|
|
205
201
|
}
|
|
206
202
|
/**
|
|
207
203
|
* Warns when agent-level `instructions` would be silently discarded.
|
|
@@ -35,18 +35,18 @@ export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, Previ
|
|
|
35
35
|
export type { AvatarVendor, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, LlmVendor, SttVendor, TtsVendor, } from "./region-vendors.js";
|
|
36
36
|
export type { GenerateClientTokenOptions, GenerateConvoAITokenOptions, GenerateTokenOptions, } from "./token.js";
|
|
37
37
|
export { ExpiresIn, generateClientToken, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.js";
|
|
38
|
-
export type { AdvancedFeatures, AgentConfig, AgentConfigUpdate, AmazonTts, AmazonTtsParams, AsrConfig, AsrVendorName, AvatarConfig, AvatarWireVendor, CartesiaTts, CartesiaTtsParams, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, Eagerness, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GoogleTts, GoogleTtsParams, GradiumTts, GradiumTtsParams,
|
|
38
|
+
export type { AdvancedFeatures, AgentConfig, AgentConfigUpdate, AmazonTts, AmazonTtsParams, AsrConfig, AsrVendorName, AvatarConfig, AvatarWireVendor, CartesiaTts, CartesiaTtsParams, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, Eagerness, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GoogleTts, GoogleTtsParams, GradiumTts, GradiumTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmStyle, LlmTool, LlmToolExecution, LlmToolFunction, LlmToolServer, McpServer, McpServersItem, MicrosoftTts, MicrosoftTtsParams, MinimaxTts, MinimaxTtsParams, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTts, MurfTtsParams, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, RimeTts, RimeTtsParams, RtcConfig, RtzrAsr, RtzrAsrParams, SalConfig, SalMode, SarvamTts, SarvamTtsParams, SayOptions, SemanticEndOfSpeechLanguage, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SmallestAiAsr, SmallestAiAsrParams, SmallestAiTts, SmallestAiTtsParams, SpatiusAvatarParams, SpeakConfig, SpeakPriority, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, SttConfig, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionLanguages, TurnDetectionNestedConfig, TurnDetectionType, TypecastTts, TypecastTtsParams, XAiAsr, XAiAsrParams, XAiTts, XAiTtsParams, } from "./types.js";
|
|
39
39
|
export type { AkoolAvatarOptions, AnamAvatarOptions, GenericAvatarOptions, HeyGenAvatarOptions, LemonSliceOptions, LiveAvatarAvatarOptions, ProtofaceOptions, TavusOptions, } from "./vendors/avatar.js";
|
|
40
40
|
export { AkoolAvatar, AnamAvatar, GenericAvatar, HeyGenAvatar, LemonSlice, LiveAvatarAvatar, Protoface, Tavus, } from "./vendors/avatar.js";
|
|
41
41
|
export type { AkoolSampleRate, CartesiaSampleRate, ElevenLabsSampleRate, HeyGenSampleRate, LiveAvatarSampleRate, MicrosoftSampleRate, SampleRate, } from "./vendors/base.js";
|
|
42
42
|
export { BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, type BaseLlmOptions, BaseMLLM, type BaseMllmOptions, BaseSTT, BaseTTS, type GoogleTTSSampleRate, } from "./vendors/base.js";
|
|
43
|
-
export type { AliyunLLMOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CosyVoiceTTSOptions, DeepSeekLLMOptions, FengmingSTTOptions, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MiniMaxCNTTSOptions, MiniMaxDuplexTTSOptions, SensetimeAvatarOptions, SpatiusAvatarOptions, StepFunSTTOptions, StepFunTTSOptions, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, XfyunBigModelSTTOptions, XfyunDialectSTTOptions, XfyunSTTOptions, } from "./vendors/cn.js";
|
|
44
|
-
export { AliyunLLM, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CosyVoiceTTS, DeepSeekLLM, FengmingSTT, MicrosoftCNSTT, MicrosoftCNTTS, MiniMaxCNTTS, MiniMaxDuplexTTS, SensetimeAvatar, SpatiusAvatar, StepFunSTT, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./vendors/cn.js";
|
|
43
|
+
export type { AliyunLLMOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CosyVoiceTTSOptions, DeepSeekLLMOptions, FengmingSTTOptions, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MiniMaxCNTTSOptions, MiniMaxDuplexTTSOptions, QwenSTTOptions, SensetimeAvatarOptions, SpatiusAvatarOptions, StepFunSTTOptions, StepFunTTSOptions, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, XfyunBigModelSTTOptions, XfyunDialectSTTOptions, XfyunSTTOptions, } from "./vendors/cn.js";
|
|
44
|
+
export { AliyunLLM, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CosyVoiceTTS, DeepSeekLLM, FengmingSTT, MicrosoftCNSTT, MicrosoftCNTTS, MiniMaxCNTTS, MiniMaxDuplexTTS, QwenSTT, SensetimeAvatar, SpatiusAvatar, StepFunSTT, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./vendors/cn.js";
|
|
45
45
|
export type { AmazonBedrockOptions, AnthropicOptions, AzureOpenAIOptions, CustomLLMOptions, DifyOptions, GeminiOptions, GroqOptions, OpenAIOptions, VertexAILLMOptions, } from "./vendors/llm.js";
|
|
46
46
|
export { AmazonBedrock, Anthropic, AzureOpenAI, CustomLLM, Dify, Gemini, Groq, OpenAI, VertexAILLM, } from "./vendors/llm.js";
|
|
47
|
-
export type { AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, GeminiLiveModel, GeminiLiveOptions, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, OpenAIRealtimeOptions, QwenOmniOptions, VertexAIOptions, XaiGrokOptions, } from "./vendors/mllm.js";
|
|
48
|
-
export { AzureOpenAIRealtime, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLive, GeminiLiveModels, GeminiThinkingLevels, OpenAIGPTLive, OpenAIRealtime, QwenOmni, VertexAI, XaiGrok, } from "./vendors/mllm.js";
|
|
49
|
-
export type { AmazonSTTOptions, AresSTTOptions, AssemblyAISTTOptions, DeepgramSTTOptions, GeminiSTTModel, GeminiSTTOptions, GoogleSTTOptions, MicrosoftSTTOptions, OpenAISTTOptions, RTZRSTTOptions, SarvamSTTOptions, SmallestAISTTOptions, SpeechmaticsSTTOptions, XAiSTTOptions, } from "./vendors/stt.js";
|
|
50
|
-
export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode, GoogleSTT, MicrosoftSTT, OpenAISTT, RTZRSTT, SarvamSTT, SmallestAISTT, SpeechmaticsSTT, XAiSTT, } from "./vendors/stt.js";
|
|
51
|
-
export type { AmazonTTSOptions, CartesiaTTSOptions, DeepgramTTSOptions, ElevenLabsTTSOptions, FishAudioTTSOptions, GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions, GenericTTSOptions, GoogleTTSOptions, GradiumTTSOptions,
|
|
52
|
-
export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GeminiTTS, GeminiTTSModels, GenericTTS, GoogleTTS, GradiumTTS,
|
|
47
|
+
export type { AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, GeminiLiveModel, GeminiLiveModelRow, GeminiLiveModelSpec, GeminiLiveOptions, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, OpenAIRealtimeOptions, QwenOmniOptions, VertexAIOptions, XaiGrokOptions, } from "./vendors/mllm.js";
|
|
48
|
+
export { AzureOpenAIRealtime, GEMINI_EAP_MLLM_MODELS, GEMINI_LIVE_MODEL_TABLE, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLive, GeminiLiveModels, GeminiThinkingLevels, OpenAIGPTLive, OpenAIRealtime, QwenOmni, VertexAI, XaiGrok, } from "./vendors/mllm.js";
|
|
49
|
+
export type { AmazonSTTOptions, AresSTTOptions, AssemblyAISTTOptions, DeepgramSTTOptions, ElevenLabsSTTOptions, FishAudioSTTOptions, GeminiSTTModel, GeminiSTTOptions, GoogleSTTOptions, MicrosoftSTTOptions, OpenAISTTOptions, RTZRSTTOptions, SarvamSTTOptions, SmallestAISTTOptions, SpeechmaticsSTTOptions, XAiSTTOptions, } from "./vendors/stt.js";
|
|
50
|
+
export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, ElevenLabsSTT, FishAudioSTT, GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode, GoogleSTT, MicrosoftSTT, OpenAISTT, RTZRSTT, SarvamSTT, SmallestAISTT, SpeechmaticsSTT, XAiSTT, } from "./vendors/stt.js";
|
|
51
|
+
export type { AmazonTTSOptions, CartesiaTTSOptions, DeepgramTTSOptions, ElevenLabsTTSOptions, FishAudioTTSOptions, GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions, GenericTTSOptions, GoogleTTSOptions, GradiumTTSOptions, MicrosoftTTSOptions, MiniMaxTTSOptions, MistralTTSOptions, MurfTTSOptions, OpenAITTSOptions, RimeTTSOptions, SarvamTTSOptions, SmallestAITTSOptions, SonioxTTSOptions, TypecastTTSOptions, XAiTTSOptions, } from "./vendors/tts.js";
|
|
52
|
+
export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GeminiTTS, GeminiTTSModels, GenericTTS, GoogleTTS, GradiumTTS, MicrosoftTTS, MiniMaxTTS, MistralTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, SarvamTTSLanguage, SmallestAITTS, SonioxTTS, TypecastTTS, XAiTTS, } from "./vendors/tts.js";
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
*/
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.createPreviewRoute = exports.normalizePresetInput = exports.AgentPresets = exports.redactSecrets = exports.redactHeadersForDebug = exports.REDACTED = exports.TurnDetectionTypeValues = exports.ThinkOnThinkingActionInterrupt = exports.ThinkOnThinkingActionIgnore = exports.ThinkOnSpeakingActionInterrupt = exports.ThinkOnSpeakingActionIgnore = exports.ThinkOnListeningActionInterrupt = exports.ThinkOnListeningActionInject = exports.ThinkOnListeningActionIgnore = exports.SpeakPriorityValues = exports.SpeakPriorityInterrupt = exports.SpeakPriorityIgnore = exports.SpeakPriorityAppend = exports.SilenceActionValues = exports.SalModeValues = exports.MllmTurnDetectionModeValues = exports.MllmTurnDetectionModeServerVad = exports.MllmTurnDetectionModeSemanticVad = exports.MllmTurnDetectionModeAgoraVad = exports.InterruptionModeValues = exports.InterruptionModeStartOfSpeech = exports.InterruptionModeKeywords = exports.InterruptionDisabledStrategyIgnore = exports.InterruptionDisabledStrategyAppend = exports.InterruptionDisabledStrategy = exports.Geofence = exports.FillerWordsSelectionRule = exports.DataChannel = exports.CredentialMode = exports.AudioScenario = exports.validateTtsSampleRate = exports.validateAvatarConfig = exports.toBaseAvatarConfig = exports.isSpatiusAvatar = exports.isSensetimeAvatar = exports.isLiveAvatarAvatar = exports.isHeyGenAvatar = exports.isGenericAvatar = exports.isAvatarTokenManaged = exports.isAnamAvatar = exports.isAkoolAvatar = exports.AgentSession = exports.Agent = void 0;
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.XAiTTS = exports.TypecastTTS = exports.SonioxTTS = exports.SmallestAITTS = exports.SarvamTTSLanguage = exports.SarvamTTS = void 0;
|
|
24
|
+
exports.Anthropic = exports.AmazonBedrock = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = exports.StepFunTTS = exports.StepFunSTT = exports.SpatiusAvatar = exports.SensetimeAvatar = exports.QwenSTT = exports.MiniMaxDuplexTTS = exports.MiniMaxCNTTS = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.FengmingSTT = exports.DeepSeekLLM = exports.CosyVoiceTTS = exports.BytedanceTTS = exports.BytedanceLLM = exports.BytedanceDuplexTTS = exports.AliyunLLM = exports.BaseTTS = exports.BaseSTT = exports.BaseMLLM = exports.BaseLLM = exports.BaseCNTTS = exports.BaseCNSTT = exports.BaseCNMLLM = exports.BaseCNLLM = exports.BaseCNAvatar = exports.BaseAvatar = exports.Tavus = exports.Protoface = exports.LiveAvatarAvatar = exports.LemonSlice = exports.HeyGenAvatar = exports.GenericAvatar = exports.AnamAvatar = exports.AkoolAvatar = exports.MAX_EXPIRY_SECONDS = exports.generateRtcToken = exports.generateConvoAIToken = exports.generateClientToken = exports.ExpiresIn = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = void 0;
|
|
25
|
+
exports.MiniMaxTTS = exports.MicrosoftTTS = exports.GradiumTTS = exports.GoogleTTS = exports.GenericTTS = exports.GeminiTTSModels = exports.GeminiTTS = exports.FishAudioTTS = exports.ElevenLabsTTS = exports.DeepgramTTS = exports.CartesiaTTS = exports.AmazonTTS = exports.XAiSTT = exports.SpeechmaticsSTT = exports.SmallestAISTT = exports.SarvamSTT = exports.RTZRSTT = exports.OpenAISTT = exports.MicrosoftSTT = exports.GoogleSTT = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = exports.FishAudioSTT = exports.ElevenLabsSTT = exports.DeepgramSTT = exports.AssemblyAISTT = exports.AresSTT = exports.AmazonSTT = exports.XaiGrok = exports.VertexAI = exports.QwenOmni = exports.OpenAIRealtime = exports.OpenAIGPTLive = exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GeminiLive = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.GEMINI_LIVE_MODEL_TABLE = exports.GEMINI_EAP_MLLM_MODELS = exports.AzureOpenAIRealtime = exports.VertexAILLM = exports.OpenAI = exports.Groq = exports.Gemini = exports.Dify = exports.CustomLLM = exports.AzureOpenAI = void 0;
|
|
26
|
+
exports.XAiTTS = exports.TypecastTTS = exports.SonioxTTS = exports.SmallestAITTS = exports.SarvamTTSLanguage = exports.SarvamTTS = exports.RimeTTS = exports.OpenAITTS = exports.MurfTTS = exports.MistralTTS = void 0;
|
|
27
27
|
// Core classes
|
|
28
28
|
var Agent_js_1 = require("./Agent.js");
|
|
29
29
|
Object.defineProperty(exports, "Agent", { enumerable: true, get: function () { return Agent_js_1.Agent; } });
|
|
@@ -127,6 +127,7 @@ Object.defineProperty(exports, "MicrosoftCNSTT", { enumerable: true, get: functi
|
|
|
127
127
|
Object.defineProperty(exports, "MicrosoftCNTTS", { enumerable: true, get: function () { return cn_js_1.MicrosoftCNTTS; } });
|
|
128
128
|
Object.defineProperty(exports, "MiniMaxCNTTS", { enumerable: true, get: function () { return cn_js_1.MiniMaxCNTTS; } });
|
|
129
129
|
Object.defineProperty(exports, "MiniMaxDuplexTTS", { enumerable: true, get: function () { return cn_js_1.MiniMaxDuplexTTS; } });
|
|
130
|
+
Object.defineProperty(exports, "QwenSTT", { enumerable: true, get: function () { return cn_js_1.QwenSTT; } });
|
|
130
131
|
Object.defineProperty(exports, "SensetimeAvatar", { enumerable: true, get: function () { return cn_js_1.SensetimeAvatar; } });
|
|
131
132
|
Object.defineProperty(exports, "SpatiusAvatar", { enumerable: true, get: function () { return cn_js_1.SpatiusAvatar; } });
|
|
132
133
|
Object.defineProperty(exports, "StepFunSTT", { enumerable: true, get: function () { return cn_js_1.StepFunSTT; } });
|
|
@@ -151,6 +152,8 @@ Object.defineProperty(exports, "VertexAILLM", { enumerable: true, get: function
|
|
|
151
152
|
// MLLM vendor classes
|
|
152
153
|
var mllm_js_1 = require("./vendors/mllm.js");
|
|
153
154
|
Object.defineProperty(exports, "AzureOpenAIRealtime", { enumerable: true, get: function () { return mllm_js_1.AzureOpenAIRealtime; } });
|
|
155
|
+
Object.defineProperty(exports, "GEMINI_EAP_MLLM_MODELS", { enumerable: true, get: function () { return mllm_js_1.GEMINI_EAP_MLLM_MODELS; } });
|
|
156
|
+
Object.defineProperty(exports, "GEMINI_LIVE_MODEL_TABLE", { enumerable: true, get: function () { return mllm_js_1.GEMINI_LIVE_MODEL_TABLE; } });
|
|
154
157
|
Object.defineProperty(exports, "GEMINI_MLLM_DEFAULT_MODEL", { enumerable: true, get: function () { return mllm_js_1.GEMINI_MLLM_DEFAULT_MODEL; } });
|
|
155
158
|
Object.defineProperty(exports, "GEMINI_MLLM_URL", { enumerable: true, get: function () { return mllm_js_1.GEMINI_MLLM_URL; } });
|
|
156
159
|
Object.defineProperty(exports, "GEMINI_PREVIEW_MLLM_URL", { enumerable: true, get: function () { return mllm_js_1.GEMINI_PREVIEW_MLLM_URL; } });
|
|
@@ -168,6 +171,8 @@ Object.defineProperty(exports, "AmazonSTT", { enumerable: true, get: function ()
|
|
|
168
171
|
Object.defineProperty(exports, "AresSTT", { enumerable: true, get: function () { return stt_js_1.AresSTT; } });
|
|
169
172
|
Object.defineProperty(exports, "AssemblyAISTT", { enumerable: true, get: function () { return stt_js_1.AssemblyAISTT; } });
|
|
170
173
|
Object.defineProperty(exports, "DeepgramSTT", { enumerable: true, get: function () { return stt_js_1.DeepgramSTT; } });
|
|
174
|
+
Object.defineProperty(exports, "ElevenLabsSTT", { enumerable: true, get: function () { return stt_js_1.ElevenLabsSTT; } });
|
|
175
|
+
Object.defineProperty(exports, "FishAudioSTT", { enumerable: true, get: function () { return stt_js_1.FishAudioSTT; } });
|
|
171
176
|
Object.defineProperty(exports, "GeminiSTT", { enumerable: true, get: function () { return stt_js_1.GeminiSTT; } });
|
|
172
177
|
Object.defineProperty(exports, "GeminiSTTModels", { enumerable: true, get: function () { return stt_js_1.GeminiSTTModels; } });
|
|
173
178
|
Object.defineProperty(exports, "GeminiTranscriptionMode", { enumerable: true, get: function () { return stt_js_1.GeminiTranscriptionMode; } });
|
|
@@ -191,7 +196,6 @@ Object.defineProperty(exports, "GeminiTTSModels", { enumerable: true, get: funct
|
|
|
191
196
|
Object.defineProperty(exports, "GenericTTS", { enumerable: true, get: function () { return tts_js_1.GenericTTS; } });
|
|
192
197
|
Object.defineProperty(exports, "GoogleTTS", { enumerable: true, get: function () { return tts_js_1.GoogleTTS; } });
|
|
193
198
|
Object.defineProperty(exports, "GradiumTTS", { enumerable: true, get: function () { return tts_js_1.GradiumTTS; } });
|
|
194
|
-
Object.defineProperty(exports, "HumeAITTS", { enumerable: true, get: function () { return tts_js_1.HumeAITTS; } });
|
|
195
199
|
Object.defineProperty(exports, "MicrosoftTTS", { enumerable: true, get: function () { return tts_js_1.MicrosoftTTS; } });
|
|
196
200
|
Object.defineProperty(exports, "MiniMaxTTS", { enumerable: true, get: function () { return tts_js_1.MiniMaxTTS; } });
|
|
197
201
|
Object.defineProperty(exports, "MistralTTS", { enumerable: true, get: function () { return tts_js_1.MistralTTS; } });
|
|
@@ -16,7 +16,7 @@ import type * as Agora from "../../api/index.js";
|
|
|
16
16
|
import { AgentManagementClient } from "../../api/resources/agentManagement/client/Client.js";
|
|
17
17
|
import { AgentsClient } from "../../api/resources/agents/client/Client.js";
|
|
18
18
|
/** Base URL that serves the preview providers. */
|
|
19
|
-
export declare const PREVIEW_API_BASE_URL = "https://
|
|
19
|
+
export declare const PREVIEW_API_BASE_URL = "https://us-west-1-preview.ai.agora.io/api/conversational-ai-agent";
|
|
20
20
|
/**
|
|
21
21
|
* Request header that opts a request into a preview provider family.
|
|
22
22
|
*
|
|
@@ -31,6 +31,8 @@ export declare const PREVIEW_FEATURE_HEADER = "agora-feature";
|
|
|
31
31
|
* preview endpoint.
|
|
32
32
|
*/
|
|
33
33
|
export declare const PreviewFeatures: {
|
|
34
|
+
/** Gemini Live EAP models. */
|
|
35
|
+
readonly Gemini: "gemini";
|
|
34
36
|
/** @deprecated Gemini ASR, Live, and TTS now use the production endpoint. */
|
|
35
37
|
readonly GeminiLive: "gemini-live";
|
|
36
38
|
/** @deprecated GPT Live now uses the production endpoint. */
|
|
@@ -52,8 +54,13 @@ export interface PreviewRoute {
|
|
|
52
54
|
export declare function previewRequestHeaders(features: readonly PreviewFeature[], headers?: Record<string, string>): Record<string, string>;
|
|
53
55
|
/** Build generated resource clients for one preview session. */
|
|
54
56
|
export declare function createPreviewRoute(client: AgoraClient, features: readonly PreviewFeature[]): PreviewRoute;
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Returns the preview features a start request needs. Routing is chosen by
|
|
59
|
+
* `mllm.params.model` alone, using `GEMINI_LIVE_MODEL_TABLE`. It reads the
|
|
60
|
+
* request body rather than the vendor classes, so hand-written configs are
|
|
61
|
+
* covered too.
|
|
62
|
+
*/
|
|
63
|
+
export declare function requiredPreviewFeatures(properties: Agora.StartAgentsRequest.Properties): PreviewFeature[];
|
|
57
64
|
/**
|
|
58
65
|
* Normalizes the historical Gemini preview greeting field for production.
|
|
59
66
|
* Kept under its old name so callers importing this compatibility helper do
|
|
@@ -29,8 +29,9 @@ exports.requiredPreviewFeatures = requiredPreviewFeatures;
|
|
|
29
29
|
exports.applyPreviewShape = applyPreviewShape;
|
|
30
30
|
const Client_js_1 = require("../../api/resources/agentManagement/client/Client.js");
|
|
31
31
|
const Client_js_2 = require("../../api/resources/agents/client/Client.js");
|
|
32
|
+
const mllm_js_1 = require("../vendors/mllm.js");
|
|
32
33
|
/** Base URL that serves the preview providers. */
|
|
33
|
-
exports.PREVIEW_API_BASE_URL = "https://
|
|
34
|
+
exports.PREVIEW_API_BASE_URL = "https://us-west-1-preview.ai.agora.io/api/conversational-ai-agent";
|
|
34
35
|
/**
|
|
35
36
|
* Request header that opts a request into a preview provider family.
|
|
36
37
|
*
|
|
@@ -45,6 +46,8 @@ exports.PREVIEW_FEATURE_HEADER = "agora-feature";
|
|
|
45
46
|
* preview endpoint.
|
|
46
47
|
*/
|
|
47
48
|
exports.PreviewFeatures = {
|
|
49
|
+
/** Gemini Live EAP models. */
|
|
50
|
+
Gemini: "gemini",
|
|
48
51
|
/** @deprecated Gemini ASR, Live, and TTS now use the production endpoint. */
|
|
49
52
|
GeminiLive: "gemini-live",
|
|
50
53
|
/** @deprecated GPT Live now uses the production endpoint. */
|
|
@@ -74,26 +77,32 @@ function createPreviewRoute(client, features) {
|
|
|
74
77
|
features: [...features],
|
|
75
78
|
};
|
|
76
79
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
function geminiLiveModelSpec(properties) {
|
|
81
|
+
var _a;
|
|
82
|
+
const mllm = properties.mllm;
|
|
83
|
+
const model = (_a = mllm === null || mllm === void 0 ? void 0 : mllm.params) === null || _a === void 0 ? void 0 : _a.model;
|
|
84
|
+
return (mllm === null || mllm === void 0 ? void 0 : mllm.vendor) === "gemini" && typeof model === "string" ? (0, mllm_js_1.resolveGeminiLiveModel)(model) : undefined;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Returns the preview features a start request needs. Routing is chosen by
|
|
88
|
+
* `mllm.params.model` alone, using `GEMINI_LIVE_MODEL_TABLE`. It reads the
|
|
89
|
+
* request body rather than the vendor classes, so hand-written configs are
|
|
90
|
+
* covered too.
|
|
91
|
+
*/
|
|
92
|
+
function requiredPreviewFeatures(properties) {
|
|
93
|
+
var _a;
|
|
94
|
+
return ((_a = geminiLiveModelSpec(properties)) === null || _a === void 0 ? void 0 : _a.preview) === true ? [exports.PreviewFeatures.Gemini] : [];
|
|
80
95
|
}
|
|
81
|
-
const PRODUCTION_GEMINI_MLLM_MODELS = new Set([
|
|
82
|
-
"models/gemini-3.8-live",
|
|
83
|
-
"models/gemini-3.8-live-extended-thinking",
|
|
84
|
-
]);
|
|
85
96
|
/**
|
|
86
97
|
* Normalizes the historical Gemini preview greeting field for production.
|
|
87
98
|
* Kept under its old name so callers importing this compatibility helper do
|
|
88
99
|
* not need to change code when moving an existing request to production.
|
|
89
100
|
*/
|
|
90
101
|
function applyPreviewShape(properties) {
|
|
91
|
-
|
|
102
|
+
// Applies to every model in GEMINI_LIVE_MODEL_TABLE, EAP models included,
|
|
103
|
+
// so an EAP body stays identical to the GA body.
|
|
92
104
|
const mllm = properties.mllm;
|
|
93
|
-
if (!mllm ||
|
|
94
|
-
mllm.vendor !== "gemini" ||
|
|
95
|
-
typeof ((_a = mllm.params) === null || _a === void 0 ? void 0 : _a.model) !== "string" ||
|
|
96
|
-
!PRODUCTION_GEMINI_MLLM_MODELS.has(mllm.params.model)) {
|
|
105
|
+
if (!mllm || geminiLiveModelSpec(properties) === undefined) {
|
|
97
106
|
return;
|
|
98
107
|
}
|
|
99
108
|
if (mllm.greeting_message === undefined && mllm.greeting !== undefined) {
|
|
@@ -12,5 +12,5 @@ export type { GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions } from "../vendo
|
|
|
12
12
|
export { GeminiTTS, GeminiTTSModels } from "../vendors/tts.js";
|
|
13
13
|
export type { PreviewFeature, PreviewRoute } from "./client.js";
|
|
14
14
|
export { applyPreviewShape, createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./client.js";
|
|
15
|
-
export type { GeminiLiveModel, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, } from "./vendors.js";
|
|
16
|
-
export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, } from "./vendors.js";
|
|
15
|
+
export type { GeminiLiveModel, GeminiLiveModelRow, GeminiLiveModelSpec, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, } from "./vendors.js";
|
|
16
|
+
export { GEMINI_EAP_MLLM_MODELS, GEMINI_LIVE_MODEL_TABLE, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, } from "./vendors.js";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* the production vendor modules independently.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.createPreviewRoute = exports.applyPreviewShape = exports.GeminiTTSModels = exports.GeminiTTS = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = exports.OpenAIGPTLive = void 0;
|
|
9
|
+
exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.GEMINI_LIVE_MODEL_TABLE = exports.GEMINI_EAP_MLLM_MODELS = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.createPreviewRoute = exports.applyPreviewShape = exports.GeminiTTSModels = exports.GeminiTTS = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = exports.OpenAIGPTLive = void 0;
|
|
10
10
|
var mllm_js_1 = require("../vendors/mllm.js");
|
|
11
11
|
Object.defineProperty(exports, "OpenAIGPTLive", { enumerable: true, get: function () { return mllm_js_1.OpenAIGPTLive; } });
|
|
12
12
|
var stt_js_1 = require("../vendors/stt.js");
|
|
@@ -25,6 +25,8 @@ Object.defineProperty(exports, "PreviewFeatures", { enumerable: true, get: funct
|
|
|
25
25
|
Object.defineProperty(exports, "previewRequestHeaders", { enumerable: true, get: function () { return client_js_1.previewRequestHeaders; } });
|
|
26
26
|
Object.defineProperty(exports, "requiredPreviewFeatures", { enumerable: true, get: function () { return client_js_1.requiredPreviewFeatures; } });
|
|
27
27
|
var vendors_js_1 = require("./vendors.js");
|
|
28
|
+
Object.defineProperty(exports, "GEMINI_EAP_MLLM_MODELS", { enumerable: true, get: function () { return vendors_js_1.GEMINI_EAP_MLLM_MODELS; } });
|
|
29
|
+
Object.defineProperty(exports, "GEMINI_LIVE_MODEL_TABLE", { enumerable: true, get: function () { return vendors_js_1.GEMINI_LIVE_MODEL_TABLE; } });
|
|
28
30
|
Object.defineProperty(exports, "GEMINI_MLLM_DEFAULT_MODEL", { enumerable: true, get: function () { return vendors_js_1.GEMINI_MLLM_DEFAULT_MODEL; } });
|
|
29
31
|
Object.defineProperty(exports, "GEMINI_MLLM_URL", { enumerable: true, get: function () { return vendors_js_1.GEMINI_MLLM_URL; } });
|
|
30
32
|
Object.defineProperty(exports, "GEMINI_PREVIEW_MLLM_URL", { enumerable: true, get: function () { return vendors_js_1.GEMINI_PREVIEW_MLLM_URL; } });
|
|
@@ -3,7 +3,7 @@ import type { MllmConfig } from "../types.js";
|
|
|
3
3
|
import { type GeminiLiveOptions } from "../vendors/mllm.js";
|
|
4
4
|
/** Legacy preview import aliases for the production GPT Live implementation. */
|
|
5
5
|
/** Gemini 3.8 names remain available from the historical preview path. */
|
|
6
|
-
export type { GeminiLiveModel, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, } from "../vendors/mllm.js";
|
|
7
|
-
export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, isOpenAIGPTLiveConfig, OPENAI_GPT_LIVE_VENDOR, OpenAIGPTLive, } from "../vendors/mllm.js";
|
|
6
|
+
export type { GeminiLiveModel, GeminiLiveModelRow, GeminiLiveModelSpec, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, } from "../vendors/mllm.js";
|
|
7
|
+
export { GEMINI_EAP_MLLM_MODELS, GEMINI_LIVE_MODEL_TABLE, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, isOpenAIGPTLiveConfig, OPENAI_GPT_LIVE_VENDOR, OpenAIGPTLive, } from "../vendors/mllm.js";
|
|
8
8
|
/** @deprecated Use `new GeminiLive(options).toConfig()`. */
|
|
9
9
|
export declare function buildGeminiPreviewConfig(options: GeminiLiveOptions): MllmConfig;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/** Legacy preview import aliases for production MLLM implementations. */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.OpenAIGPTLive = exports.OPENAI_GPT_LIVE_VENDOR = exports.isOpenAIGPTLiveConfig = exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = void 0;
|
|
4
|
+
exports.OpenAIGPTLive = exports.OPENAI_GPT_LIVE_VENDOR = exports.isOpenAIGPTLiveConfig = exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.GEMINI_LIVE_MODEL_TABLE = exports.GEMINI_EAP_MLLM_MODELS = void 0;
|
|
5
5
|
exports.buildGeminiPreviewConfig = buildGeminiPreviewConfig;
|
|
6
6
|
const mllm_js_1 = require("../vendors/mllm.js");
|
|
7
7
|
var mllm_js_2 = require("../vendors/mllm.js");
|
|
8
|
+
Object.defineProperty(exports, "GEMINI_EAP_MLLM_MODELS", { enumerable: true, get: function () { return mllm_js_2.GEMINI_EAP_MLLM_MODELS; } });
|
|
9
|
+
Object.defineProperty(exports, "GEMINI_LIVE_MODEL_TABLE", { enumerable: true, get: function () { return mllm_js_2.GEMINI_LIVE_MODEL_TABLE; } });
|
|
8
10
|
Object.defineProperty(exports, "GEMINI_MLLM_DEFAULT_MODEL", { enumerable: true, get: function () { return mllm_js_2.GEMINI_MLLM_DEFAULT_MODEL; } });
|
|
9
11
|
Object.defineProperty(exports, "GEMINI_MLLM_URL", { enumerable: true, get: function () { return mllm_js_2.GEMINI_MLLM_URL; } });
|
|
10
12
|
Object.defineProperty(exports, "GEMINI_PREVIEW_MLLM_URL", { enumerable: true, get: function () { return mllm_js_2.GEMINI_PREVIEW_MLLM_URL; } });
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Clean type aliases for the Agora Conversational AI SDK.
|
|
3
3
|
* These provide shorter, more intuitive names for the verbose Fern-generated types.
|
|
4
4
|
*/
|
|
5
|
-
import type { AgentThinkAgentManagementResponse, AmazonTtsParams as AmazonTtsParamsType, AmazonTts as AmazonTtsType, Asr, AsrLanguage, CartesiaTtsParams as CartesiaTtsParamsType, CartesiaTts as CartesiaTtsType, ElevenLabsTtsParams as ElevenLabsTtsParamsType, ElevenLabsTts as ElevenLabsTtsType, FishAudioTtsParams as FishAudioTtsParamsType, FishAudioTts as FishAudioTtsType, GeminiAsrParams as GeminiAsrParamsType, GenericHttpTtsParams as GenericTtsParamsType, GenericHttpTts as GenericTtsType, GetAgentsResponse, GetHistoryAgentsResponse, GetTurnsAgentsResponse, GoogleTtsParams as GoogleTtsParamsType, GoogleTts as GoogleTtsType, GradiumTtsParams as GradiumTtsParamsType, GradiumTts as GradiumTtsType,
|
|
5
|
+
import type { AgentThinkAgentManagementResponse, AmazonTtsParams as AmazonTtsParamsType, AmazonTts as AmazonTtsType, Asr, AsrLanguage, CartesiaTtsParams as CartesiaTtsParamsType, CartesiaTts as CartesiaTtsType, ElevenLabsAsrParams, ElevenLabsTtsParams as ElevenLabsTtsParamsType, ElevenLabsTts as ElevenLabsTtsType, FishAudioAsrParams, FishAudioTtsParams as FishAudioTtsParamsType, FishAudioTts as FishAudioTtsType, GeminiAsrParams as GeminiAsrParamsType, GenericHttpTtsParams as GenericTtsParamsType, GenericHttpTts as GenericTtsType, GetAgentsResponse, GetHistoryAgentsResponse, GetTurnsAgentsResponse, GoogleTtsParams as GoogleTtsParamsType, GoogleTts as GoogleTtsType, GradiumTtsParams as GradiumTtsParamsType, GradiumTts as GradiumTtsType, ListAgentsResponse, Llm, LlmToolExecution as LlmToolExecutionType, LlmToolFunction as LlmToolFunctionType, LlmToolServer as LlmToolServerType, LlmTool as LlmToolType, McpServer as McpServerType, MicrosoftTtsParams as MicrosoftTtsParamsType, MicrosoftTts as MicrosoftTtsType, MinimaxTtsParams as MinimaxTtsParamsType, MinimaxTts as MinimaxTtsType, MistralTtsParams as MistralTtsParamsType, MistralTts as MistralTtsType, Mllm, MllmTurnDetection, MllmTurnDetection as MllmTurnDetectionNS, MurfTtsParams as MurfTtsParamsType, MurfTts as MurfTtsType, OpenAiTtsParams as OpenAiTtsParamsType, OpenAiTts as OpenAiTtsType, QwenAsrParams, RimeTtsParams as RimeTtsParamsType, RimeTts as RimeTtsType, RtzrAsrParams as RtzrAsrParamsType, RtzrAsr as RtzrAsrType, SarvamTtsParams as SarvamTtsParamsType, SarvamTts as SarvamTtsType, SmallestAiAsrParams as SmallestAiAsrParamsType, SmallestAiAsr as SmallestAiAsrType, SmallestAiTtsParams as SmallestAiTtsParamsType, SmallestAiTts as SmallestAiTtsType, SpatiusAvatarParams as SpatiusAvatarParamsType, SpeakAgentsRequest, StartAgentsRequest, Tts, TypecastTtsParams as TypecastTtsParamsType, TypecastTts as TypecastTtsType, UpdateAgentsRequest, XAiAsrParams as XAiAsrParamsType, XAiAsr as XAiAsrType, XAiTtsParams as XAiTtsParamsType, XAiTts as XAiTtsType } from "../api/index.js";
|
|
6
6
|
import type { AgentThinkAgentManagementRequest } from "../api/resources/agentManagement/client/requests/AgentThinkAgentManagementRequest.js";
|
|
7
7
|
import type { PresetInput } from "./presets.js";
|
|
8
8
|
/** LLM request style (openai, gemini, anthropic, dify) */
|
|
@@ -13,6 +13,18 @@ export type LlmStyle = Llm.Style;
|
|
|
13
13
|
* When using shorthand strings or minimal configs, the untyped variant is available.
|
|
14
14
|
*/
|
|
15
15
|
export type SttConfig = {
|
|
16
|
+
vendor: "elevenlabs";
|
|
17
|
+
language?: TurnDetectionLanguage;
|
|
18
|
+
params: ElevenLabsAsrParams;
|
|
19
|
+
} | {
|
|
20
|
+
vendor: "fishaudio";
|
|
21
|
+
language?: TurnDetectionLanguage;
|
|
22
|
+
params: FishAudioAsrParams;
|
|
23
|
+
} | {
|
|
24
|
+
vendor: "qwen";
|
|
25
|
+
language?: TurnDetectionLanguage;
|
|
26
|
+
params: QwenAsrParams;
|
|
27
|
+
} | {
|
|
16
28
|
vendor: "fengming";
|
|
17
29
|
language?: TurnDetectionLanguage;
|
|
18
30
|
keywords?: string[];
|
|
@@ -107,10 +119,45 @@ export type AvatarConfig = StartAgentsRequest.Properties.Avatar;
|
|
|
107
119
|
export type AvatarWireVendor = StartAgentsRequest.Properties.Avatar.Vendor;
|
|
108
120
|
/** BCP-47 language tag used by `turn_detection.language`. */
|
|
109
121
|
export type TurnDetectionLanguage = AsrLanguage;
|
|
110
|
-
/**
|
|
111
|
-
|
|
112
|
-
|
|
122
|
+
/**
|
|
123
|
+
* Languages supported by semantic end-of-speech detection
|
|
124
|
+
* (`turn_detection.config.end_of_speech.mode = "semantic"`): English and Chinese only.
|
|
125
|
+
*/
|
|
126
|
+
export type SemanticEndOfSpeechLanguage = Extract<TurnDetectionLanguage, `en-${string}` | `zh-${string}`>;
|
|
127
|
+
/**
|
|
128
|
+
* One language, or a non-empty list of languages for multi-language sessions.
|
|
129
|
+
* A list is sent to `asr.language` as a comma-separated string.
|
|
130
|
+
*/
|
|
131
|
+
export type TurnDetectionLanguages = TurnDetectionLanguage | readonly [TurnDetectionLanguage, ...TurnDetectionLanguage[]];
|
|
132
|
+
type TurnDetectionBase = Omit<StartAgentsRequest.Properties.TurnDetection, "language" | "config">;
|
|
133
|
+
type GeneratedEndOfSpeech = StartAgentsRequest.Properties.TurnDetection.Config.EndOfSpeech;
|
|
134
|
+
/** Semantic EoS: only one English or Chinese language. */
|
|
135
|
+
type SemanticTurnDetectionConfig = TurnDetectionBase & {
|
|
136
|
+
config: TurnDetectionNestedConfig & {
|
|
137
|
+
end_of_speech: GeneratedEndOfSpeech & {
|
|
138
|
+
mode: "semantic";
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
language?: SemanticEndOfSpeechLanguage;
|
|
113
142
|
};
|
|
143
|
+
/** VAD or manual EoS (or unset): one language or a list of languages. */
|
|
144
|
+
type NonSemanticTurnDetectionConfig = TurnDetectionBase & {
|
|
145
|
+
config?: TurnDetectionNestedConfig & {
|
|
146
|
+
end_of_speech?: Omit<GeneratedEndOfSpeech, "mode"> & {
|
|
147
|
+
mode?: Exclude<EndOfSpeechMode, "semantic">;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
language?: TurnDetectionLanguages;
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Turn detection configuration.
|
|
154
|
+
*
|
|
155
|
+
* `language` takes one BCP-47 tag or a list of tags. A list cannot be used with
|
|
156
|
+
* semantic end-of-speech: TypeScript reports an error at compile time, and the
|
|
157
|
+
* SDK also throws at runtime. When a list has more than one language and
|
|
158
|
+
* `end_of_speech.mode` is unset, the SDK sends `end_of_speech.mode = "vad"`.
|
|
159
|
+
*/
|
|
160
|
+
export type TurnDetectionConfig = NonSemanticTurnDetectionConfig | SemanticTurnDetectionConfig;
|
|
114
161
|
/** Detailed nested config for turn detection (`turn_detection.config`) */
|
|
115
162
|
export type TurnDetectionNestedConfig = StartAgentsRequest.Properties.TurnDetection.Config;
|
|
116
163
|
/** Start of Speech (SoS) detection configuration (`turn_detection.config.start_of_speech`) */
|
|
@@ -585,8 +632,6 @@ export type CartesiaTts = CartesiaTtsType;
|
|
|
585
632
|
export type CartesiaTtsParams = CartesiaTtsParamsType;
|
|
586
633
|
export type OpenAiTts = OpenAiTtsType;
|
|
587
634
|
export type OpenAiTtsParams = OpenAiTtsParamsType;
|
|
588
|
-
export type HumeAiTts = HumeAiTtsType;
|
|
589
|
-
export type HumeAiTtsParams = HumeAiTtsParamsType;
|
|
590
635
|
export type RimeTts = RimeTtsType;
|
|
591
636
|
export type RimeTtsParams = RimeTtsParamsType;
|
|
592
637
|
export type FishAudioTts = FishAudioTtsType;
|