phonic 0.30.18 → 0.30.19
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/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/tools/client/Client.d.ts +21 -2
- package/dist/cjs/api/resources/tools/client/Client.js +21 -2
- package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.d.ts +25 -3
- package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.js +1 -0
- package/dist/cjs/api/resources/tools/client/requests/ToolsGetRequest.d.ts +5 -0
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.d.ts +4 -1
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.js +1 -0
- package/dist/cjs/api/types/Tool.d.ts +4 -1
- package/dist/cjs/api/types/Tool.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/tools/client/Client.d.mts +21 -2
- package/dist/esm/api/resources/tools/client/Client.mjs +21 -2
- package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.d.mts +25 -3
- package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.mjs +1 -0
- package/dist/esm/api/resources/tools/client/requests/ToolsGetRequest.d.mts +5 -0
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.d.mts +4 -1
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.mjs +1 -0
- package/dist/esm/api/types/Tool.d.mts +4 -1
- package/dist/esm/api/types/Tool.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +6 -20
package/dist/cjs/Client.js
CHANGED
|
@@ -50,8 +50,8 @@ class PhonicClient {
|
|
|
50
50
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
51
51
|
"X-Fern-Language": "JavaScript",
|
|
52
52
|
"X-Fern-SDK-Name": "phonic",
|
|
53
|
-
"X-Fern-SDK-Version": "0.30.
|
|
54
|
-
"User-Agent": "phonic/0.30.
|
|
53
|
+
"X-Fern-SDK-Version": "0.30.19",
|
|
54
|
+
"User-Agent": "phonic/0.30.19",
|
|
55
55
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
56
56
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
57
57
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -58,6 +58,23 @@ export declare class Tools {
|
|
|
58
58
|
* @example
|
|
59
59
|
* await client.tools.create({
|
|
60
60
|
* project: "main",
|
|
61
|
+
* name: "context_printer",
|
|
62
|
+
* description: "Gets the specific context for fixing our printer",
|
|
63
|
+
* type: "custom_context",
|
|
64
|
+
* execution_mode: "sync",
|
|
65
|
+
* parameters: [{
|
|
66
|
+
* type: "string",
|
|
67
|
+
* name: "name",
|
|
68
|
+
* description: "description",
|
|
69
|
+
* is_required: true
|
|
70
|
+
* }],
|
|
71
|
+
* require_speech_before_tool_call: false,
|
|
72
|
+
* forbid_speech_after_tool_call: false
|
|
73
|
+
* })
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await client.tools.create({
|
|
77
|
+
* project: "main",
|
|
61
78
|
* name: "book_appointment",
|
|
62
79
|
* description: "Books an appointment in the calendar system",
|
|
63
80
|
* type: "custom_webhook",
|
|
@@ -82,7 +99,8 @@ export declare class Tools {
|
|
|
82
99
|
* "Content-Type": "application/json"
|
|
83
100
|
* },
|
|
84
101
|
* endpoint_timeout_ms: 5000,
|
|
85
|
-
* require_speech_before_tool_call: false
|
|
102
|
+
* require_speech_before_tool_call: false,
|
|
103
|
+
* forbid_speech_after_tool_call: false
|
|
86
104
|
* })
|
|
87
105
|
*
|
|
88
106
|
* @example
|
|
@@ -99,7 +117,8 @@ export declare class Tools {
|
|
|
99
117
|
* is_required: true
|
|
100
118
|
* }],
|
|
101
119
|
* tool_call_output_timeout_ms: 5000,
|
|
102
|
-
* require_speech_before_tool_call: false
|
|
120
|
+
* require_speech_before_tool_call: false,
|
|
121
|
+
* forbid_speech_after_tool_call: false
|
|
103
122
|
* })
|
|
104
123
|
*
|
|
105
124
|
* @example
|
|
@@ -146,6 +146,23 @@ class Tools {
|
|
|
146
146
|
* @example
|
|
147
147
|
* await client.tools.create({
|
|
148
148
|
* project: "main",
|
|
149
|
+
* name: "context_printer",
|
|
150
|
+
* description: "Gets the specific context for fixing our printer",
|
|
151
|
+
* type: "custom_context",
|
|
152
|
+
* execution_mode: "sync",
|
|
153
|
+
* parameters: [{
|
|
154
|
+
* type: "string",
|
|
155
|
+
* name: "name",
|
|
156
|
+
* description: "description",
|
|
157
|
+
* is_required: true
|
|
158
|
+
* }],
|
|
159
|
+
* require_speech_before_tool_call: false,
|
|
160
|
+
* forbid_speech_after_tool_call: false
|
|
161
|
+
* })
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* await client.tools.create({
|
|
165
|
+
* project: "main",
|
|
149
166
|
* name: "book_appointment",
|
|
150
167
|
* description: "Books an appointment in the calendar system",
|
|
151
168
|
* type: "custom_webhook",
|
|
@@ -170,7 +187,8 @@ class Tools {
|
|
|
170
187
|
* "Content-Type": "application/json"
|
|
171
188
|
* },
|
|
172
189
|
* endpoint_timeout_ms: 5000,
|
|
173
|
-
* require_speech_before_tool_call: false
|
|
190
|
+
* require_speech_before_tool_call: false,
|
|
191
|
+
* forbid_speech_after_tool_call: false
|
|
174
192
|
* })
|
|
175
193
|
*
|
|
176
194
|
* @example
|
|
@@ -187,7 +205,8 @@ class Tools {
|
|
|
187
205
|
* is_required: true
|
|
188
206
|
* }],
|
|
189
207
|
* tool_call_output_timeout_ms: 5000,
|
|
190
|
-
* require_speech_before_tool_call: false
|
|
208
|
+
* require_speech_before_tool_call: false,
|
|
209
|
+
* forbid_speech_after_tool_call: false
|
|
191
210
|
* })
|
|
192
211
|
*
|
|
193
212
|
* @example
|
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Phonic from "../../../../index.js";
|
|
5
5
|
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* project: "main",
|
|
9
|
+
* name: "context_printer",
|
|
10
|
+
* description: "Gets the specific context for fixing our printer",
|
|
11
|
+
* type: "custom_context",
|
|
12
|
+
* execution_mode: "sync",
|
|
13
|
+
* parameters: [{
|
|
14
|
+
* type: "string",
|
|
15
|
+
* name: "name",
|
|
16
|
+
* description: "description",
|
|
17
|
+
* is_required: true
|
|
18
|
+
* }],
|
|
19
|
+
* require_speech_before_tool_call: false,
|
|
20
|
+
* forbid_speech_after_tool_call: false
|
|
21
|
+
* }
|
|
22
|
+
*
|
|
6
23
|
* @example
|
|
7
24
|
* {
|
|
8
25
|
* project: "main",
|
|
@@ -30,7 +47,8 @@ import * as Phonic from "../../../../index.js";
|
|
|
30
47
|
* "Content-Type": "application/json"
|
|
31
48
|
* },
|
|
32
49
|
* endpoint_timeout_ms: 5000,
|
|
33
|
-
* require_speech_before_tool_call: false
|
|
50
|
+
* require_speech_before_tool_call: false,
|
|
51
|
+
* forbid_speech_after_tool_call: false
|
|
34
52
|
* }
|
|
35
53
|
*
|
|
36
54
|
* @example
|
|
@@ -47,7 +65,8 @@ import * as Phonic from "../../../../index.js";
|
|
|
47
65
|
* is_required: true
|
|
48
66
|
* }],
|
|
49
67
|
* tool_call_output_timeout_ms: 5000,
|
|
50
|
-
* require_speech_before_tool_call: false
|
|
68
|
+
* require_speech_before_tool_call: false,
|
|
69
|
+
* forbid_speech_after_tool_call: false
|
|
51
70
|
* }
|
|
52
71
|
*
|
|
53
72
|
* @example
|
|
@@ -109,13 +128,16 @@ export interface CreateToolRequest {
|
|
|
109
128
|
agents_to_transfer_to?: string[];
|
|
110
129
|
/** When true, forces the agent to speak before executing the tool. */
|
|
111
130
|
require_speech_before_tool_call?: boolean;
|
|
131
|
+
/** When true, forbids the agent from speaking after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
|
|
132
|
+
forbid_speech_after_tool_call?: boolean;
|
|
112
133
|
}
|
|
113
134
|
export declare namespace CreateToolRequest {
|
|
114
135
|
/**
|
|
115
136
|
* The type of tool.
|
|
116
137
|
*/
|
|
117
|
-
type Type = "custom_webhook" | "custom_websocket" | "built_in_transfer_to_phone_number" | "built_in_transfer_to_agent";
|
|
138
|
+
type Type = "custom_context" | "custom_webhook" | "custom_websocket" | "built_in_transfer_to_phone_number" | "built_in_transfer_to_agent";
|
|
118
139
|
const Type: {
|
|
140
|
+
readonly CustomContext: "custom_context";
|
|
119
141
|
readonly CustomWebhook: "custom_webhook";
|
|
120
142
|
readonly CustomWebsocket: "custom_websocket";
|
|
121
143
|
readonly BuiltInTransferToPhoneNumber: "built_in_transfer_to_phone_number";
|
|
@@ -7,6 +7,7 @@ exports.CreateToolRequest = void 0;
|
|
|
7
7
|
var CreateToolRequest;
|
|
8
8
|
(function (CreateToolRequest) {
|
|
9
9
|
CreateToolRequest.Type = {
|
|
10
|
+
CustomContext: "custom_context",
|
|
10
11
|
CustomWebhook: "custom_webhook",
|
|
11
12
|
CustomWebsocket: "custom_websocket",
|
|
12
13
|
BuiltInTransferToPhoneNumber: "built_in_transfer_to_phone_number",
|
|
@@ -45,13 +45,16 @@ export interface UpdateToolRequest {
|
|
|
45
45
|
agents_to_transfer_to?: string[];
|
|
46
46
|
/** When true, forces the agent to speak before executing the tool. */
|
|
47
47
|
require_speech_before_tool_call?: boolean;
|
|
48
|
+
/** When true, forbids the agent from speaking after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
|
|
49
|
+
forbid_speech_after_tool_call?: boolean;
|
|
48
50
|
}
|
|
49
51
|
export declare namespace UpdateToolRequest {
|
|
50
52
|
/**
|
|
51
53
|
* The type of tool.
|
|
52
54
|
*/
|
|
53
|
-
type Type = "custom_webhook" | "custom_websocket" | "built_in_transfer_to_phone_number" | "built_in_transfer_to_agent";
|
|
55
|
+
type Type = "custom_context" | "custom_webhook" | "custom_websocket" | "built_in_transfer_to_phone_number" | "built_in_transfer_to_agent";
|
|
54
56
|
const Type: {
|
|
57
|
+
readonly CustomContext: "custom_context";
|
|
55
58
|
readonly CustomWebhook: "custom_webhook";
|
|
56
59
|
readonly CustomWebsocket: "custom_websocket";
|
|
57
60
|
readonly BuiltInTransferToPhoneNumber: "built_in_transfer_to_phone_number";
|
|
@@ -7,6 +7,7 @@ exports.UpdateToolRequest = void 0;
|
|
|
7
7
|
var UpdateToolRequest;
|
|
8
8
|
(function (UpdateToolRequest) {
|
|
9
9
|
UpdateToolRequest.Type = {
|
|
10
|
+
CustomContext: "custom_context",
|
|
10
11
|
CustomWebhook: "custom_webhook",
|
|
11
12
|
CustomWebsocket: "custom_websocket",
|
|
12
13
|
BuiltInTransferToPhoneNumber: "built_in_transfer_to_phone_number",
|
|
@@ -34,6 +34,8 @@ export interface Tool {
|
|
|
34
34
|
agents_to_transfer_to?: string[];
|
|
35
35
|
/** When true, forces the agent to speak before executing the tool. */
|
|
36
36
|
require_speech_before_tool_call?: boolean;
|
|
37
|
+
/** When true, forbids the agent from speaking after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
|
|
38
|
+
forbid_speech_after_tool_call?: boolean;
|
|
37
39
|
}
|
|
38
40
|
export declare namespace Tool {
|
|
39
41
|
interface Project {
|
|
@@ -43,8 +45,9 @@ export declare namespace Tool {
|
|
|
43
45
|
/**
|
|
44
46
|
* The type of tool.
|
|
45
47
|
*/
|
|
46
|
-
type Type = "custom_webhook" | "custom_websocket" | "built_in_transfer_to_phone_number" | "built_in_transfer_to_agent";
|
|
48
|
+
type Type = "custom_context" | "custom_webhook" | "custom_websocket" | "built_in_transfer_to_phone_number" | "built_in_transfer_to_agent";
|
|
47
49
|
const Type: {
|
|
50
|
+
readonly CustomContext: "custom_context";
|
|
48
51
|
readonly CustomWebhook: "custom_webhook";
|
|
49
52
|
readonly CustomWebsocket: "custom_websocket";
|
|
50
53
|
readonly BuiltInTransferToPhoneNumber: "built_in_transfer_to_phone_number";
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.30.
|
|
1
|
+
export declare const SDK_VERSION = "0.30.19";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -14,8 +14,8 @@ export class PhonicClient {
|
|
|
14
14
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
15
15
|
"X-Fern-Language": "JavaScript",
|
|
16
16
|
"X-Fern-SDK-Name": "phonic",
|
|
17
|
-
"X-Fern-SDK-Version": "0.30.
|
|
18
|
-
"User-Agent": "phonic/0.30.
|
|
17
|
+
"X-Fern-SDK-Version": "0.30.19",
|
|
18
|
+
"User-Agent": "phonic/0.30.19",
|
|
19
19
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
20
20
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
21
21
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -58,6 +58,23 @@ export declare class Tools {
|
|
|
58
58
|
* @example
|
|
59
59
|
* await client.tools.create({
|
|
60
60
|
* project: "main",
|
|
61
|
+
* name: "context_printer",
|
|
62
|
+
* description: "Gets the specific context for fixing our printer",
|
|
63
|
+
* type: "custom_context",
|
|
64
|
+
* execution_mode: "sync",
|
|
65
|
+
* parameters: [{
|
|
66
|
+
* type: "string",
|
|
67
|
+
* name: "name",
|
|
68
|
+
* description: "description",
|
|
69
|
+
* is_required: true
|
|
70
|
+
* }],
|
|
71
|
+
* require_speech_before_tool_call: false,
|
|
72
|
+
* forbid_speech_after_tool_call: false
|
|
73
|
+
* })
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await client.tools.create({
|
|
77
|
+
* project: "main",
|
|
61
78
|
* name: "book_appointment",
|
|
62
79
|
* description: "Books an appointment in the calendar system",
|
|
63
80
|
* type: "custom_webhook",
|
|
@@ -82,7 +99,8 @@ export declare class Tools {
|
|
|
82
99
|
* "Content-Type": "application/json"
|
|
83
100
|
* },
|
|
84
101
|
* endpoint_timeout_ms: 5000,
|
|
85
|
-
* require_speech_before_tool_call: false
|
|
102
|
+
* require_speech_before_tool_call: false,
|
|
103
|
+
* forbid_speech_after_tool_call: false
|
|
86
104
|
* })
|
|
87
105
|
*
|
|
88
106
|
* @example
|
|
@@ -99,7 +117,8 @@ export declare class Tools {
|
|
|
99
117
|
* is_required: true
|
|
100
118
|
* }],
|
|
101
119
|
* tool_call_output_timeout_ms: 5000,
|
|
102
|
-
* require_speech_before_tool_call: false
|
|
120
|
+
* require_speech_before_tool_call: false,
|
|
121
|
+
* forbid_speech_after_tool_call: false
|
|
103
122
|
* })
|
|
104
123
|
*
|
|
105
124
|
* @example
|
|
@@ -110,6 +110,23 @@ export class Tools {
|
|
|
110
110
|
* @example
|
|
111
111
|
* await client.tools.create({
|
|
112
112
|
* project: "main",
|
|
113
|
+
* name: "context_printer",
|
|
114
|
+
* description: "Gets the specific context for fixing our printer",
|
|
115
|
+
* type: "custom_context",
|
|
116
|
+
* execution_mode: "sync",
|
|
117
|
+
* parameters: [{
|
|
118
|
+
* type: "string",
|
|
119
|
+
* name: "name",
|
|
120
|
+
* description: "description",
|
|
121
|
+
* is_required: true
|
|
122
|
+
* }],
|
|
123
|
+
* require_speech_before_tool_call: false,
|
|
124
|
+
* forbid_speech_after_tool_call: false
|
|
125
|
+
* })
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* await client.tools.create({
|
|
129
|
+
* project: "main",
|
|
113
130
|
* name: "book_appointment",
|
|
114
131
|
* description: "Books an appointment in the calendar system",
|
|
115
132
|
* type: "custom_webhook",
|
|
@@ -134,7 +151,8 @@ export class Tools {
|
|
|
134
151
|
* "Content-Type": "application/json"
|
|
135
152
|
* },
|
|
136
153
|
* endpoint_timeout_ms: 5000,
|
|
137
|
-
* require_speech_before_tool_call: false
|
|
154
|
+
* require_speech_before_tool_call: false,
|
|
155
|
+
* forbid_speech_after_tool_call: false
|
|
138
156
|
* })
|
|
139
157
|
*
|
|
140
158
|
* @example
|
|
@@ -151,7 +169,8 @@ export class Tools {
|
|
|
151
169
|
* is_required: true
|
|
152
170
|
* }],
|
|
153
171
|
* tool_call_output_timeout_ms: 5000,
|
|
154
|
-
* require_speech_before_tool_call: false
|
|
172
|
+
* require_speech_before_tool_call: false,
|
|
173
|
+
* forbid_speech_after_tool_call: false
|
|
155
174
|
* })
|
|
156
175
|
*
|
|
157
176
|
* @example
|
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Phonic from "../../../../index.mjs";
|
|
5
5
|
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* project: "main",
|
|
9
|
+
* name: "context_printer",
|
|
10
|
+
* description: "Gets the specific context for fixing our printer",
|
|
11
|
+
* type: "custom_context",
|
|
12
|
+
* execution_mode: "sync",
|
|
13
|
+
* parameters: [{
|
|
14
|
+
* type: "string",
|
|
15
|
+
* name: "name",
|
|
16
|
+
* description: "description",
|
|
17
|
+
* is_required: true
|
|
18
|
+
* }],
|
|
19
|
+
* require_speech_before_tool_call: false,
|
|
20
|
+
* forbid_speech_after_tool_call: false
|
|
21
|
+
* }
|
|
22
|
+
*
|
|
6
23
|
* @example
|
|
7
24
|
* {
|
|
8
25
|
* project: "main",
|
|
@@ -30,7 +47,8 @@ import * as Phonic from "../../../../index.mjs";
|
|
|
30
47
|
* "Content-Type": "application/json"
|
|
31
48
|
* },
|
|
32
49
|
* endpoint_timeout_ms: 5000,
|
|
33
|
-
* require_speech_before_tool_call: false
|
|
50
|
+
* require_speech_before_tool_call: false,
|
|
51
|
+
* forbid_speech_after_tool_call: false
|
|
34
52
|
* }
|
|
35
53
|
*
|
|
36
54
|
* @example
|
|
@@ -47,7 +65,8 @@ import * as Phonic from "../../../../index.mjs";
|
|
|
47
65
|
* is_required: true
|
|
48
66
|
* }],
|
|
49
67
|
* tool_call_output_timeout_ms: 5000,
|
|
50
|
-
* require_speech_before_tool_call: false
|
|
68
|
+
* require_speech_before_tool_call: false,
|
|
69
|
+
* forbid_speech_after_tool_call: false
|
|
51
70
|
* }
|
|
52
71
|
*
|
|
53
72
|
* @example
|
|
@@ -109,13 +128,16 @@ export interface CreateToolRequest {
|
|
|
109
128
|
agents_to_transfer_to?: string[];
|
|
110
129
|
/** When true, forces the agent to speak before executing the tool. */
|
|
111
130
|
require_speech_before_tool_call?: boolean;
|
|
131
|
+
/** When true, forbids the agent from speaking after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
|
|
132
|
+
forbid_speech_after_tool_call?: boolean;
|
|
112
133
|
}
|
|
113
134
|
export declare namespace CreateToolRequest {
|
|
114
135
|
/**
|
|
115
136
|
* The type of tool.
|
|
116
137
|
*/
|
|
117
|
-
type Type = "custom_webhook" | "custom_websocket" | "built_in_transfer_to_phone_number" | "built_in_transfer_to_agent";
|
|
138
|
+
type Type = "custom_context" | "custom_webhook" | "custom_websocket" | "built_in_transfer_to_phone_number" | "built_in_transfer_to_agent";
|
|
118
139
|
const Type: {
|
|
140
|
+
readonly CustomContext: "custom_context";
|
|
119
141
|
readonly CustomWebhook: "custom_webhook";
|
|
120
142
|
readonly CustomWebsocket: "custom_websocket";
|
|
121
143
|
readonly BuiltInTransferToPhoneNumber: "built_in_transfer_to_phone_number";
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
export var CreateToolRequest;
|
|
5
5
|
(function (CreateToolRequest) {
|
|
6
6
|
CreateToolRequest.Type = {
|
|
7
|
+
CustomContext: "custom_context",
|
|
7
8
|
CustomWebhook: "custom_webhook",
|
|
8
9
|
CustomWebsocket: "custom_websocket",
|
|
9
10
|
BuiltInTransferToPhoneNumber: "built_in_transfer_to_phone_number",
|
|
@@ -45,13 +45,16 @@ export interface UpdateToolRequest {
|
|
|
45
45
|
agents_to_transfer_to?: string[];
|
|
46
46
|
/** When true, forces the agent to speak before executing the tool. */
|
|
47
47
|
require_speech_before_tool_call?: boolean;
|
|
48
|
+
/** When true, forbids the agent from speaking after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
|
|
49
|
+
forbid_speech_after_tool_call?: boolean;
|
|
48
50
|
}
|
|
49
51
|
export declare namespace UpdateToolRequest {
|
|
50
52
|
/**
|
|
51
53
|
* The type of tool.
|
|
52
54
|
*/
|
|
53
|
-
type Type = "custom_webhook" | "custom_websocket" | "built_in_transfer_to_phone_number" | "built_in_transfer_to_agent";
|
|
55
|
+
type Type = "custom_context" | "custom_webhook" | "custom_websocket" | "built_in_transfer_to_phone_number" | "built_in_transfer_to_agent";
|
|
54
56
|
const Type: {
|
|
57
|
+
readonly CustomContext: "custom_context";
|
|
55
58
|
readonly CustomWebhook: "custom_webhook";
|
|
56
59
|
readonly CustomWebsocket: "custom_websocket";
|
|
57
60
|
readonly BuiltInTransferToPhoneNumber: "built_in_transfer_to_phone_number";
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
export var UpdateToolRequest;
|
|
5
5
|
(function (UpdateToolRequest) {
|
|
6
6
|
UpdateToolRequest.Type = {
|
|
7
|
+
CustomContext: "custom_context",
|
|
7
8
|
CustomWebhook: "custom_webhook",
|
|
8
9
|
CustomWebsocket: "custom_websocket",
|
|
9
10
|
BuiltInTransferToPhoneNumber: "built_in_transfer_to_phone_number",
|
|
@@ -34,6 +34,8 @@ export interface Tool {
|
|
|
34
34
|
agents_to_transfer_to?: string[];
|
|
35
35
|
/** When true, forces the agent to speak before executing the tool. */
|
|
36
36
|
require_speech_before_tool_call?: boolean;
|
|
37
|
+
/** When true, forbids the agent from speaking after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools. */
|
|
38
|
+
forbid_speech_after_tool_call?: boolean;
|
|
37
39
|
}
|
|
38
40
|
export declare namespace Tool {
|
|
39
41
|
interface Project {
|
|
@@ -43,8 +45,9 @@ export declare namespace Tool {
|
|
|
43
45
|
/**
|
|
44
46
|
* The type of tool.
|
|
45
47
|
*/
|
|
46
|
-
type Type = "custom_webhook" | "custom_websocket" | "built_in_transfer_to_phone_number" | "built_in_transfer_to_agent";
|
|
48
|
+
type Type = "custom_context" | "custom_webhook" | "custom_websocket" | "built_in_transfer_to_phone_number" | "built_in_transfer_to_agent";
|
|
47
49
|
const Type: {
|
|
50
|
+
readonly CustomContext: "custom_context";
|
|
48
51
|
readonly CustomWebhook: "custom_webhook";
|
|
49
52
|
readonly CustomWebsocket: "custom_websocket";
|
|
50
53
|
readonly BuiltInTransferToPhoneNumber: "built_in_transfer_to_phone_number";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.30.
|
|
1
|
+
export declare const SDK_VERSION = "0.30.19";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.30.
|
|
1
|
+
export const SDK_VERSION = "0.30.19";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -595,34 +595,20 @@ Creates a new tool in a project.
|
|
|
595
595
|
```typescript
|
|
596
596
|
await client.tools.create({
|
|
597
597
|
project: "main",
|
|
598
|
-
name: "
|
|
599
|
-
description: "
|
|
600
|
-
type: "
|
|
598
|
+
name: "context_printer",
|
|
599
|
+
description: "Gets the specific context for fixing our printer",
|
|
600
|
+
type: "custom_context",
|
|
601
601
|
execution_mode: "sync",
|
|
602
602
|
parameters: [
|
|
603
603
|
{
|
|
604
604
|
type: "string",
|
|
605
|
-
name: "
|
|
606
|
-
description: "
|
|
605
|
+
name: "name",
|
|
606
|
+
description: "description",
|
|
607
607
|
is_required: true,
|
|
608
|
-
location: "request_body",
|
|
609
|
-
},
|
|
610
|
-
{
|
|
611
|
-
type: "string",
|
|
612
|
-
name: "time",
|
|
613
|
-
description: "The time for the appointment in HH:MM format",
|
|
614
|
-
is_required: true,
|
|
615
|
-
location: "request_body",
|
|
616
608
|
},
|
|
617
609
|
],
|
|
618
|
-
endpoint_method: "POST",
|
|
619
|
-
endpoint_url: "https://api.example.com/book-appointment",
|
|
620
|
-
endpoint_headers: {
|
|
621
|
-
Authorization: "Bearer token123",
|
|
622
|
-
"Content-Type": "application/json",
|
|
623
|
-
},
|
|
624
|
-
endpoint_timeout_ms: 5000,
|
|
625
610
|
require_speech_before_tool_call: false,
|
|
611
|
+
forbid_speech_after_tool_call: false,
|
|
626
612
|
});
|
|
627
613
|
```
|
|
628
614
|
|