@sinch/functions-runtime 0.6.1 → 0.6.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.
|
@@ -63933,19 +63933,27 @@ function buildSettingsFrame(options) {
|
|
|
63933
63933
|
output: { encoding: "linear16", sample_rate: sampleRate, container: "none" }
|
|
63934
63934
|
},
|
|
63935
63935
|
agent: {
|
|
63936
|
+
// Deepgram's `agent.language` — pins recognition to `options.language` (defaults to
|
|
63937
|
+
// `'en-US'`, see `resolvePerCallOptions`) rather than letting the model auto-detect and
|
|
63938
|
+
// drift onto a misheard phrase, the way it did on a live Gemini call (see `gemini.ts`'s own
|
|
63939
|
+
// `speechConfig.languageCode` comment for that incident). This must live at `agent.language`,
|
|
63940
|
+
// never inside `listen.provider`: a live probe against the current Deepgram API on
|
|
63941
|
+
// 2026-09-26 confirmed a Flux listen model plus `listen.provider.language` is rejected as
|
|
63942
|
+
// `UNPARSABLE_CLIENT_MESSAGE` ("Check the agent.listen.provider field against the API
|
|
63943
|
+
// spec"), while Flux plus `agent.language`, Flux with no language at all, and nova-3 with
|
|
63944
|
+
// `language` at either location are all accepted — matching the shape the C# runtime
|
|
63945
|
+
// already sends. `language_hints` (for `flux-general-multi`) is a separate,
|
|
63946
|
+
// `listen.provider`-only concern this adapter does not yet support.
|
|
63947
|
+
language: options.language ?? DEFAULT_LANGUAGE,
|
|
63936
63948
|
listen: {
|
|
63937
63949
|
// Deepgram's Voice Agent API: Flux models take `version: 'v2'`, every other listen
|
|
63938
63950
|
// model takes `'v1'` — https://developers.deepgram.com/docs/configure-voice-agent.
|
|
63939
63951
|
provider: {
|
|
63940
63952
|
type: "deepgram",
|
|
63941
63953
|
model: sttModel,
|
|
63942
|
-
|
|
63943
|
-
//
|
|
63944
|
-
|
|
63945
|
-
// auto-detect and drift onto a misheard phrase, the way it did on a live Gemini call
|
|
63946
|
-
// (see `gemini.ts`'s own `speechConfig.languageCode` comment for that incident; not yet
|
|
63947
|
-
// reproduced against Deepgram specifically, wired here for the same reason).
|
|
63948
|
-
language: options.language ?? DEFAULT_LANGUAGE
|
|
63954
|
+
// Flux listen models (`flux-general-en`, `flux-general-multi`) take `version: 'v2'`;
|
|
63955
|
+
// every other model (Nova, etc.) takes `'v1'`.
|
|
63956
|
+
version: sttModel.startsWith("flux") ? "v2" : "v1"
|
|
63949
63957
|
}
|
|
63950
63958
|
},
|
|
63951
63959
|
think: {
|
|
@@ -64424,15 +64432,16 @@ function buildInstructions(options) {
|
|
|
64424
64432
|
|
|
64425
64433
|
Open the call by greeting the caller before waiting for any caller input.`;
|
|
64426
64434
|
}
|
|
64427
|
-
function buildBackendInstructions(po, tools) {
|
|
64435
|
+
function buildBackendInstructions(options, po, tools) {
|
|
64436
|
+
const preamble = currentDateTimePreamble(options.timezone);
|
|
64428
64437
|
if (!offersHangup(tools))
|
|
64429
|
-
return po.backendInstructions;
|
|
64438
|
+
return preamble + (po.backendInstructions ?? "");
|
|
64430
64439
|
const terminationBlock = CALL_TERMINATION_INSTRUCTIONS + GPT_LIVE_BACKEND_CALL_TERMINATION_RULE;
|
|
64431
|
-
return po.backendInstructions ? po.backendInstructions + terminationBlock : terminationBlock.trimStart();
|
|
64440
|
+
return preamble + (po.backendInstructions ? po.backendInstructions + terminationBlock : terminationBlock.trimStart());
|
|
64432
64441
|
}
|
|
64433
64442
|
function buildSessionStart(options, tools) {
|
|
64434
64443
|
const po = providerOptionsFor2(options);
|
|
64435
|
-
const backendInstructions = buildBackendInstructions(po, tools);
|
|
64444
|
+
const backendInstructions = buildBackendInstructions(options, po, tools);
|
|
64436
64445
|
return {
|
|
64437
64446
|
type: "session.start",
|
|
64438
64447
|
session: {
|
|
@@ -76214,4 +76223,4 @@ serve-static/index.js:
|
|
|
76214
76223
|
* MIT Licensed
|
|
76215
76224
|
*)
|
|
76216
76225
|
*/
|
|
76217
|
-
//# sourceMappingURL=chunk-
|
|
76226
|
+
//# sourceMappingURL=chunk-W3R4GR3E.js.map
|