sarvamai 1.1.9 → 1.1.10-alpha.2

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.
Files changed (29) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/speechToTextJob/client/Client.d.ts +2 -0
  3. package/dist/cjs/api/resources/speechToTextJob/client/Client.js +3 -2
  4. package/dist/cjs/api/resources/speechToTextRealtimeStreaming/client/Client.d.ts +1 -1
  5. package/dist/cjs/api/resources/speechToTextRealtimeStreaming/types/SpeechToTextRealtimeStreamingLanguageCode.d.ts +1 -1
  6. package/dist/cjs/api/resources/speechToTextRealtimeStreaming/types/SpeechToTextRealtimeStreamingLanguageCode.js +1 -1
  7. package/dist/cjs/api/resources/speechToTextRealtimeStreaming/types/SpeechToTextRealtimeStreamingModel.d.ts +6 -0
  8. package/dist/cjs/api/resources/speechToTextRealtimeStreaming/types/SpeechToTextRealtimeStreamingModel.js +9 -0
  9. package/dist/cjs/api/resources/speechToTextRealtimeStreaming/types/index.d.ts +1 -0
  10. package/dist/cjs/api/resources/speechToTextRealtimeStreaming/types/index.js +1 -0
  11. package/dist/cjs/api/types/V2ModelIds.d.ts +4 -0
  12. package/dist/cjs/api/types/V2ModelIds.js +4 -0
  13. package/dist/cjs/version.d.ts +1 -1
  14. package/dist/cjs/version.js +1 -1
  15. package/dist/esm/BaseClient.mjs +2 -2
  16. package/dist/esm/api/resources/speechToTextJob/client/Client.d.mts +2 -0
  17. package/dist/esm/api/resources/speechToTextJob/client/Client.mjs +3 -2
  18. package/dist/esm/api/resources/speechToTextRealtimeStreaming/client/Client.d.mts +1 -1
  19. package/dist/esm/api/resources/speechToTextRealtimeStreaming/types/SpeechToTextRealtimeStreamingLanguageCode.d.mts +1 -1
  20. package/dist/esm/api/resources/speechToTextRealtimeStreaming/types/SpeechToTextRealtimeStreamingLanguageCode.mjs +1 -1
  21. package/dist/esm/api/resources/speechToTextRealtimeStreaming/types/SpeechToTextRealtimeStreamingModel.d.mts +6 -0
  22. package/dist/esm/api/resources/speechToTextRealtimeStreaming/types/SpeechToTextRealtimeStreamingModel.mjs +6 -0
  23. package/dist/esm/api/resources/speechToTextRealtimeStreaming/types/index.d.mts +1 -0
  24. package/dist/esm/api/resources/speechToTextRealtimeStreaming/types/index.mjs +1 -0
  25. package/dist/esm/api/types/V2ModelIds.d.mts +4 -0
  26. package/dist/esm/api/types/V2ModelIds.mjs +4 -0
  27. package/dist/esm/version.d.mts +1 -1
  28. package/dist/esm/version.mjs +1 -1
  29. package/package.json +1 -1
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "sarvamai",
46
- "X-Fern-SDK-Version": "1.1.9",
47
- "User-Agent": "sarvamai/1.1.9",
46
+ "X-Fern-SDK-Version": "1.1.10-alpha.2",
47
+ "User-Agent": "sarvamai/1.1.10-alpha.2",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -125,6 +125,7 @@ export declare class SpeechToTextJobClient {
125
125
  * @param params.languageCode - The language code of the input audio (e.g., "hi-IN", "bn-IN")
126
126
  * @param params.numSpeakers - The number of distinct speakers in the audio, if known
127
127
  * @param params.mode - Output mode for **saaras:v3** / **saaras:v4** (e.g. transcribe, translate, verbatim)
128
+ * @param params.keyterms - List of up to 50 domain-specific terms (names, places, brands, technical terms) to bias recognition toward. Only supported with model="saaras:v4"
128
129
  * @param params.callback - Optional callback configuration to receive job completion events
129
130
  * @param requestOptions - Request-specific configuration
130
131
  * @returns A handle to the newly created Speech-to-Text job
@@ -136,6 +137,7 @@ export declare class SpeechToTextJobClient {
136
137
  languageCode?: SarvamAI.SpeechToTextLanguage;
137
138
  numSpeakers?: number;
138
139
  mode?: SarvamAI.Mode;
140
+ keyterms?: string[];
139
141
  callback?: SarvamAI.BulkJobCallback;
140
142
  }, requestOptions?: SpeechToTextJobClient.RequestOptions): Promise<SpeechToTextJobInstance>;
