@onereach/step-voice 7.0.41-subagents.6 → 7.0.41-subagents.7
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.
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import VoiceStep from './voice';
|
|
2
2
|
type SystemInstructionMode = 'append' | 'replace' | 'off';
|
|
3
|
+
type ToolResponseMode = 'sync' | 'async' | 'none';
|
|
3
4
|
interface Tool {
|
|
4
5
|
name: string;
|
|
5
6
|
description: string;
|
|
6
7
|
parameters: string | Record<string, unknown>;
|
|
7
8
|
exitId?: string;
|
|
9
|
+
timeout_seconds?: number | string | null;
|
|
10
|
+
response_mode?: ToolResponseMode | string | null;
|
|
8
11
|
}
|
|
9
12
|
interface AgentServiceConfig {
|
|
10
13
|
provider: string;
|
|
@@ -139,12 +139,19 @@ class UpdateVoiceAgent extends voice_1.default {
|
|
|
139
139
|
else if (t.parameters && typeof t.parameters === 'object') {
|
|
140
140
|
parameters = t.parameters;
|
|
141
141
|
}
|
|
142
|
-
|
|
142
|
+
const tool = {
|
|
143
143
|
type: 'function',
|
|
144
144
|
name: lodash_1.default.trim(t.name),
|
|
145
145
|
description: t.description || '',
|
|
146
146
|
parameters,
|
|
147
147
|
};
|
|
148
|
+
if (t.timeout_seconds != null && t.timeout_seconds !== '') {
|
|
149
|
+
tool.timeout_seconds = Number(t.timeout_seconds);
|
|
150
|
+
}
|
|
151
|
+
if (t.response_mode) {
|
|
152
|
+
tool.response_mode = t.response_mode;
|
|
153
|
+
}
|
|
154
|
+
return tool;
|
|
148
155
|
});
|
|
149
156
|
}
|
|
150
157
|
buildOptionalServiceOverride(label, service) {
|