agora-agents 2.6.1 → 2.7.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/agentkit/Agent.js +9 -0
- package/dist/cjs/agentkit/AgentSession.d.ts +27 -0
- package/dist/cjs/agentkit/AgentSession.js +95 -23
- package/dist/cjs/agentkit/__tests__/area-aware-vendors.test.js +2 -2
- package/dist/cjs/agentkit/__tests__/preview-types.test.d.ts +7 -0
- package/dist/cjs/agentkit/__tests__/preview-types.test.js +57 -0
- package/dist/cjs/agentkit/__tests__/readme-examples.test.js +3 -3
- package/dist/cjs/agentkit/__tests__/type-safety.test.js +1 -1
- package/dist/cjs/agentkit/debug.d.ts +33 -0
- package/dist/cjs/agentkit/debug.js +134 -0
- package/dist/cjs/agentkit/index.d.ts +4 -1
- package/dist/cjs/agentkit/index.js +16 -3
- package/dist/cjs/agentkit/preview/client.d.ts +58 -0
- package/dist/cjs/agentkit/preview/client.js +89 -0
- package/dist/cjs/agentkit/preview/index.d.ts +11 -0
- package/dist/cjs/agentkit/preview/index.js +20 -0
- package/dist/cjs/agentkit/preview/vendors.d.ts +72 -0
- package/dist/cjs/agentkit/preview/vendors.js +53 -0
- package/dist/cjs/agentkit/token.js +32 -3
- package/dist/cjs/agentkit/types.d.ts +39 -0
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +13 -3
- package/dist/esm/agentkit/Agent.mjs +9 -0
- package/dist/esm/agentkit/AgentSession.d.mts +27 -0
- package/dist/esm/agentkit/AgentSession.mjs +95 -23
- package/dist/esm/agentkit/__tests__/area-aware-vendors.test.mjs +2 -2
- package/dist/esm/agentkit/__tests__/preview-types.test.d.mts +7 -0
- package/dist/esm/agentkit/__tests__/preview-types.test.mjs +55 -0
- package/dist/esm/agentkit/__tests__/readme-examples.test.mjs +3 -3
- package/dist/esm/agentkit/__tests__/type-safety.test.mjs +1 -1
- package/dist/esm/agentkit/debug.d.mts +33 -0
- package/dist/esm/agentkit/debug.mjs +129 -0
- package/dist/esm/agentkit/index.d.mts +4 -1
- package/dist/esm/agentkit/index.mjs +2 -0
- package/dist/esm/agentkit/preview/client.d.mts +58 -0
- package/dist/esm/agentkit/preview/client.mjs +83 -0
- package/dist/esm/agentkit/preview/index.d.mts +11 -0
- package/dist/esm/agentkit/preview/index.mjs +9 -0
- package/dist/esm/agentkit/preview/vendors.d.mts +72 -0
- package/dist/esm/agentkit/preview/vendors.mjs +49 -0
- package/dist/esm/agentkit/token.mjs +32 -3
- package/dist/esm/agentkit/types.d.mts +39 -0
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preview endpoint routing.
|
|
3
|
+
*
|
|
4
|
+
* Preview providers are not served by the production Conversational AI gateway.
|
|
5
|
+
* They live behind a single partner host and are gated by an `agora-feature`
|
|
6
|
+
* header. AgentSession detects preview providers from its resolved request body
|
|
7
|
+
* and binds that session to the preview host while ordinary AgoraClient calls
|
|
8
|
+
* remain on the regional production endpoint.
|
|
9
|
+
*
|
|
10
|
+
* Everything under `agentkit/preview/` is temporary. When these providers ship
|
|
11
|
+
* on the production gateway, delete this directory and move the vendor classes
|
|
12
|
+
* into `vendors/stt.ts`.
|
|
13
|
+
*/
|
|
14
|
+
import type { AgoraClient } from "../../AgoraPoolClient.mjs";
|
|
15
|
+
import type * as Agora from "../../api/index.mjs";
|
|
16
|
+
import { AgentManagementClient } from "../../api/resources/agentManagement/client/Client.mjs";
|
|
17
|
+
import { AgentsClient } from "../../api/resources/agents/client/Client.mjs";
|
|
18
|
+
/** Base URL that serves the preview providers. */
|
|
19
|
+
export declare const PREVIEW_API_BASE_URL = "https://partner.ai.agora.io/preview/api/conversational-ai-agent";
|
|
20
|
+
/**
|
|
21
|
+
* Request header that opts a request into a preview provider family.
|
|
22
|
+
*
|
|
23
|
+
* This is the header the preview gateway routes on. A request that reaches the
|
|
24
|
+
* gateway without it is not rejected — it is routed to the production
|
|
25
|
+
* environment, where the preview providers do not exist.
|
|
26
|
+
*/
|
|
27
|
+
export declare const PREVIEW_FEATURE_HEADER = "agora-feature";
|
|
28
|
+
/**
|
|
29
|
+
* Preview provider families. Each value is one entry in the
|
|
30
|
+
* {@link PREVIEW_FEATURE_HEADER} header and gates a set of vendors on the
|
|
31
|
+
* preview endpoint.
|
|
32
|
+
*/
|
|
33
|
+
export declare const PreviewFeatures: {
|
|
34
|
+
/** Gemini 3.5 Transcribe ASR. */
|
|
35
|
+
readonly GeminiLive: "gemini-live";
|
|
36
|
+
};
|
|
37
|
+
/** A preview provider family (`"gemini-live"`). */
|
|
38
|
+
export type PreviewFeature = (typeof PreviewFeatures)[keyof typeof PreviewFeatures];
|
|
39
|
+
/** Session-scoped clients bound to one resolved route. */
|
|
40
|
+
export interface PreviewRoute {
|
|
41
|
+
readonly agents: AgentsClient;
|
|
42
|
+
readonly agentManagement: AgentManagementClient;
|
|
43
|
+
readonly baseUrl: string;
|
|
44
|
+
readonly features: readonly PreviewFeature[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Pins the gate after any caller headers. This is also used for per-call auth
|
|
48
|
+
* headers so a custom `agora-feature` value can never blank the session gate.
|
|
49
|
+
*/
|
|
50
|
+
export declare function previewRequestHeaders(features: readonly PreviewFeature[], headers?: Record<string, string>): Record<string, string>;
|
|
51
|
+
/** Build generated resource clients for one preview session. */
|
|
52
|
+
export declare function createPreviewRoute(client: AgoraClient, features: readonly PreviewFeature[]): PreviewRoute;
|
|
53
|
+
/**
|
|
54
|
+
* Returns the preview features a start request needs, derived from the request
|
|
55
|
+
* body rather than from the vendor classes — so hand-written configs are
|
|
56
|
+
* covered too.
|
|
57
|
+
*/
|
|
58
|
+
export declare function requiredPreviewFeatures(properties: Agora.StartAgentsRequest.Properties): PreviewFeature[];
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preview endpoint routing.
|
|
3
|
+
*
|
|
4
|
+
* Preview providers are not served by the production Conversational AI gateway.
|
|
5
|
+
* They live behind a single partner host and are gated by an `agora-feature`
|
|
6
|
+
* header. AgentSession detects preview providers from its resolved request body
|
|
7
|
+
* and binds that session to the preview host while ordinary AgoraClient calls
|
|
8
|
+
* remain on the regional production endpoint.
|
|
9
|
+
*
|
|
10
|
+
* Everything under `agentkit/preview/` is temporary. When these providers ship
|
|
11
|
+
* on the production gateway, delete this directory and move the vendor classes
|
|
12
|
+
* into `vendors/stt.ts`.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import { AgentManagementClient } from "../../api/resources/agentManagement/client/Client.mjs";
|
|
24
|
+
import { AgentsClient } from "../../api/resources/agents/client/Client.mjs";
|
|
25
|
+
/** Base URL that serves the preview providers. */
|
|
26
|
+
export const PREVIEW_API_BASE_URL = "https://partner.ai.agora.io/preview/api/conversational-ai-agent";
|
|
27
|
+
/**
|
|
28
|
+
* Request header that opts a request into a preview provider family.
|
|
29
|
+
*
|
|
30
|
+
* This is the header the preview gateway routes on. A request that reaches the
|
|
31
|
+
* gateway without it is not rejected — it is routed to the production
|
|
32
|
+
* environment, where the preview providers do not exist.
|
|
33
|
+
*/
|
|
34
|
+
export const PREVIEW_FEATURE_HEADER = "agora-feature";
|
|
35
|
+
/**
|
|
36
|
+
* Preview provider families. Each value is one entry in the
|
|
37
|
+
* {@link PREVIEW_FEATURE_HEADER} header and gates a set of vendors on the
|
|
38
|
+
* preview endpoint.
|
|
39
|
+
*/
|
|
40
|
+
export const PreviewFeatures = {
|
|
41
|
+
/** Gemini 3.5 Transcribe ASR. */
|
|
42
|
+
GeminiLive: "gemini-live",
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Pins the gate after any caller headers. This is also used for per-call auth
|
|
46
|
+
* headers so a custom `agora-feature` value can never blank the session gate.
|
|
47
|
+
*/
|
|
48
|
+
export function previewRequestHeaders(features, headers) {
|
|
49
|
+
return Object.assign(Object.assign({}, headers), { [PREVIEW_FEATURE_HEADER]: features.join(",") });
|
|
50
|
+
}
|
|
51
|
+
/** Build generated resource clients for one preview session. */
|
|
52
|
+
export function createPreviewRoute(client, features) {
|
|
53
|
+
var _a;
|
|
54
|
+
const clientOptions = client._options;
|
|
55
|
+
const fetchFn = (_a = clientOptions.fetch) !== null && _a !== void 0 ? _a : globalThis.fetch;
|
|
56
|
+
const options = Object.assign(Object.assign({}, clientOptions), { baseUrl: PREVIEW_API_BASE_URL, headers: previewRequestHeaders(features, clientOptions.headers), fetch: (input, init) => __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
const headers = new Headers(init === null || init === void 0 ? void 0 : init.headers);
|
|
58
|
+
headers.set(PREVIEW_FEATURE_HEADER, features.join(","));
|
|
59
|
+
return fetchFn(input, Object.assign(Object.assign({}, init), { headers }));
|
|
60
|
+
}) });
|
|
61
|
+
return {
|
|
62
|
+
agents: new AgentsClient(options),
|
|
63
|
+
agentManagement: new AgentManagementClient(options),
|
|
64
|
+
baseUrl: PREVIEW_API_BASE_URL,
|
|
65
|
+
features: [...features],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/** ASR vendor served only by the preview endpoint. */
|
|
69
|
+
const PREVIEW_ASR_VENDORS = new Set(["gemini"]);
|
|
70
|
+
/**
|
|
71
|
+
* Returns the preview features a start request needs, derived from the request
|
|
72
|
+
* body rather than from the vendor classes — so hand-written configs are
|
|
73
|
+
* covered too.
|
|
74
|
+
*/
|
|
75
|
+
export function requiredPreviewFeatures(properties) {
|
|
76
|
+
var _a;
|
|
77
|
+
const features = new Set();
|
|
78
|
+
const asrVendor = (_a = properties.asr) === null || _a === void 0 ? void 0 : _a.vendor;
|
|
79
|
+
if (asrVendor !== undefined && PREVIEW_ASR_VENDORS.has(asrVendor)) {
|
|
80
|
+
features.add(PreviewFeatures.GeminiLive);
|
|
81
|
+
}
|
|
82
|
+
return [...features];
|
|
83
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preview provider surface.
|
|
3
|
+
*
|
|
4
|
+
* Self-contained on purpose: when these providers ship on the production
|
|
5
|
+
* gateway, this directory is deleted and the vendor classes move into
|
|
6
|
+
* `vendors/stt.ts`.
|
|
7
|
+
*/
|
|
8
|
+
export type { PreviewFeature, PreviewRoute } from "./client.mjs";
|
|
9
|
+
export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./client.mjs";
|
|
10
|
+
export type { GeminiSTTModel, GeminiSTTOptions } from "./vendors.mjs";
|
|
11
|
+
export { GeminiSTT, GeminiSTTModels } from "./vendors.mjs";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preview provider surface.
|
|
3
|
+
*
|
|
4
|
+
* Self-contained on purpose: when these providers ship on the production
|
|
5
|
+
* gateway, this directory is deleted and the vendor classes move into
|
|
6
|
+
* `vendors/stt.ts`.
|
|
7
|
+
*/
|
|
8
|
+
export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./client.mjs";
|
|
9
|
+
export { GeminiSTT, GeminiSTTModels } from "./vendors.mjs";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preview provider vendor classes.
|
|
3
|
+
*
|
|
4
|
+
* These follow the same shape as the GA vendor classes in `vendors/` —
|
|
5
|
+
* camelCase constructor options in, snake_case wire config out — so they drop
|
|
6
|
+
* into `agent.withStt()` unchanged. They only work against the preview
|
|
7
|
+
* endpoint; AgentSession routes it automatically.
|
|
8
|
+
*/
|
|
9
|
+
import type { SttConfig, TurnDetectionLanguage } from "../types.mjs";
|
|
10
|
+
import type { SampleRate } from "../vendors/base.mjs";
|
|
11
|
+
import { BaseSTT } from "../vendors/base.mjs";
|
|
12
|
+
/** Gemini preview transcription models. */
|
|
13
|
+
export declare const GeminiSTTModels: {
|
|
14
|
+
readonly Transcribe35Live: "gemini-3.5-transcribe-live";
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* A Gemini preview transcription model. Known model names autocomplete; any
|
|
18
|
+
* string is accepted so a newly published preview model can be used before this
|
|
19
|
+
* SDK is updated.
|
|
20
|
+
*/
|
|
21
|
+
export type GeminiSTTModel = (typeof GeminiSTTModels)[keyof typeof GeminiSTTModels] | (string & {});
|
|
22
|
+
/** Constructor options for {@link GeminiSTT}. */
|
|
23
|
+
export interface GeminiSTTOptions {
|
|
24
|
+
/** Google API key. */
|
|
25
|
+
apiKey: string;
|
|
26
|
+
/** Model name. Defaults to `gemini-3.5-transcribe-live`. */
|
|
27
|
+
model?: GeminiSTTModel;
|
|
28
|
+
/**
|
|
29
|
+
* Languages the model should transcribe, sent as `params.language_codes`.
|
|
30
|
+
*
|
|
31
|
+
* Omitted from the request when unset, which is how the provider spells
|
|
32
|
+
* auto-detect — the SDK does not pin a language the caller never asked for.
|
|
33
|
+
* Pass one code to commit to a language, several to let the model choose
|
|
34
|
+
* between them, or an explicit empty array to request auto-detect
|
|
35
|
+
* outright.
|
|
36
|
+
*
|
|
37
|
+
* This is the only language setting on this vendor. The top-level
|
|
38
|
+
* `asr.language` is supplied by `Agent` from `turnDetection.language`, as
|
|
39
|
+
* it is for every STT vendor.
|
|
40
|
+
*/
|
|
41
|
+
languageCodes?: readonly TurnDetectionLanguage[];
|
|
42
|
+
/**
|
|
43
|
+
* Words and phrases to bias recognition toward — product names, jargon,
|
|
44
|
+
* proper nouns the model would otherwise mis-hear.
|
|
45
|
+
*/
|
|
46
|
+
customVocabulary?: readonly string[];
|
|
47
|
+
/** Audio sample rate in Hz. Defaults to 16000. */
|
|
48
|
+
sampleRate?: SampleRate;
|
|
49
|
+
/**
|
|
50
|
+
* Emit per-word timestamps in transcription results. Omitted unless
|
|
51
|
+
* explicitly set; cannot be `true` when `customVocabulary` is set.
|
|
52
|
+
*/
|
|
53
|
+
wordTimestamp?: boolean;
|
|
54
|
+
/** Additional vendor-specific parameters. */
|
|
55
|
+
additionalParams?: Record<string, unknown>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Gemini 3.5 Transcribe ASR vendor (preview).
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* const agent = new Agent({ client }).withStt(new GeminiSTT({
|
|
63
|
+
* apiKey: process.env.GOOGLE_API_KEY!,
|
|
64
|
+
* languageCodes: ['en-US'],
|
|
65
|
+
* }));
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export declare class GeminiSTT extends BaseSTT {
|
|
69
|
+
private readonly options;
|
|
70
|
+
constructor(options: GeminiSTTOptions);
|
|
71
|
+
toConfig(): SttConfig;
|
|
72
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preview provider vendor classes.
|
|
3
|
+
*
|
|
4
|
+
* These follow the same shape as the GA vendor classes in `vendors/` —
|
|
5
|
+
* camelCase constructor options in, snake_case wire config out — so they drop
|
|
6
|
+
* into `agent.withStt()` unchanged. They only work against the preview
|
|
7
|
+
* endpoint; AgentSession routes it automatically.
|
|
8
|
+
*/
|
|
9
|
+
import { BaseSTT } from "../vendors/base.mjs";
|
|
10
|
+
// =============================================================================
|
|
11
|
+
// Gemini 3.5 Transcribe (ASR)
|
|
12
|
+
// =============================================================================
|
|
13
|
+
/** Gemini preview transcription models. */
|
|
14
|
+
export const GeminiSTTModels = {
|
|
15
|
+
Transcribe35Live: "gemini-3.5-transcribe-live",
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Gemini 3.5 Transcribe ASR vendor (preview).
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* const agent = new Agent({ client }).withStt(new GeminiSTT({
|
|
23
|
+
* apiKey: process.env.GOOGLE_API_KEY!,
|
|
24
|
+
* languageCodes: ['en-US'],
|
|
25
|
+
* }));
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export class GeminiSTT extends BaseSTT {
|
|
29
|
+
constructor(options) {
|
|
30
|
+
super();
|
|
31
|
+
if (!options.apiKey) {
|
|
32
|
+
throw new Error("GeminiSTT requires apiKey");
|
|
33
|
+
}
|
|
34
|
+
this.options = options;
|
|
35
|
+
}
|
|
36
|
+
toConfig() {
|
|
37
|
+
const { apiKey, model = GeminiSTTModels.Transcribe35Live, languageCodes, customVocabulary, sampleRate = 16000, wordTimestamp, additionalParams, } = this.options;
|
|
38
|
+
const params = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, additionalParams), { api_key: apiKey, model, sample_rate: sampleRate }), (languageCodes && { language_codes: [...languageCodes] })), (customVocabulary && { custom_vocabulary: [...customVocabulary] })), (wordTimestamp !== undefined && { word_timestamp: wordTimestamp }));
|
|
39
|
+
if ("custom_vocabulary" in params && params.word_timestamp === true) {
|
|
40
|
+
throw new Error("customVocabulary cannot be used with wordTimestamp=true");
|
|
41
|
+
}
|
|
42
|
+
// No top-level `language`: `Agent` sets it from `turnDetection.language`,
|
|
43
|
+
// the same as every other STT vendor.
|
|
44
|
+
return {
|
|
45
|
+
vendor: "gemini",
|
|
46
|
+
params,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -11,6 +11,35 @@
|
|
|
11
11
|
import agoraToken from "agora-token";
|
|
12
12
|
const DEFAULT_EXPIRY_SECONDS = 86400;
|
|
13
13
|
export const MAX_EXPIRY_SECONDS = 86400;
|
|
14
|
+
/**
|
|
15
|
+
* Length `agora-token` requires of both the app ID and the app certificate.
|
|
16
|
+
* Either one being a different length yields an empty token.
|
|
17
|
+
*/
|
|
18
|
+
const AGORA_CREDENTIAL_LENGTH = 32;
|
|
19
|
+
/**
|
|
20
|
+
* Rejects the empty string `agora-token` returns for a malformed credential.
|
|
21
|
+
*
|
|
22
|
+
* The builders validate nothing and never throw — they hand back `""` whenever
|
|
23
|
+
* `appId` or `appCertificate` is not exactly {@link AGORA_CREDENTIAL_LENGTH}
|
|
24
|
+
* characters. That empty token is then sent as `token: ""`, and the failure
|
|
25
|
+
* surfaces as an opaque gateway auth error naming neither field. A value pasted
|
|
26
|
+
* with a trailing newline or a stray space is enough to trigger it, so fail
|
|
27
|
+
* here, where the cause is still visible.
|
|
28
|
+
*
|
|
29
|
+
* Credential values are never included in the message — only their lengths.
|
|
30
|
+
*/
|
|
31
|
+
function _requireBuiltToken(token, appId, appCertificate) {
|
|
32
|
+
if (token) {
|
|
33
|
+
return token;
|
|
34
|
+
}
|
|
35
|
+
const wrong = [["appId", appId], ["appCertificate", appCertificate]].filter(([, value]) => value.length !== AGORA_CREDENTIAL_LENGTH);
|
|
36
|
+
const detail = wrong.length > 0
|
|
37
|
+
? wrong.map(([name, value]) => `${name} is ${value.length} characters`).join(" and ")
|
|
38
|
+
: "both are the right length, so the values themselves were rejected";
|
|
39
|
+
throw new Error(`Failed to build an Agora token: appId and appCertificate must each be exactly ` +
|
|
40
|
+
`${AGORA_CREDENTIAL_LENGTH} characters (${detail}). ` +
|
|
41
|
+
"Check the values for stray whitespace or a truncated paste.");
|
|
42
|
+
}
|
|
14
43
|
/**
|
|
15
44
|
* Convenience helpers for specifying token expiry durations.
|
|
16
45
|
*
|
|
@@ -82,7 +111,7 @@ function _validateExpiresIn(secs) {
|
|
|
82
111
|
export function generateRtcToken(opts) {
|
|
83
112
|
var _a, _b;
|
|
84
113
|
const expiry = (_a = opts.expirySeconds) !== null && _a !== void 0 ? _a : DEFAULT_EXPIRY_SECONDS;
|
|
85
|
-
return agoraToken.RtcTokenBuilder.buildTokenWithUid(opts.appId, opts.appCertificate, opts.channel, opts.uid, (_b = opts.role) !== null && _b !== void 0 ? _b : agoraToken.RtcRole.PUBLISHER, expiry, expiry);
|
|
114
|
+
return _requireBuiltToken(agoraToken.RtcTokenBuilder.buildTokenWithUid(opts.appId, opts.appCertificate, opts.channel, opts.uid, (_b = opts.role) !== null && _b !== void 0 ? _b : agoraToken.RtcRole.PUBLISHER, expiry, expiry), opts.appId, opts.appCertificate);
|
|
86
115
|
}
|
|
87
116
|
/**
|
|
88
117
|
* Builds a short-lived RTC token for a string UID (user account).
|
|
@@ -96,7 +125,7 @@ export function generateRtcToken(opts) {
|
|
|
96
125
|
export function generateRtcTokenWithAccount(opts) {
|
|
97
126
|
var _a, _b;
|
|
98
127
|
const expiry = (_a = opts.expirySeconds) !== null && _a !== void 0 ? _a : DEFAULT_EXPIRY_SECONDS;
|
|
99
|
-
return agoraToken.RtcTokenBuilder.buildTokenWithUserAccount(opts.appId, opts.appCertificate, opts.channel, opts.account, (_b = opts.role) !== null && _b !== void 0 ? _b : agoraToken.RtcRole.PUBLISHER, expiry, expiry);
|
|
128
|
+
return _requireBuiltToken(agoraToken.RtcTokenBuilder.buildTokenWithUserAccount(opts.appId, opts.appCertificate, opts.channel, opts.account, (_b = opts.role) !== null && _b !== void 0 ? _b : agoraToken.RtcRole.PUBLISHER, expiry, expiry), opts.appId, opts.appCertificate);
|
|
100
129
|
}
|
|
101
130
|
/**
|
|
102
131
|
* Builds a combined RTC + RTM token for ConvoAI REST API authentication.
|
|
@@ -114,7 +143,7 @@ export function generateConvoAIToken(opts) {
|
|
|
114
143
|
const configuredPrivilegeExpire = (_b = opts.privilegeExpire) !== null && _b !== void 0 ? _b : 0;
|
|
115
144
|
const privilegeExpire = configuredPrivilegeExpire === 0 ? tokenExpire : configuredPrivilegeExpire;
|
|
116
145
|
const account = _uidToAccount(opts.uid);
|
|
117
|
-
return agoraToken.RtcTokenBuilder.buildTokenWithRtm(opts.appId, opts.appCertificate, opts.channelName, account, agoraToken.RtcRole.PUBLISHER, tokenExpire, privilegeExpire);
|
|
146
|
+
return _requireBuiltToken(agoraToken.RtcTokenBuilder.buildTokenWithRtm(opts.appId, opts.appCertificate, opts.channelName, account, agoraToken.RtcRole.PUBLISHER, tokenExpire, privilegeExpire), opts.appId, opts.appCertificate);
|
|
118
147
|
}
|
|
119
148
|
function _uidToAccount(uid) {
|
|
120
149
|
if (!Number.isInteger(uid)) {
|
|
@@ -72,6 +72,10 @@ export type SttConfig = {
|
|
|
72
72
|
vendor: "xai";
|
|
73
73
|
language?: TurnDetectionLanguage;
|
|
74
74
|
params: XAiAsrParams;
|
|
75
|
+
} | {
|
|
76
|
+
vendor: "gemini";
|
|
77
|
+
language?: TurnDetectionLanguage;
|
|
78
|
+
params: GeminiAsrParams;
|
|
75
79
|
} | Asr;
|
|
76
80
|
/** ASR configuration — alias for {@link SttConfig} (wire field: `asr`). */
|
|
77
81
|
export type AsrConfig = SttConfig;
|
|
@@ -542,6 +546,41 @@ export interface SarvamAsrParams {
|
|
|
542
546
|
*/
|
|
543
547
|
export type XAiAsr = XAiAsrType;
|
|
544
548
|
export type XAiAsrParams = XAiAsrParamsType;
|
|
549
|
+
/**
|
|
550
|
+
* Gemini STT parameters (preview).
|
|
551
|
+
*
|
|
552
|
+
* Served only by the preview endpoint and routed automatically by AgentSession.
|
|
553
|
+
* Not part of the generated `Asr` union, so the variant
|
|
554
|
+
* is declared here until the provider ships on the production gateway.
|
|
555
|
+
*/
|
|
556
|
+
export interface GeminiAsrParams {
|
|
557
|
+
/** Google API key */
|
|
558
|
+
api_key: string;
|
|
559
|
+
/** Model name (e.g., 'gemini-3.5-transcribe-live') */
|
|
560
|
+
model: string;
|
|
561
|
+
/** Audio sample rate in Hz */
|
|
562
|
+
sample_rate?: number;
|
|
563
|
+
/**
|
|
564
|
+
* Languages to transcribe (e.g., `['en-US']`).
|
|
565
|
+
*
|
|
566
|
+
* Omit the field or send `[]` to let the model auto-detect. Note this is
|
|
567
|
+
* `language_codes` — an array — not the singular `language` other ASR
|
|
568
|
+
* vendors take.
|
|
569
|
+
*/
|
|
570
|
+
language_codes?: string[];
|
|
571
|
+
/**
|
|
572
|
+
* Words and phrases to bias recognition toward (e.g., product names,
|
|
573
|
+
* jargon). Optional.
|
|
574
|
+
*/
|
|
575
|
+
custom_vocabulary?: string[];
|
|
576
|
+
/**
|
|
577
|
+
* Emit per-word timestamps in transcription results. Cannot be `true`
|
|
578
|
+
* when `custom_vocabulary` is set.
|
|
579
|
+
*/
|
|
580
|
+
word_timestamp?: boolean;
|
|
581
|
+
/** Additional Gemini-specific parameters */
|
|
582
|
+
[key: string]: unknown;
|
|
583
|
+
}
|
|
545
584
|
export type MicrosoftTts = MicrosoftTtsType;
|
|
546
585
|
export type MicrosoftTtsParams = MicrosoftTtsParamsType;
|
|
547
586
|
export type ElevenLabsTts = ElevenLabsTtsType;
|
package/dist/esm/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type { AgoraAuthMode } from "./AgoraPoolClient.mjs";
|
|
2
2
|
export { AgoraClient } from "./AgoraPoolClient.mjs";
|
|
3
3
|
export type { AgoraArea, AreaScope, GlobalArea } from "./agentkit/area.mjs";
|
|
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.mjs";
|
|
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.mjs";
|
|
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, 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, 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, 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.mjs";
|
|
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, 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, 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.mjs";
|
|
6
6
|
export * as Agora from "./api/index.mjs";
|
|
7
7
|
export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
|
|
8
8
|
export { Area } from "./core/domain/index.mjs";
|
package/dist/esm/index.mjs
CHANGED
|
@@ -2,15 +2,15 @@ export { AgoraClient } from "./AgoraPoolClient.mjs";
|
|
|
2
2
|
// Agentkit layer exports - clean, ergonomic API
|
|
3
3
|
export { Agent, AgentPresets, AgentSession, AkoolAvatar, AliyunLLM, AmazonBedrock, AmazonSTT, AmazonTTS, AnamAvatar, Anthropic, AresSTT, AssemblyAISTT, AudioScenario, AzureOpenAI, AzureOpenAIRealtime, BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS,
|
|
4
4
|
// Base vendor classes
|
|
5
|
-
BaseLLM, BaseMLLM, BaseSTT, BaseTTS, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CartesiaTTS, CosyVoiceTTS, CredentialMode, CustomLLM, DataChannel, DeepgramSTT, DeepgramTTS, DeepSeekLLM, Dify,
|
|
5
|
+
BaseLLM, BaseMLLM, BaseSTT, BaseTTS, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CartesiaTTS, CosyVoiceTTS, CredentialMode, CustomLLM, createPreviewRoute, DataChannel, DeepgramSTT, DeepgramTTS, DeepSeekLLM, Dify,
|
|
6
6
|
// TTS vendors
|
|
7
|
-
ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioTTS, Gemini, GeminiLive, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateConvoAIToken, generateRtcToken,
|
|
7
|
+
ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioTTS, Gemini, GeminiLive, GeminiSTT, GeminiSTTModels, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateConvoAIToken, generateRtcToken,
|
|
8
8
|
// Avatar vendors
|
|
9
9
|
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,
|
|
10
10
|
// LLM vendors
|
|
11
11
|
OpenAI,
|
|
12
12
|
// MLLM vendors
|
|
13
|
-
OpenAIRealtime, OpenAISTT, OpenAITTS, QwenOmni, RimeTTS, SalModeValues, SarvamSTT, SarvamTTS, SensetimeAvatar, SilenceActionValues, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues,
|
|
13
|
+
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,
|
|
14
14
|
// STT vendors
|
|
15
15
|
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.mjs";
|
|
16
16
|
export * as Agora from "./api/index.mjs";
|