phonic 0.30.25 → 0.30.26

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 (37) hide show
  1. package/README.md +1 -0
  2. package/dist/cjs/Client.js +2 -2
  3. package/dist/cjs/api/resources/agents/client/Client.d.ts +3 -0
  4. package/dist/cjs/api/resources/agents/client/Client.js +3 -0
  5. package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +4 -1
  6. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +4 -1
  7. package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.d.ts +1 -0
  8. package/dist/cjs/api/resources/tools/client/Client.d.ts +6 -3
  9. package/dist/cjs/api/resources/tools/client/Client.js +6 -3
  10. package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.d.ts +8 -3
  11. package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.d.ts +2 -0
  12. package/dist/cjs/api/types/Agent.d.ts +3 -1
  13. package/dist/cjs/api/types/ConfigPayload.d.ts +3 -1
  14. package/dist/cjs/api/types/Conversation.d.ts +3 -1
  15. package/dist/cjs/api/types/CreateAgentRequest.d.ts +3 -1
  16. package/dist/cjs/api/types/Tool.d.ts +2 -0
  17. package/dist/cjs/version.d.ts +1 -1
  18. package/dist/cjs/version.js +1 -1
  19. package/dist/esm/Client.mjs +2 -2
  20. package/dist/esm/api/resources/agents/client/Client.d.mts +3 -0
  21. package/dist/esm/api/resources/agents/client/Client.mjs +3 -0
  22. package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +4 -1
  23. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +4 -1
  24. package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.d.mts +1 -0
  25. package/dist/esm/api/resources/tools/client/Client.d.mts +6 -3
  26. package/dist/esm/api/resources/tools/client/Client.mjs +6 -3
  27. package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.d.mts +8 -3
  28. package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.d.mts +2 -0
  29. package/dist/esm/api/types/Agent.d.mts +3 -1
  30. package/dist/esm/api/types/ConfigPayload.d.mts +3 -1
  31. package/dist/esm/api/types/Conversation.d.mts +3 -1
  32. package/dist/esm/api/types/CreateAgentRequest.d.mts +3 -1
  33. package/dist/esm/api/types/Tool.d.mts +2 -0
  34. package/dist/esm/version.d.mts +1 -1
  35. package/dist/esm/version.mjs +1 -1
  36. package/package.json +1 -1
  37. package/reference.md +4 -0
