syllable-sdk 1.0.8-rc.1 → 1.0.8-rc.2

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 (66) hide show
  1. package/bin/mcp-server.js +6 -6
  2. package/bin/mcp-server.js.map +4 -4
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/openapi.json +33 -33
  10. package/package.json +1 -1
  11. package/src/lib/config.ts +3 -3
  12. package/src/mcp-server/mcp-server.ts +1 -1
  13. package/src/mcp-server/server.ts +1 -1
  14. package/.devcontainer/README.md +0 -35
  15. package/api-reference/sdks/agents/README.md +0 -224
  16. package/api-reference/sdks/availabletargets/README.md +0 -49
  17. package/api-reference/sdks/channels/README.md +0 -92
  18. package/api-reference/sdks/chats/README.md +0 -55
  19. package/api-reference/sdks/conversations/README.md +0 -91
  20. package/api-reference/sdks/dashboards/README.md +0 -321
  21. package/api-reference/sdks/events/README.md +0 -50
  22. package/api-reference/sdks/greetings/README.md +0 -223
  23. package/api-reference/sdks/organizations/README.md +0 -48
  24. package/api-reference/sdks/prompts/README.md +0 -225
  25. package/api-reference/sdks/sessions/README.md +0 -50
  26. package/api-reference/sdks/syllable/README.md +0 -22
  27. package/api-reference/sdks/targets/README.md +0 -194
  28. package/api-reference/sdks/tools/README.md +0 -92
  29. package/docs/sdks/agents/README.md +0 -589
  30. package/docs/sdks/batches/README.md +0 -742
  31. package/docs/sdks/campaigns/README.md +0 -526
  32. package/docs/sdks/channels/README.md +0 -401
  33. package/docs/sdks/conversations/README.md +0 -100
  34. package/docs/sdks/custommessages/README.md +0 -496
  35. package/docs/sdks/dashboards/README.md +0 -481
  36. package/docs/sdks/datasources/README.md +0 -458
  37. package/docs/sdks/directory/README.md +0 -727
  38. package/docs/sdks/events/README.md +0 -100
  39. package/docs/sdks/folders/README.md +0 -675
  40. package/docs/sdks/fullsummary/README.md +0 -82
  41. package/docs/sdks/incidents/README.md +0 -501
  42. package/docs/sdks/insights/README.md +0 -100
  43. package/docs/sdks/languagegroups/README.md +0 -565
  44. package/docs/sdks/latency/README.md +0 -82
  45. package/docs/sdks/numbers/README.md +0 -250
  46. package/docs/sdks/organizations/README.md +0 -317
  47. package/docs/sdks/permissions/README.md +0 -78
  48. package/docs/sdks/prompts/README.md +0 -592
  49. package/docs/sdks/pronunciations/README.md +0 -360
  50. package/docs/sdks/roles/README.md +0 -430
  51. package/docs/sdks/services/README.md +0 -430
  52. package/docs/sdks/sessiondebug/README.md +0 -236
  53. package/docs/sdks/sessionlabels/README.md +0 -262
  54. package/docs/sdks/sessions/README.md +0 -325
  55. package/docs/sdks/syllablesdktools/README.md +0 -578
  56. package/docs/sdks/takeouts/README.md +0 -228
  57. package/docs/sdks/targets/README.md +0 -454
  58. package/docs/sdks/test/README.md +0 -92
  59. package/docs/sdks/tools/README.md +0 -518
  60. package/docs/sdks/transcript/README.md +0 -82
  61. package/docs/sdks/twilio/README.md +0 -246
  62. package/docs/sdks/users/README.md +0 -561
  63. package/docs/sdks/v1/README.md +0 -561
  64. package/docs/sdks/voicegroups/README.md +0 -551
  65. package/docs/sdks/workflows/README.md +0 -781
  66. package/examples/README.md +0 -31
