@onereach/step-voice 7.0.47 → 7.0.48-VOIC1810.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/dst/Voice Agent.d.ts +2 -0
- package/dst/Voice Agent.js +17 -0
- package/package.json +1 -1
package/dst/Voice Agent.d.ts
CHANGED
|
@@ -110,6 +110,8 @@ export default class VoiceAgent extends VoiceStep<Partial<INPUT>> {
|
|
|
110
110
|
private findExitByLabel;
|
|
111
111
|
private validateToolFeedback;
|
|
112
112
|
private isStepFlagEnabled;
|
|
113
|
+
private isRealtimePipeline;
|
|
114
|
+
private omitRealtimeUnsupportedSettings;
|
|
113
115
|
private isValidAgentUrl;
|
|
114
116
|
private buildAgentServiceConfig;
|
|
115
117
|
private validatePerToolFeedback;
|
package/dst/Voice Agent.js
CHANGED
|
@@ -158,6 +158,9 @@ class VoiceAgent extends voice_1.default {
|
|
|
158
158
|
if (!lodash_1.default.isEmpty(knowledge)) {
|
|
159
159
|
config.knowledge = this.validateKnowledge(knowledge);
|
|
160
160
|
}
|
|
161
|
+
if (this.isRealtimePipeline(custom_config_enabled, mode)) {
|
|
162
|
+
this.omitRealtimeUnsupportedSettings(config);
|
|
163
|
+
}
|
|
161
164
|
const params = { config };
|
|
162
165
|
if (agentCustomUrl) {
|
|
163
166
|
params.url = agentCustomUrl;
|
|
@@ -304,6 +307,20 @@ class VoiceAgent extends voice_1.default {
|
|
|
304
307
|
isStepFlagEnabled(value) {
|
|
305
308
|
return value === true || value === 'true';
|
|
306
309
|
}
|
|
310
|
+
isRealtimePipeline(customConfigEnabled, mode) {
|
|
311
|
+
return this.isStepFlagEnabled(customConfigEnabled) && mode === "realtime" /* AgentPipelineMode.REALTIME */;
|
|
312
|
+
}
|
|
313
|
+
omitRealtimeUnsupportedSettings(config) {
|
|
314
|
+
delete config.greeting_message;
|
|
315
|
+
delete config.prevent_greeting_interruption;
|
|
316
|
+
delete config.idle_detection;
|
|
317
|
+
delete config.dtmf;
|
|
318
|
+
delete config.tool_feedback;
|
|
319
|
+
delete config.soft_timeout;
|
|
320
|
+
for (const tool of config.tools) {
|
|
321
|
+
delete tool.feedback;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
307
324
|
isValidAgentUrl(value) {
|
|
308
325
|
return /^wss?:\/\/([a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+|\[[a-fA-F0-9:]+\])(:\d+)?(\/\S*)?$/.test(value);
|
|
309
326
|
}
|