agora-agents 2.15.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 -3
- package/dist/cjs/agentkit/Agent.js +50 -18
- package/dist/cjs/agentkit/AgentSession.js +1 -5
- package/dist/cjs/agentkit/index.d.ts +2 -2
- package/dist/cjs/agentkit/index.js +4 -2
- 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/vendors/mllm.d.ts +56 -4
- package/dist/cjs/agentkit/vendors/mllm.js +62 -7
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +6 -4
- 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 -3
- package/dist/esm/agentkit/Agent.mjs +50 -18
- package/dist/esm/agentkit/AgentSession.mjs +1 -5
- package/dist/esm/agentkit/index.d.mts +2 -2
- package/dist/esm/agentkit/index.mjs +1 -1
- 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/vendors/mllm.d.mts +56 -4
- package/dist/esm/agentkit/vendors/mllm.mjs +60 -6
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
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
|
|
@@ -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",
|
|
@@ -212,9 +245,12 @@ class Agent {
|
|
|
212
245
|
* Returns a new Agent with the specified MLLM vendor.
|
|
213
246
|
*
|
|
214
247
|
* MLLM vendors handle real-time audio end-to-end, bypassing the standard
|
|
215
|
-
* ASR → LLM → TTS pipeline. Calling this method
|
|
216
|
-
* `
|
|
217
|
-
* 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.
|
|
218
254
|
*
|
|
219
255
|
* Note: avatars are not supported with MLLM. The avatar publisher requires
|
|
220
256
|
* the cascading ASR + LLM + TTS pipeline. Combining `withMllm()` and
|
|
@@ -223,14 +259,8 @@ class Agent {
|
|
|
223
259
|
* @param vendor - MLLM vendor instance (e.g., new VertexAI({ model: '...', projectId: '...', ... }))
|
|
224
260
|
*/
|
|
225
261
|
withMllm(vendor) {
|
|
226
|
-
var _a;
|
|
227
262
|
const newAgent = this._clone();
|
|
228
|
-
newAgent._mllm =
|
|
229
|
-
if (((_a = newAgent._advancedFeatures) === null || _a === void 0 ? void 0 : _a.enable_mllm) !== undefined) {
|
|
230
|
-
const advancedFeatures = Object.assign({}, newAgent._advancedFeatures);
|
|
231
|
-
delete advancedFeatures.enable_mllm;
|
|
232
|
-
newAgent._advancedFeatures = Object.keys(advancedFeatures).length > 0 ? advancedFeatures : undefined;
|
|
233
|
-
}
|
|
263
|
+
newAgent._mllm = withoutMllmEnable(vendor.toConfig());
|
|
234
264
|
return newAgent;
|
|
235
265
|
}
|
|
236
266
|
/**
|
|
@@ -621,10 +651,10 @@ class Agent {
|
|
|
621
651
|
* and RTM privileges (required for RTM-enabled sessions).
|
|
622
652
|
*/
|
|
623
653
|
toProperties(opts) {
|
|
624
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
654
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
625
655
|
// In MLLM mode the backend handles audio end-to-end; LLM, TTS, and ASR
|
|
626
656
|
// are not required.
|
|
627
|
-
const isMllmMode =
|
|
657
|
+
const isMllmMode = this._mllm !== undefined;
|
|
628
658
|
// Reject incompatible combinations before any work (token generation, etc.).
|
|
629
659
|
// Avatars are currently supported only with the cascading ASR/LLM/TTS pipeline;
|
|
630
660
|
// the MLLM pipeline does not flow through the avatar publisher, so combining
|
|
@@ -654,7 +684,7 @@ class Agent {
|
|
|
654
684
|
// to receive transcripts and state events. Default it automatically so
|
|
655
685
|
// callers only need to set advancedFeatures.enable_rtm: true.
|
|
656
686
|
let resolvedParameters = this._parameters;
|
|
657
|
-
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)) {
|
|
658
688
|
resolvedParameters = Object.assign(Object.assign({}, resolvedParameters), { data_channel: "rtm" });
|
|
659
689
|
}
|
|
660
690
|
if ((resolvedParameters === null || resolvedParameters === void 0 ? void 0 : resolvedParameters.audio_scenario) === undefined) {
|
|
@@ -679,7 +709,9 @@ class Agent {
|
|
|
679
709
|
filler_words: this._fillerWords,
|
|
680
710
|
};
|
|
681
711
|
if (isMllmMode) {
|
|
682
|
-
|
|
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);
|
|
683
715
|
if (mllmConfig) {
|
|
684
716
|
// Vendor config wins: only apply agent-level values when the vendor hasn't already set them.
|
|
685
717
|
// Consistent with Python (setdefault) and Go (!exists) semantics.
|
|
@@ -696,15 +728,15 @@ class Agent {
|
|
|
696
728
|
if (isOpenAIGPTLive && this._turnDetection !== undefined) {
|
|
697
729
|
console.warn("GPT Live v3 ignores agent-level turn_detection; endpointing is internal");
|
|
698
730
|
}
|
|
699
|
-
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 &&
|
|
700
732
|
this._turnDetection !== undefined && {
|
|
701
733
|
turn_detection: Object.assign(Object.assign({}, this._turnDetection), (this._turnDetection.language !== undefined && {
|
|
702
734
|
language: toWireLanguage(this._turnDetection.language),
|
|
703
735
|
})),
|
|
704
736
|
}));
|
|
705
737
|
}
|
|
706
|
-
const skipCategories = new Set((
|
|
707
|
-
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 : []);
|
|
708
740
|
if (opts.skipVendorValidation) {
|
|
709
741
|
for (const category of ["asr", "llm", "tts"]) {
|
|
710
742
|
skipCategories.add(category);
|
|
@@ -727,7 +759,7 @@ class Agent {
|
|
|
727
759
|
? this._llm.system_messages
|
|
728
760
|
: this._instructions
|
|
729
761
|
? [{ role: "system", content: this._instructions }]
|
|
730
|
-
: undefined, greeting_message: (
|
|
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;
|
|
731
763
|
const turnDetectionConfig = resolveTurnDetectionConfig(this._turnDetection);
|
|
732
764
|
const asrConfig = this._stt !== undefined || !allowMissingAsr
|
|
733
765
|
? this._resolveAsrConfig(turnDetectionConfig)
|
|
@@ -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.
|
|
@@ -44,8 +44,8 @@ export type { AliyunLLMOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions,
|
|
|
44
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";
|
|
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
49
|
export type { AmazonSTTOptions, AresSTTOptions, AssemblyAISTTOptions, DeepgramSTTOptions, ElevenLabsSTTOptions, FishAudioSTTOptions, GeminiSTTModel, GeminiSTTOptions, GoogleSTTOptions, MicrosoftSTTOptions, OpenAISTTOptions, RTZRSTTOptions, SarvamSTTOptions, SmallestAISTTOptions, SpeechmaticsSTTOptions, XAiSTTOptions, } from "./vendors/stt.js";
|
|
50
50
|
export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, ElevenLabsSTT, FishAudioSTT, GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode, GoogleSTT, MicrosoftSTT, OpenAISTT, RTZRSTT, SarvamSTT, SmallestAISTT, SpeechmaticsSTT, XAiSTT, } from "./vendors/stt.js";
|
|
51
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";
|
|
@@ -22,8 +22,8 @@
|
|
|
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
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.
|
|
26
|
-
exports.XAiTTS = exports.TypecastTTS = exports.SonioxTTS = exports.SmallestAITTS = exports.SarvamTTSLanguage = exports.SarvamTTS = exports.RimeTTS = exports.OpenAITTS = 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; } });
|
|
@@ -152,6 +152,8 @@ Object.defineProperty(exports, "VertexAILLM", { enumerable: true, get: function
|
|
|
152
152
|
// MLLM vendor classes
|
|
153
153
|
var mllm_js_1 = require("./vendors/mllm.js");
|
|
154
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; } });
|
|
155
157
|
Object.defineProperty(exports, "GEMINI_MLLM_DEFAULT_MODEL", { enumerable: true, get: function () { return mllm_js_1.GEMINI_MLLM_DEFAULT_MODEL; } });
|
|
156
158
|
Object.defineProperty(exports, "GEMINI_MLLM_URL", { enumerable: true, get: function () { return mllm_js_1.GEMINI_MLLM_URL; } });
|
|
157
159
|
Object.defineProperty(exports, "GEMINI_PREVIEW_MLLM_URL", { enumerable: true, get: function () { return mllm_js_1.GEMINI_PREVIEW_MLLM_URL; } });
|
|
@@ -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,8 +2,9 @@
|
|
|
2
2
|
* Type-safe MLLM (Multimodal Large Language Model) vendor classes.
|
|
3
3
|
*
|
|
4
4
|
* MLLM vendors handle real-time audio end-to-end, bypassing the standard
|
|
5
|
-
* ASR → LLM → TTS pipeline. Calling `agent.withMllm(vendor)`
|
|
6
|
-
*
|
|
5
|
+
* ASR → LLM → TTS pipeline. Calling `agent.withMllm(vendor)` makes the start
|
|
6
|
+
* request send `advanced_features.enable_mllm: true`. `mllm.enable` is never
|
|
7
|
+
* sent, because its presence stops RTM `message.metrics` from being delivered.
|
|
7
8
|
*/
|
|
8
9
|
import type { MllmConfig, MllmTurnDetectionConfig } from "../types.js";
|
|
9
10
|
import { BaseCNMLLM, BaseMLLM, type BaseMllmOptions } from "./base.js";
|
|
@@ -12,7 +13,49 @@ export declare const GeminiLiveModels: {
|
|
|
12
13
|
readonly Live38: "models/gemini-3.8-live";
|
|
13
14
|
/** Public ID for the reasoning voice model. */
|
|
14
15
|
readonly Live38ExtendedThinking: "models/gemini-3.8-live-extended-thinking";
|
|
16
|
+
/** Gemini Live EAP voice model. Accepts `thinkingLevel`. */
|
|
17
|
+
readonly Live4: "gemini-4-live";
|
|
18
|
+
/** Gemini Live EAP translation model. Set `translateTo` to use it. */
|
|
19
|
+
readonly Live4Translate: "gemini-4-live-translate";
|
|
15
20
|
};
|
|
21
|
+
/** How the SDK treats one Gemini Live model ID. */
|
|
22
|
+
export interface GeminiLiveModelSpec {
|
|
23
|
+
/**
|
|
24
|
+
* Served only by the preview endpoint. `AgentSession` routes these sessions
|
|
25
|
+
* to the preview host with `agora-feature: gemini`. The start body is the
|
|
26
|
+
* same as the GA body.
|
|
27
|
+
*/
|
|
28
|
+
readonly preview: boolean;
|
|
29
|
+
/** Accepts `thinkingLevel`, sent as `params.thinking_level`. */
|
|
30
|
+
readonly extendedThinking?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** A row in {@link GEMINI_LIVE_MODEL_TABLE}: a model spec, or an alias of another row. */
|
|
33
|
+
export type GeminiLiveModelRow = GeminiLiveModelSpec | {
|
|
34
|
+
readonly aliasOf: string;
|
|
35
|
+
readonly deprecated?: boolean;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Every Gemini Live model that uses the Gemini 3.8 builder path, keyed by the
|
|
39
|
+
* model ID sent in `mllm.params.model`. This one table selects the builder
|
|
40
|
+
* path, the production greeting normalization, and preview routing.
|
|
41
|
+
*
|
|
42
|
+
* A renamed model can keep its old ID as `{ aliasOf: "<new name>", deprecated: true }`.
|
|
43
|
+
* An alias takes the target's spec, and the SDK sends the model ID the caller
|
|
44
|
+
* wrote unchanged.
|
|
45
|
+
*
|
|
46
|
+
* Models missing from this table use the legacy Gemini path and the production
|
|
47
|
+
* route.
|
|
48
|
+
*/
|
|
49
|
+
export declare const GEMINI_LIVE_MODEL_TABLE: Readonly<Record<string, GeminiLiveModelRow>>;
|
|
50
|
+
/**
|
|
51
|
+
* Looks up a model in a Gemini Live model table, following alias rows.
|
|
52
|
+
* Returns `undefined` for models missing from the table.
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolveGeminiLiveModel(model: string, table?: Readonly<Record<string, GeminiLiveModelRow>>): GeminiLiveModelSpec | undefined;
|
|
55
|
+
/** Gemini Live EAP models, served only by the preview endpoint. Derived from {@link GEMINI_LIVE_MODEL_TABLE}. */
|
|
56
|
+
export declare const GEMINI_EAP_MLLM_MODELS: ReadonlySet<string>;
|
|
57
|
+
/** Gemini Live models served by the production endpoint. Derived from {@link GEMINI_LIVE_MODEL_TABLE}. */
|
|
58
|
+
export declare const PRODUCTION_GEMINI_MLLM_MODELS: ReadonlySet<string>;
|
|
16
59
|
/** The model Gemini Live sends by default. */
|
|
17
60
|
export declare const GEMINI_MLLM_DEFAULT_MODEL: string;
|
|
18
61
|
/** Default Gemini Developer API endpoint for Gemini 3.8 models. */
|
|
@@ -25,7 +68,7 @@ export type GeminiLiveModel = (typeof GeminiLiveModels)[keyof typeof GeminiLiveM
|
|
|
25
68
|
export declare const GeminiThinkingLevels: readonly ["low", "medium", "high"];
|
|
26
69
|
export type GeminiThinkingLevel = (typeof GeminiThinkingLevels)[number];
|
|
27
70
|
/** Known Gemini output voices; future voice names remain accepted. */
|
|
28
|
-
export type GeminiLiveVoice = "Puck" | "Charon" | "Kore" | "Fenrir" | "Aoede" | "Leda" | "Orus" | "Zephyr" | (string & {});
|
|
71
|
+
export type GeminiLiveVoice = "Puck" | "Charon" | "Kore" | "Fenrir" | "Aoede" | "Leda" | "Orus" | "Zephyr" | "Fola" | (string & {});
|
|
29
72
|
/** @deprecated Use {@link GeminiLiveVoice}. */
|
|
30
73
|
export type GeminiPreviewVoice = GeminiLiveVoice;
|
|
31
74
|
export declare const OPENAI_GPT_LIVE_VENDOR: "openai_gpt_live";
|
|
@@ -200,10 +243,19 @@ export interface GeminiLiveOptions extends BaseMllmOptions {
|
|
|
200
243
|
apiKey: string;
|
|
201
244
|
/** Model name (e.g., 'gemini-live-2.5-flash') */
|
|
202
245
|
model?: GeminiLiveModel;
|
|
203
|
-
/** Sent only for models/gemini-3.8-live-extended-thinking. */
|
|
246
|
+
/** Sent only for models/gemini-3.8-live-extended-thinking and gemini-4-live. */
|
|
204
247
|
thinkingLevel?: GeminiThinkingLevel;
|
|
205
248
|
/** Languages for Gemini 3.8, sent as params.language_codes. */
|
|
206
249
|
languageCodes?: readonly string[];
|
|
250
|
+
/**
|
|
251
|
+
* Switches the session to speech translation, sent as params.translate_to
|
|
252
|
+
* whenever set. The Gemini Live EAP `gemini-4-live-translate` model uses it. Codes are a vendor allow-list that the SDK does not
|
|
253
|
+
* validate: `es` and `pt-BR` work, `es-ES` does not. A rejected code closes
|
|
254
|
+
* the session mid-stream with a 1007.
|
|
255
|
+
*/
|
|
256
|
+
translateTo?: string;
|
|
257
|
+
/** Sent as params.echo_target_language whenever set. Used with `translateTo`. */
|
|
258
|
+
echoTargetLanguage?: boolean;
|
|
207
259
|
/** Endpoint override; Gemini 3.8 defaults to the Developer API host. */
|
|
208
260
|
url?: string;
|
|
209
261
|
/** System instructions for the model */
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
* Type-safe MLLM (Multimodal Large Language Model) vendor classes.
|
|
4
4
|
*
|
|
5
5
|
* MLLM vendors handle real-time audio end-to-end, bypassing the standard
|
|
6
|
-
* ASR → LLM → TTS pipeline. Calling `agent.withMllm(vendor)`
|
|
7
|
-
*
|
|
6
|
+
* ASR → LLM → TTS pipeline. Calling `agent.withMllm(vendor)` makes the start
|
|
7
|
+
* request send `advanced_features.enable_mllm: true`. `mllm.enable` is never
|
|
8
|
+
* sent, because its presence stops RTM `message.metrics` from being delivered.
|
|
8
9
|
*/
|
|
9
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.QwenOmni = exports.XaiGrok = exports.VertexAI = exports.GeminiLive = exports.AzureOpenAIRealtime = exports.OpenAIRealtime = exports.OpenAIGPTLive = exports.OPENAI_GPT_LIVE_VENDOR = exports.GeminiThinkingLevels = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.GeminiLiveModels = void 0;
|
|
11
|
+
exports.QwenOmni = exports.XaiGrok = exports.VertexAI = exports.GeminiLive = exports.AzureOpenAIRealtime = exports.OpenAIRealtime = exports.OpenAIGPTLive = exports.OPENAI_GPT_LIVE_VENDOR = exports.GeminiThinkingLevels = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.PRODUCTION_GEMINI_MLLM_MODELS = exports.GEMINI_EAP_MLLM_MODELS = exports.GEMINI_LIVE_MODEL_TABLE = exports.GeminiLiveModels = void 0;
|
|
12
|
+
exports.resolveGeminiLiveModel = resolveGeminiLiveModel;
|
|
11
13
|
exports.isOpenAIGPTLiveConfig = isOpenAIGPTLiveConfig;
|
|
12
14
|
const base_js_1 = require("./base.js");
|
|
13
15
|
function requireString(value, field, vendor) {
|
|
@@ -28,7 +30,57 @@ exports.GeminiLiveModels = {
|
|
|
28
30
|
Live38: "models/gemini-3.8-live",
|
|
29
31
|
/** Public ID for the reasoning voice model. */
|
|
30
32
|
Live38ExtendedThinking: "models/gemini-3.8-live-extended-thinking",
|
|
33
|
+
/** Gemini Live EAP voice model. Accepts `thinkingLevel`. */
|
|
34
|
+
Live4: "gemini-4-live",
|
|
35
|
+
/** Gemini Live EAP translation model. Set `translateTo` to use it. */
|
|
36
|
+
Live4Translate: "gemini-4-live-translate",
|
|
31
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* Every Gemini Live model that uses the Gemini 3.8 builder path, keyed by the
|
|
40
|
+
* model ID sent in `mllm.params.model`. This one table selects the builder
|
|
41
|
+
* path, the production greeting normalization, and preview routing.
|
|
42
|
+
*
|
|
43
|
+
* A renamed model can keep its old ID as `{ aliasOf: "<new name>", deprecated: true }`.
|
|
44
|
+
* An alias takes the target's spec, and the SDK sends the model ID the caller
|
|
45
|
+
* wrote unchanged.
|
|
46
|
+
*
|
|
47
|
+
* Models missing from this table use the legacy Gemini path and the production
|
|
48
|
+
* route.
|
|
49
|
+
*/
|
|
50
|
+
exports.GEMINI_LIVE_MODEL_TABLE = {
|
|
51
|
+
[exports.GeminiLiveModels.Live38]: { preview: false },
|
|
52
|
+
[exports.GeminiLiveModels.Live38ExtendedThinking]: { preview: false, extendedThinking: true },
|
|
53
|
+
[exports.GeminiLiveModels.Live4]: { preview: true, extendedThinking: true },
|
|
54
|
+
[exports.GeminiLiveModels.Live4Translate]: { preview: true },
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Looks up a model in a Gemini Live model table, following alias rows.
|
|
58
|
+
* Returns `undefined` for models missing from the table.
|
|
59
|
+
*/
|
|
60
|
+
function resolveGeminiLiveModel(model, table = exports.GEMINI_LIVE_MODEL_TABLE) {
|
|
61
|
+
var _a, _b;
|
|
62
|
+
const seen = new Set();
|
|
63
|
+
let id = model;
|
|
64
|
+
let row = (_a = Object.getOwnPropertyDescriptor(table, id)) === null || _a === void 0 ? void 0 : _a.value;
|
|
65
|
+
while (row !== undefined && !seen.has(id)) {
|
|
66
|
+
if (!("aliasOf" in row))
|
|
67
|
+
return row;
|
|
68
|
+
seen.add(id);
|
|
69
|
+
id = row.aliasOf;
|
|
70
|
+
row = (_b = Object.getOwnPropertyDescriptor(table, id)) === null || _b === void 0 ? void 0 : _b.value;
|
|
71
|
+
}
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
function geminiLiveModelsWhere(predicate) {
|
|
75
|
+
return new Set(Object.keys(exports.GEMINI_LIVE_MODEL_TABLE).filter((model) => {
|
|
76
|
+
const spec = resolveGeminiLiveModel(model);
|
|
77
|
+
return spec !== undefined && predicate(spec);
|
|
78
|
+
}));
|
|
79
|
+
}
|
|
80
|
+
/** Gemini Live EAP models, served only by the preview endpoint. Derived from {@link GEMINI_LIVE_MODEL_TABLE}. */
|
|
81
|
+
exports.GEMINI_EAP_MLLM_MODELS = geminiLiveModelsWhere((spec) => spec.preview);
|
|
82
|
+
/** Gemini Live models served by the production endpoint. Derived from {@link GEMINI_LIVE_MODEL_TABLE}. */
|
|
83
|
+
exports.PRODUCTION_GEMINI_MLLM_MODELS = geminiLiveModelsWhere((spec) => !spec.preview);
|
|
32
84
|
/** The model Gemini Live sends by default. */
|
|
33
85
|
exports.GEMINI_MLLM_DEFAULT_MODEL = exports.GeminiLiveModels.Live38;
|
|
34
86
|
/** Default Gemini Developer API endpoint for Gemini 3.8 models. */
|
|
@@ -203,12 +255,15 @@ class GeminiLive extends base_js_1.BaseMLLM {
|
|
|
203
255
|
toConfig() {
|
|
204
256
|
const { apiKey, model, url, instructions, voice, affectiveDialog, proactiveAudio, transcribeAgent, transcribeUser, httpOptions, greetingMessage, inputModalities, outputModalities, messages, additionalParams, turnDetection, } = this.options;
|
|
205
257
|
const selectedModel = (model === null || model === void 0 ? void 0 : model.trim()) || exports.GEMINI_MLLM_DEFAULT_MODEL;
|
|
206
|
-
const
|
|
207
|
-
const
|
|
208
|
-
const
|
|
258
|
+
const spec = resolveGeminiLiveModel(selectedModel);
|
|
259
|
+
const isGemini38 = spec !== undefined;
|
|
260
|
+
const isExtendedThinking = (spec === null || spec === void 0 ? void 0 : spec.extendedThinking) === true;
|
|
261
|
+
const params = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, additionalParams), { model: selectedModel }), (instructions && { instructions })), ((voice || isGemini38) && { voice: voice || "Puck" })), (isExtendedThinking &&
|
|
209
262
|
this.options.thinkingLevel !== undefined && {
|
|
210
263
|
thinking_level: this.options.thinkingLevel,
|
|
211
|
-
})), (isGemini38 && this.options.languageCodes && { language_codes: [...this.options.languageCodes] })), (
|
|
264
|
+
})), (isGemini38 && this.options.languageCodes && { language_codes: [...this.options.languageCodes] })), (this.options.translateTo && { translate_to: this.options.translateTo })), (this.options.echoTargetLanguage !== undefined && {
|
|
265
|
+
echo_target_language: this.options.echoTargetLanguage,
|
|
266
|
+
})), (affectiveDialog !== undefined && { affective_dialog: affectiveDialog })), (proactiveAudio !== undefined && { proactive_audio: proactiveAudio })), (transcribeAgent !== undefined && { transcribe_agent: transcribeAgent })), (transcribeUser !== undefined && { transcribe_user: transcribeUser })), (httpOptions && { http_options: httpOptions }));
|
|
212
267
|
if (isGemini38) {
|
|
213
268
|
delete params.api_key;
|
|
214
269
|
if (!isExtendedThinking)
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type { AgoraAuthMode } from "./AgoraPoolClient.js";
|
|
2
2
|
export { AgoraClient } from "./AgoraPoolClient.js";
|
|
3
3
|
export type { AgoraArea, AreaScope, GlobalArea } from "./agentkit/area.js";
|
|
4
|
-
export type { AdvancedFeatures, AgentConfig, AgentConfigUpdate, AgentOptions, AgentPreset, AgentSessionEvent, AgentSessionEventHandler, AgentSessionOptions, AgentsClient, AkoolAvatarConfig, AkoolAvatarOptions, AkoolSampleRate, AliyunLLMOptions, AmazonBedrockOptions, AmazonSTTOptions, AmazonTTSOptions, AmazonTts, AmazonTtsParams, AnamAvatarConfig, AnamAvatarOptions, AnthropicOptions, AresSTTOptions, AsrConfig, AsrPreset, AsrVendorName, AssemblyAISTTOptions, AvatarConfig, AvatarVendor, AvatarWireVendor, AzureOpenAIOptions, AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, BaseMllmOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CartesiaSampleRate, CartesiaTTSOptions, CartesiaTts, CartesiaTtsParams, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, CustomLLMOptions, DeepgramSTTOptions, DeepgramTTSOptions, DeepSeekLLMOptions, DifyOptions, Eagerness, ElevenLabsSampleRate, ElevenLabsSTTOptions, ElevenLabsTTSOptions, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FengmingSTTOptions, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioSTTOptions, FishAudioTTSOptions, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GeminiLiveModel, GeminiLiveOptions, GeminiLiveVoice, GeminiOptions, GeminiPreviewVoice, GeminiSTTModel, GeminiSTTOptions, GeminiThinkingLevel, GenerateClientTokenOptions, GenerateConvoAITokenOptions, GenerateTokenOptions, GenericAvatarConfig, GenericAvatarOptions, GenericTTSOptions, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, GoogleSTTOptions, GoogleTTSOptions, GoogleTts, GoogleTtsParams, GradiumTTSOptions, GradiumTts, GradiumTtsParams, GroqOptions, HeyGenAvatarConfig, HeyGenAvatarOptions, HeyGenSampleRate, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LemonSliceOptions, LiveAvatarAvatarConfig, LiveAvatarAvatarOptions, LiveAvatarSampleRate, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmPreset, LlmStyle, LlmTool, LlmToolExecution, LlmToolFunction, LlmToolServer, LlmVendor, McpServer, McpServersItem, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MicrosoftSampleRate, MicrosoftSTTOptions, MicrosoftTTSOptions, MicrosoftTts, MicrosoftTtsParams, MiniMaxCNTTSOptions, MiniMaxDuplexTTSOptions, MiniMaxTTSOptions, MinimaxDuplexTts, MinimaxDuplexTtsParams, MinimaxTts, MinimaxTtsParams, MistralTTSOptions, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTTSOptions, MurfTts, MurfTtsParams, OpenAIGPTLiveOptions, OpenAIOptions, OpenAIRealtimeOptions, OpenAISTTOptions, OpenAITTSOptions, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, PresetCategory, PresetInput, PreviewFeature, PreviewRoute, ProtofaceOptions, QwenOmniOptions, QwenSTTOptions, RimeTTSOptions, RimeTts, RimeTtsParams, RTZRSTTOptions, RtcConfig, RtzrAsr, RtzrAsrParams, SalConfig, SalMode, SampleRate, SarvamSTTOptions, SarvamTTSOptions, SarvamTts, SarvamTtsParams, SayOptions, SensetimeAvatarConfig, SensetimeAvatarOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SmallestAISTTOptions, SmallestAITTSOptions, SmallestAiAsr, SmallestAiAsrParams, SmallestAiTts, SmallestAiTtsParams, SonioxTTSOptions, SonioxTts, SonioxTtsParams, SpatiusAvatarConfig, SpatiusAvatarOptions, SpatiusAvatarParams, SpeakConfig, SpeakPriority, SpeechmaticsSTTOptions, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, StepFunSTTOptions, StepFunTTSOptions, StepfunAsr, StepfunAsrParams, StrictAvatarConfig, SttConfig, SttVendor, TavusOptions, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TtsPreset, TtsVendor, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionNestedConfig, TurnDetectionType, TypecastTTSOptions, TypecastTts, TypecastTtsParams, VertexAILLMOptions, VertexAIOptions, XAiAsr, XAiAsrParams, XAiSTTOptions, XAiTTSOptions, XAiTts, XAiTtsParams, XaiGrokOptions, XfyunBigModelSTTOptions, XfyunDialectSTTOptions, XfyunSTTOptions, } from "./agentkit/index.js";
|
|
5
|
-
export { Agent, AgentPresets, AgentSession, AkoolAvatar, AliyunLLM, AmazonBedrock, AmazonSTT, AmazonTTS, AnamAvatar, Anthropic, AresSTT, AssemblyAISTT, AudioScenario, AzureOpenAI, AzureOpenAIRealtime, BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, BaseMLLM, BaseSTT, BaseTTS, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CartesiaTTS, CosyVoiceTTS, CredentialMode, CustomLLM, createPreviewRoute, DataChannel, DeepgramSTT, DeepgramTTS, DeepSeekLLM, Dify, ElevenLabsSTT, ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioSTT, FishAudioTTS, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, Gemini, GeminiLive, GeminiLiveModels, GeminiSTT, GeminiSTTModels, GeminiThinkingLevels, GeminiTranscriptionMode, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateClientToken, generateConvoAIToken, generateRtcToken, HeyGenAvatar, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, LemonSlice, LiveAvatarAvatar, MAX_EXPIRY_SECONDS, MicrosoftCNSTT, MicrosoftCNTTS, MicrosoftSTT, MicrosoftTTS, MiniMaxCNTTS, MiniMaxDuplexTTS, MiniMaxTTS, MistralTTS, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, MurfTTS, normalizePresetInput, OpenAI, OpenAIGPTLive, OpenAIRealtime, OpenAISTT, OpenAITTS, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, Protoface, previewRequestHeaders, QwenOmni, QwenSTT, REDACTED, RimeTTS, RTZRSTT, redactHeadersForDebug, redactSecrets, SalModeValues, SarvamSTT, SarvamTTS, SarvamTTSLanguage, SensetimeAvatar, SilenceActionValues, SmallestAISTT, SmallestAITTS, SonioxTTS, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, SpeechmaticsSTT, StepFunSTT, StepFunTTS, Tavus, TencentLLM, TencentSTT, TencentTTS, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, TypecastTTS, toBaseAvatarConfig, VertexAI, VertexAILLM, validateAvatarConfig, validateTtsSampleRate, XAiSTT, XAiTTS, XaiGrok, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./agentkit/index.js";
|
|
4
|
+
export type { AdvancedFeatures, AgentConfig, AgentConfigUpdate, AgentOptions, AgentPreset, AgentSessionEvent, AgentSessionEventHandler, AgentSessionOptions, AgentsClient, AkoolAvatarConfig, AkoolAvatarOptions, AkoolSampleRate, AliyunLLMOptions, AmazonBedrockOptions, AmazonSTTOptions, AmazonTTSOptions, AmazonTts, AmazonTtsParams, AnamAvatarConfig, AnamAvatarOptions, AnthropicOptions, AresSTTOptions, AsrConfig, AsrPreset, AsrVendorName, AssemblyAISTTOptions, AvatarConfig, AvatarVendor, AvatarWireVendor, AzureOpenAIOptions, AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, BaseMllmOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CartesiaSampleRate, CartesiaTTSOptions, CartesiaTts, CartesiaTtsParams, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, CustomLLMOptions, DeepgramSTTOptions, DeepgramTTSOptions, DeepSeekLLMOptions, DifyOptions, Eagerness, ElevenLabsSampleRate, ElevenLabsSTTOptions, ElevenLabsTTSOptions, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FengmingSTTOptions, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioSTTOptions, FishAudioTTSOptions, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GeminiLiveModel, GeminiLiveModelRow, GeminiLiveModelSpec, GeminiLiveOptions, GeminiLiveVoice, GeminiOptions, GeminiPreviewVoice, GeminiSTTModel, GeminiSTTOptions, GeminiThinkingLevel, GenerateClientTokenOptions, GenerateConvoAITokenOptions, GenerateTokenOptions, GenericAvatarConfig, GenericAvatarOptions, GenericTTSOptions, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, GoogleSTTOptions, GoogleTTSOptions, GoogleTts, GoogleTtsParams, GradiumTTSOptions, GradiumTts, GradiumTtsParams, GroqOptions, HeyGenAvatarConfig, HeyGenAvatarOptions, HeyGenSampleRate, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LemonSliceOptions, LiveAvatarAvatarConfig, LiveAvatarAvatarOptions, LiveAvatarSampleRate, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmPreset, LlmStyle, LlmTool, LlmToolExecution, LlmToolFunction, LlmToolServer, LlmVendor, McpServer, McpServersItem, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MicrosoftSampleRate, MicrosoftSTTOptions, MicrosoftTTSOptions, MicrosoftTts, MicrosoftTtsParams, MiniMaxCNTTSOptions, MiniMaxDuplexTTSOptions, MiniMaxTTSOptions, MinimaxDuplexTts, MinimaxDuplexTtsParams, MinimaxTts, MinimaxTtsParams, MistralTTSOptions, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTTSOptions, MurfTts, MurfTtsParams, OpenAIGPTLiveOptions, OpenAIOptions, OpenAIRealtimeOptions, OpenAISTTOptions, OpenAITTSOptions, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, PresetCategory, PresetInput, PreviewFeature, PreviewRoute, ProtofaceOptions, QwenOmniOptions, QwenSTTOptions, RimeTTSOptions, RimeTts, RimeTtsParams, RTZRSTTOptions, RtcConfig, RtzrAsr, RtzrAsrParams, SalConfig, SalMode, SampleRate, SarvamSTTOptions, SarvamTTSOptions, SarvamTts, SarvamTtsParams, SayOptions, SensetimeAvatarConfig, SensetimeAvatarOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SmallestAISTTOptions, SmallestAITTSOptions, SmallestAiAsr, SmallestAiAsrParams, SmallestAiTts, SmallestAiTtsParams, SonioxTTSOptions, SonioxTts, SonioxTtsParams, SpatiusAvatarConfig, SpatiusAvatarOptions, SpatiusAvatarParams, SpeakConfig, SpeakPriority, SpeechmaticsSTTOptions, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, StepFunSTTOptions, StepFunTTSOptions, StepfunAsr, StepfunAsrParams, StrictAvatarConfig, SttConfig, SttVendor, TavusOptions, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TtsPreset, TtsVendor, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionNestedConfig, TurnDetectionType, TypecastTTSOptions, TypecastTts, TypecastTtsParams, VertexAILLMOptions, VertexAIOptions, XAiAsr, XAiAsrParams, XAiSTTOptions, XAiTTSOptions, XAiTts, XAiTtsParams, XaiGrokOptions, XfyunBigModelSTTOptions, XfyunDialectSTTOptions, XfyunSTTOptions, } from "./agentkit/index.js";
|
|
5
|
+
export { Agent, AgentPresets, AgentSession, AkoolAvatar, AliyunLLM, AmazonBedrock, AmazonSTT, AmazonTTS, AnamAvatar, Anthropic, AresSTT, AssemblyAISTT, AudioScenario, AzureOpenAI, AzureOpenAIRealtime, BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, BaseMLLM, BaseSTT, BaseTTS, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CartesiaTTS, CosyVoiceTTS, CredentialMode, CustomLLM, createPreviewRoute, DataChannel, DeepgramSTT, DeepgramTTS, DeepSeekLLM, Dify, ElevenLabsSTT, ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioSTT, FishAudioTTS, GEMINI_EAP_MLLM_MODELS, GEMINI_LIVE_MODEL_TABLE, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, Gemini, GeminiLive, GeminiLiveModels, GeminiSTT, GeminiSTTModels, GeminiThinkingLevels, GeminiTranscriptionMode, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateClientToken, generateConvoAIToken, generateRtcToken, HeyGenAvatar, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, LemonSlice, LiveAvatarAvatar, MAX_EXPIRY_SECONDS, MicrosoftCNSTT, MicrosoftCNTTS, MicrosoftSTT, MicrosoftTTS, MiniMaxCNTTS, MiniMaxDuplexTTS, MiniMaxTTS, MistralTTS, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, MurfTTS, normalizePresetInput, OpenAI, OpenAIGPTLive, OpenAIRealtime, OpenAISTT, OpenAITTS, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, Protoface, previewRequestHeaders, QwenOmni, QwenSTT, REDACTED, RimeTTS, RTZRSTT, redactHeadersForDebug, redactSecrets, SalModeValues, SarvamSTT, SarvamTTS, SarvamTTSLanguage, SensetimeAvatar, SilenceActionValues, SmallestAISTT, SmallestAITTS, SonioxTTS, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, SpeechmaticsSTT, StepFunSTT, StepFunTTS, Tavus, TencentLLM, TencentSTT, TencentTTS, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, TypecastTTS, toBaseAvatarConfig, VertexAI, VertexAILLM, validateAvatarConfig, validateTtsSampleRate, XAiSTT, XAiTTS, XaiGrok, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./agentkit/index.js";
|
|
6
6
|
export type { GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions } from "./agentkit/vendors/tts.js";
|
|
7
7
|
export { GeminiTTS, GeminiTTSModels } from "./agentkit/vendors/tts.js";
|
|
8
8
|
export * as Agora from "./api/index.js";
|