agora-agents 2.6.1 → 2.8.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/README.md +3 -3
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/agentkit/Agent.d.ts +1 -1
- package/dist/cjs/agentkit/Agent.js +28 -4
- package/dist/cjs/agentkit/AgentSession.d.ts +24 -0
- package/dist/cjs/agentkit/AgentSession.js +95 -23
- package/dist/cjs/agentkit/debug.d.ts +31 -0
- package/dist/cjs/agentkit/debug.js +143 -0
- package/dist/cjs/agentkit/index.d.ts +8 -3
- package/dist/cjs/agentkit/index.js +19 -3
- package/dist/cjs/agentkit/preview/client.d.ts +59 -0
- package/dist/cjs/agentkit/preview/client.js +94 -0
- package/dist/cjs/agentkit/preview/index.d.ts +12 -0
- package/dist/cjs/agentkit/preview/index.js +22 -0
- package/dist/cjs/agentkit/preview/vendors.d.ts +74 -0
- package/dist/cjs/agentkit/preview/vendors.js +88 -0
- package/dist/cjs/agentkit/token.js +32 -3
- package/dist/cjs/agentkit/types.d.ts +27 -6
- package/dist/cjs/agentkit/vendors/base.d.ts +6 -2
- package/dist/cjs/agentkit/vendors/base.js +4 -0
- package/dist/cjs/agentkit/vendors/cn.js +7 -5
- package/dist/cjs/agentkit/vendors/llm.js +8 -1
- package/dist/cjs/agentkit/vendors/stt.d.ts +45 -2
- package/dist/cjs/agentkit/vendors/stt.js +53 -5
- package/dist/cjs/agentkit/vendors/tts.js +1 -1
- package/dist/cjs/api/resources/agents/client/requests/StartAgentsRequest.d.ts +12 -20
- package/dist/cjs/api/resources/agents/client/requests/StartAgentsRequest.js +1 -1
- package/dist/cjs/api/types/Asr.d.ts +4 -1
- package/dist/cjs/api/types/GeminiAsr.d.ts +10 -0
- package/dist/cjs/api/types/GeminiAsr.js +3 -0
- package/dist/cjs/api/types/GeminiAsrParams.d.ts +33 -0
- package/dist/cjs/api/types/GeminiAsrParams.js +12 -0
- package/dist/cjs/api/types/index.d.ts +2 -0
- package/dist/cjs/api/types/index.js +2 -0
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +15 -3
- 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 +1 -1
- package/dist/esm/agentkit/Agent.mjs +28 -4
- package/dist/esm/agentkit/AgentSession.d.mts +24 -0
- package/dist/esm/agentkit/AgentSession.mjs +95 -23
- package/dist/esm/agentkit/debug.d.mts +31 -0
- package/dist/esm/agentkit/debug.mjs +138 -0
- package/dist/esm/agentkit/index.d.mts +8 -3
- package/dist/esm/agentkit/index.mjs +4 -1
- package/dist/esm/agentkit/preview/client.d.mts +59 -0
- package/dist/esm/agentkit/preview/client.mjs +88 -0
- package/dist/esm/agentkit/preview/index.d.mts +12 -0
- package/dist/esm/agentkit/preview/index.mjs +9 -0
- package/dist/esm/agentkit/preview/vendors.d.mts +74 -0
- package/dist/esm/agentkit/preview/vendors.mjs +83 -0
- package/dist/esm/agentkit/token.mjs +32 -3
- package/dist/esm/agentkit/types.d.mts +27 -6
- package/dist/esm/agentkit/vendors/base.d.mts +6 -2
- package/dist/esm/agentkit/vendors/base.mjs +4 -0
- package/dist/esm/agentkit/vendors/cn.mjs +7 -5
- package/dist/esm/agentkit/vendors/llm.mjs +8 -1
- package/dist/esm/agentkit/vendors/stt.d.mts +45 -2
- package/dist/esm/agentkit/vendors/stt.mjs +51 -4
- package/dist/esm/agentkit/vendors/tts.mjs +1 -1
- package/dist/esm/api/resources/agents/client/requests/StartAgentsRequest.d.mts +12 -20
- package/dist/esm/api/resources/agents/client/requests/StartAgentsRequest.mjs +1 -1
- package/dist/esm/api/types/Asr.d.mts +4 -1
- package/dist/esm/api/types/GeminiAsr.d.mts +10 -0
- package/dist/esm/api/types/GeminiAsr.mjs +2 -0
- package/dist/esm/api/types/GeminiAsrParams.d.mts +33 -0
- package/dist/esm/api/types/GeminiAsrParams.mjs +9 -0
- package/dist/esm/api/types/index.d.mts +2 -0
- package/dist/esm/api/types/index.mjs +2 -0
- 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 +4 -2
- package/dist/cjs/agentkit/__tests__/area-aware-vendors.test.d.ts +0 -1
- package/dist/cjs/agentkit/__tests__/area-aware-vendors.test.js +0 -87
- package/dist/cjs/agentkit/__tests__/readme-examples.test.d.ts +0 -1
- package/dist/cjs/agentkit/__tests__/readme-examples.test.js +0 -126
- package/dist/cjs/agentkit/__tests__/type-safety.test.d.ts +0 -14
- package/dist/cjs/agentkit/__tests__/type-safety.test.js +0 -321
- package/dist/esm/agentkit/__tests__/area-aware-vendors.test.d.mts +0 -1
- package/dist/esm/agentkit/__tests__/area-aware-vendors.test.mjs +0 -85
- package/dist/esm/agentkit/__tests__/readme-examples.test.d.mts +0 -1
- package/dist/esm/agentkit/__tests__/readme-examples.test.mjs +0 -124
- package/dist/esm/agentkit/__tests__/type-safety.test.d.mts +0 -14
- package/dist/esm/agentkit/__tests__/type-safety.test.mjs +0 -319
|
@@ -9,15 +9,17 @@ function requireString(value, field, vendor) {
|
|
|
9
9
|
}
|
|
10
10
|
class FengmingSTT extends base_js_1.BaseCNSTT {
|
|
11
11
|
constructor(options = {}) {
|
|
12
|
+
var _a;
|
|
12
13
|
super();
|
|
14
|
+
if (Object.keys((_a = options.additionalParams) !== null && _a !== void 0 ? _a : {}).includes("keywords")) {
|
|
15
|
+
throw new Error("FengmingSTT additionalParams must not contain keywords; use the top-level keywords option");
|
|
16
|
+
}
|
|
13
17
|
this.options = options;
|
|
14
18
|
}
|
|
15
19
|
toConfig() {
|
|
16
20
|
const { keywords, additionalParams } = this.options;
|
|
17
|
-
const hasParams =
|
|
18
|
-
return Object.assign({ vendor: "fengming" }, (hasParams && {
|
|
19
|
-
params: Object.assign(Object.assign({}, additionalParams), (keywords !== undefined && { keywords })),
|
|
20
|
-
}));
|
|
21
|
+
const hasParams = additionalParams !== undefined && Object.keys(additionalParams).length > 0;
|
|
22
|
+
return Object.assign(Object.assign({ vendor: "fengming" }, (keywords !== undefined && { keywords })), (hasParams && { params: Object.assign({}, additionalParams) }));
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
25
|
exports.FengmingSTT = FengmingSTT;
|
|
@@ -228,7 +230,7 @@ class StepFunTTS extends base_js_1.BaseCNTTS {
|
|
|
228
230
|
exports.StepFunTTS = StepFunTTS;
|
|
229
231
|
function cnLlmConfig(options, vendor) {
|
|
230
232
|
var _a;
|
|
231
|
-
return Object.assign(Object.assign({ url: options.url }, (options.apiKey && { api_key: options.apiKey })), { params: Object.assign({ model: options.model }, options.params), headers: options.headers, max_history: options.maxHistory, system_messages: options.systemMessages, greeting_message: options.greetingMessage, greeting_audio_url: options.greetingAudioUrl, failure_message: options.failureMessage, input_modalities: (_a = options.inputModalities) !== null && _a !== void 0 ? _a : ["text"], output_modalities: options.outputModalities, style: "openai", vendor, greeting_configs: options.greetingConfigs, template_variables: options.templateVariables, mcp_servers: options.mcpServers });
|
|
233
|
+
return Object.assign(Object.assign({ url: options.url }, (options.apiKey && { api_key: options.apiKey })), { params: Object.assign({ model: options.model }, options.params), headers: options.headers, max_history: options.maxHistory, system_messages: options.systemMessages, greeting_message: options.greetingMessage, greeting_audio_url: options.greetingAudioUrl, failure_message: options.failureMessage, input_modalities: (_a = options.inputModalities) !== null && _a !== void 0 ? _a : ["text"], output_modalities: options.outputModalities, style: "openai", vendor, greeting_configs: options.greetingConfigs, template_variables: options.templateVariables, mcp_servers: options.mcpServers, tools: options.tools });
|
|
232
234
|
}
|
|
233
235
|
class AliyunLLM extends base_js_1.BaseCNLLM {
|
|
234
236
|
constructor(options) {
|
|
@@ -60,7 +60,7 @@ class OpenAI extends base_js_1.BaseLLM {
|
|
|
60
60
|
const { apiKey, model, url, maxHistory, temperature, topP, maxTokens, systemMessages, greetingMessage, failureMessage, inputModalities, params, headers, } = this.options;
|
|
61
61
|
return Object.assign(Object.assign({ url: url !== null && url !== void 0 ? url : "https://api.openai.com/v1/chat/completions" }, (apiKey && { api_key: apiKey })), {
|
|
62
62
|
// model is the default; params entries extend it; named fields win.
|
|
63
|
-
params: Object.assign(Object.assign(Object.assign(Object.assign({ model }, params), (temperature !== undefined && { temperature })), (topP !== undefined && { top_p: topP })), (maxTokens !== undefined && { max_tokens: maxTokens })), headers, max_history: maxHistory, system_messages: systemMessages, greeting_message: greetingMessage, greeting_audio_url: this.greetingAudioUrl, failure_message: failureMessage, input_modalities: inputModalities !== null && inputModalities !== void 0 ? inputModalities : ["text"], output_modalities: this.outputModalities, style: "openai", vendor: this.vendor, greeting_configs: this.greetingConfigs, template_variables: this.templateVariables, mcp_servers: this.mcpServers });
|
|
63
|
+
params: Object.assign(Object.assign(Object.assign(Object.assign({ model }, params), (temperature !== undefined && { temperature })), (topP !== undefined && { top_p: topP })), (maxTokens !== undefined && { max_tokens: maxTokens })), headers, max_history: maxHistory, system_messages: systemMessages, greeting_message: greetingMessage, greeting_audio_url: this.greetingAudioUrl, failure_message: failureMessage, input_modalities: inputModalities !== null && inputModalities !== void 0 ? inputModalities : ["text"], output_modalities: this.outputModalities, style: "openai", vendor: this.vendor, greeting_configs: this.greetingConfigs, template_variables: this.templateVariables, mcp_servers: this.mcpServers, tools: this.tools });
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
exports.OpenAI = OpenAI;
|
|
@@ -112,6 +112,7 @@ class AzureOpenAI extends base_js_1.BaseLLM {
|
|
|
112
112
|
greeting_configs: this.greetingConfigs,
|
|
113
113
|
template_variables: this.templateVariables,
|
|
114
114
|
mcp_servers: this.mcpServers,
|
|
115
|
+
tools: this.tools,
|
|
115
116
|
};
|
|
116
117
|
}
|
|
117
118
|
}
|
|
@@ -160,6 +161,7 @@ class Anthropic extends base_js_1.BaseLLM {
|
|
|
160
161
|
greeting_configs: this.greetingConfigs,
|
|
161
162
|
template_variables: this.templateVariables,
|
|
162
163
|
mcp_servers: this.mcpServers,
|
|
164
|
+
tools: this.tools,
|
|
163
165
|
};
|
|
164
166
|
}
|
|
165
167
|
}
|
|
@@ -205,6 +207,7 @@ class Gemini extends base_js_1.BaseLLM {
|
|
|
205
207
|
greeting_configs: this.greetingConfigs,
|
|
206
208
|
template_variables: this.templateVariables,
|
|
207
209
|
mcp_servers: this.mcpServers,
|
|
210
|
+
tools: this.tools,
|
|
208
211
|
};
|
|
209
212
|
}
|
|
210
213
|
}
|
|
@@ -228,6 +231,7 @@ function openAIStyleConfig(options, vendor) {
|
|
|
228
231
|
greeting_configs: options.greetingConfigs,
|
|
229
232
|
template_variables: options.templateVariables,
|
|
230
233
|
mcp_servers: options.mcpServers,
|
|
234
|
+
tools: options.tools,
|
|
231
235
|
};
|
|
232
236
|
}
|
|
233
237
|
class Groq extends base_js_1.BaseLLM {
|
|
@@ -286,6 +290,7 @@ class VertexAILLM extends base_js_1.BaseLLM {
|
|
|
286
290
|
greeting_configs: this.greetingConfigs,
|
|
287
291
|
template_variables: this.templateVariables,
|
|
288
292
|
mcp_servers: this.mcpServers,
|
|
293
|
+
tools: this.tools,
|
|
289
294
|
};
|
|
290
295
|
}
|
|
291
296
|
}
|
|
@@ -322,6 +327,7 @@ class AmazonBedrock extends base_js_1.BaseLLM {
|
|
|
322
327
|
greeting_configs: this.greetingConfigs,
|
|
323
328
|
template_variables: this.templateVariables,
|
|
324
329
|
mcp_servers: this.mcpServers,
|
|
330
|
+
tools: this.tools,
|
|
325
331
|
};
|
|
326
332
|
}
|
|
327
333
|
}
|
|
@@ -354,6 +360,7 @@ class Dify extends base_js_1.BaseLLM {
|
|
|
354
360
|
greeting_configs: this.greetingConfigs,
|
|
355
361
|
template_variables: this.templateVariables,
|
|
356
362
|
mcp_servers: this.mcpServers,
|
|
363
|
+
tools: this.tools,
|
|
357
364
|
};
|
|
358
365
|
}
|
|
359
366
|
}
|
|
@@ -2,8 +2,51 @@
|
|
|
2
2
|
* Type-safe STT (Speech-to-Text) vendor classes.
|
|
3
3
|
*/
|
|
4
4
|
import { type DeepgramPresetModel } from "../presets.js";
|
|
5
|
-
import type { SttConfig } from "../types.js";
|
|
6
|
-
import { BaseSTT } from "./base.js";
|
|
5
|
+
import type { SttConfig, TurnDetectionLanguage } from "../types.js";
|
|
6
|
+
import { BaseSTT, type SampleRate } from "./base.js";
|
|
7
|
+
/** Gemini transcription models. */
|
|
8
|
+
export declare const GeminiSTTModels: {
|
|
9
|
+
readonly Transcribe35Live: "gemini-3.5-transcribe-live";
|
|
10
|
+
};
|
|
11
|
+
/** A Gemini transcription model. Known models autocomplete while newer model names remain accepted. */
|
|
12
|
+
export type GeminiSTTModel = (typeof GeminiSTTModels)[keyof typeof GeminiSTTModels] | (string & {});
|
|
13
|
+
/** Transcription output mode for Gemini ASR. */
|
|
14
|
+
export declare const GeminiTranscriptionMode: {
|
|
15
|
+
readonly Smart: "SMART";
|
|
16
|
+
readonly Verbatim: "VERBATIM";
|
|
17
|
+
};
|
|
18
|
+
export type GeminiTranscriptionMode = (typeof GeminiTranscriptionMode)[keyof typeof GeminiTranscriptionMode];
|
|
19
|
+
/** Constructor options for Google Gemini STT. */
|
|
20
|
+
export interface GeminiSTTOptions {
|
|
21
|
+
/** Google Gemini API key. */
|
|
22
|
+
apiKey: string;
|
|
23
|
+
/** Gemini transcription model. Defaults to `gemini-3.5-transcribe-live`. */
|
|
24
|
+
model?: GeminiSTTModel;
|
|
25
|
+
/** Language code for speech recognition (for example, `en-US`). */
|
|
26
|
+
language?: string;
|
|
27
|
+
/** Candidate transcription languages, serialized as `params.language_hints`. */
|
|
28
|
+
languageHints?: readonly TurnDetectionLanguage[];
|
|
29
|
+
/** @deprecated Use `languageHints` instead. */
|
|
30
|
+
languageCodes?: readonly TurnDetectionLanguage[];
|
|
31
|
+
/** Words and phrases used to bias recognition. */
|
|
32
|
+
customVocabulary?: readonly string[];
|
|
33
|
+
/** Audio sample rate in Hz. Defaults to 16000. */
|
|
34
|
+
sampleRate?: SampleRate;
|
|
35
|
+
/** Whether to include word-level timestamps. Cannot be true when custom vocabulary or SMART mode is used. */
|
|
36
|
+
wordTimestamp?: boolean;
|
|
37
|
+
/** Transcript cleanup mode. Defaults to VERBATIM when omitted. */
|
|
38
|
+
mode?: GeminiTranscriptionMode;
|
|
39
|
+
/** Whether to include speaker labels. Cannot be true when mode is SMART. */
|
|
40
|
+
diarization?: boolean;
|
|
41
|
+
/** Additional vendor-specific parameters. Explicit options take precedence. */
|
|
42
|
+
additionalParams?: Record<string, unknown>;
|
|
43
|
+
}
|
|
44
|
+
/** Google Gemini STT vendor. */
|
|
45
|
+
export declare class GeminiSTT extends BaseSTT {
|
|
46
|
+
private readonly options;
|
|
47
|
+
constructor(options: GeminiSTTOptions);
|
|
48
|
+
toConfig(): SttConfig;
|
|
49
|
+
}
|
|
7
50
|
/**
|
|
8
51
|
* Constructor options for Speechmatics STT.
|
|
9
52
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Type-safe STT (Speech-to-Text) vendor classes.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.XAiSTT = exports.SarvamSTT = exports.AresSTT = exports.AssemblyAISTT = exports.AmazonSTT = exports.GoogleSTT = exports.OpenAISTT = exports.MicrosoftSTT = exports.DeepgramSTT = exports.SpeechmaticsSTT = void 0;
|
|
6
|
+
exports.XAiSTT = exports.SarvamSTT = exports.AresSTT = exports.AssemblyAISTT = exports.AmazonSTT = exports.GoogleSTT = exports.OpenAISTT = exports.MicrosoftSTT = exports.DeepgramSTT = exports.SpeechmaticsSTT = exports.GeminiSTT = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = void 0;
|
|
7
7
|
const presets_js_1 = require("../presets.js");
|
|
8
8
|
const base_js_1 = require("./base.js");
|
|
9
9
|
function _requireString(value, field, vendor) {
|
|
@@ -14,6 +14,52 @@ function _requireString(value, field, vendor) {
|
|
|
14
14
|
function isDeepgramManagedModel(model) {
|
|
15
15
|
return model !== undefined && presets_js_1.DeepgramPresetModels.includes(model.trim().toLowerCase());
|
|
16
16
|
}
|
|
17
|
+
/** Gemini transcription models. */
|
|
18
|
+
exports.GeminiSTTModels = {
|
|
19
|
+
Transcribe35Live: "gemini-3.5-transcribe-live",
|
|
20
|
+
};
|
|
21
|
+
/** Transcription output mode for Gemini ASR. */
|
|
22
|
+
exports.GeminiTranscriptionMode = {
|
|
23
|
+
Smart: "SMART",
|
|
24
|
+
Verbatim: "VERBATIM",
|
|
25
|
+
};
|
|
26
|
+
/** Google Gemini STT vendor. */
|
|
27
|
+
class GeminiSTT extends base_js_1.BaseSTT {
|
|
28
|
+
constructor(options) {
|
|
29
|
+
var _a, _b, _c;
|
|
30
|
+
super();
|
|
31
|
+
_requireString(options.apiKey, "apiKey", "GeminiSTT");
|
|
32
|
+
const wordTimestamp = options.wordTimestamp === true;
|
|
33
|
+
if (((_b = (_a = options.customVocabulary) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0 && wordTimestamp) {
|
|
34
|
+
throw new Error("customVocabulary cannot be used with wordTimestamp=true");
|
|
35
|
+
}
|
|
36
|
+
const mode = (_c = options.mode) !== null && _c !== void 0 ? _c : exports.GeminiTranscriptionMode.Verbatim;
|
|
37
|
+
if (mode !== exports.GeminiTranscriptionMode.Smart && mode !== exports.GeminiTranscriptionMode.Verbatim) {
|
|
38
|
+
throw new Error("GeminiSTT Mode must be SMART or VERBATIM");
|
|
39
|
+
}
|
|
40
|
+
if (mode === exports.GeminiTranscriptionMode.Smart) {
|
|
41
|
+
if (wordTimestamp) {
|
|
42
|
+
throw new Error("GeminiSTT Mode=SMART cannot be used with WordTimestamp=true");
|
|
43
|
+
}
|
|
44
|
+
if (options.diarization === true) {
|
|
45
|
+
throw new Error("GeminiSTT Mode=SMART cannot be used with Diarization=true");
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
this.options = options;
|
|
49
|
+
}
|
|
50
|
+
toConfig() {
|
|
51
|
+
const { apiKey, model, language, languageHints, languageCodes, customVocabulary, sampleRate, wordTimestamp, mode, diarization, additionalParams, } = this.options;
|
|
52
|
+
const resolvedLanguageHints = languageHints !== null && languageHints !== void 0 ? languageHints : languageCodes;
|
|
53
|
+
const params = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, additionalParams), { api_key: apiKey, model: model === undefined ? exports.GeminiSTTModels.Transcribe35Live : model, sample_rate: sampleRate === undefined ? 16000 : sampleRate }), (language !== undefined && { language })), (resolvedLanguageHints !== undefined && {
|
|
54
|
+
language_hints: [...resolvedLanguageHints],
|
|
55
|
+
})), (customVocabulary !== undefined && { custom_vocabulary: [...customVocabulary] })), (wordTimestamp !== undefined && { word_timestamp: wordTimestamp })), (mode !== undefined && { mode })), (diarization !== undefined && { diarization }));
|
|
56
|
+
return {
|
|
57
|
+
vendor: "gemini",
|
|
58
|
+
params,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.GeminiSTT = GeminiSTT;
|
|
17
63
|
/**
|
|
18
64
|
* Speechmatics STT vendor.
|
|
19
65
|
*
|
|
@@ -219,15 +265,17 @@ exports.AssemblyAISTT = AssemblyAISTT;
|
|
|
219
265
|
*/
|
|
220
266
|
class AresSTT extends base_js_1.BaseSTT {
|
|
221
267
|
constructor(options = {}) {
|
|
268
|
+
var _a;
|
|
222
269
|
super();
|
|
270
|
+
if (Object.keys((_a = options.additionalParams) !== null && _a !== void 0 ? _a : {}).includes("keywords")) {
|
|
271
|
+
throw new Error("AresSTT additionalParams must not contain keywords; use the top-level keywords option");
|
|
272
|
+
}
|
|
223
273
|
this.options = options;
|
|
224
274
|
}
|
|
225
275
|
toConfig() {
|
|
226
276
|
const { keywords, additionalParams } = this.options;
|
|
227
|
-
const hasParams =
|
|
228
|
-
return Object.assign({ vendor: "ares" }, (hasParams && {
|
|
229
|
-
params: Object.assign(Object.assign({}, additionalParams), (keywords !== undefined && { keywords })),
|
|
230
|
-
}));
|
|
277
|
+
const hasParams = additionalParams !== undefined && Object.keys(additionalParams).length > 0;
|
|
278
|
+
return Object.assign(Object.assign({ vendor: "ares" }, (keywords !== undefined && { keywords })), (hasParams && { params: Object.assign({}, additionalParams) }));
|
|
231
279
|
}
|
|
232
280
|
}
|
|
233
281
|
exports.AresSTT = AresSTT;
|
|
@@ -12,7 +12,7 @@ function requireString(value, field, vendor) {
|
|
|
12
12
|
throw new Error(`${vendor} requires ${field}`);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function _requireRecord(value, field, vendor) {
|
|
16
16
|
if (value == null || typeof value !== "object" || Array.isArray(value)) {
|
|
17
17
|
throw new Error(`${vendor} requires ${field}`);
|
|
18
18
|
}
|
|
@@ -111,10 +111,7 @@ export declare namespace StartAgentsRequest {
|
|
|
111
111
|
labels?: Record<string, string>;
|
|
112
112
|
/** RTC media encryption configuration. */
|
|
113
113
|
rtc?: Properties.Rtc;
|
|
114
|
-
/**
|
|
115
|
-
* Filler word configuration. Plays filler words while waiting for LLM responses to reduce user anxiety and improve conversation flow.
|
|
116
|
-
* When `enable` is `true`, `content.static_config.phrases` must be present and non-empty, even when `content.mode` is `generated`, because generated mode still falls back to static filler words.
|
|
117
|
-
*/
|
|
114
|
+
/** Filler word configuration. Plays filler words while waiting for LLM responses to reduce user anxiety and improve conversation flow. */
|
|
118
115
|
filler_words?: Properties.FillerWords;
|
|
119
116
|
/** Agent configuration parameters. */
|
|
120
117
|
parameters?: Properties.Parameters;
|
|
@@ -160,7 +157,7 @@ export declare namespace StartAgentsRequest {
|
|
|
160
157
|
enable_rtm?: boolean;
|
|
161
158
|
/** Enable Selective Attention Locking (SAL). When enabled, configure the `sal` field to set up speaker recognition or locking modes. */
|
|
162
159
|
enable_sal?: boolean;
|
|
163
|
-
/** Enable
|
|
160
|
+
/** Enable invocation for MCP servers and inline REST tools. */
|
|
164
161
|
enable_tools?: boolean;
|
|
165
162
|
}
|
|
166
163
|
/**
|
|
@@ -569,7 +566,6 @@ export declare namespace StartAgentsRequest {
|
|
|
569
566
|
}
|
|
570
567
|
/**
|
|
571
568
|
* Filler word configuration. Plays filler words while waiting for LLM responses to reduce user anxiety and improve conversation flow.
|
|
572
|
-
* When `enable` is `true`, `content.static_config.phrases` must be present and non-empty, even when `content.mode` is `generated`, because generated mode still falls back to static filler words.
|
|
573
569
|
*/
|
|
574
570
|
interface FillerWords {
|
|
575
571
|
/**
|
|
@@ -612,22 +608,19 @@ export declare namespace StartAgentsRequest {
|
|
|
612
608
|
/**
|
|
613
609
|
* Filler word content mode:
|
|
614
610
|
* - `static`: Static filler words. Uses a predefined list of filler words.
|
|
615
|
-
* - `generated`: LLM-generated filler words based on the last user message.
|
|
611
|
+
* - `generated`: LLM-generated filler words based on the last user message.
|
|
616
612
|
*/
|
|
617
613
|
mode?: Content.Mode;
|
|
618
|
-
/**
|
|
619
|
-
* Static filler word configuration. Required when `mode` is `static`.
|
|
620
|
-
* Also required whenever `filler_words.enable` is `true`, including when `mode` is `generated`, because generated mode uses static filler words as fallback.
|
|
621
|
-
*/
|
|
614
|
+
/** Static filler word configuration. Required when `mode` is `static`. */
|
|
622
615
|
static_config?: Content.StaticConfig;
|
|
623
|
-
/**
|
|
616
|
+
/** Optional configuration for generated filler words. When omitted, the service uses its default generator settings. */
|
|
624
617
|
generated_config?: Content.GeneratedConfig;
|
|
625
618
|
}
|
|
626
619
|
namespace Content {
|
|
627
620
|
/**
|
|
628
621
|
* Filler word content mode:
|
|
629
622
|
* - `static`: Static filler words. Uses a predefined list of filler words.
|
|
630
|
-
* - `generated`: LLM-generated filler words based on the last user message.
|
|
623
|
+
* - `generated`: LLM-generated filler words based on the last user message.
|
|
631
624
|
*/
|
|
632
625
|
const Mode: {
|
|
633
626
|
readonly Static: "static";
|
|
@@ -636,7 +629,6 @@ export declare namespace StartAgentsRequest {
|
|
|
636
629
|
type Mode = (typeof Mode)[keyof typeof Mode];
|
|
637
630
|
/**
|
|
638
631
|
* Static filler word configuration. Required when `mode` is `static`.
|
|
639
|
-
* Also required whenever `filler_words.enable` is `true`, including when `mode` is `generated`, because generated mode uses static filler words as fallback.
|
|
640
632
|
*/
|
|
641
633
|
interface StaticConfig {
|
|
642
634
|
/** List of filler word phrases. Maximum 100 filler words, each not exceeding 50 English words. */
|
|
@@ -661,23 +653,23 @@ export declare namespace StartAgentsRequest {
|
|
|
661
653
|
type SelectionRule = (typeof SelectionRule)[keyof typeof SelectionRule];
|
|
662
654
|
}
|
|
663
655
|
/**
|
|
664
|
-
*
|
|
656
|
+
* Optional configuration for generated filler words. When omitted, the service uses its default generator settings.
|
|
665
657
|
*/
|
|
666
658
|
interface GeneratedConfig {
|
|
667
659
|
/** OpenAI-compatible LLM provider used to generate filler words. Runs in parallel with the main business LLM and only uses the last user message as input. */
|
|
668
|
-
llm_provider
|
|
660
|
+
llm_provider?: GeneratedConfig.LlmProvider;
|
|
669
661
|
/** System prompt used to generate a short filler phrase based on the last user message. The generated text should be conversational and must not answer the user's question. */
|
|
670
|
-
prompt
|
|
662
|
+
prompt?: string;
|
|
671
663
|
/** Fallback strategy when generated filler text is not ready, fails, or returns empty text. Phase 1 only supports `static`. */
|
|
672
|
-
fallback_strategy
|
|
664
|
+
fallback_strategy?: "static";
|
|
673
665
|
}
|
|
674
666
|
namespace GeneratedConfig {
|
|
675
667
|
/**
|
|
676
668
|
* OpenAI-compatible LLM provider used to generate filler words. Runs in parallel with the main business LLM and only uses the last user message as input.
|
|
677
669
|
*/
|
|
678
670
|
interface LlmProvider {
|
|
679
|
-
/**
|
|
680
|
-
|
|
671
|
+
/** URL of the OpenAI-compatible chat completions endpoint. If the URL does not end with `/chat/completions`, the engine appends it automatically. */
|
|
672
|
+
url: string;
|
|
681
673
|
/** API key for authenticating requests to the filler LLM provider. */
|
|
682
674
|
api_key: string;
|
|
683
675
|
/** Additional request parameters merged into the generated filler LLM request body, such as `model`. */
|
|
@@ -190,7 +190,7 @@ var StartAgentsRequest;
|
|
|
190
190
|
/**
|
|
191
191
|
* Filler word content mode:
|
|
192
192
|
* - `static`: Static filler words. Uses a predefined list of filler words.
|
|
193
|
-
* - `generated`: LLM-generated filler words based on the last user message.
|
|
193
|
+
* - `generated`: LLM-generated filler words based on the last user message.
|
|
194
194
|
*/
|
|
195
195
|
Content.Mode = {
|
|
196
196
|
Static: "static",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as Agora from "../index.js";
|
|
2
|
-
export type Asr = Agora.Asr.Ares | Agora.Asr.Fengming | Agora.Asr.Tencent | Agora.Asr.Microsoft | Agora.Asr.Deepgram | Agora.Asr.Openai | Agora.Asr.Google | Agora.Asr.Amazon | Agora.Asr.Assemblyai | Agora.Asr.Speechmatics | Agora.Asr.Sarvam | Agora.Asr.Xai | Agora.Asr.Xfyun | Agora.Asr.XfyunBigmodel | Agora.Asr.XfyunDialect;
|
|
2
|
+
export type Asr = Agora.Asr.Ares | Agora.Asr.Fengming | Agora.Asr.Tencent | Agora.Asr.Microsoft | Agora.Asr.Deepgram | Agora.Asr.Openai | Agora.Asr.Google | Agora.Asr.Gemini | Agora.Asr.Amazon | Agora.Asr.Assemblyai | Agora.Asr.Speechmatics | Agora.Asr.Sarvam | Agora.Asr.Xai | Agora.Asr.Xfyun | Agora.Asr.XfyunBigmodel | Agora.Asr.XfyunDialect;
|
|
3
3
|
export declare namespace Asr {
|
|
4
4
|
interface Ares extends Agora.AresAsr {
|
|
5
5
|
vendor: "ares";
|
|
@@ -22,6 +22,9 @@ export declare namespace Asr {
|
|
|
22
22
|
interface Google extends Agora.GoogleAsr {
|
|
23
23
|
vendor: "google";
|
|
24
24
|
}
|
|
25
|
+
interface Gemini extends Agora.GeminiAsr {
|
|
26
|
+
vendor: "gemini";
|
|
27
|
+
}
|
|
25
28
|
interface Amazon extends Agora.AmazonAsr {
|
|
26
29
|
vendor: "amazon";
|
|
27
30
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini ASR configuration parameters.
|
|
3
|
+
*/
|
|
4
|
+
export interface GeminiAsrParams {
|
|
5
|
+
/** The Google Gemini API key used to authenticate requests. */
|
|
6
|
+
api_key: string;
|
|
7
|
+
/** The Gemini transcription model identifier. */
|
|
8
|
+
model: string;
|
|
9
|
+
/** The audio sample rate in Hz. */
|
|
10
|
+
sample_rate?: number | null;
|
|
11
|
+
/** The language code for speech recognition. This takes precedence over the top-level `asr.language` value. */
|
|
12
|
+
language?: string;
|
|
13
|
+
/** Candidate language codes for transcription. When non-empty, these take precedence over language. */
|
|
14
|
+
language_hints?: string[];
|
|
15
|
+
/** Words and phrases used to bias transcription. A non-empty custom vocabulary cannot be combined with word_timestamp. */
|
|
16
|
+
custom_vocabulary?: string[];
|
|
17
|
+
/** Transcription output mode. SMART removes disfluencies and applies formatting; VERBATIM preserves literal speech. When omitted, the service defaults to VERBATIM. SMART cannot be combined with word_timestamp or diarization. */
|
|
18
|
+
mode?: GeminiAsrParams.Mode;
|
|
19
|
+
/** Whether to include word-level timestamps in the transcription results. Cannot be enabled when mode is SMART or custom_vocabulary is non-empty. */
|
|
20
|
+
word_timestamp?: boolean;
|
|
21
|
+
/** Whether to include speaker labels in the transcription results. Cannot be enabled when mode is SMART. */
|
|
22
|
+
diarization?: boolean;
|
|
23
|
+
/** Accepts any additional properties */
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}
|
|
26
|
+
export declare namespace GeminiAsrParams {
|
|
27
|
+
/** Transcription output mode. SMART removes disfluencies and applies formatting; VERBATIM preserves literal speech. When omitted, the service defaults to VERBATIM. SMART cannot be combined with word_timestamp or diarization. */
|
|
28
|
+
const Mode: {
|
|
29
|
+
readonly Smart: "SMART";
|
|
30
|
+
readonly Verbatim: "VERBATIM";
|
|
31
|
+
};
|
|
32
|
+
type Mode = (typeof Mode)[keyof typeof Mode];
|
|
33
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.GeminiAsrParams = void 0;
|
|
5
|
+
var GeminiAsrParams;
|
|
6
|
+
(function (GeminiAsrParams) {
|
|
7
|
+
/** Transcription output mode. SMART removes disfluencies and applies formatting; VERBATIM preserves literal speech. When omitted, the service defaults to VERBATIM. SMART cannot be combined with word_timestamp or diarization. */
|
|
8
|
+
GeminiAsrParams.Mode = {
|
|
9
|
+
Smart: "SMART",
|
|
10
|
+
Verbatim: "VERBATIM",
|
|
11
|
+
};
|
|
12
|
+
})(GeminiAsrParams || (exports.GeminiAsrParams = GeminiAsrParams = {}));
|
|
@@ -29,6 +29,8 @@ export * from "./FengmingAsr.js";
|
|
|
29
29
|
export * from "./FengmingAsrParams.js";
|
|
30
30
|
export * from "./FishAudioTts.js";
|
|
31
31
|
export * from "./FishAudioTtsParams.js";
|
|
32
|
+
export * from "./GeminiAsr.js";
|
|
33
|
+
export * from "./GeminiAsrParams.js";
|
|
32
34
|
export * from "./GenericHttpTts.js";
|
|
33
35
|
export * from "./GenericHttpTtsParams.js";
|
|
34
36
|
export * from "./GoogleAsr.js";
|
|
@@ -45,6 +45,8 @@ __exportStar(require("./FengmingAsr.js"), exports);
|
|
|
45
45
|
__exportStar(require("./FengmingAsrParams.js"), exports);
|
|
46
46
|
__exportStar(require("./FishAudioTts.js"), exports);
|
|
47
47
|
__exportStar(require("./FishAudioTtsParams.js"), exports);
|
|
48
|
+
__exportStar(require("./GeminiAsr.js"), exports);
|
|
49
|
+
__exportStar(require("./GeminiAsrParams.js"), exports);
|
|
48
50
|
__exportStar(require("./GenericHttpTts.js"), exports);
|
|
49
51
|
__exportStar(require("./GenericHttpTtsParams.js"), exports);
|
|
50
52
|
__exportStar(require("./GoogleAsr.js"), exports);
|
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, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CartesiaSampleRate, CartesiaTTSOptions, CartesiaTts, CartesiaTtsParams, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, CustomLLMOptions, DeepgramSTTOptions, DeepgramTTSOptions, DeepSeekLLMOptions, DifyOptions, Eagerness, ElevenLabsSampleRate, ElevenLabsTTSOptions, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FengmingSTTOptions, FillerWordsConfig, FillerWordsContent, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTTSOptions, FishAudioTts, FishAudioTtsParams, GeminiLiveOptions, GeminiOptions, 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, HumeAITTSOptions, HumeAiTts, HumeAiTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LiveAvatarAvatarConfig, LiveAvatarAvatarOptions, LiveAvatarSampleRate, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmPreset, LlmStyle, LlmVendor, McpServersItem, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MicrosoftSampleRate, MicrosoftSTTOptions, MicrosoftTTSOptions, MicrosoftTts, MicrosoftTtsParams, MiniMaxCNTTSOptions, MiniMaxTTSOptions, MinimaxTts, MinimaxTtsParams, MistralTTSOptions, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTTSOptions, MurfTts, MurfTtsParams, OpenAIOptions, OpenAIRealtimeOptions, OpenAISTTOptions, OpenAITTSOptions, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, PresetCategory, PresetInput, QwenOmniOptions, RimeTTSOptions, RimeTts, RimeTtsParams, RtcConfig, SalConfig, SalMode, SampleRate, SarvamSTTOptions, SarvamTTSOptions, SarvamTts, SarvamTtsParams, SayOptions, SensetimeAvatarConfig, SensetimeAvatarOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SpatiusAvatarConfig, SpatiusAvatarOptions, SpatiusAvatarParams, SpeakPriority, SpeechmaticsSTTOptions, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, StepFunTTSOptions, StrictAvatarConfig, SttConfig, SttVendor, 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, DataChannel, DeepgramSTT, DeepgramTTS, DeepSeekLLM, Dify, ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioTTS, Gemini, GeminiLive, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateConvoAIToken, generateRtcToken, HeyGenAvatar, HumeAITTS, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, LiveAvatarAvatar, MAX_EXPIRY_SECONDS, MicrosoftCNSTT, MicrosoftCNTTS, MicrosoftSTT, MicrosoftTTS, MiniMaxCNTTS, MiniMaxTTS, MistralTTS, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, MurfTTS, normalizePresetInput, OpenAI, OpenAIRealtime, OpenAISTT, OpenAITTS, QwenOmni, RimeTTS, SalModeValues, SarvamSTT, SarvamTTS, SensetimeAvatar, SilenceActionValues, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, SpeechmaticsSTT, StepFunTTS, 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, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CartesiaSampleRate, CartesiaTTSOptions, CartesiaTts, CartesiaTtsParams, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, CustomLLMOptions, DeepgramSTTOptions, DeepgramTTSOptions, DeepSeekLLMOptions, DifyOptions, Eagerness, ElevenLabsSampleRate, ElevenLabsTTSOptions, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FengmingSTTOptions, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTTSOptions, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GeminiLiveOptions, GeminiOptions, GeminiSTTModel, GeminiSTTOptions, 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, HumeAITTSOptions, HumeAiTts, HumeAiTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LiveAvatarAvatarConfig, LiveAvatarAvatarOptions, LiveAvatarSampleRate, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmPreset, LlmStyle, LlmTool, LlmToolExecution, LlmToolFunction, LlmToolServer, LlmVendor, McpServersItem, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MicrosoftSampleRate, MicrosoftSTTOptions, MicrosoftTTSOptions, MicrosoftTts, MicrosoftTtsParams, MiniMaxCNTTSOptions, MiniMaxTTSOptions, 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, QwenOmniOptions, RimeTTSOptions, RimeTts, RimeTtsParams, RtcConfig, SalConfig, SalMode, SampleRate, SarvamSTTOptions, SarvamTTSOptions, SarvamTts, SarvamTtsParams, SayOptions, SensetimeAvatarConfig, SensetimeAvatarOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SpatiusAvatarConfig, SpatiusAvatarOptions, SpatiusAvatarParams, SpeakPriority, SpeechmaticsSTTOptions, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, StepFunTTSOptions, StrictAvatarConfig, SttConfig, SttVendor, 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, ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioTTS, Gemini, GeminiLive, GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateConvoAIToken, generateRtcToken, HeyGenAvatar, HumeAITTS, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, LiveAvatarAvatar, MAX_EXPIRY_SECONDS, MicrosoftCNSTT, MicrosoftCNTTS, MicrosoftSTT, MicrosoftTTS, MiniMaxCNTTS, MiniMaxTTS, MistralTTS, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, MurfTTS, normalizePresetInput, OpenAI, OpenAIGPTLive, OpenAIRealtime, OpenAISTT, OpenAITTS, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, QwenOmni, REDACTED, RimeTTS, redactHeadersForDebug, redactSecrets, SalModeValues, SarvamSTT, SarvamTTS, SensetimeAvatar, SilenceActionValues, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, SpeechmaticsSTT, StepFunTTS, 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 * as Agora from "./api/index.js";
|
|
7
7
|
export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
8
8
|
export { Area } from "./core/domain/index.js";
|
package/dist/cjs/index.js
CHANGED
|
@@ -36,9 +36,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.AgoraTimeoutError = exports.AgoraError = exports.AgoraEnvironment = exports.Area = exports.Agora = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.XaiGrok = exports.XAiTTS = exports.XAiSTT = exports.validateTtsSampleRate = exports.validateAvatarConfig = exports.VertexAILLM = exports.VertexAI = exports.toBaseAvatarConfig = exports.TypecastTTS = exports.TurnDetectionTypeValues = exports.ThinkOnThinkingActionInterrupt = exports.ThinkOnThinkingActionIgnore = exports.ThinkOnSpeakingActionInterrupt = exports.ThinkOnSpeakingActionIgnore = exports.ThinkOnListeningActionInterrupt = exports.ThinkOnListeningActionInject = exports.ThinkOnListeningActionIgnore = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = exports.StepFunTTS = exports.SpeechmaticsSTT = exports.SpeakPriorityValues = void 0;
|
|
39
|
+
exports.GenericAvatar = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = exports.GeminiLive = exports.Gemini = exports.FishAudioTTS = exports.FillerWordsSelectionRule = exports.FengmingSTT = exports.ExpiresIn = exports.ElevenLabsTTS = exports.Dify = exports.DeepSeekLLM = exports.DeepgramTTS = exports.DeepgramSTT = exports.DataChannel = exports.createPreviewRoute = exports.CustomLLM = exports.CredentialMode = exports.CosyVoiceTTS = exports.CartesiaTTS = exports.BytedanceTTS = exports.BytedanceLLM = exports.BytedanceDuplexTTS = exports.BaseTTS = exports.BaseSTT = exports.BaseMLLM = exports.BaseLLM = exports.BaseCNTTS = exports.BaseCNSTT = exports.BaseCNMLLM = exports.BaseCNLLM = exports.BaseCNAvatar = exports.BaseAvatar = exports.AzureOpenAIRealtime = exports.AzureOpenAI = exports.AudioScenario = exports.AssemblyAISTT = exports.AresSTT = exports.Anthropic = exports.AnamAvatar = exports.AmazonTTS = exports.AmazonSTT = exports.AmazonBedrock = exports.AliyunLLM = exports.AkoolAvatar = exports.AgentSession = exports.AgentPresets = exports.Agent = exports.AgoraClient = void 0;
|
|
40
|
+
exports.REDACTED = exports.QwenOmni = exports.previewRequestHeaders = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.OpenAITTS = exports.OpenAISTT = exports.OpenAIRealtime = exports.OpenAIGPTLive = exports.OpenAI = exports.normalizePresetInput = exports.MurfTTS = exports.MllmTurnDetectionModeValues = exports.MllmTurnDetectionModeServerVad = exports.MllmTurnDetectionModeSemanticVad = exports.MllmTurnDetectionModeAgoraVad = exports.MistralTTS = exports.MiniMaxTTS = exports.MiniMaxCNTTS = exports.MicrosoftTTS = exports.MicrosoftSTT = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.MAX_EXPIRY_SECONDS = exports.LiveAvatarAvatar = exports.isSpatiusAvatar = exports.isSensetimeAvatar = exports.isLiveAvatarAvatar = exports.isHeyGenAvatar = exports.isGenericAvatar = exports.isAvatarTokenManaged = exports.isAnamAvatar = exports.isAkoolAvatar = exports.InterruptionModeValues = exports.InterruptionModeStartOfSpeech = exports.InterruptionModeKeywords = exports.InterruptionDisabledStrategyIgnore = exports.InterruptionDisabledStrategyAppend = exports.InterruptionDisabledStrategy = exports.HumeAITTS = exports.HeyGenAvatar = exports.generateRtcToken = exports.generateConvoAIToken = exports.Groq = exports.GradiumTTS = exports.GoogleTTS = exports.GoogleSTT = exports.Geofence = exports.GenericTTS = void 0;
|
|
41
|
+
exports.AgoraTimeoutError = exports.AgoraError = exports.AgoraEnvironment = exports.Area = exports.Agora = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.XaiGrok = exports.XAiTTS = exports.XAiSTT = exports.validateTtsSampleRate = exports.validateAvatarConfig = exports.VertexAILLM = exports.VertexAI = exports.toBaseAvatarConfig = exports.TypecastTTS = exports.TurnDetectionTypeValues = exports.ThinkOnThinkingActionInterrupt = exports.ThinkOnThinkingActionIgnore = exports.ThinkOnSpeakingActionInterrupt = exports.ThinkOnSpeakingActionIgnore = exports.ThinkOnListeningActionInterrupt = exports.ThinkOnListeningActionInject = exports.ThinkOnListeningActionIgnore = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = exports.StepFunTTS = exports.SpeechmaticsSTT = exports.SpeakPriorityValues = exports.SpeakPriorityInterrupt = exports.SpeakPriorityIgnore = exports.SpeakPriorityAppend = exports.SpatiusAvatar = exports.SilenceActionValues = exports.SensetimeAvatar = exports.SarvamTTS = exports.SarvamSTT = exports.SalModeValues = exports.redactSecrets = exports.redactHeadersForDebug = exports.RimeTTS = void 0;
|
|
42
42
|
var AgoraPoolClient_js_1 = require("./AgoraPoolClient.js");
|
|
43
43
|
Object.defineProperty(exports, "AgoraClient", { enumerable: true, get: function () { return AgoraPoolClient_js_1.AgoraClient; } });
|
|
44
44
|
// Agentkit layer exports - clean, ergonomic API
|
|
@@ -76,6 +76,7 @@ Object.defineProperty(exports, "CartesiaTTS", { enumerable: true, get: function
|
|
|
76
76
|
Object.defineProperty(exports, "CosyVoiceTTS", { enumerable: true, get: function () { return index_js_1.CosyVoiceTTS; } });
|
|
77
77
|
Object.defineProperty(exports, "CredentialMode", { enumerable: true, get: function () { return index_js_1.CredentialMode; } });
|
|
78
78
|
Object.defineProperty(exports, "CustomLLM", { enumerable: true, get: function () { return index_js_1.CustomLLM; } });
|
|
79
|
+
Object.defineProperty(exports, "createPreviewRoute", { enumerable: true, get: function () { return index_js_1.createPreviewRoute; } });
|
|
79
80
|
Object.defineProperty(exports, "DataChannel", { enumerable: true, get: function () { return index_js_1.DataChannel; } });
|
|
80
81
|
Object.defineProperty(exports, "DeepgramSTT", { enumerable: true, get: function () { return index_js_1.DeepgramSTT; } });
|
|
81
82
|
Object.defineProperty(exports, "DeepgramTTS", { enumerable: true, get: function () { return index_js_1.DeepgramTTS; } });
|
|
@@ -89,6 +90,9 @@ Object.defineProperty(exports, "FillerWordsSelectionRule", { enumerable: true, g
|
|
|
89
90
|
Object.defineProperty(exports, "FishAudioTTS", { enumerable: true, get: function () { return index_js_1.FishAudioTTS; } });
|
|
90
91
|
Object.defineProperty(exports, "Gemini", { enumerable: true, get: function () { return index_js_1.Gemini; } });
|
|
91
92
|
Object.defineProperty(exports, "GeminiLive", { enumerable: true, get: function () { return index_js_1.GeminiLive; } });
|
|
93
|
+
Object.defineProperty(exports, "GeminiSTT", { enumerable: true, get: function () { return index_js_1.GeminiSTT; } });
|
|
94
|
+
Object.defineProperty(exports, "GeminiSTTModels", { enumerable: true, get: function () { return index_js_1.GeminiSTTModels; } });
|
|
95
|
+
Object.defineProperty(exports, "GeminiTranscriptionMode", { enumerable: true, get: function () { return index_js_1.GeminiTranscriptionMode; } });
|
|
92
96
|
Object.defineProperty(exports, "GenericAvatar", { enumerable: true, get: function () { return index_js_1.GenericAvatar; } });
|
|
93
97
|
Object.defineProperty(exports, "GenericTTS", { enumerable: true, get: function () { return index_js_1.GenericTTS; } });
|
|
94
98
|
Object.defineProperty(exports, "Geofence", { enumerable: true, get: function () { return index_js_1.Geofence; } });
|
|
@@ -132,12 +136,20 @@ Object.defineProperty(exports, "MurfTTS", { enumerable: true, get: function () {
|
|
|
132
136
|
Object.defineProperty(exports, "normalizePresetInput", { enumerable: true, get: function () { return index_js_1.normalizePresetInput; } });
|
|
133
137
|
// LLM vendors
|
|
134
138
|
Object.defineProperty(exports, "OpenAI", { enumerable: true, get: function () { return index_js_1.OpenAI; } });
|
|
139
|
+
Object.defineProperty(exports, "OpenAIGPTLive", { enumerable: true, get: function () { return index_js_1.OpenAIGPTLive; } });
|
|
135
140
|
// MLLM vendors
|
|
136
141
|
Object.defineProperty(exports, "OpenAIRealtime", { enumerable: true, get: function () { return index_js_1.OpenAIRealtime; } });
|
|
137
142
|
Object.defineProperty(exports, "OpenAISTT", { enumerable: true, get: function () { return index_js_1.OpenAISTT; } });
|
|
138
143
|
Object.defineProperty(exports, "OpenAITTS", { enumerable: true, get: function () { return index_js_1.OpenAITTS; } });
|
|
144
|
+
Object.defineProperty(exports, "PREVIEW_API_BASE_URL", { enumerable: true, get: function () { return index_js_1.PREVIEW_API_BASE_URL; } });
|
|
145
|
+
Object.defineProperty(exports, "PREVIEW_FEATURE_HEADER", { enumerable: true, get: function () { return index_js_1.PREVIEW_FEATURE_HEADER; } });
|
|
146
|
+
Object.defineProperty(exports, "PreviewFeatures", { enumerable: true, get: function () { return index_js_1.PreviewFeatures; } });
|
|
147
|
+
Object.defineProperty(exports, "previewRequestHeaders", { enumerable: true, get: function () { return index_js_1.previewRequestHeaders; } });
|
|
139
148
|
Object.defineProperty(exports, "QwenOmni", { enumerable: true, get: function () { return index_js_1.QwenOmni; } });
|
|
149
|
+
Object.defineProperty(exports, "REDACTED", { enumerable: true, get: function () { return index_js_1.REDACTED; } });
|
|
140
150
|
Object.defineProperty(exports, "RimeTTS", { enumerable: true, get: function () { return index_js_1.RimeTTS; } });
|
|
151
|
+
Object.defineProperty(exports, "redactHeadersForDebug", { enumerable: true, get: function () { return index_js_1.redactHeadersForDebug; } });
|
|
152
|
+
Object.defineProperty(exports, "redactSecrets", { enumerable: true, get: function () { return index_js_1.redactSecrets; } });
|
|
141
153
|
Object.defineProperty(exports, "SalModeValues", { enumerable: true, get: function () { return index_js_1.SalModeValues; } });
|
|
142
154
|
Object.defineProperty(exports, "SarvamSTT", { enumerable: true, get: function () { return index_js_1.SarvamSTT; } });
|
|
143
155
|
Object.defineProperty(exports, "SarvamTTS", { enumerable: true, get: function () { return index_js_1.SarvamTTS; } });
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "v2.
|
|
1
|
+
export declare const SDK_VERSION = "v2.8.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -5,8 +5,8 @@ export function normalizeClientOptions(options) {
|
|
|
5
5
|
const headers = mergeHeaders({
|
|
6
6
|
"X-Fern-Language": "JavaScript",
|
|
7
7
|
"X-Fern-SDK-Name": "agora-agents",
|
|
8
|
-
"X-Fern-SDK-Version": "v2.
|
|
9
|
-
"User-Agent": "agora-agents/v2.
|
|
8
|
+
"X-Fern-SDK-Version": "v2.8.0",
|
|
9
|
+
"User-Agent": "agora-agents/v2.8.0",
|
|
10
10
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
11
11
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
12
12
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -246,7 +246,7 @@ export declare class Agent<TTSSampleRate extends number = number, TArea extends
|
|
|
246
246
|
*/
|
|
247
247
|
withAdvancedFeatures(features: AdvancedFeatures): Agent<TTSSampleRate, TArea>;
|
|
248
248
|
/**
|
|
249
|
-
* Returns a new Agent with MCP tool invocation enabled or disabled.
|
|
249
|
+
* Returns a new Agent with MCP and inline REST tool invocation enabled or disabled.
|
|
250
250
|
*/
|
|
251
251
|
withTools(enabled?: boolean): Agent<TTSSampleRate, TArea>;
|
|
252
252
|
/**
|