package/README.md CHANGED
@@ -48,6 +48,7 @@ await client.agents.create({
48
48
  voice_id: "grant",
49
49
  audio_speed: 1,
50
50
  background_noise_level: 0,
51
+ generate_welcome_message: false,
51
52
  welcome_message: "Hi {{customer_name}}. How can I help you today?",
52
53
  system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
53
54
  template_variables: {
@@ -51,8 +51,8 @@ class PhonicClient {
51
51
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
52
52
  "X-Fern-Language": "JavaScript",
53
53
  "X-Fern-SDK-Name": "phonic",
54
- "X-Fern-SDK-Version": "0.30.24",
55
- "User-Agent": "phonic/0.30.24",
54
+ "X-Fern-SDK-Version": "0.30.26",
55
+ "User-Agent": "phonic/0.30.26",
56
56
  "X-Fern-Runtime": core.RUNTIME.type,
57
57
  "X-Fern-Runtime-Version": core.RUNTIME.version,
58
58
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -64,6 +64,7 @@ export declare class Agents {
64
64
  * voice_id: "grant",
65
65
  * audio_speed: 1,
66
66
  * background_noise_level: 0,
67
+ * generate_welcome_message: false,
67
68
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
68
69
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
69
70
  * template_variables: {
@@ -108,6 +109,7 @@ export declare class Agents {
108
109
  * voice_id: "grant",
109
110
  * audio_speed: 1,
110
111
  * background_noise_level: 0,
112
+ * generate_welcome_message: false,
111
113
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
112
114
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
113
115
  * template_variables: {
@@ -188,6 +190,7 @@ export declare class Agents {
188
190
  * voice_id: "grant",
189
191
  * audio_speed: 1,
190
192
  * background_noise_level: 0,
193
+ * generate_welcome_message: false,
191
194
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
192
195
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
193
196
  * template_variables: {
@@ -154,6 +154,7 @@ class Agents {
154
154
  * voice_id: "grant",
155
155
  * audio_speed: 1,
156
156
  * background_noise_level: 0,
157
+ * generate_welcome_message: false,
157
158
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
158
159
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
159
160
  * template_variables: {
@@ -259,6 +260,7 @@ class Agents {
259
260
  * voice_id: "grant",
260
261
  * audio_speed: 1,
261
262
  * background_noise_level: 0,
263
+ * generate_welcome_message: false,
262
264
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
263
265
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
264
266
  * template_variables: {
@@ -504,6 +506,7 @@ class Agents {
504
506
  * voice_id: "grant",
505
507
  * audio_speed: 1,
506
508
  * background_noise_level: 0,
509
+ * generate_welcome_message: false,
507
510
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
508
511
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
509
512
  * template_variables: {
@@ -12,6 +12,7 @@ import * as Phonic from "../../../../index.js";
12
12
  * voice_id: "grant",
13
13
  * audio_speed: 1,
14
14
  * background_noise_level: 0,
15
+ * generate_welcome_message: false,
15
16
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
16
17
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
17
18
  * template_variables: {
@@ -58,7 +59,9 @@ export interface AgentsCreateRequest {
58
59
  background_noise_level?: number;
59
60
  /** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
60
61
  background_noise?: Phonic.CreateAgentRequest.BackgroundNoise | null;
61
- /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. */
62
+ /** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
63
+ generate_welcome_message?: boolean;
64
+ /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
62
65
  welcome_message?: string;
63
66
  /** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
64
67
  system_prompt?: string;
@@ -12,6 +12,7 @@ import * as Phonic from "../../../../index.js";
12
12
  * voice_id: "grant",
13
13
  * audio_speed: 1,
14
14
  * background_noise_level: 0,
15
+ * generate_welcome_message: false,
15
16
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
16
17
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
17
18
  * template_variables: {
@@ -58,7 +59,9 @@ export interface UpdateAgentRequest {
58
59
  background_noise_level?: number;
59
60
  /** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
60
61
  background_noise?: UpdateAgentRequest.BackgroundNoise | null;
61
- /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. */
62
+ /** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
63
+ generate_welcome_message?: boolean;
64
+ /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
62
65
  welcome_message?: string;
63
66
  /** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
64
67
  system_prompt?: string;
@@ -12,6 +12,7 @@ import * as Phonic from "../../../../index.js";
12
12
  * voice_id: "grant",
13
13
  * audio_speed: 1,
14
14
  * background_noise_level: 0,
15
+ * generate_welcome_message: false,
15
16
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
16
17
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
17
18
  * template_variables: {
@@ -69,7 +69,8 @@ export declare class Tools {
69
69
  * is_required: true
70
70
  * }],
71
71
  * require_speech_before_tool_call: false,
72
- * forbid_speech_after_tool_call: false
72
+ * forbid_speech_after_tool_call: false,
73
+ * allow_tool_chaining: true
73
74
  * })
74
75
  *
75
76
  * @example
@@ -101,7 +102,8 @@ export declare class Tools {
101
102
  * endpoint_timeout_ms: 5000,
102
103
  * require_speech_before_tool_call: false,
103
104
  * wait_for_speech_before_tool_call: false,
104
- * forbid_speech_after_tool_call: false
105
+ * forbid_speech_after_tool_call: false,
106
+ * allow_tool_chaining: true
105
107
  * })
106
108
  *
107
109
  * @example
@@ -120,7 +122,8 @@ export declare class Tools {
120
122
  * tool_call_output_timeout_ms: 5000,
121
123
  * require_speech_before_tool_call: false,
122
124
  * wait_for_speech_before_tool_call: false,
123
- * forbid_speech_after_tool_call: false
125
+ * forbid_speech_after_tool_call: false,
126
+ * allow_tool_chaining: true
124
127
  * })
125
128
  *
126
129
  * @example
@@ -157,7 +157,8 @@ class Tools {
157
157
  * is_required: true
158
158
  * }],
159
159
  * require_speech_before_tool_call: false,
160
- * forbid_speech_after_tool_call: false
160
+ * forbid_speech_after_tool_call: false,
161
+ * allow_tool_chaining: true
161
162
  * })
162
163
  *
163
164
  * @example
@@ -189,7 +190,8 @@ class Tools {
189
190
  * endpoint_timeout_ms: 5000,
190
191
  * require_speech_before_tool_call: false,
191
192
  * wait_for_speech_before_tool_call: false,
192
- * forbid_speech_after_tool_call: false
193
+ * forbid_speech_after_tool_call: false,
194
+ * allow_tool_chaining: true
193
195
  * })
194
196
  *
195
197
  * @example
@@ -208,7 +210,8 @@ class Tools {
208
210
  * tool_call_output_timeout_ms: 5000,
209
211
  * require_speech_before_tool_call: false,
210
212
  * wait_for_speech_before_tool_call: false,
211
- * forbid_speech_after_tool_call: false
213
+ * forbid_speech_after_tool_call: false,
214
+ * allow_tool_chaining: true
212
215
  * })
213
216
  *
214
217
  * @example
@@ -17,7 +17,8 @@ import * as Phonic from "../../../../index.js";
17
17
  * is_required: true
18
18
  * }],
19
19
  * require_speech_before_tool_call: false,
20
- * forbid_speech_after_tool_call: false
20
+ * forbid_speech_after_tool_call: false,
21
+ * allow_tool_chaining: true
21
22
  * }
22
23
  *
23
24
  * @example
@@ -49,7 +50,8 @@ import * as Phonic from "../../../../index.js";
49
50
  * endpoint_timeout_ms: 5000,
50
51
  * require_speech_before_tool_call: false,
51
52
  * wait_for_speech_before_tool_call: false,
52
- * forbid_speech_after_tool_call: false
53
+ * forbid_speech_after_tool_call: false,
54
+ * allow_tool_chaining: true
53
55
  * }
54
56
  *
55
57
  * @example
@@ -68,7 +70,8 @@ import * as Phonic from "../../../../index.js";
68
70
  * tool_call_output_timeout_ms: 5000,
69
71
  * require_speech_before_tool_call: false,
70
72
  * wait_for_speech_before_tool_call: false,
71
- * forbid_speech_after_tool_call: false
73
+ * forbid_speech_after_tool_call: false,
74
+ * allow_tool_chaining: true
72
75
  * }
73
76
  *
74
77
  * @example
@@ -137,6 +140,8 @@ export interface CreateToolRequest {
137
140
  wait_for_speech_before_tool_call?: boolean;
138
141
  /** When true, forbids the agent from speaking after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
139
142
  forbid_speech_after_tool_call?: boolean;
143
+ /** When true, allows the agent to chain and execute other tools after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
144
+ allow_tool_chaining?: boolean;
140
145
  }
141
146
  export declare namespace CreateToolRequest {
142
147
  /**
@@ -51,6 +51,8 @@ export interface UpdateToolRequest {
51
51
  wait_for_speech_before_tool_call?: boolean;
52
52
  /** When true, forbids the agent from speaking after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
53
53
  forbid_speech_after_tool_call?: boolean;
54
+ /** When true, allows the agent to chain and execute other tools after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
55
+ allow_tool_chaining?: boolean;
54
56
  }
55
57
  export declare namespace UpdateToolRequest {
56
58
  /**
@@ -25,7 +25,9 @@ export interface Agent {
25
25
  background_noise_level: number;
26
26
  /** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
27
27
  background_noise: Agent.BackgroundNoise | null;
28
- /** Message to play when the conversation starts. */
28
+ /** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
29
+ generate_welcome_message: boolean;
30
+ /** Message to play when the conversation starts. Ignored when `generate_welcome_message` is `true`. */
29
31
  welcome_message: string | null;
30
32
  /** Instructions for the conversation. */
31
33
  system_prompt: string;
@@ -17,7 +17,9 @@ export interface ConfigPayload {
17
17
  background_noise_level?: number;
18
18
  /** Background noise type for the conversation */
19
19
  background_noise?: ConfigPayload.BackgroundNoise | null;
20
- /** Message to play when conversation starts */
20
+ /** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
21
+ generate_welcome_message?: boolean;
22
+ /** Message to play when conversation starts. Ignored when `generate_welcome_message` is `true`. */
21
23
  welcome_message?: string | null;
22
24
  /** Voice ID to use for speech synthesis */
23
25
  voice_id?: string;
@@ -15,7 +15,9 @@ export interface Conversation {
15
15
  external_id: string | null;
16
16
  /** The STS model used. */
17
17
  model: string;
18
- /** Welcome message played at start. */
18
+ /** Will be `true` if welcome message was automatically generated. */
19
+ generate_welcome_message: boolean;
20
+ /** Welcome message played at start. Will be `null` when `generate_welcome_message` is `true`. */
19
21
  welcome_message: string | null;
20
22
  /** Template variables used in the conversation. */
21
23
  template_variables: Record<string, string>;
@@ -22,7 +22,9 @@ export interface CreateAgentRequest {
22
22
  background_noise_level?: number;
23
23
  /** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
24
24
  background_noise?: CreateAgentRequest.BackgroundNoise | null;
25
- /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. */
25
+ /** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
26
+ generate_welcome_message?: boolean;
27
+ /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
26
28
  welcome_message?: string;
27
29
  /** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
28
30
  system_prompt?: string;
@@ -40,6 +40,8 @@ export interface Tool {
40
40
  wait_for_speech_before_tool_call?: boolean;
41
41
  /** When true, forbids the agent from speaking after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
42
42
  forbid_speech_after_tool_call?: boolean;
43
+ /** When true, allows the agent to chain and execute other tools after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
44
+ allow_tool_chaining?: boolean;
43
45
  }
44
46
  export declare namespace Tool {
45
47
  interface Project {
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.30.24";
1
+ export declare const SDK_VERSION = "0.30.26";
@@ -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 = "0.30.24";
4
+ exports.SDK_VERSION = "0.30.26";
@@ -15,8 +15,8 @@ export class PhonicClient {
15
15
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
16
16
  "X-Fern-Language": "JavaScript",
17
17
  "X-Fern-SDK-Name": "phonic",
18
- "X-Fern-SDK-Version": "0.30.24",
19
- "User-Agent": "phonic/0.30.24",
18
+ "X-Fern-SDK-Version": "0.30.26",
19
+ "User-Agent": "phonic/0.30.26",
20
20
  "X-Fern-Runtime": core.RUNTIME.type,
21
21
  "X-Fern-Runtime-Version": core.RUNTIME.version,
22
22
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -64,6 +64,7 @@ export declare class Agents {
64
64
  * voice_id: "grant",
65
65
  * audio_speed: 1,
66
66
  * background_noise_level: 0,
67
+ * generate_welcome_message: false,
67
68
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
68
69
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
69
70
  * template_variables: {
@@ -108,6 +109,7 @@ export declare class Agents {
108
109
  * voice_id: "grant",
109
110
  * audio_speed: 1,
110
111
  * background_noise_level: 0,
112
+ * generate_welcome_message: false,
111
113
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
112
114
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
113
115
  * template_variables: {
@@ -188,6 +190,7 @@ export declare class Agents {
188
190
  * voice_id: "grant",
189
191
  * audio_speed: 1,
190
192
  * background_noise_level: 0,
193
+ * generate_welcome_message: false,
191
194
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
192
195
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
193
196
  * template_variables: {
@@ -118,6 +118,7 @@ export class Agents {
118
118
  * voice_id: "grant",
119
119
  * audio_speed: 1,
120
120
  * background_noise_level: 0,
121
+ * generate_welcome_message: false,
121
122
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
122
123
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
123
124
  * template_variables: {
@@ -223,6 +224,7 @@ export class Agents {
223
224
  * voice_id: "grant",
224
225
  * audio_speed: 1,
225
226
  * background_noise_level: 0,
227
+ * generate_welcome_message: false,
226
228
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
227
229
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
228
230
  * template_variables: {
@@ -468,6 +470,7 @@ export class Agents {
468
470
  * voice_id: "grant",
469
471
  * audio_speed: 1,
470
472
  * background_noise_level: 0,
473
+ * generate_welcome_message: false,
471
474
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
472
475
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
473
476
  * template_variables: {
@@ -12,6 +12,7 @@ import * as Phonic from "../../../../index.mjs";
12
12
  * voice_id: "grant",
13
13
  * audio_speed: 1,
14
14
  * background_noise_level: 0,
15
+ * generate_welcome_message: false,
15
16
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
16
17
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
17
18
  * template_variables: {
@@ -58,7 +59,9 @@ export interface AgentsCreateRequest {
58
59
  background_noise_level?: number;
59
60
  /** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
60
61
  background_noise?: Phonic.CreateAgentRequest.BackgroundNoise | null;
61
- /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. */
62
+ /** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
63
+ generate_welcome_message?: boolean;
64
+ /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
62
65
  welcome_message?: string;
63
66
  /** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
64
67
  system_prompt?: string;
@@ -12,6 +12,7 @@ import * as Phonic from "../../../../index.mjs";
12
12
  * voice_id: "grant",
13
13
  * audio_speed: 1,
14
14
  * background_noise_level: 0,
15
+ * generate_welcome_message: false,
15
16
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
16
17
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
17
18
  * template_variables: {
@@ -58,7 +59,9 @@ export interface UpdateAgentRequest {
58
59
  background_noise_level?: number;
59
60
  /** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
60
61
  background_noise?: UpdateAgentRequest.BackgroundNoise | null;
61
- /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. */
62
+ /** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
63
+ generate_welcome_message?: boolean;
64
+ /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
62
65
  welcome_message?: string;
63
66
  /** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
64
67
  system_prompt?: string;
@@ -12,6 +12,7 @@ import * as Phonic from "../../../../index.mjs";
12
12
  * voice_id: "grant",
13
13
  * audio_speed: 1,
14
14
  * background_noise_level: 0,
15
+ * generate_welcome_message: false,
15
16
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
16
17
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
17
18
  * template_variables: {
@@ -69,7 +69,8 @@ export declare class Tools {
69
69
  * is_required: true
70
70
  * }],
71
71
  * require_speech_before_tool_call: false,
72
- * forbid_speech_after_tool_call: false
72
+ * forbid_speech_after_tool_call: false,
73
+ * allow_tool_chaining: true
73
74
  * })
74
75
  *
75
76
  * @example
@@ -101,7 +102,8 @@ export declare class Tools {
101
102
  * endpoint_timeout_ms: 5000,
102
103
  * require_speech_before_tool_call: false,
103
104
  * wait_for_speech_before_tool_call: false,
104
- * forbid_speech_after_tool_call: false
105
+ * forbid_speech_after_tool_call: false,
106
+ * allow_tool_chaining: true
105
107
  * })
106
108
  *
107
109
  * @example
@@ -120,7 +122,8 @@ export declare class Tools {
120
122
  * tool_call_output_timeout_ms: 5000,
121
123
  * require_speech_before_tool_call: false,
122
124
  * wait_for_speech_before_tool_call: false,
123
- * forbid_speech_after_tool_call: false
125
+ * forbid_speech_after_tool_call: false,
126
+ * allow_tool_chaining: true
124
127
  * })
125
128
  *
126
129
  * @example
@@ -121,7 +121,8 @@ export class Tools {
121
121
  * is_required: true
122
122
  * }],
123
123
  * require_speech_before_tool_call: false,
124
- * forbid_speech_after_tool_call: false
124
+ * forbid_speech_after_tool_call: false,
125
+ * allow_tool_chaining: true
125
126
  * })
126
127
  *
127
128
  * @example
@@ -153,7 +154,8 @@ export class Tools {
153
154
  * endpoint_timeout_ms: 5000,
154
155
  * require_speech_before_tool_call: false,
155
156
  * wait_for_speech_before_tool_call: false,
156
- * forbid_speech_after_tool_call: false
157
+ * forbid_speech_after_tool_call: false,
158
+ * allow_tool_chaining: true
157
159
  * })
158
160
  *
159
161
  * @example
@@ -172,7 +174,8 @@ export class Tools {
172
174
  * tool_call_output_timeout_ms: 5000,
173
175
  * require_speech_before_tool_call: false,
174
176
  * wait_for_speech_before_tool_call: false,
175
- * forbid_speech_after_tool_call: false
177
+ * forbid_speech_after_tool_call: false,
178
+ * allow_tool_chaining: true
176
179
  * })
177
180
  *
178
181
  * @example
@@ -17,7 +17,8 @@ import * as Phonic from "../../../../index.mjs";
17
17
  * is_required: true
18
18
  * }],
19
19
  * require_speech_before_tool_call: false,
20
- * forbid_speech_after_tool_call: false
20
+ * forbid_speech_after_tool_call: false,
21
+ * allow_tool_chaining: true
21
22
  * }
22
23
  *
23
24
  * @example
@@ -49,7 +50,8 @@ import * as Phonic from "../../../../index.mjs";
49
50
  * endpoint_timeout_ms: 5000,
50
51
  * require_speech_before_tool_call: false,
51
52
  * wait_for_speech_before_tool_call: false,
52
- * forbid_speech_after_tool_call: false
53
+ * forbid_speech_after_tool_call: false,
54
+ * allow_tool_chaining: true
53
55
  * }
54
56
  *
55
57
  * @example
@@ -68,7 +70,8 @@ import * as Phonic from "../../../../index.mjs";
68
70
  * tool_call_output_timeout_ms: 5000,
69
71
  * require_speech_before_tool_call: false,
70
72
  * wait_for_speech_before_tool_call: false,
71
- * forbid_speech_after_tool_call: false
73
+ * forbid_speech_after_tool_call: false,
74
+ * allow_tool_chaining: true
72
75
  * }
73
76
  *
74
77
  * @example
@@ -137,6 +140,8 @@ export interface CreateToolRequest {
137
140
  wait_for_speech_before_tool_call?: boolean;
138
141
  /** When true, forbids the agent from speaking after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
139
142
  forbid_speech_after_tool_call?: boolean;
143
+ /** When true, allows the agent to chain and execute other tools after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
144
+ allow_tool_chaining?: boolean;
140
145
  }
141
146
  export declare namespace CreateToolRequest {
142
147
  /**
@@ -51,6 +51,8 @@ export interface UpdateToolRequest {
51
51
  wait_for_speech_before_tool_call?: boolean;
52
52
  /** When true, forbids the agent from speaking after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
53
53
  forbid_speech_after_tool_call?: boolean;
54
+ /** When true, allows the agent to chain and execute other tools after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
55
+ allow_tool_chaining?: boolean;
54
56
  }
55
57
  export declare namespace UpdateToolRequest {
56
58
  /**
@@ -25,7 +25,9 @@ export interface Agent {
25
25
  background_noise_level: number;
26
26
  /** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
27
27
  background_noise: Agent.BackgroundNoise | null;
28
- /** Message to play when the conversation starts. */
28
+ /** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
29
+ generate_welcome_message: boolean;
30
+ /** Message to play when the conversation starts. Ignored when `generate_welcome_message` is `true`. */
29
31
  welcome_message: string | null;
30
32
  /** Instructions for the conversation. */
31
33
  system_prompt: string;
@@ -17,7 +17,9 @@ export interface ConfigPayload {
17
17
  background_noise_level?: number;
18
18
  /** Background noise type for the conversation */
19
19
  background_noise?: ConfigPayload.BackgroundNoise | null;
20
- /** Message to play when conversation starts */
20
+ /** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
21
+ generate_welcome_message?: boolean;
22
+ /** Message to play when conversation starts. Ignored when `generate_welcome_message` is `true`. */
21
23
  welcome_message?: string | null;
22
24
  /** Voice ID to use for speech synthesis */
23
25
  voice_id?: string;
@@ -15,7 +15,9 @@ export interface Conversation {
15
15
  external_id: string | null;
16
16
  /** The STS model used. */
17
17
  model: string;
18
- /** Welcome message played at start. */
18
+ /** Will be `true` if welcome message was automatically generated. */
19
+ generate_welcome_message: boolean;
20
+ /** Welcome message played at start. Will be `null` when `generate_welcome_message` is `true`. */
19
21
  welcome_message: string | null;
20
22
  /** Template variables used in the conversation. */
21
23
  template_variables: Record<string, string>;
@@ -22,7 +22,9 @@ export interface CreateAgentRequest {
22
22
  background_noise_level?: number;
23
23
  /** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
24
24
  background_noise?: CreateAgentRequest.BackgroundNoise | null;
25
- /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. */
25
+ /** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
26
+ generate_welcome_message?: boolean;
27
+ /** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
26
28
  welcome_message?: string;
27
29
  /** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
28
30
  system_prompt?: string;
@@ -40,6 +40,8 @@ export interface Tool {
40
40
  wait_for_speech_before_tool_call?: boolean;
41
41
  /** When true, forbids the agent from speaking after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
42
42
  forbid_speech_after_tool_call?: boolean;
43
+ /** When true, allows the agent to chain and execute other tools after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
44
+ allow_tool_chaining?: boolean;
43
45
  }
44
46
  export declare namespace Tool {
45
47
  interface Project {
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.30.24";
1
+ export declare const SDK_VERSION = "0.30.26";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.30.24";
1
+ export const SDK_VERSION = "0.30.26";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.30.25",
3
+ "version": "0.30.26",
4
4
  "private": false,
5
5
  "repository": "github:Phonic-Co/phonic-node",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -101,6 +101,7 @@ await client.agents.create({
101
101
  voice_id: "grant",
102
102
  audio_speed: 1,
103
103
  background_noise_level: 0,
104
+ generate_welcome_message: false,
104
105
  welcome_message: "Hi {{customer_name}}. How can I help you today?",
105
106
  system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
106
107
  template_variables: {
@@ -194,6 +195,7 @@ await client.agents.upsert({
194
195
  voice_id: "grant",
195
196
  audio_speed: 1,
196
197
  background_noise_level: 0,
198
+ generate_welcome_message: false,
197
199
  welcome_message: "Hi {{customer_name}}. How can I help you today?",
198
200
  system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
199
201
  template_variables: {
@@ -433,6 +435,7 @@ await client.agents.update("nameOrId", {
433
435
  voice_id: "grant",
434
436
  audio_speed: 1,
435
437
  background_noise_level: 0,
438
+ generate_welcome_message: false,
436
439
  welcome_message: "Hi {{customer_name}}. How can I help you today?",
437
440
  system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
438
441
  template_variables: {
@@ -609,6 +612,7 @@ await client.tools.create({
609
612
  ],
610
613
  require_speech_before_tool_call: false,
611
614
  forbid_speech_after_tool_call: false,
615
+ allow_tool_chaining: true,
612
616
  });
613
617
  ```
614
618