141
143
  /**
@@ -502,15 +502,16 @@ class SpeechToTextJobClient {
502
502
  * @param params.languageCode - The language code of the input audio (e.g., "hi-IN", "bn-IN")
503
503
  * @param params.numSpeakers - The number of distinct speakers in the audio, if known
504
504
  * @param params.mode - Output mode for **saaras:v3** / **saaras:v4** (e.g. transcribe, translate, verbatim)
505
+ * @param params.keyterms - List of up to 50 domain-specific terms (names, places, brands, technical terms) to bias recognition toward. Only supported with model="saaras:v4"
505
506
  * @param params.callback - Optional callback configuration to receive job completion events
506
507
  * @param requestOptions - Request-specific configuration
507
508
  * @returns A handle to the newly created Speech-to-Text job
508
509
  */
509
510
  createJob() {
510
511
  return __awaiter(this, arguments, void 0, function* (params = {}, requestOptions) {
511
- const { model = "saaras:v3", withDiarization = false, withTimestamps = false, languageCode, numSpeakers, mode, callback, } = params;
512
+ const { model = "saaras:v3", withDiarization = false, withTimestamps = false, languageCode, numSpeakers, mode, keyterms, callback, } = params;
512
513
  const response = yield this.initialise({
513
- job_parameters: Object.assign({ language_code: languageCode, model: model, num_speakers: numSpeakers, with_diarization: withDiarization, with_timestamps: withTimestamps }, (mode !== undefined ? { mode } : {})),
514
+ job_parameters: Object.assign(Object.assign({ language_code: languageCode, model: model, num_speakers: numSpeakers, with_diarization: withDiarization, with_timestamps: withTimestamps }, (mode !== undefined ? { mode } : {})), (keyterms !== undefined ? { keyterms } : {})),
514
515
  callback: callback,
515
516
  }, requestOptions);
516
517
  return new SpeechToTextJobInstance_js_1.SpeechToTextJobInstance(response.job_id, this);
@@ -6,7 +6,7 @@ export declare namespace SpeechToTextRealtimeStreamingClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface ConnectArgs {
8
8
  language_code: SarvamAI.SpeechToTextRealtimeStreamingLanguageCode;
9
- model?: "saaras:v3-realtime";
9
+ model?: SarvamAI.SpeechToTextRealtimeStreamingModel;
10
10
  stream_type?: SarvamAI.SpeechToTextRealtimeStreamingStreamType;
11
11
  mode?: SarvamAI.SpeechToTextRealtimeStreamingMode;
12
12
  prompt?: string;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * BCP-47 language code of the input audio. **Required.**
3
3
  *
4
- * **Supported languages (saaras:v3-realtime):**
4
+ * **Supported languages (saaras:v3-realtime and saaras:v4-realtime):**
5
5
  * - `auto`: Adaptive automatic language detection
6
6
  * - `en-IN`: English
7
7
  * - `hi-IN`: Hindi
@@ -5,7 +5,7 @@ exports.SpeechToTextRealtimeStreamingLanguageCode = void 0;
5
5
  /**
6
6
  * BCP-47 language code of the input audio. **Required.**
7
7
  *
8
- * **Supported languages (saaras:v3-realtime):**
8
+ * **Supported languages (saaras:v3-realtime and saaras:v4-realtime):**
9
9
  * - `auto`: Adaptive automatic language detection
10
10
  * - `en-IN`: English
11
11
  * - `hi-IN`: Hindi
@@ -0,0 +1,6 @@
1
+ /** Speech-to-text model for this endpoint. `saaras:v3-realtime` (default) or `saaras:v4-realtime`. */
2
+ export declare const SpeechToTextRealtimeStreamingModel: {
3
+ readonly SaarasV3Realtime: "saaras:v3-realtime";
4
+ readonly SaarasV4Realtime: "saaras:v4-realtime";
5
+ };
6
+ export type SpeechToTextRealtimeStreamingModel = (typeof SpeechToTextRealtimeStreamingModel)[keyof typeof SpeechToTextRealtimeStreamingModel];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.SpeechToTextRealtimeStreamingModel = void 0;
5
+ /** Speech-to-text model for this endpoint. `saaras:v3-realtime` (default) or `saaras:v4-realtime`. */
6
+ exports.SpeechToTextRealtimeStreamingModel = {
7
+ SaarasV3Realtime: "saaras:v3-realtime",
8
+ SaarasV4Realtime: "saaras:v4-realtime",
9
+ };
@@ -2,5 +2,6 @@ export * from "./SpeechToTextRealtimeStreamingEncoding.js";
2
2
  export * from "./SpeechToTextRealtimeStreamingEndpointing.js";
3
3
  export * from "./SpeechToTextRealtimeStreamingLanguageCode.js";
4
4
  export * from "./SpeechToTextRealtimeStreamingMode.js";
5
+ export * from "./SpeechToTextRealtimeStreamingModel.js";
5
6
  export * from "./SpeechToTextRealtimeStreamingReturnTimestamps.js";
6
7
  export * from "./SpeechToTextRealtimeStreamingStreamType.js";
@@ -18,5 +18,6 @@ __exportStar(require("./SpeechToTextRealtimeStreamingEncoding.js"), exports);
18
18
  __exportStar(require("./SpeechToTextRealtimeStreamingEndpointing.js"), exports);
19
19
  __exportStar(require("./SpeechToTextRealtimeStreamingLanguageCode.js"), exports);
20
20
  __exportStar(require("./SpeechToTextRealtimeStreamingMode.js"), exports);
21
+ __exportStar(require("./SpeechToTextRealtimeStreamingModel.js"), exports);
21
22
  __exportStar(require("./SpeechToTextRealtimeStreamingReturnTimestamps.js"), exports);
22
23
  __exportStar(require("./SpeechToTextRealtimeStreamingStreamType.js"), exports);
@@ -3,6 +3,8 @@
3
3
  *
4
4
  * - **`sarvam-105b`** — Sarvam flagship chat model.
5
5
  * - **`glm5.2`** — open-source; 512K context, tool calling, visible reasoning.
6
+ * - **`glm5.3`** — open-source; served by `GET /v2/models`, capability details not yet published.
7
+ * - **`glm5.3-flash`** — open-source; served by `GET /v2/models`, capability details not yet published.
6
8
  * - **`gemma4`** — open-source; image input, tool calling.
7
9
  * - **`deepseekv4-flash`** — open-source; 1M context, tool calling, reasoning.
8
10
  *
@@ -11,6 +13,8 @@
11
13
  export declare const V2ModelIds: {
12
14
  readonly Sarvam105B: "sarvam-105b";
13
15
  readonly Glm52: "glm5.2";
16
+ readonly Glm53: "glm5.3";
17
+ readonly Glm53Flash: "glm5.3-flash";
14
18
  readonly Gemma4: "gemma4";
15
19
  readonly Deepseekv4Flash: "deepseekv4-flash";
16
20
  };
@@ -7,6 +7,8 @@ exports.V2ModelIds = void 0;
7
7
  *
8
8
  * - **`sarvam-105b`** — Sarvam flagship chat model.
9
9
  * - **`glm5.2`** — open-source; 512K context, tool calling, visible reasoning.
10
+ * - **`glm5.3`** — open-source; served by `GET /v2/models`, capability details not yet published.
11
+ * - **`glm5.3-flash`** — open-source; served by `GET /v2/models`, capability details not yet published.
10
12
  * - **`gemma4`** — open-source; image input, tool calling.
11
13
  * - **`deepseekv4-flash`** — open-source; 1M context, tool calling, reasoning.
12
14
  *
@@ -15,6 +17,8 @@ exports.V2ModelIds = void 0;
15
17
  exports.V2ModelIds = {
16
18
  Sarvam105B: "sarvam-105b",
17
19
  Glm52: "glm5.2",
20
+ Glm53: "glm5.3",
21
+ Glm53Flash: "glm5.3-flash",
18
22
  Gemma4: "gemma4",
19
23
  Deepseekv4Flash: "deepseekv4-flash",
20
24
  };
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.1.9";
1
+ export declare const SDK_VERSION = "1.1.10-alpha.2";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.1.9";
4
+ exports.SDK_VERSION = "1.1.10-alpha.2";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "sarvamai",
9
- "X-Fern-SDK-Version": "1.1.9",
10
- "User-Agent": "sarvamai/1.1.9",
9
+ "X-Fern-SDK-Version": "1.1.10-alpha.2",
10
+ "User-Agent": "sarvamai/1.1.10-alpha.2",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -125,6 +125,7 @@ export declare class SpeechToTextJobClient {
125
125
  * @param params.languageCode - The language code of the input audio (e.g., "hi-IN", "bn-IN")
126
126
  * @param params.numSpeakers - The number of distinct speakers in the audio, if known
127
127
  * @param params.mode - Output mode for **saaras:v3** / **saaras:v4** (e.g. transcribe, translate, verbatim)
128
+ * @param params.keyterms - List of up to 50 domain-specific terms (names, places, brands, technical terms) to bias recognition toward. Only supported with model="saaras:v4"
128
129
  * @param params.callback - Optional callback configuration to receive job completion events
129
130
  * @param requestOptions - Request-specific configuration
130
131
  * @returns A handle to the newly created Speech-to-Text job
@@ -136,6 +137,7 @@ export declare class SpeechToTextJobClient {
136
137
  languageCode?: SarvamAI.SpeechToTextLanguage;
137
138
  numSpeakers?: number;
138
139
  mode?: SarvamAI.Mode;
140
+ keyterms?: string[];
139
141
  callback?: SarvamAI.BulkJobCallback;
140
142
  }, requestOptions?: SpeechToTextJobClient.RequestOptions): Promise<SpeechToTextJobInstance>;
141
143
  /**
@@ -466,15 +466,16 @@ export class SpeechToTextJobClient {
466
466
  * @param params.languageCode - The language code of the input audio (e.g., "hi-IN", "bn-IN")
467
467
  * @param params.numSpeakers - The number of distinct speakers in the audio, if known
468
468
  * @param params.mode - Output mode for **saaras:v3** / **saaras:v4** (e.g. transcribe, translate, verbatim)
469
+ * @param params.keyterms - List of up to 50 domain-specific terms (names, places, brands, technical terms) to bias recognition toward. Only supported with model="saaras:v4"
469
470
  * @param params.callback - Optional callback configuration to receive job completion events
470
471
  * @param requestOptions - Request-specific configuration
471
472
  * @returns A handle to the newly created Speech-to-Text job
472
473
  */
473
474
  createJob() {
474
475
  return __awaiter(this, arguments, void 0, function* (params = {}, requestOptions) {
475
- const { model = "saaras:v3", withDiarization = false, withTimestamps = false, languageCode, numSpeakers, mode, callback, } = params;
476
+ const { model = "saaras:v3", withDiarization = false, withTimestamps = false, languageCode, numSpeakers, mode, keyterms, callback, } = params;
476
477
  const response = yield this.initialise({
477
- job_parameters: Object.assign({ language_code: languageCode, model: model, num_speakers: numSpeakers, with_diarization: withDiarization, with_timestamps: withTimestamps }, (mode !== undefined ? { mode } : {})),
478
+ job_parameters: Object.assign(Object.assign({ language_code: languageCode, model: model, num_speakers: numSpeakers, with_diarization: withDiarization, with_timestamps: withTimestamps }, (mode !== undefined ? { mode } : {})), (keyterms !== undefined ? { keyterms } : {})),
478
479
  callback: callback,
479
480
  }, requestOptions);
480
481
  return new SpeechToTextJobInstance(response.job_id, this);
@@ -6,7 +6,7 @@ export declare namespace SpeechToTextRealtimeStreamingClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface ConnectArgs {
8
8
  language_code: SarvamAI.SpeechToTextRealtimeStreamingLanguageCode;
9
- model?: "saaras:v3-realtime";
9
+ model?: SarvamAI.SpeechToTextRealtimeStreamingModel;
10
10
  stream_type?: SarvamAI.SpeechToTextRealtimeStreamingStreamType;
11
11
  mode?: SarvamAI.SpeechToTextRealtimeStreamingMode;
12
12
  prompt?: string;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * BCP-47 language code of the input audio. **Required.**
3
3
  *
4
- * **Supported languages (saaras:v3-realtime):**
4
+ * **Supported languages (saaras:v3-realtime and saaras:v4-realtime):**
5
5
  * - `auto`: Adaptive automatic language detection
6
6
  * - `en-IN`: English
7
7
  * - `hi-IN`: Hindi
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * BCP-47 language code of the input audio. **Required.**
4
4
  *
5
- * **Supported languages (saaras:v3-realtime):**
5
+ * **Supported languages (saaras:v3-realtime and saaras:v4-realtime):**
6
6
  * - `auto`: Adaptive automatic language detection
7
7
  * - `en-IN`: English
8
8
  * - `hi-IN`: Hindi
@@ -0,0 +1,6 @@
1
+ /** Speech-to-text model for this endpoint. `saaras:v3-realtime` (default) or `saaras:v4-realtime`. */
2
+ export declare const SpeechToTextRealtimeStreamingModel: {
3
+ readonly SaarasV3Realtime: "saaras:v3-realtime";
4
+ readonly SaarasV4Realtime: "saaras:v4-realtime";
5
+ };
6
+ export type SpeechToTextRealtimeStreamingModel = (typeof SpeechToTextRealtimeStreamingModel)[keyof typeof SpeechToTextRealtimeStreamingModel];
@@ -0,0 +1,6 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ /** Speech-to-text model for this endpoint. `saaras:v3-realtime` (default) or `saaras:v4-realtime`. */
3
+ export const SpeechToTextRealtimeStreamingModel = {
4
+ SaarasV3Realtime: "saaras:v3-realtime",
5
+ SaarasV4Realtime: "saaras:v4-realtime",
6
+ };
@@ -2,5 +2,6 @@ export * from "./SpeechToTextRealtimeStreamingEncoding.mjs";
2
2
  export * from "./SpeechToTextRealtimeStreamingEndpointing.mjs";
3
3
  export * from "./SpeechToTextRealtimeStreamingLanguageCode.mjs";
4
4
  export * from "./SpeechToTextRealtimeStreamingMode.mjs";
5
+ export * from "./SpeechToTextRealtimeStreamingModel.mjs";
5
6
  export * from "./SpeechToTextRealtimeStreamingReturnTimestamps.mjs";
6
7
  export * from "./SpeechToTextRealtimeStreamingStreamType.mjs";
@@ -2,5 +2,6 @@ export * from "./SpeechToTextRealtimeStreamingEncoding.mjs";
2
2
  export * from "./SpeechToTextRealtimeStreamingEndpointing.mjs";
3
3
  export * from "./SpeechToTextRealtimeStreamingLanguageCode.mjs";
4
4
  export * from "./SpeechToTextRealtimeStreamingMode.mjs";
5
+ export * from "./SpeechToTextRealtimeStreamingModel.mjs";
5
6
  export * from "./SpeechToTextRealtimeStreamingReturnTimestamps.mjs";
6
7
  export * from "./SpeechToTextRealtimeStreamingStreamType.mjs";
@@ -3,6 +3,8 @@
3
3
  *
4
4
  * - **`sarvam-105b`** — Sarvam flagship chat model.
5
5
  * - **`glm5.2`** — open-source; 512K context, tool calling, visible reasoning.
6
+ * - **`glm5.3`** — open-source; served by `GET /v2/models`, capability details not yet published.
7
+ * - **`glm5.3-flash`** — open-source; served by `GET /v2/models`, capability details not yet published.
6
8
  * - **`gemma4`** — open-source; image input, tool calling.
7
9
  * - **`deepseekv4-flash`** — open-source; 1M context, tool calling, reasoning.
8
10
  *
@@ -11,6 +13,8 @@
11
13
  export declare const V2ModelIds: {
12
14
  readonly Sarvam105B: "sarvam-105b";
13
15
  readonly Glm52: "glm5.2";
16
+ readonly Glm53: "glm5.3";
17
+ readonly Glm53Flash: "glm5.3-flash";
14
18
  readonly Gemma4: "gemma4";
15
19
  readonly Deepseekv4Flash: "deepseekv4-flash";
16
20
  };
@@ -4,6 +4,8 @@
4
4
  *
5
5
  * - **`sarvam-105b`** — Sarvam flagship chat model.
6
6
  * - **`glm5.2`** — open-source; 512K context, tool calling, visible reasoning.
7
+ * - **`glm5.3`** — open-source; served by `GET /v2/models`, capability details not yet published.
8
+ * - **`glm5.3-flash`** — open-source; served by `GET /v2/models`, capability details not yet published.
7
9
  * - **`gemma4`** — open-source; image input, tool calling.
8
10
  * - **`deepseekv4-flash`** — open-source; 1M context, tool calling, reasoning.
9
11
  *
@@ -12,6 +14,8 @@
12
14
  export const V2ModelIds = {
13
15
  Sarvam105B: "sarvam-105b",
14
16
  Glm52: "glm5.2",
17
+ Glm53: "glm5.3",
18
+ Glm53Flash: "glm5.3-flash",
15
19
  Gemma4: "gemma4",
16
20
  Deepseekv4Flash: "deepseekv4-flash",
17
21
  };
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.1.9";
1
+ export declare const SDK_VERSION = "1.1.10-alpha.2";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.1.9";
1
+ export const SDK_VERSION = "1.1.10-alpha.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sarvamai",
3
- "version": "1.1.9",
3
+ "version": "1.1.10-alpha.2",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",