@@ -1,592 +0,0 @@
1
- # Prompts
2
- (*prompts*)
3
-
4
- ## Overview
5
-
6
- Operations related to prompts. A prompt defines the behavior of an agent by delivering instructions to the LLM about how the agent should behave. A prompt can be linked to one or more agents. A prompt can also be linked to tools to allow an agent using the prompt to use them. For more information, see [Console docs](https://docs.syllable.ai/Resources/Prompts).
7
-
8
- ### Available Operations
9
-
10
- * [list](#list) - Prompt List
11
- * [create](#create) - Create Prompt
12
- * [update](#update) - Update Prompt
13
- * [getById](#getbyid) - Get Prompt By Id
14
- * [delete](#delete) - Delete Prompt
15
- * [promptsHistory](#promptshistory) - Get Prompt History
16
- * [promptGetSupportedLlms](#promptgetsupportedllms) - Get Supported Llm Configs
17
-
18
- ## list
19
-
20
- List the existing prompts
21
-
22
- ### Example Usage
23
-
24
- <!-- UsageSnippet language="typescript" operationID="prompts_list" method="get" path="/api/v1/prompts/" -->
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.prompts.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 { promptsList } from "syllable-sdk/funcs/promptsList.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 promptsList(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("promptsList failed:", res.error);
82
- }
83
- }
84
-
85
- run();
86
- ```
87
-
88
- ### Parameters
89
-
90
- | Parameter | Type | Required | Description |
91
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
92
- | `request` | [operations.PromptsListRequest](../../models/operations/promptslistrequest.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.ListResponsePromptResponse](../../models/components/listresponsepromptresponse.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 prompt
111
-
112
- ### Example Usage
113
-
114
- <!-- UsageSnippet language="typescript" operationID="prompts_create" method="post" path="/api/v1/prompts/" -->
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.prompts.create({
124
- name: "Weather Agent Prompt",
125
- description: "Prompt for a weather agent.",
126
- type: "prompt_v1",
127
- context: "You are a weather agent. Answer the user's questions about weather and nothing else.",
128
- tools: [],
129
- llmConfig: {
130
- version: "2024-05-13",
131
- apiVersion: "2024-06-01",
132
- temperature: 1,
133
- seed: 123,
134
- },
135
- editComments: "Updated prompt text to include requirement to not answer questions that aren't about weather.",
136
- });
137
-
138
- console.log(result);
139
- }
140
-
141
- run();
142
- ```
143
-
144
- ### Standalone function
145
-
146
- The standalone function version of this method:
147
-
148
- ```typescript
149
- import { SyllableSDKCore } from "syllable-sdk/core.js";
150
- import { promptsCreate } from "syllable-sdk/funcs/promptsCreate.js";
151
-
152
- // Use `SyllableSDKCore` for best tree-shaking performance.
153
- // You can create one instance of it to use across an application.
154
- const syllableSDK = new SyllableSDKCore({
155
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
156
- });
157
-
158
- async function run() {
159
- const res = await promptsCreate(syllableSDK, {
160
- name: "Weather Agent Prompt",
161
- description: "Prompt for a weather agent.",
162
- type: "prompt_v1",
163
- context: "You are a weather agent. Answer the user's questions about weather and nothing else.",
164
- tools: [],
165
- llmConfig: {
166
- version: "2024-05-13",
167
- apiVersion: "2024-06-01",
168
- temperature: 1,
169
- seed: 123,
170
- },
171
- editComments: "Updated prompt text to include requirement to not answer questions that aren't about weather.",
172
- });
173
- if (res.ok) {
174
- const { value: result } = res;
175
- console.log(result);
176
- } else {
177
- console.log("promptsCreate failed:", res.error);
178
- }
179
- }
180
-
181
- run();
182
- ```
183
-
184
- ### Parameters
185
-
186
- | Parameter | Type | Required | Description |
187
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
188
- | `request` | [components.PromptCreateRequest](../../models/components/promptcreaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
189
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
190
- | `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. |
191
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
192
-
193
- ### Response
194
-
195
- **Promise\<[components.PromptResponse](../../models/components/promptresponse.md)\>**
196
-
197
- ### Errors
198
-
199
- | Error Type | Status Code | Content Type |
200
- | -------------------------- | -------------------------- | -------------------------- |
201
- | errors.HTTPValidationError | 422 | application/json |
202
- | errors.SDKError | 4XX, 5XX | \*/\* |
203
-
204
- ## update
205
-
206
- Update an existing prompt
207
-
208
- ### Example Usage
209
-
210
- <!-- UsageSnippet language="typescript" operationID="prompts_update" method="put" path="/api/v1/prompts/" -->
211
- ```typescript
212
- import { SyllableSDK } from "syllable-sdk";
213
-
214
- const syllableSDK = new SyllableSDK({
215
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
216
- });
217
-
218
- async function run() {
219
- const result = await syllableSDK.prompts.update({
220
- name: "Weather Agent Prompt",
221
- description: "Prompt for a weather agent.",
222
- type: "prompt_v1",
223
- context: "You are a weather agent. Answer the user's questions about weather and nothing else.",
224
- tools: [],
225
- llmConfig: {
226
- version: "2024-05-13",
227
- apiVersion: "2024-06-01",
228
- temperature: 1,
229
- seed: 123,
230
- },
231
- editComments: "Updated prompt text to include requirement to not answer questions that aren't about weather.",
232
- id: 1,
233
- });
234
-
235
- console.log(result);
236
- }
237
-
238
- run();
239
- ```
240
-
241
- ### Standalone function
242
-
243
- The standalone function version of this method:
244
-
245
- ```typescript
246
- import { SyllableSDKCore } from "syllable-sdk/core.js";
247
- import { promptsUpdate } from "syllable-sdk/funcs/promptsUpdate.js";
248
-
249
- // Use `SyllableSDKCore` for best tree-shaking performance.
250
- // You can create one instance of it to use across an application.
251
- const syllableSDK = new SyllableSDKCore({
252
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
253
- });
254
-
255
- async function run() {
256
- const res = await promptsUpdate(syllableSDK, {
257
- name: "Weather Agent Prompt",
258
- description: "Prompt for a weather agent.",
259
- type: "prompt_v1",
260
- context: "You are a weather agent. Answer the user's questions about weather and nothing else.",
261
- tools: [],
262
- llmConfig: {
263
- version: "2024-05-13",
264
- apiVersion: "2024-06-01",
265
- temperature: 1,
266
- seed: 123,
267
- },
268
- editComments: "Updated prompt text to include requirement to not answer questions that aren't about weather.",
269
- id: 1,
270
- });
271
- if (res.ok) {
272
- const { value: result } = res;
273
- console.log(result);
274
- } else {
275
- console.log("promptsUpdate failed:", res.error);
276
- }
277
- }
278
-
279
- run();
280
- ```
281
-
282
- ### Parameters
283
-
284
- | Parameter | Type | Required | Description |
285
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
286
- | `request` | [components.PromptUpdateRequest](../../models/components/promptupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
287
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
288
- | `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. |
289
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
290
-
291
- ### Response
292
-
293
- **Promise\<[components.PromptResponse](../../models/components/promptresponse.md)\>**
294
-
295
- ### Errors
296
-
297
- | Error Type | Status Code | Content Type |
298
- | -------------------------- | -------------------------- | -------------------------- |
299
- | errors.HTTPValidationError | 422 | application/json |
300
- | errors.SDKError | 4XX, 5XX | \*/\* |
301
-
302
- ## getById
303
-
304
- Get a prompt by ID
305
-
306
- ### Example Usage
307
-
308
- <!-- UsageSnippet language="typescript" operationID="prompts_get_by_id" method="get" path="/api/v1/prompts/{prompt_id}" -->
309
- ```typescript
310
- import { SyllableSDK } from "syllable-sdk";
311
-
312
- const syllableSDK = new SyllableSDK({
313
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
314
- });
315
-
316
- async function run() {
317
- const result = await syllableSDK.prompts.getById({
318
- promptId: 417330,
319
- });
320
-
321
- console.log(result);
322
- }
323
-
324
- run();
325
- ```
326
-
327
- ### Standalone function
328
-
329
- The standalone function version of this method:
330
-
331
- ```typescript
332
- import { SyllableSDKCore } from "syllable-sdk/core.js";
333
- import { promptsGetById } from "syllable-sdk/funcs/promptsGetById.js";
334
-
335
- // Use `SyllableSDKCore` for best tree-shaking performance.
336
- // You can create one instance of it to use across an application.
337
- const syllableSDK = new SyllableSDKCore({
338
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
339
- });
340
-
341
- async function run() {
342
- const res = await promptsGetById(syllableSDK, {
343
- promptId: 417330,
344
- });
345
- if (res.ok) {
346
- const { value: result } = res;
347
- console.log(result);
348
- } else {
349
- console.log("promptsGetById failed:", res.error);
350
- }
351
- }
352
-
353
- run();
354
- ```
355
-
356
- ### Parameters
357
-
358
- | Parameter | Type | Required | Description |
359
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
360
- | `request` | [operations.PromptsGetByIdRequest](../../models/operations/promptsgetbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
361
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
362
- | `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. |
363
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
364
-
365
- ### Response
366
-
367
- **Promise\<[components.PromptResponse](../../models/components/promptresponse.md)\>**
368
-
369
- ### Errors
370
-
371
- | Error Type | Status Code | Content Type |
372
- | -------------------------- | -------------------------- | -------------------------- |
373
- | errors.HTTPValidationError | 422 | application/json |
374
- | errors.SDKError | 4XX, 5XX | \*/\* |
375
-
376
- ## delete
377
-
378
- Delete a prompt
379
-
380
- ### Example Usage
381
-
382
- <!-- UsageSnippet language="typescript" operationID="prompts_delete" method="delete" path="/api/v1/prompts/{prompt_id}" -->
383
- ```typescript
384
- import { SyllableSDK } from "syllable-sdk";
385
-
386
- const syllableSDK = new SyllableSDK({
387
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
388
- });
389
-
390
- async function run() {
391
- const result = await syllableSDK.prompts.delete({
392
- promptId: 982839,
393
- reason: "<value>",
394
- });
395
-
396
- console.log(result);
397
- }
398
-
399
- run();
400
- ```
401
-
402
- ### Standalone function
403
-
404
- The standalone function version of this method:
405
-
406
- ```typescript
407
- import { SyllableSDKCore } from "syllable-sdk/core.js";
408
- import { promptsDelete } from "syllable-sdk/funcs/promptsDelete.js";
409
-
410
- // Use `SyllableSDKCore` for best tree-shaking performance.
411
- // You can create one instance of it to use across an application.
412
- const syllableSDK = new SyllableSDKCore({
413
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
414
- });
415
-
416
- async function run() {
417
- const res = await promptsDelete(syllableSDK, {
418
- promptId: 982839,
419
- reason: "<value>",
420
- });
421
- if (res.ok) {
422
- const { value: result } = res;
423
- console.log(result);
424
- } else {
425
- console.log("promptsDelete failed:", res.error);
426
- }
427
- }
428
-
429
- run();
430
- ```
431
-
432
- ### Parameters
433
-
434
- | Parameter | Type | Required | Description |
435
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
436
- | `request` | [operations.PromptsDeleteRequest](../../models/operations/promptsdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
437
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
438
- | `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. |
439
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
440
-
441
- ### Response
442
-
443
- **Promise\<[any](../../models/.md)\>**
444
-
445
- ### Errors
446
-
447
- | Error Type | Status Code | Content Type |
448
- | -------------------------- | -------------------------- | -------------------------- |
449
- | errors.HTTPValidationError | 422 | application/json |
450
- | errors.SDKError | 4XX, 5XX | \*/\* |
451
-
452
- ## promptsHistory
453
-
454
- Get a list of historical versions of a prompt by its ID
455
-
456
- ### Example Usage
457
-
458
- <!-- UsageSnippet language="typescript" operationID="prompts_history" method="get" path="/api/v1/prompts/{prompt_id}/history" -->
459
- ```typescript
460
- import { SyllableSDK } from "syllable-sdk";
461
-
462
- const syllableSDK = new SyllableSDK({
463
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
464
- });
465
-
466
- async function run() {
467
- const result = await syllableSDK.prompts.promptsHistory({
468
- promptId: 922849,
469
- });
470
-
471
- console.log(result);
472
- }
473
-
474
- run();
475
- ```
476
-
477
- ### Standalone function
478
-
479
- The standalone function version of this method:
480
-
481
- ```typescript
482
- import { SyllableSDKCore } from "syllable-sdk/core.js";
483
- import { promptsPromptsHistory } from "syllable-sdk/funcs/promptsPromptsHistory.js";
484
-
485
- // Use `SyllableSDKCore` for best tree-shaking performance.
486
- // You can create one instance of it to use across an application.
487
- const syllableSDK = new SyllableSDKCore({
488
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
489
- });
490
-
491
- async function run() {
492
- const res = await promptsPromptsHistory(syllableSDK, {
493
- promptId: 922849,
494
- });
495
- if (res.ok) {
496
- const { value: result } = res;
497
- console.log(result);
498
- } else {
499
- console.log("promptsPromptsHistory failed:", res.error);
500
- }
501
- }
502
-
503
- run();
504
- ```
505
-
506
- ### Parameters
507
-
508
- | Parameter | Type | Required | Description |
509
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
510
- | `request` | [operations.PromptsHistoryRequest](../../models/operations/promptshistoryrequest.md) | :heavy_check_mark: | The request object to use for the request. |
511
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
512
- | `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. |
513
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
514
-
515
- ### Response
516
-
517
- **Promise\<[components.PromptHistory[]](../../models/.md)\>**
518
-
519
- ### Errors
520
-
521
- | Error Type | Status Code | Content Type |
522
- | -------------------------- | -------------------------- | -------------------------- |
523
- | errors.HTTPValidationError | 422 | application/json |
524
- | errors.SDKError | 4XX, 5XX | \*/\* |
525
-
526
- ## promptGetSupportedLlms
527
-
528
- Get supported LLM configs.
529
-
530
- ### Example Usage
531
-
532
- <!-- UsageSnippet language="typescript" operationID="prompt_get_supported_llms" method="get" path="/api/v1/prompts/llms/supported" -->
533
- ```typescript
534
- import { SyllableSDK } from "syllable-sdk";
535
-
536
- const syllableSDK = new SyllableSDK({
537
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
538
- });
539
-
540
- async function run() {
541
- const result = await syllableSDK.prompts.promptGetSupportedLlms();
542
-
543
- console.log(result);
544
- }
545
-
546
- run();
547
- ```
548
-
549
- ### Standalone function
550
-
551
- The standalone function version of this method:
552
-
553
- ```typescript
554
- import { SyllableSDKCore } from "syllable-sdk/core.js";
555
- import { promptsPromptGetSupportedLlms } from "syllable-sdk/funcs/promptsPromptGetSupportedLlms.js";
556
-
557
- // Use `SyllableSDKCore` for best tree-shaking performance.
558
- // You can create one instance of it to use across an application.
559
- const syllableSDK = new SyllableSDKCore({
560
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
561
- });
562
-
563
- async function run() {
564
- const res = await promptsPromptGetSupportedLlms(syllableSDK);
565
- if (res.ok) {
566
- const { value: result } = res;
567
- console.log(result);
568
- } else {
569
- console.log("promptsPromptGetSupportedLlms failed:", res.error);
570
- }
571
- }
572
-
573
- run();
574
- ```
575
-
576
- ### Parameters
577
-
578
- | Parameter | Type | Required | Description |
579
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
580
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
581
- | `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. |
582
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
583
-
584
- ### Response
585
-
586
- **Promise\<[components.SupportedLlm[]](../../models/.md)\>**
587
-
588
- ### Errors
589
-
590
- | Error Type | Status Code | Content Type |
591
- | --------------- | --------------- | --------------- |
592
- | errors.SDKError | 4XX, 5XX | \*/\* |