syllable-sdk 0.1.0-alpha.34 → 0.1.0-alpha.36
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/README.md +23 -0
- package/docs/sdks/agents/README.md +18 -6
- package/docs/sdks/custommessages/README.md +160 -2
- package/docs/sdks/datasources/README.md +417 -0
- package/docs/sdks/prompts/README.md +0 -8
- package/docs/sdks/sessionlabels/README.md +6 -0
- package/docs/sdks/targets/README.md +10 -18
- package/docs/sdks/tools/README.md +6 -6
- package/docs/sdks/v1/README.md +408 -0
- package/funcs/agentsCreate.js +1 -1
- package/funcs/agentsCreate.js.map +1 -1
- package/funcs/agentsDelete.js +1 -1
- package/funcs/agentsDelete.js.map +1 -1
- package/funcs/agentsUpdate.js +1 -1
- package/funcs/agentsUpdate.js.map +1 -1
- package/funcs/dataSourcesCreate.d.ts +16 -0
- package/funcs/dataSourcesCreate.d.ts.map +1 -0
- package/funcs/dataSourcesCreate.js +101 -0
- package/funcs/dataSourcesCreate.js.map +1 -0
- package/funcs/dataSourcesDataSourcesDeleteByName.d.ts +16 -0
- package/funcs/dataSourcesDataSourcesDeleteByName.d.ts.map +1 -0
- package/funcs/dataSourcesDataSourcesDeleteByName.js +111 -0
- package/funcs/dataSourcesDataSourcesDeleteByName.js.map +1 -0
- package/funcs/dataSourcesGetByName.d.ts +17 -0
- package/funcs/dataSourcesGetByName.d.ts.map +1 -0
- package/funcs/dataSourcesGetByName.js +107 -0
- package/funcs/dataSourcesGetByName.js.map +1 -0
- package/funcs/dataSourcesList.d.ts +17 -0
- package/funcs/dataSourcesList.d.ts.map +1 -0
- package/funcs/dataSourcesList.js +113 -0
- package/funcs/dataSourcesList.js.map +1 -0
- package/funcs/dataSourcesUpdate.d.ts +16 -0
- package/funcs/dataSourcesUpdate.d.ts.map +1 -0
- package/funcs/dataSourcesUpdate.js +101 -0
- package/funcs/dataSourcesUpdate.js.map +1 -0
- package/funcs/v1Create.d.ts +16 -0
- package/funcs/v1Create.d.ts.map +1 -0
- package/funcs/v1Create.js +101 -0
- package/funcs/v1Create.js.map +1 -0
- package/funcs/v1DataSourcesDeleteByName.d.ts +16 -0
- package/funcs/v1DataSourcesDeleteByName.d.ts.map +1 -0
- package/funcs/v1DataSourcesDeleteByName.js +111 -0
- package/funcs/v1DataSourcesDeleteByName.js.map +1 -0
- package/funcs/v1GetByName.d.ts +17 -0
- package/funcs/v1GetByName.d.ts.map +1 -0
- package/funcs/v1GetByName.js +107 -0
- package/funcs/v1GetByName.js.map +1 -0
- package/funcs/v1List.d.ts +17 -0
- package/funcs/v1List.d.ts.map +1 -0
- package/funcs/v1List.js +113 -0
- package/funcs/v1List.js.map +1 -0
- package/funcs/v1Update.d.ts +16 -0
- package/funcs/v1Update.d.ts.map +1 -0
- package/funcs/v1Update.js +101 -0
- package/funcs/v1Update.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/lib/retries.js +0 -1
- package/lib/retries.js.map +1 -1
- package/lib/schemas.d.ts +1 -1
- package/lib/schemas.d.ts.map +1 -1
- package/lib/schemas.js +4 -1
- package/lib/schemas.js.map +1 -1
- package/mintlify/mint.json +1 -1
- package/models/components/agentcreate.d.ts +6 -23
- package/models/components/agentcreate.d.ts.map +1 -1
- package/models/components/agentcreate.js +3 -26
- package/models/components/agentcreate.js.map +1 -1
- package/models/components/agentupdate.d.ts +6 -23
- package/models/components/agentupdate.d.ts.map +1 -1
- package/models/components/agentupdate.js +3 -26
- package/models/components/agentupdate.js.map +1 -1
- package/models/components/datasourcecreaterequest.d.ts +57 -0
- package/models/components/datasourcecreaterequest.d.ts.map +1 -0
- package/models/components/datasourcecreaterequest.js +78 -0
- package/models/components/datasourcecreaterequest.js.map +1 -0
- package/models/components/datasourcedetailresponse.d.ts +75 -0
- package/models/components/datasourcedetailresponse.d.ts.map +1 -0
- package/models/components/datasourcedetailresponse.js +90 -0
- package/models/components/datasourcedetailresponse.js.map +1 -0
- package/models/components/datasourcemetadataresponse.d.ts +70 -0
- package/models/components/datasourcemetadataresponse.d.ts.map +1 -0
- package/models/components/datasourcemetadataresponse.js +88 -0
- package/models/components/datasourcemetadataresponse.js.map +1 -0
- package/models/components/datasourceproperties.d.ts +43 -0
- package/models/components/datasourceproperties.d.ts.map +1 -0
- package/models/components/datasourceproperties.js +55 -0
- package/models/components/datasourceproperties.js.map +1 -0
- package/models/components/datasourceupdaterequest.d.ts +62 -0
- package/models/components/datasourceupdaterequest.d.ts.map +1 -0
- package/models/components/datasourceupdaterequest.js +82 -0
- package/models/components/datasourceupdaterequest.js.map +1 -0
- package/models/components/index.d.ts +6 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +6 -0
- package/models/components/index.js.map +1 -1
- package/models/components/listresponsedatasourcemetadataresponse.d.ts +38 -0
- package/models/components/listresponsedatasourcemetadataresponse.d.ts.map +1 -0
- package/models/components/listresponsedatasourcemetadataresponse.js +81 -0
- package/models/components/listresponsedatasourcemetadataresponse.js.map +1 -0
- package/models/operations/datasourcesdeletebyname.d.ts +31 -0
- package/models/operations/datasourcesdeletebyname.d.ts.map +1 -0
- package/models/operations/datasourcesdeletebyname.js +61 -0
- package/models/operations/datasourcesdeletebyname.js.map +1 -0
- package/models/operations/datasourcesgetbyname.d.ts +29 -0
- package/models/operations/datasourcesgetbyname.d.ts.map +1 -0
- package/models/operations/datasourcesgetbyname.js +59 -0
- package/models/operations/datasourcesgetbyname.js.map +1 -0
- package/models/operations/datasourceslist.d.ts +46 -0
- package/models/operations/datasourceslist.d.ts.map +1 -0
- package/models/operations/datasourceslist.js +103 -0
- package/models/operations/datasourceslist.js.map +1 -0
- package/models/operations/index.d.ts +3 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +3 -0
- package/models/operations/index.js.map +1 -1
- package/openapi.json +3080 -1612
- package/package.json +6 -7
- package/sdk/datasources.d.ts +41 -0
- package/sdk/datasources.d.ts.map +1 -0
- package/sdk/datasources.js +62 -0
- package/sdk/datasources.js.map +1 -0
- package/sdk/sdk.d.ts +5 -2
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +7 -3
- package/sdk/sdk.js.map +1 -1
- package/sdk/v1.d.ts +36 -0
- package/sdk/v1.d.ts.map +1 -1
- package/sdk/v1.js +50 -0
- package/sdk/v1.js.map +1 -1
- package/src/funcs/agentsCreate.ts +1 -1
- package/src/funcs/agentsDelete.ts +1 -1
- package/src/funcs/agentsUpdate.ts +1 -1
- package/src/funcs/dataSourcesCreate.ts +134 -0
- package/src/funcs/dataSourcesDataSourcesDeleteByName.ts +147 -0
- package/src/funcs/dataSourcesGetByName.ts +142 -0
- package/src/funcs/dataSourcesList.ts +150 -0
- package/src/funcs/dataSourcesUpdate.ts +134 -0
- package/src/funcs/v1Create.ts +134 -0
- package/src/funcs/v1DataSourcesDeleteByName.ts +147 -0
- package/src/funcs/v1GetByName.ts +142 -0
- package/src/funcs/v1List.ts +150 -0
- package/src/funcs/v1Update.ts +134 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/retries.ts +0 -1
- package/src/lib/schemas.ts +5 -0
- package/src/models/components/agentcreate.ts +4 -50
- package/src/models/components/agentupdate.ts +4 -54
- package/src/models/components/datasourcecreaterequest.ts +113 -0
- package/src/models/components/datasourcedetailresponse.ts +143 -0
- package/src/models/components/datasourcemetadataresponse.ts +136 -0
- package/src/models/components/datasourceproperties.ts +38 -0
- package/src/models/components/datasourceupdaterequest.ts +122 -0
- package/src/models/components/index.ts +6 -0
- package/src/models/components/listresponsedatasourcemetadataresponse.ts +107 -0
- package/src/models/operations/datasourcesdeletebyname.ts +72 -0
- package/src/models/operations/datasourcesgetbyname.ts +68 -0
- package/src/models/operations/datasourceslist.ts +126 -0
- package/src/models/operations/index.ts +3 -0
- package/src/sdk/datasources.ts +100 -0
- package/src/sdk/sdk.ts +11 -5
- package/src/sdk/v1.ts +91 -0
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
# DataSources
|
|
2
|
+
(*dataSources*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
Operations related to data sources. A data source is a blob of text that can be made available to an agent's general info tools to provide more context to the agent when generating its responses.
|
|
7
|
+
|
|
8
|
+
### Available Operations
|
|
9
|
+
|
|
10
|
+
* [list](#list) - List Data Sources
|
|
11
|
+
* [create](#create) - Create Data Source
|
|
12
|
+
* [update](#update) - Update Data Source
|
|
13
|
+
* [getByName](#getbyname) - Get Data Source
|
|
14
|
+
* [dataSourcesDeleteByName](#datasourcesdeletebyname) - Delete Data Source
|
|
15
|
+
|
|
16
|
+
## list
|
|
17
|
+
|
|
18
|
+
Fetch metadata about all data sources, not including their text.
|
|
19
|
+
|
|
20
|
+
### Example Usage
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import { SyllableSDK } from "syllable-sdk";
|
|
24
|
+
|
|
25
|
+
const syllableSDK = new SyllableSDK({
|
|
26
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
async function run() {
|
|
30
|
+
const result = await syllableSDK.dataSources.list({});
|
|
31
|
+
|
|
32
|
+
// Handle the result
|
|
33
|
+
console.log(result);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
run();
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Standalone function
|
|
40
|
+
|
|
41
|
+
The standalone function version of this method:
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
45
|
+
import { dataSourcesList } from "syllable-sdk/funcs/dataSourcesList.js";
|
|
46
|
+
|
|
47
|
+
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
48
|
+
// You can create one instance of it to use across an application.
|
|
49
|
+
const syllableSDK = new SyllableSDKCore({
|
|
50
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
async function run() {
|
|
54
|
+
const res = await dataSourcesList(syllableSDK, {});
|
|
55
|
+
|
|
56
|
+
if (!res.ok) {
|
|
57
|
+
throw res.error;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const { value: result } = res;
|
|
61
|
+
|
|
62
|
+
// Handle the result
|
|
63
|
+
console.log(result);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
run();
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Parameters
|
|
70
|
+
|
|
71
|
+
| Parameter | Type | Required | Description |
|
|
72
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
73
|
+
| `request` | [operations.DataSourcesListRequest](../../models/operations/datasourceslistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
74
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
75
|
+
| `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. |
|
|
76
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
77
|
+
|
|
78
|
+
### Response
|
|
79
|
+
|
|
80
|
+
**Promise\<[components.ListResponseDataSourceMetadataResponse](../../models/components/listresponsedatasourcemetadataresponse.md)\>**
|
|
81
|
+
|
|
82
|
+
### Errors
|
|
83
|
+
|
|
84
|
+
| Error Type | Status Code | Content Type |
|
|
85
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
86
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
87
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
88
|
+
|
|
89
|
+
## create
|
|
90
|
+
|
|
91
|
+
Create a new data source.
|
|
92
|
+
|
|
93
|
+
### Example Usage
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
import { SyllableSDK } from "syllable-sdk";
|
|
97
|
+
|
|
98
|
+
const syllableSDK = new SyllableSDK({
|
|
99
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
async function run() {
|
|
103
|
+
const result = await syllableSDK.dataSources.create({
|
|
104
|
+
name: "<value>",
|
|
105
|
+
labels: [
|
|
106
|
+
"Location Info",
|
|
107
|
+
],
|
|
108
|
+
chunk: true,
|
|
109
|
+
text: "<value>",
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// Handle the result
|
|
113
|
+
console.log(result);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
run();
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Standalone function
|
|
120
|
+
|
|
121
|
+
The standalone function version of this method:
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
125
|
+
import { dataSourcesCreate } from "syllable-sdk/funcs/dataSourcesCreate.js";
|
|
126
|
+
|
|
127
|
+
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
128
|
+
// You can create one instance of it to use across an application.
|
|
129
|
+
const syllableSDK = new SyllableSDKCore({
|
|
130
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
async function run() {
|
|
134
|
+
const res = await dataSourcesCreate(syllableSDK, {
|
|
135
|
+
name: "<value>",
|
|
136
|
+
labels: [
|
|
137
|
+
"Location Info",
|
|
138
|
+
],
|
|
139
|
+
chunk: true,
|
|
140
|
+
text: "<value>",
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
if (!res.ok) {
|
|
144
|
+
throw res.error;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const { value: result } = res;
|
|
148
|
+
|
|
149
|
+
// Handle the result
|
|
150
|
+
console.log(result);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
run();
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Parameters
|
|
157
|
+
|
|
158
|
+
| Parameter | Type | Required | Description |
|
|
159
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
160
|
+
| `request` | [components.DataSourceCreateRequest](../../models/components/datasourcecreaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
161
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
162
|
+
| `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. |
|
|
163
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
164
|
+
|
|
165
|
+
### Response
|
|
166
|
+
|
|
167
|
+
**Promise\<[components.DataSourceDetailResponse](../../models/components/datasourcedetailresponse.md)\>**
|
|
168
|
+
|
|
169
|
+
### Errors
|
|
170
|
+
|
|
171
|
+
| Error Type | Status Code | Content Type |
|
|
172
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
173
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
174
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
175
|
+
|
|
176
|
+
## update
|
|
177
|
+
|
|
178
|
+
Update an existing data source.
|
|
179
|
+
|
|
180
|
+
### Example Usage
|
|
181
|
+
|
|
182
|
+
```typescript
|
|
183
|
+
import { SyllableSDK } from "syllable-sdk";
|
|
184
|
+
|
|
185
|
+
const syllableSDK = new SyllableSDK({
|
|
186
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
async function run() {
|
|
190
|
+
const result = await syllableSDK.dataSources.update({
|
|
191
|
+
name: "<value>",
|
|
192
|
+
labels: [
|
|
193
|
+
"Location Info",
|
|
194
|
+
],
|
|
195
|
+
chunk: false,
|
|
196
|
+
text: "<value>",
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
// Handle the result
|
|
200
|
+
console.log(result);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
run();
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Standalone function
|
|
207
|
+
|
|
208
|
+
The standalone function version of this method:
|
|
209
|
+
|
|
210
|
+
```typescript
|
|
211
|
+
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
212
|
+
import { dataSourcesUpdate } from "syllable-sdk/funcs/dataSourcesUpdate.js";
|
|
213
|
+
|
|
214
|
+
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
215
|
+
// You can create one instance of it to use across an application.
|
|
216
|
+
const syllableSDK = new SyllableSDKCore({
|
|
217
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
async function run() {
|
|
221
|
+
const res = await dataSourcesUpdate(syllableSDK, {
|
|
222
|
+
name: "<value>",
|
|
223
|
+
labels: [
|
|
224
|
+
"Location Info",
|
|
225
|
+
],
|
|
226
|
+
chunk: false,
|
|
227
|
+
text: "<value>",
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
if (!res.ok) {
|
|
231
|
+
throw res.error;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const { value: result } = res;
|
|
235
|
+
|
|
236
|
+
// Handle the result
|
|
237
|
+
console.log(result);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
run();
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Parameters
|
|
244
|
+
|
|
245
|
+
| Parameter | Type | Required | Description |
|
|
246
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
247
|
+
| `request` | [components.DataSourceUpdateRequest](../../models/components/datasourceupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
248
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
249
|
+
| `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. |
|
|
250
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
251
|
+
|
|
252
|
+
### Response
|
|
253
|
+
|
|
254
|
+
**Promise\<[components.DataSourceDetailResponse](../../models/components/datasourcedetailresponse.md)\>**
|
|
255
|
+
|
|
256
|
+
### Errors
|
|
257
|
+
|
|
258
|
+
| Error Type | Status Code | Content Type |
|
|
259
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
260
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
261
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
262
|
+
|
|
263
|
+
## getByName
|
|
264
|
+
|
|
265
|
+
Fetch a given data source, including its text.
|
|
266
|
+
|
|
267
|
+
### Example Usage
|
|
268
|
+
|
|
269
|
+
```typescript
|
|
270
|
+
import { SyllableSDK } from "syllable-sdk";
|
|
271
|
+
|
|
272
|
+
const syllableSDK = new SyllableSDK({
|
|
273
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
async function run() {
|
|
277
|
+
const result = await syllableSDK.dataSources.getByName({
|
|
278
|
+
name: "<value>",
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
// Handle the result
|
|
282
|
+
console.log(result);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
run();
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Standalone function
|
|
289
|
+
|
|
290
|
+
The standalone function version of this method:
|
|
291
|
+
|
|
292
|
+
```typescript
|
|
293
|
+
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
294
|
+
import { dataSourcesGetByName } from "syllable-sdk/funcs/dataSourcesGetByName.js";
|
|
295
|
+
|
|
296
|
+
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
297
|
+
// You can create one instance of it to use across an application.
|
|
298
|
+
const syllableSDK = new SyllableSDKCore({
|
|
299
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
async function run() {
|
|
303
|
+
const res = await dataSourcesGetByName(syllableSDK, {
|
|
304
|
+
name: "<value>",
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
if (!res.ok) {
|
|
308
|
+
throw res.error;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
const { value: result } = res;
|
|
312
|
+
|
|
313
|
+
// Handle the result
|
|
314
|
+
console.log(result);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
run();
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Parameters
|
|
321
|
+
|
|
322
|
+
| Parameter | Type | Required | Description |
|
|
323
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
324
|
+
| `request` | [operations.DataSourcesGetByNameRequest](../../models/operations/datasourcesgetbynamerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
325
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
326
|
+
| `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. |
|
|
327
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
328
|
+
|
|
329
|
+
### Response
|
|
330
|
+
|
|
331
|
+
**Promise\<[components.DataSourceDetailResponse](../../models/components/datasourcedetailresponse.md)\>**
|
|
332
|
+
|
|
333
|
+
### Errors
|
|
334
|
+
|
|
335
|
+
| Error Type | Status Code | Content Type |
|
|
336
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
337
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
338
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
339
|
+
|
|
340
|
+
## dataSourcesDeleteByName
|
|
341
|
+
|
|
342
|
+
Delete a given data source.
|
|
343
|
+
|
|
344
|
+
### Example Usage
|
|
345
|
+
|
|
346
|
+
```typescript
|
|
347
|
+
import { SyllableSDK } from "syllable-sdk";
|
|
348
|
+
|
|
349
|
+
const syllableSDK = new SyllableSDK({
|
|
350
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
async function run() {
|
|
354
|
+
const result = await syllableSDK.dataSources.dataSourcesDeleteByName({
|
|
355
|
+
name: "<value>",
|
|
356
|
+
reason: "<value>",
|
|
357
|
+
});
|
|
358
|
+
|
|
359
|
+
// Handle the result
|
|
360
|
+
console.log(result);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
run();
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### Standalone function
|
|
367
|
+
|
|
368
|
+
The standalone function version of this method:
|
|
369
|
+
|
|
370
|
+
```typescript
|
|
371
|
+
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
372
|
+
import { dataSourcesDataSourcesDeleteByName } from "syllable-sdk/funcs/dataSourcesDataSourcesDeleteByName.js";
|
|
373
|
+
|
|
374
|
+
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
375
|
+
// You can create one instance of it to use across an application.
|
|
376
|
+
const syllableSDK = new SyllableSDKCore({
|
|
377
|
+
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
378
|
+
});
|
|
379
|
+
|
|
380
|
+
async function run() {
|
|
381
|
+
const res = await dataSourcesDataSourcesDeleteByName(syllableSDK, {
|
|
382
|
+
name: "<value>",
|
|
383
|
+
reason: "<value>",
|
|
384
|
+
});
|
|
385
|
+
|
|
386
|
+
if (!res.ok) {
|
|
387
|
+
throw res.error;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
const { value: result } = res;
|
|
391
|
+
|
|
392
|
+
// Handle the result
|
|
393
|
+
console.log(result);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
run();
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
### Parameters
|
|
400
|
+
|
|
401
|
+
| Parameter | Type | Required | Description |
|
|
402
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
403
|
+
| `request` | [operations.DataSourcesDeleteByNameRequest](../../models/operations/datasourcesdeletebynamerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
404
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
405
|
+
| `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. |
|
|
406
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
407
|
+
|
|
408
|
+
### Response
|
|
409
|
+
|
|
410
|
+
**Promise\<[any](../../models/.md)\>**
|
|
411
|
+
|
|
412
|
+
### Errors
|
|
413
|
+
|
|
414
|
+
| Error Type | Status Code | Content Type |
|
|
415
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
416
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
417
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
@@ -105,8 +105,6 @@ async function run() {
|
|
|
105
105
|
name: "<value>",
|
|
106
106
|
type: "<value>",
|
|
107
107
|
llmConfig: {
|
|
108
|
-
provider: "azure_openai",
|
|
109
|
-
model: "gpt-4o",
|
|
110
108
|
version: "2024-05-13",
|
|
111
109
|
apiVersion: "2024-06-01",
|
|
112
110
|
},
|
|
@@ -138,8 +136,6 @@ async function run() {
|
|
|
138
136
|
name: "<value>",
|
|
139
137
|
type: "<value>",
|
|
140
138
|
llmConfig: {
|
|
141
|
-
provider: "azure_openai",
|
|
142
|
-
model: "gpt-4o",
|
|
143
139
|
version: "2024-05-13",
|
|
144
140
|
apiVersion: "2024-06-01",
|
|
145
141
|
},
|
|
@@ -196,8 +192,6 @@ async function run() {
|
|
|
196
192
|
name: "<value>",
|
|
197
193
|
type: "<value>",
|
|
198
194
|
llmConfig: {
|
|
199
|
-
provider: "openai",
|
|
200
|
-
model: "gpt-4o",
|
|
201
195
|
version: "2024-05-13",
|
|
202
196
|
apiVersion: "2024-06-01",
|
|
203
197
|
},
|
|
@@ -230,8 +224,6 @@ async function run() {
|
|
|
230
224
|
name: "<value>",
|
|
231
225
|
type: "<value>",
|
|
232
226
|
llmConfig: {
|
|
233
|
-
provider: "openai",
|
|
234
|
-
model: "gpt-4o",
|
|
235
227
|
version: "2024-05-13",
|
|
236
228
|
apiVersion: "2024-06-01",
|
|
237
229
|
},
|
|
@@ -107,6 +107,9 @@ async function run() {
|
|
|
107
107
|
type: "auto-rating",
|
|
108
108
|
code: "BAD",
|
|
109
109
|
userEmail: "<value>",
|
|
110
|
+
issueCategories: [
|
|
111
|
+
"Silent treatment",
|
|
112
|
+
],
|
|
110
113
|
});
|
|
111
114
|
|
|
112
115
|
// Handle the result
|
|
@@ -136,6 +139,9 @@ async function run() {
|
|
|
136
139
|
type: "auto-rating",
|
|
137
140
|
code: "BAD",
|
|
138
141
|
userEmail: "<value>",
|
|
142
|
+
issueCategories: [
|
|
143
|
+
"Silent treatment",
|
|
144
|
+
],
|
|
139
145
|
});
|
|
140
146
|
|
|
141
147
|
if (!res.ok) {
|
|
@@ -176,12 +176,10 @@ async function run() {
|
|
|
176
176
|
const result = await syllableSDK.channels.targets.create({
|
|
177
177
|
channelId: 134365,
|
|
178
178
|
channelTargetCreateRequest: {
|
|
179
|
-
agentId:
|
|
180
|
-
channelId:
|
|
179
|
+
agentId: 486589,
|
|
180
|
+
channelId: 638424,
|
|
181
181
|
target: "<value>",
|
|
182
182
|
targetMode: "chat",
|
|
183
|
-
fallbackTarget: "<value>",
|
|
184
|
-
isTest: true,
|
|
185
183
|
},
|
|
186
184
|
});
|
|
187
185
|
|
|
@@ -210,12 +208,10 @@ async function run() {
|
|
|
210
208
|
const res = await channelsTargetsCreate(syllableSDK, {
|
|
211
209
|
channelId: 134365,
|
|
212
210
|
channelTargetCreateRequest: {
|
|
213
|
-
agentId:
|
|
214
|
-
channelId:
|
|
211
|
+
agentId: 486589,
|
|
212
|
+
channelId: 638424,
|
|
215
213
|
target: "<value>",
|
|
216
214
|
targetMode: "chat",
|
|
217
|
-
fallbackTarget: "<value>",
|
|
218
|
-
isTest: true,
|
|
219
215
|
},
|
|
220
216
|
});
|
|
221
217
|
|
|
@@ -349,13 +345,11 @@ async function run() {
|
|
|
349
345
|
channelId: 627690,
|
|
350
346
|
targetId: 488852,
|
|
351
347
|
channelTargetUpdateRequest: {
|
|
352
|
-
agentId:
|
|
348
|
+
agentId: 857478,
|
|
353
349
|
channelId: 597129,
|
|
354
350
|
target: "<value>",
|
|
355
|
-
targetMode: "
|
|
356
|
-
|
|
357
|
-
isTest: false,
|
|
358
|
-
id: 857478,
|
|
351
|
+
targetMode: "chat",
|
|
352
|
+
id: 991464,
|
|
359
353
|
},
|
|
360
354
|
});
|
|
361
355
|
|
|
@@ -385,13 +379,11 @@ async function run() {
|
|
|
385
379
|
channelId: 627690,
|
|
386
380
|
targetId: 488852,
|
|
387
381
|
channelTargetUpdateRequest: {
|
|
388
|
-
agentId:
|
|
382
|
+
agentId: 857478,
|
|
389
383
|
channelId: 597129,
|
|
390
384
|
target: "<value>",
|
|
391
|
-
targetMode: "
|
|
392
|
-
|
|
393
|
-
isTest: false,
|
|
394
|
-
id: 857478,
|
|
385
|
+
targetMode: "chat",
|
|
386
|
+
id: 991464,
|
|
395
387
|
},
|
|
396
388
|
});
|
|
397
389
|
|
|
@@ -110,7 +110,7 @@ async function run() {
|
|
|
110
110
|
},
|
|
111
111
|
},
|
|
112
112
|
},
|
|
113
|
-
serviceId:
|
|
113
|
+
serviceId: 920994,
|
|
114
114
|
});
|
|
115
115
|
|
|
116
116
|
// Handle the result
|
|
@@ -146,7 +146,7 @@ async function run() {
|
|
|
146
146
|
},
|
|
147
147
|
},
|
|
148
148
|
},
|
|
149
|
-
serviceId:
|
|
149
|
+
serviceId: 920994,
|
|
150
150
|
});
|
|
151
151
|
|
|
152
152
|
if (!res.ok) {
|
|
@@ -207,8 +207,8 @@ async function run() {
|
|
|
207
207
|
},
|
|
208
208
|
},
|
|
209
209
|
},
|
|
210
|
-
serviceId:
|
|
211
|
-
id:
|
|
210
|
+
serviceId: 243447,
|
|
211
|
+
id: 265006,
|
|
212
212
|
});
|
|
213
213
|
|
|
214
214
|
// Handle the result
|
|
@@ -244,8 +244,8 @@ async function run() {
|
|
|
244
244
|
},
|
|
245
245
|
},
|
|
246
246
|
},
|
|
247
|
-
serviceId:
|
|
248
|
-
id:
|
|
247
|
+
serviceId: 243447,
|
|
248
|
+
id: 265006,
|
|
249
249
|
});
|
|
250
250
|
|
|
251
251
|
if (!res.ok) {
|