syllable-sdk 1.0.8-rc.1 → 1.0.8-rc.3
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/bin/mcp-server.js +135 -59
- package/bin/mcp-server.js.map +13 -12
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/components/daotoolresponse.d.ts +80 -0
- package/models/components/daotoolresponse.d.ts.map +1 -0
- package/models/components/daotoolresponse.js +111 -0
- package/models/components/daotoolresponse.js.map +1 -0
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/promptcreaterequest.d.ts +5 -0
- package/models/components/promptcreaterequest.d.ts.map +1 -1
- package/models/components/promptcreaterequest.js +4 -0
- package/models/components/promptcreaterequest.js.map +1 -1
- package/models/components/promptresponse.d.ts +11 -0
- package/models/components/promptresponse.d.ts.map +1 -1
- package/models/components/promptresponse.js +9 -0
- package/models/components/promptresponse.js.map +1 -1
- package/models/components/promptupdaterequest.d.ts +5 -0
- package/models/components/promptupdaterequest.d.ts.map +1 -1
- package/models/components/promptupdaterequest.js +4 -0
- package/models/components/promptupdaterequest.js.map +1 -1
- package/openapi.json +243 -33
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/daotoolresponse.ts +171 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/promptcreaterequest.ts +9 -0
- package/src/models/components/promptresponse.ts +24 -0
- package/src/models/components/promptupdaterequest.ts +9 -0
- package/.devcontainer/README.md +0 -35
- package/api-reference/sdks/agents/README.md +0 -224
- package/api-reference/sdks/availabletargets/README.md +0 -49
- package/api-reference/sdks/channels/README.md +0 -92
- package/api-reference/sdks/chats/README.md +0 -55
- package/api-reference/sdks/conversations/README.md +0 -91
- package/api-reference/sdks/dashboards/README.md +0 -321
- package/api-reference/sdks/events/README.md +0 -50
- package/api-reference/sdks/greetings/README.md +0 -223
- package/api-reference/sdks/organizations/README.md +0 -48
- package/api-reference/sdks/prompts/README.md +0 -225
- package/api-reference/sdks/sessions/README.md +0 -50
- package/api-reference/sdks/syllable/README.md +0 -22
- package/api-reference/sdks/targets/README.md +0 -194
- package/api-reference/sdks/tools/README.md +0 -92
- package/docs/sdks/agents/README.md +0 -589
- package/docs/sdks/batches/README.md +0 -742
- package/docs/sdks/campaigns/README.md +0 -526
- package/docs/sdks/channels/README.md +0 -401
- package/docs/sdks/conversations/README.md +0 -100
- package/docs/sdks/custommessages/README.md +0 -496
- package/docs/sdks/dashboards/README.md +0 -481
- package/docs/sdks/datasources/README.md +0 -458
- package/docs/sdks/directory/README.md +0 -727
- package/docs/sdks/events/README.md +0 -100
- package/docs/sdks/folders/README.md +0 -675
- package/docs/sdks/fullsummary/README.md +0 -82
- package/docs/sdks/incidents/README.md +0 -501
- package/docs/sdks/insights/README.md +0 -100
- package/docs/sdks/languagegroups/README.md +0 -565
- package/docs/sdks/latency/README.md +0 -82
- package/docs/sdks/numbers/README.md +0 -250
- package/docs/sdks/organizations/README.md +0 -317
- package/docs/sdks/permissions/README.md +0 -78
- package/docs/sdks/prompts/README.md +0 -592
- package/docs/sdks/pronunciations/README.md +0 -360
- package/docs/sdks/roles/README.md +0 -430
- package/docs/sdks/services/README.md +0 -430
- package/docs/sdks/sessiondebug/README.md +0 -236
- package/docs/sdks/sessionlabels/README.md +0 -262
- package/docs/sdks/sessions/README.md +0 -325
- package/docs/sdks/syllablesdktools/README.md +0 -578
- package/docs/sdks/takeouts/README.md +0 -228
- package/docs/sdks/targets/README.md +0 -454
- package/docs/sdks/test/README.md +0 -92
- package/docs/sdks/tools/README.md +0 -518
- package/docs/sdks/transcript/README.md +0 -82
- package/docs/sdks/twilio/README.md +0 -246
- package/docs/sdks/users/README.md +0 -561
- package/docs/sdks/v1/README.md +0 -561
- package/docs/sdks/voicegroups/README.md +0 -551
- package/docs/sdks/workflows/README.md +0 -781
- package/examples/README.md +0 -31
|
@@ -1,578 +0,0 @@
|
|
|
1
|
-
# SyllableSDKTools
|
|
2
|
-
(*insights.tools*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
Operations related to insights tool configurationss. An insight is a tool that processes conversation data to extract information and generate reports.
|
|
7
|
-
|
|
8
|
-
### Available Operations
|
|
9
|
-
|
|
10
|
-
* [list](#list) - List Insight Tool Configurations
|
|
11
|
-
* [create](#create) - Create Insight Tool Configuration
|
|
12
|
-
* [getById](#getbyid) - Get Insight Tool Config By Id
|
|
13
|
-
* [delete](#delete) - Delete Insight Tool Configuration
|
|
14
|
-
* [update](#update) - Update Insights Tool Configuration
|
|
15
|
-
* [insightsToolTest](#insightstooltest) - Test Insights Tool
|
|
16
|
-
* [insightToolGetDefinitions](#insighttoolgetdefinitions) - Get Insight Tool Definitions
|
|
17
|
-
|
|
18
|
-
## list
|
|
19
|
-
|
|
20
|
-
List the existing insight_tools
|
|
21
|
-
|
|
22
|
-
### Example Usage
|
|
23
|
-
|
|
24
|
-
<!-- UsageSnippet language="typescript" operationID="insight_tool_list" method="get" path="/api/v1/insights/tool-configurations" -->
|
|
25
|
-
```typescript
|
|
26
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
27
|
-
|
|
28
|
-
const syllableSDK = new SyllableSDK({
|
|
29
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
async function run() {
|
|
33
|
-
const result = await syllableSDK.insights.tools.list({
|
|
34
|
-
page: 0,
|
|
35
|
-
searchFields: [
|
|
36
|
-
"name",
|
|
37
|
-
],
|
|
38
|
-
searchFieldValues: [
|
|
39
|
-
"Some Object Name",
|
|
40
|
-
],
|
|
41
|
-
startDatetime: "2023-01-01T00:00:00Z",
|
|
42
|
-
endDatetime: "2024-01-01T00:00:00Z",
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
console.log(result);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
run();
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Standalone function
|
|
52
|
-
|
|
53
|
-
The standalone function version of this method:
|
|
54
|
-
|
|
55
|
-
```typescript
|
|
56
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
57
|
-
import { insightsToolsList } from "syllable-sdk/funcs/insightsToolsList.js";
|
|
58
|
-
|
|
59
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
60
|
-
// You can create one instance of it to use across an application.
|
|
61
|
-
const syllableSDK = new SyllableSDKCore({
|
|
62
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
async function run() {
|
|
66
|
-
const res = await insightsToolsList(syllableSDK, {
|
|
67
|
-
page: 0,
|
|
68
|
-
searchFields: [
|
|
69
|
-
"name",
|
|
70
|
-
],
|
|
71
|
-
searchFieldValues: [
|
|
72
|
-
"Some Object Name",
|
|
73
|
-
],
|
|
74
|
-
startDatetime: "2023-01-01T00:00:00Z",
|
|
75
|
-
endDatetime: "2024-01-01T00:00:00Z",
|
|
76
|
-
});
|
|
77
|
-
if (res.ok) {
|
|
78
|
-
const { value: result } = res;
|
|
79
|
-
console.log(result);
|
|
80
|
-
} else {
|
|
81
|
-
console.log("insightsToolsList failed:", res.error);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
run();
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Parameters
|
|
89
|
-
|
|
90
|
-
| Parameter | Type | Required | Description |
|
|
91
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
92
|
-
| `request` | [operations.InsightToolListRequest](../../models/operations/insighttoollistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
93
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
94
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
95
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
96
|
-
|
|
97
|
-
### Response
|
|
98
|
-
|
|
99
|
-
**Promise\<[components.ListResponseInsightToolOutput](../../models/components/listresponseinsighttooloutput.md)\>**
|
|
100
|
-
|
|
101
|
-
### Errors
|
|
102
|
-
|
|
103
|
-
| Error Type | Status Code | Content Type |
|
|
104
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
105
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
106
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
107
|
-
|
|
108
|
-
## create
|
|
109
|
-
|
|
110
|
-
Create a new insight tool.
|
|
111
|
-
|
|
112
|
-
### Example Usage
|
|
113
|
-
|
|
114
|
-
<!-- UsageSnippet language="typescript" operationID="insights_tool_create" method="post" path="/api/v1/insights/tool-configurations" -->
|
|
115
|
-
```typescript
|
|
116
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
117
|
-
|
|
118
|
-
const syllableSDK = new SyllableSDK({
|
|
119
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
async function run() {
|
|
123
|
-
const result = await syllableSDK.insights.tools.create({
|
|
124
|
-
name: "summary-tool",
|
|
125
|
-
description: "This tool uses GPT4.1 to generate a summary of the call",
|
|
126
|
-
version: 1,
|
|
127
|
-
toolArguments: {
|
|
128
|
-
"prompt": "Provide a concise, accurate summary of the conversation's key points, focusing on the user's goal and how the agent responded",
|
|
129
|
-
},
|
|
130
|
-
insightToolDefinitionId: 1,
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
console.log(result);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
run();
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### Standalone function
|
|
140
|
-
|
|
141
|
-
The standalone function version of this method:
|
|
142
|
-
|
|
143
|
-
```typescript
|
|
144
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
145
|
-
import { insightsToolsCreate } from "syllable-sdk/funcs/insightsToolsCreate.js";
|
|
146
|
-
|
|
147
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
148
|
-
// You can create one instance of it to use across an application.
|
|
149
|
-
const syllableSDK = new SyllableSDKCore({
|
|
150
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
async function run() {
|
|
154
|
-
const res = await insightsToolsCreate(syllableSDK, {
|
|
155
|
-
name: "summary-tool",
|
|
156
|
-
description: "This tool uses GPT4.1 to generate a summary of the call",
|
|
157
|
-
version: 1,
|
|
158
|
-
toolArguments: {
|
|
159
|
-
"prompt": "Provide a concise, accurate summary of the conversation's key points, focusing on the user's goal and how the agent responded",
|
|
160
|
-
},
|
|
161
|
-
insightToolDefinitionId: 1,
|
|
162
|
-
});
|
|
163
|
-
if (res.ok) {
|
|
164
|
-
const { value: result } = res;
|
|
165
|
-
console.log(result);
|
|
166
|
-
} else {
|
|
167
|
-
console.log("insightsToolsCreate failed:", res.error);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
run();
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
### Parameters
|
|
175
|
-
|
|
176
|
-
| Parameter | Type | Required | Description |
|
|
177
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
178
|
-
| `request` | [components.InsightToolInput](../../models/components/insighttoolinput.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
179
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
180
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
181
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
182
|
-
|
|
183
|
-
### Response
|
|
184
|
-
|
|
185
|
-
**Promise\<[components.InsightToolOutput](../../models/components/insighttooloutput.md)\>**
|
|
186
|
-
|
|
187
|
-
### Errors
|
|
188
|
-
|
|
189
|
-
| Error Type | Status Code | Content Type |
|
|
190
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
191
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
192
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
193
|
-
|
|
194
|
-
## getById
|
|
195
|
-
|
|
196
|
-
Get a InsightTool by Name.
|
|
197
|
-
|
|
198
|
-
### Example Usage
|
|
199
|
-
|
|
200
|
-
<!-- UsageSnippet language="typescript" operationID="insight_tool_get_by_id" method="get" path="/api/v1/insights/tool-configurations/{tool_id}" -->
|
|
201
|
-
```typescript
|
|
202
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
203
|
-
|
|
204
|
-
const syllableSDK = new SyllableSDK({
|
|
205
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
async function run() {
|
|
209
|
-
const result = await syllableSDK.insights.tools.getById({
|
|
210
|
-
toolId: "<id>",
|
|
211
|
-
});
|
|
212
|
-
|
|
213
|
-
console.log(result);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
run();
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### Standalone function
|
|
220
|
-
|
|
221
|
-
The standalone function version of this method:
|
|
222
|
-
|
|
223
|
-
```typescript
|
|
224
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
225
|
-
import { insightsToolsGetById } from "syllable-sdk/funcs/insightsToolsGetById.js";
|
|
226
|
-
|
|
227
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
228
|
-
// You can create one instance of it to use across an application.
|
|
229
|
-
const syllableSDK = new SyllableSDKCore({
|
|
230
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
async function run() {
|
|
234
|
-
const res = await insightsToolsGetById(syllableSDK, {
|
|
235
|
-
toolId: "<id>",
|
|
236
|
-
});
|
|
237
|
-
if (res.ok) {
|
|
238
|
-
const { value: result } = res;
|
|
239
|
-
console.log(result);
|
|
240
|
-
} else {
|
|
241
|
-
console.log("insightsToolsGetById failed:", res.error);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
run();
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
### Parameters
|
|
249
|
-
|
|
250
|
-
| Parameter | Type | Required | Description |
|
|
251
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
252
|
-
| `request` | [operations.InsightToolGetByIdRequest](../../models/operations/insighttoolgetbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
253
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
254
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
255
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
256
|
-
|
|
257
|
-
### Response
|
|
258
|
-
|
|
259
|
-
**Promise\<[components.InsightToolOutput](../../models/components/insighttooloutput.md)\>**
|
|
260
|
-
|
|
261
|
-
### Errors
|
|
262
|
-
|
|
263
|
-
| Error Type | Status Code | Content Type |
|
|
264
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
265
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
266
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
267
|
-
|
|
268
|
-
## delete
|
|
269
|
-
|
|
270
|
-
Delete an Insights tool configuration.
|
|
271
|
-
|
|
272
|
-
### Example Usage
|
|
273
|
-
|
|
274
|
-
<!-- UsageSnippet language="typescript" operationID="insights_tool_delete" method="delete" path="/api/v1/insights/tool-configurations/{tool_id}" -->
|
|
275
|
-
```typescript
|
|
276
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
277
|
-
|
|
278
|
-
const syllableSDK = new SyllableSDK({
|
|
279
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
280
|
-
});
|
|
281
|
-
|
|
282
|
-
async function run() {
|
|
283
|
-
const result = await syllableSDK.insights.tools.delete({
|
|
284
|
-
toolId: 770449,
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
console.log(result);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
run();
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
### Standalone function
|
|
294
|
-
|
|
295
|
-
The standalone function version of this method:
|
|
296
|
-
|
|
297
|
-
```typescript
|
|
298
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
299
|
-
import { insightsToolsDelete } from "syllable-sdk/funcs/insightsToolsDelete.js";
|
|
300
|
-
|
|
301
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
302
|
-
// You can create one instance of it to use across an application.
|
|
303
|
-
const syllableSDK = new SyllableSDKCore({
|
|
304
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
305
|
-
});
|
|
306
|
-
|
|
307
|
-
async function run() {
|
|
308
|
-
const res = await insightsToolsDelete(syllableSDK, {
|
|
309
|
-
toolId: 770449,
|
|
310
|
-
});
|
|
311
|
-
if (res.ok) {
|
|
312
|
-
const { value: result } = res;
|
|
313
|
-
console.log(result);
|
|
314
|
-
} else {
|
|
315
|
-
console.log("insightsToolsDelete failed:", res.error);
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
run();
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
### Parameters
|
|
323
|
-
|
|
324
|
-
| Parameter | Type | Required | Description |
|
|
325
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
326
|
-
| `request` | [operations.InsightsToolDeleteRequest](../../models/operations/insightstooldeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
327
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
328
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
329
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
330
|
-
|
|
331
|
-
### Response
|
|
332
|
-
|
|
333
|
-
**Promise\<[any](../../models/.md)\>**
|
|
334
|
-
|
|
335
|
-
### Errors
|
|
336
|
-
|
|
337
|
-
| Error Type | Status Code | Content Type |
|
|
338
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
339
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
340
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
341
|
-
|
|
342
|
-
## update
|
|
343
|
-
|
|
344
|
-
Update an Insights tool.
|
|
345
|
-
|
|
346
|
-
### Example Usage
|
|
347
|
-
|
|
348
|
-
<!-- UsageSnippet language="typescript" operationID="insights_tool_update" method="put" path="/api/v1/insights/tool-configurations/{tool_id}" -->
|
|
349
|
-
```typescript
|
|
350
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
351
|
-
|
|
352
|
-
const syllableSDK = new SyllableSDK({
|
|
353
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
354
|
-
});
|
|
355
|
-
|
|
356
|
-
async function run() {
|
|
357
|
-
const result = await syllableSDK.insights.tools.update({
|
|
358
|
-
toolId: 368362,
|
|
359
|
-
insightToolInput: {
|
|
360
|
-
name: "summary-tool",
|
|
361
|
-
description: "This tool uses GPT4.1 to generate a summary of the call",
|
|
362
|
-
version: 1,
|
|
363
|
-
toolArguments: {
|
|
364
|
-
"prompt": "Provide a concise, accurate summary of the conversation's key points, focusing on the user's goal and how the agent responded",
|
|
365
|
-
},
|
|
366
|
-
insightToolDefinitionId: 1,
|
|
367
|
-
},
|
|
368
|
-
});
|
|
369
|
-
|
|
370
|
-
console.log(result);
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
run();
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
### Standalone function
|
|
377
|
-
|
|
378
|
-
The standalone function version of this method:
|
|
379
|
-
|
|
380
|
-
```typescript
|
|
381
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
382
|
-
import { insightsToolsUpdate } from "syllable-sdk/funcs/insightsToolsUpdate.js";
|
|
383
|
-
|
|
384
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
385
|
-
// You can create one instance of it to use across an application.
|
|
386
|
-
const syllableSDK = new SyllableSDKCore({
|
|
387
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
388
|
-
});
|
|
389
|
-
|
|
390
|
-
async function run() {
|
|
391
|
-
const res = await insightsToolsUpdate(syllableSDK, {
|
|
392
|
-
toolId: 368362,
|
|
393
|
-
insightToolInput: {
|
|
394
|
-
name: "summary-tool",
|
|
395
|
-
description: "This tool uses GPT4.1 to generate a summary of the call",
|
|
396
|
-
version: 1,
|
|
397
|
-
toolArguments: {
|
|
398
|
-
"prompt": "Provide a concise, accurate summary of the conversation's key points, focusing on the user's goal and how the agent responded",
|
|
399
|
-
},
|
|
400
|
-
insightToolDefinitionId: 1,
|
|
401
|
-
},
|
|
402
|
-
});
|
|
403
|
-
if (res.ok) {
|
|
404
|
-
const { value: result } = res;
|
|
405
|
-
console.log(result);
|
|
406
|
-
} else {
|
|
407
|
-
console.log("insightsToolsUpdate failed:", res.error);
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
run();
|
|
412
|
-
```
|
|
413
|
-
|
|
414
|
-
### Parameters
|
|
415
|
-
|
|
416
|
-
| Parameter | Type | Required | Description |
|
|
417
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
418
|
-
| `request` | [operations.InsightsToolUpdateRequest](../../models/operations/insightstoolupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
419
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
420
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
421
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
422
|
-
|
|
423
|
-
### Response
|
|
424
|
-
|
|
425
|
-
**Promise\<[components.InsightToolOutput](../../models/components/insighttooloutput.md)\>**
|
|
426
|
-
|
|
427
|
-
### Errors
|
|
428
|
-
|
|
429
|
-
| Error Type | Status Code | Content Type |
|
|
430
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
431
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
432
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
433
|
-
|
|
434
|
-
## insightsToolTest
|
|
435
|
-
|
|
436
|
-
Manually run the given insight tool against a session and return the response.
|
|
437
|
-
|
|
438
|
-
### Example Usage
|
|
439
|
-
|
|
440
|
-
<!-- UsageSnippet language="typescript" operationID="insights_tool_test" method="post" path="/api/v1/insights/tools-test" -->
|
|
441
|
-
```typescript
|
|
442
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
443
|
-
|
|
444
|
-
const syllableSDK = new SyllableSDK({
|
|
445
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
446
|
-
});
|
|
447
|
-
|
|
448
|
-
async function run() {
|
|
449
|
-
const result = await syllableSDK.insights.tools.insightsToolTest({
|
|
450
|
-
toolName: "summary-tool",
|
|
451
|
-
sessionId: 283467,
|
|
452
|
-
uploadFileId: 283467,
|
|
453
|
-
});
|
|
454
|
-
|
|
455
|
-
console.log(result);
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
run();
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
### Standalone function
|
|
462
|
-
|
|
463
|
-
The standalone function version of this method:
|
|
464
|
-
|
|
465
|
-
```typescript
|
|
466
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
467
|
-
import { insightsToolsInsightsToolTest } from "syllable-sdk/funcs/insightsToolsInsightsToolTest.js";
|
|
468
|
-
|
|
469
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
470
|
-
// You can create one instance of it to use across an application.
|
|
471
|
-
const syllableSDK = new SyllableSDKCore({
|
|
472
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
473
|
-
});
|
|
474
|
-
|
|
475
|
-
async function run() {
|
|
476
|
-
const res = await insightsToolsInsightsToolTest(syllableSDK, {
|
|
477
|
-
toolName: "summary-tool",
|
|
478
|
-
sessionId: 283467,
|
|
479
|
-
uploadFileId: 283467,
|
|
480
|
-
});
|
|
481
|
-
if (res.ok) {
|
|
482
|
-
const { value: result } = res;
|
|
483
|
-
console.log(result);
|
|
484
|
-
} else {
|
|
485
|
-
console.log("insightsToolsInsightsToolTest failed:", res.error);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
run();
|
|
490
|
-
```
|
|
491
|
-
|
|
492
|
-
### Parameters
|
|
493
|
-
|
|
494
|
-
| Parameter | Type | Required | Description |
|
|
495
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
496
|
-
| `request` | [components.InsightToolTestInput](../../models/components/insighttooltestinput.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
497
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
498
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
499
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
500
|
-
|
|
501
|
-
### Response
|
|
502
|
-
|
|
503
|
-
**Promise\<[any](../../models/.md)\>**
|
|
504
|
-
|
|
505
|
-
### Errors
|
|
506
|
-
|
|
507
|
-
| Error Type | Status Code | Content Type |
|
|
508
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
509
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
510
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
511
|
-
|
|
512
|
-
## insightToolGetDefinitions
|
|
513
|
-
|
|
514
|
-
Get a InsightTool by Name.
|
|
515
|
-
|
|
516
|
-
### Example Usage
|
|
517
|
-
|
|
518
|
-
<!-- UsageSnippet language="typescript" operationID="insight_tool_get_definitions" method="get" path="/api/v1/insights/tool-definitions" -->
|
|
519
|
-
```typescript
|
|
520
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
521
|
-
|
|
522
|
-
const syllableSDK = new SyllableSDK({
|
|
523
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
524
|
-
});
|
|
525
|
-
|
|
526
|
-
async function run() {
|
|
527
|
-
const result = await syllableSDK.insights.tools.insightToolGetDefinitions();
|
|
528
|
-
|
|
529
|
-
console.log(result);
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
run();
|
|
533
|
-
```
|
|
534
|
-
|
|
535
|
-
### Standalone function
|
|
536
|
-
|
|
537
|
-
The standalone function version of this method:
|
|
538
|
-
|
|
539
|
-
```typescript
|
|
540
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
541
|
-
import { insightsToolsInsightToolGetDefinitions } from "syllable-sdk/funcs/insightsToolsInsightToolGetDefinitions.js";
|
|
542
|
-
|
|
543
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
544
|
-
// You can create one instance of it to use across an application.
|
|
545
|
-
const syllableSDK = new SyllableSDKCore({
|
|
546
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
547
|
-
});
|
|
548
|
-
|
|
549
|
-
async function run() {
|
|
550
|
-
const res = await insightsToolsInsightToolGetDefinitions(syllableSDK);
|
|
551
|
-
if (res.ok) {
|
|
552
|
-
const { value: result } = res;
|
|
553
|
-
console.log(result);
|
|
554
|
-
} else {
|
|
555
|
-
console.log("insightsToolsInsightToolGetDefinitions failed:", res.error);
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
run();
|
|
560
|
-
```
|
|
561
|
-
|
|
562
|
-
### Parameters
|
|
563
|
-
|
|
564
|
-
| Parameter | Type | Required | Description |
|
|
565
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
566
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
567
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
568
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
569
|
-
|
|
570
|
-
### Response
|
|
571
|
-
|
|
572
|
-
**Promise\<[components.InsightToolDefinition[]](../../models/.md)\>**
|
|
573
|
-
|
|
574
|
-
### Errors
|
|
575
|
-
|
|
576
|
-
| Error Type | Status Code | Content Type |
|
|
577
|
-
| --------------- | --------------- | --------------- |
|
|
578
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|