@orq-ai/node 3.1.0 → 3.1.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.
- package/README.md +34 -34
- package/docs/sdks/deployments/README.md +9 -86
- package/docs/sdks/files/README.md +174 -2
- package/docs/sdks/orq/README.md +1 -1
- package/docs/sdks/prompt/README.md +6 -0
- package/docs/sdks/prompts/README.md +128 -135
- package/docs/sdks/snippets/README.md +84 -0
- package/docs/sdks/templates/README.md +80 -0
- package/funcs/{deploymentsList.d.ts → deploymentsAll.d.ts} +2 -2
- package/funcs/deploymentsAll.d.ts.map +1 -0
- package/funcs/{deploymentsList.js → deploymentsAll.js} +4 -5
- package/funcs/deploymentsAll.js.map +1 -0
- package/funcs/deploymentsInvoke.d.ts +7 -1
- package/funcs/deploymentsInvoke.d.ts.map +1 -1
- package/funcs/deploymentsInvoke.js +11 -10
- package/funcs/deploymentsInvoke.js.map +1 -1
- package/funcs/filesBulkUpload.d.ts +15 -0
- package/funcs/filesBulkUpload.d.ts.map +1 -0
- package/funcs/{promptsList.js → filesBulkUpload.js} +15 -18
- package/funcs/filesBulkUpload.js.map +1 -0
- package/funcs/{promptSnippetsDelete.d.ts → filesUpdate.d.ts} +3 -3
- package/funcs/filesUpdate.d.ts.map +1 -0
- package/funcs/{promptSnippetsGetByKey.js → filesUpdate.js} +13 -12
- package/funcs/filesUpdate.js.map +1 -0
- package/funcs/{promptSnippetsList.d.ts → promptSnippetsFindOne.d.ts} +3 -3
- package/funcs/promptSnippetsFindOne.d.ts.map +1 -0
- package/funcs/{promptSnippetsGet.js → promptSnippetsFindOne.js} +6 -6
- package/funcs/promptSnippetsFindOne.js.map +1 -0
- package/funcs/{promptSnippetsCreate.d.ts → promptTemplatesGetAll.d.ts} +3 -3
- package/funcs/promptTemplatesGetAll.d.ts.map +1 -0
- package/funcs/{promptSnippetsList.js → promptTemplatesGetAll.js} +13 -13
- package/funcs/promptTemplatesGetAll.js.map +1 -0
- package/funcs/promptsCreate.d.ts +1 -1
- package/funcs/promptsCreate.js +2 -2
- package/funcs/promptsCreate.js.map +1 -1
- package/funcs/{promptsRetrieve.d.ts → promptsCreateVersion.d.ts} +3 -6
- package/funcs/{promptSnippetsDelete.d.ts.map → promptsCreateVersion.d.ts.map} +1 -1
- package/funcs/promptsCreateVersion.js +110 -0
- package/funcs/promptsCreateVersion.js.map +1 -0
- package/funcs/promptsDelete.js +1 -1
- package/funcs/promptsDelete.js.map +1 -1
- package/funcs/{promptSnippetsGet.d.ts → promptsDuplicate.d.ts} +3 -3
- package/funcs/promptsDuplicate.d.ts.map +1 -0
- package/funcs/{promptSnippetsDelete.js → promptsDuplicate.js} +8 -8
- package/funcs/promptsDuplicate.js.map +1 -0
- package/funcs/promptsGetAll.d.ts +12 -0
- package/funcs/promptsGetAll.d.ts.map +1 -0
- package/funcs/{promptSnippetsCreate.js → promptsGetAll.js} +8 -8
- package/funcs/promptsGetAll.js.map +1 -0
- package/funcs/promptsGetOne.d.ts +12 -0
- package/funcs/promptsGetOne.d.ts.map +1 -0
- package/funcs/{promptsRetrieve.js → promptsGetOne.js} +8 -10
- package/funcs/promptsGetOne.js.map +1 -0
- package/funcs/promptsUpdate.js +1 -1
- package/funcs/promptsUpdate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -10
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +2 -2
- package/lib/config.js.map +1 -1
- package/lib/env.d.ts +0 -13
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +0 -17
- package/lib/env.js.map +1 -1
- package/lib/sdks.js +1 -1
- package/lib/sdks.js.map +1 -1
- package/models/components/deployments.d.ts +5 -0
- package/models/components/deployments.d.ts.map +1 -1
- package/models/components/deployments.js +2 -0
- package/models/components/deployments.js.map +1 -1
- package/models/errors/index.d.ts +0 -2
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +0 -2
- package/models/errors/index.js.map +1 -1
- package/models/operations/bulkfileupload.d.ts +173 -0
- package/models/operations/bulkfileupload.d.ts.map +1 -0
- package/models/operations/bulkfileupload.js +210 -0
- package/models/operations/bulkfileupload.js.map +1 -0
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createprompt.d.ts +381 -702
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +481 -641
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createpromptversion.d.ts +2003 -0
- package/models/operations/createpromptversion.d.ts.map +1 -0
- package/models/operations/createpromptversion.js +1852 -0
- package/models/operations/createpromptversion.js.map +1 -0
- package/models/operations/deleteprompt.d.ts +1 -1
- package/models/operations/deploymentgetconfig.d.ts +0 -39
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +4 -29
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deploymentinvoke.d.ts +683 -23
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +614 -23
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deployments.d.ts +8 -54
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +13 -44
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/duplicateprompt.d.ts +32 -0
- package/models/operations/duplicateprompt.d.ts.map +1 -0
- package/models/operations/{deletepromptsnippet.js → duplicateprompt.js} +17 -17
- package/models/operations/duplicateprompt.js.map +1 -0
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.d.ts +5 -1
- package/models/operations/filelist.d.ts.map +1 -1
- package/models/operations/filelist.js +12 -4
- package/models/operations/filelist.js.map +1 -1
- package/models/operations/fileupdate.d.ts +143 -0
- package/models/operations/fileupdate.d.ts.map +1 -0
- package/models/operations/fileupdate.js +193 -0
- package/models/operations/fileupdate.js.map +1 -0
- package/models/operations/fileupload.js +2 -2
- package/models/operations/findonepromptsnippet.d.ts +4768 -938
- package/models/operations/findonepromptsnippet.d.ts.map +1 -1
- package/models/operations/findonepromptsnippet.js +4751 -984
- package/models/operations/findonepromptsnippet.js.map +1 -1
- package/models/operations/getallprompts.d.ts +9926 -546
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +8805 -557
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getallprompttemplates.d.ts +6607 -0
- package/models/operations/getallprompttemplates.d.ts.map +1 -0
- package/models/operations/getallprompttemplates.js +6225 -0
- package/models/operations/getallprompttemplates.js.map +1 -0
- package/models/operations/getoneprompt.d.ts +1 -1203
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +1 -1011
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/index.d.ts +5 -8
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +5 -8
- package/models/operations/index.js.map +1 -1
- package/models/operations/updateprompt.d.ts +5979 -1121
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +5729 -1119
- package/models/operations/updateprompt.js.map +1 -1
- package/package.json +1 -1
- package/sdk/deployments.d.ts +6 -10
- package/sdk/deployments.d.ts.map +1 -1
- package/sdk/deployments.js +6 -14
- package/sdk/deployments.js.map +1 -1
- package/sdk/files.d.ts +11 -0
- package/sdk/files.d.ts.map +1 -1
- package/sdk/files.js +17 -0
- package/sdk/files.js.map +1 -1
- package/sdk/prompt.d.ts +10 -0
- package/sdk/prompt.d.ts.map +1 -0
- package/sdk/prompt.js +19 -0
- package/sdk/prompt.js.map +1 -0
- package/sdk/prompts.d.ts +14 -26
- package/sdk/prompts.d.ts.map +1 -1
- package/sdk/prompts.js +25 -37
- package/sdk/prompts.js.map +1 -1
- package/sdk/sdk.d.ts +3 -3
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +3 -3
- package/sdk/sdk.js.map +1 -1
- package/sdk/snippets.d.ts +9 -0
- package/sdk/snippets.d.ts.map +1 -0
- package/sdk/snippets.js +19 -0
- package/sdk/snippets.js.map +1 -0
- package/sdk/templates.d.ts +9 -0
- package/sdk/templates.d.ts.map +1 -0
- package/sdk/templates.js +19 -0
- package/sdk/templates.js.map +1 -0
- package/src/funcs/{deploymentsList.ts → deploymentsAll.ts} +2 -3
- package/src/funcs/deploymentsInvoke.ts +16 -21
- package/src/funcs/filesBulkUpload.ts +129 -0
- package/src/funcs/{promptSnippetsGetByKey.ts → filesUpdate.ts} +16 -18
- package/src/funcs/{promptSnippetsGet.ts → promptSnippetsFindOne.ts} +4 -4
- package/src/funcs/{promptSnippetsList.ts → promptTemplatesGetAll.ts} +16 -16
- package/src/funcs/promptsCreate.ts +2 -2
- package/src/funcs/promptsCreateVersion.ts +131 -0
- package/src/funcs/promptsDelete.ts +1 -1
- package/src/funcs/{promptSnippetsDelete.ts → promptsDuplicate.ts} +7 -8
- package/src/funcs/{promptSnippetsCreate.ts → promptsGetAll.ts} +9 -9
- package/src/funcs/{promptsRetrieve.ts → promptsGetOne.ts} +8 -10
- package/src/funcs/promptsUpdate.ts +1 -1
- package/src/lib/config.ts +2 -12
- package/src/lib/env.ts +0 -32
- package/src/lib/sdks.ts +2 -2
- package/src/models/components/deployments.ts +7 -0
- package/src/models/errors/index.ts +0 -2
- package/src/models/operations/bulkfileupload.ts +315 -0
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createprompt.ts +690 -1048
- package/src/models/operations/createpromptversion.ts +3703 -0
- package/src/models/operations/deleteprompt.ts +1 -1
- package/src/models/operations/deploymentgetconfig.ts +0 -44
- package/src/models/operations/deploymentinvoke.ts +1415 -174
- package/src/models/operations/deployments.ts +18 -68
- package/src/models/operations/duplicateprompt.ts +69 -0
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +17 -5
- package/src/models/operations/fileupdate.ts +298 -0
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/findonepromptsnippet.ts +11104 -1818
- package/src/models/operations/getallprompts.ts +17860 -1336
- package/src/models/operations/getallprompttemplates.ts +13690 -0
- package/src/models/operations/getoneprompt.ts +1 -1914
- package/src/models/operations/index.ts +5 -8
- package/src/models/operations/updateprompt.ts +12561 -2071
- package/src/sdk/deployments.ts +11 -25
- package/src/sdk/files.ts +33 -0
- package/src/sdk/prompt.ts +19 -0
- package/src/sdk/prompts.ts +39 -51
- package/src/sdk/sdk.ts +4 -4
- package/src/sdk/snippets.ts +24 -0
- package/src/sdk/templates.ts +24 -0
- package/docs/sdks/promptsnippets/README.md +0 -488
- package/funcs/deploymentsList.d.ts.map +0 -1
- package/funcs/deploymentsList.js.map +0 -1
- package/funcs/deploymentsStream.d.ts +0 -16
- package/funcs/deploymentsStream.d.ts.map +0 -1
- package/funcs/deploymentsStream.js +0 -125
- package/funcs/deploymentsStream.js.map +0 -1
- package/funcs/promptSnippetsCreate.d.ts.map +0 -1
- package/funcs/promptSnippetsCreate.js.map +0 -1
- package/funcs/promptSnippetsDelete.js.map +0 -1
- package/funcs/promptSnippetsGet.d.ts.map +0 -1
- package/funcs/promptSnippetsGet.js.map +0 -1
- package/funcs/promptSnippetsGetByKey.d.ts +0 -12
- package/funcs/promptSnippetsGetByKey.d.ts.map +0 -1
- package/funcs/promptSnippetsGetByKey.js.map +0 -1
- package/funcs/promptSnippetsList.d.ts.map +0 -1
- package/funcs/promptSnippetsList.js.map +0 -1
- package/funcs/promptSnippetsUpdate.d.ts +0 -13
- package/funcs/promptSnippetsUpdate.d.ts.map +0 -1
- package/funcs/promptSnippetsUpdate.js +0 -114
- package/funcs/promptSnippetsUpdate.js.map +0 -1
- package/funcs/promptsGetVersion.d.ts +0 -16
- package/funcs/promptsGetVersion.d.ts.map +0 -1
- package/funcs/promptsGetVersion.js +0 -120
- package/funcs/promptsGetVersion.js.map +0 -1
- package/funcs/promptsList.d.ts +0 -15
- package/funcs/promptsList.d.ts.map +0 -1
- package/funcs/promptsList.js.map +0 -1
- package/funcs/promptsListVersions.d.ts +0 -15
- package/funcs/promptsListVersions.d.ts.map +0 -1
- package/funcs/promptsListVersions.js +0 -118
- package/funcs/promptsListVersions.js.map +0 -1
- package/funcs/promptsRetrieve.d.ts.map +0 -1
- package/funcs/promptsRetrieve.js.map +0 -1
- package/models/errors/getpromptversion.d.ts +0 -36
- package/models/errors/getpromptversion.d.ts.map +0 -1
- package/models/errors/getpromptversion.js +0 -79
- package/models/errors/getpromptversion.js.map +0 -1
- package/models/errors/updatepromptsnippet.d.ts +0 -36
- package/models/errors/updatepromptsnippet.d.ts.map +0 -1
- package/models/errors/updatepromptsnippet.js +0 -79
- package/models/errors/updatepromptsnippet.js.map +0 -1
- package/models/operations/createpromptsnippet.d.ts +0 -3567
- package/models/operations/createpromptsnippet.d.ts.map +0 -1
- package/models/operations/createpromptsnippet.js +0 -3056
- package/models/operations/createpromptsnippet.js.map +0 -1
- package/models/operations/deletepromptsnippet.d.ts +0 -32
- package/models/operations/deletepromptsnippet.d.ts.map +0 -1
- package/models/operations/deletepromptsnippet.js.map +0 -1
- package/models/operations/deploymentstream.d.ts +0 -1622
- package/models/operations/deploymentstream.d.ts.map +0 -1
- package/models/operations/deploymentstream.js +0 -1571
- package/models/operations/deploymentstream.js.map +0 -1
- package/models/operations/findonebykeypromptsnippet.d.ts +0 -2448
- package/models/operations/findonebykeypromptsnippet.d.ts.map +0 -1
- package/models/operations/findonebykeypromptsnippet.js +0 -2133
- package/models/operations/findonebykeypromptsnippet.js.map +0 -1
- package/models/operations/getallpromptsnippets.d.ts +0 -2512
- package/models/operations/getallpromptsnippets.d.ts.map +0 -1
- package/models/operations/getallpromptsnippets.js +0 -2195
- package/models/operations/getallpromptsnippets.js.map +0 -1
- package/models/operations/getpromptversion.d.ts +0 -1228
- package/models/operations/getpromptversion.d.ts.map +0 -1
- package/models/operations/getpromptversion.js +0 -1080
- package/models/operations/getpromptversion.js.map +0 -1
- package/models/operations/listpromptversions.d.ts +0 -1286
- package/models/operations/listpromptversions.d.ts.map +0 -1
- package/models/operations/listpromptversions.js +0 -1142
- package/models/operations/listpromptversions.js.map +0 -1
- package/models/operations/updatepromptsnippet.d.ts +0 -3595
- package/models/operations/updatepromptsnippet.d.ts.map +0 -1
- package/models/operations/updatepromptsnippet.js +0 -3116
- package/models/operations/updatepromptsnippet.js.map +0 -1
- package/sdk/promptsnippets.d.ts +0 -29
- package/sdk/promptsnippets.d.ts.map +0 -1
- package/sdk/promptsnippets.js +0 -54
- package/sdk/promptsnippets.js.map +0 -1
- package/src/funcs/deploymentsStream.ts +0 -150
- package/src/funcs/promptSnippetsUpdate.ts +0 -139
- package/src/funcs/promptsGetVersion.ts +0 -146
- package/src/funcs/promptsList.ts +0 -133
- package/src/funcs/promptsListVersions.ts +0 -139
- package/src/models/errors/getpromptversion.ts +0 -71
- package/src/models/errors/updatepromptsnippet.ts +0 -71
- package/src/models/operations/createpromptsnippet.ts +0 -6239
- package/src/models/operations/deletepromptsnippet.ts +0 -69
- package/src/models/operations/deploymentstream.ts +0 -3062
- package/src/models/operations/findonebykeypromptsnippet.ts +0 -4483
- package/src/models/operations/getallpromptsnippets.ts +0 -4472
- package/src/models/operations/getpromptversion.ts +0 -2012
- package/src/models/operations/listpromptversions.ts +0 -2146
- package/src/models/operations/updatepromptsnippet.ts +0 -6544
- package/src/sdk/promptsnippets.ts +0 -99
|
@@ -5,89 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
### Available Operations
|
|
7
7
|
|
|
8
|
-
* [
|
|
9
|
-
* [
|
|
10
|
-
* [retrieve](#retrieve) - Retrieve a prompt
|
|
11
|
-
* [update](#update) - Update a prompt
|
|
8
|
+
* [create](#create) - Create a new prompt
|
|
9
|
+
* [createVersion](#createversion) - Create a new prompt version
|
|
12
10
|
* [delete](#delete) - Delete a prompt
|
|
13
|
-
* [
|
|
14
|
-
* [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Returns a list of your prompts. The prompts are returned sorted by creation date, with the most recent prompts appearing first
|
|
19
|
-
|
|
20
|
-
### Example Usage
|
|
21
|
-
|
|
22
|
-
```typescript
|
|
23
|
-
import { Orq } from "@orq-ai/node";
|
|
24
|
-
|
|
25
|
-
const orq = new Orq({
|
|
26
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
async function run() {
|
|
30
|
-
const result = await orq.prompts.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 { OrqCore } from "@orq-ai/node/core.js";
|
|
45
|
-
import { promptsList } from "@orq-ai/node/funcs/promptsList.js";
|
|
46
|
-
|
|
47
|
-
// Use `OrqCore` for best tree-shaking performance.
|
|
48
|
-
// You can create one instance of it to use across an application.
|
|
49
|
-
const orq = new OrqCore({
|
|
50
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
async function run() {
|
|
54
|
-
const res = await promptsList(orq, {});
|
|
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.GetAllPromptsRequest](../../models/operations/getallpromptsrequest.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\<[operations.GetAllPromptsResponseBody](../../models/operations/getallpromptsresponsebody.md)\>**
|
|
81
|
-
|
|
82
|
-
### Errors
|
|
83
|
-
|
|
84
|
-
| Error Type | Status Code | Content Type |
|
|
85
|
-
| --------------- | --------------- | --------------- |
|
|
86
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
11
|
+
* [getOne](#getone) - Get one prompt
|
|
12
|
+
* [update](#update) - Update a prompt
|
|
13
|
+
* [duplicate](#duplicate) - Duplicate a prompt
|
|
14
|
+
* [getAll](#getall) - Get all prompts
|
|
87
15
|
|
|
88
16
|
## create
|
|
89
17
|
|
|
90
|
-
Create a prompt
|
|
18
|
+
Create a new prompt
|
|
91
19
|
|
|
92
20
|
### Example Usage
|
|
93
21
|
|
|
@@ -132,7 +60,7 @@ async function run() {
|
|
|
132
60
|
},
|
|
133
61
|
],
|
|
134
62
|
},
|
|
135
|
-
|
|
63
|
+
type: "snippet",
|
|
136
64
|
});
|
|
137
65
|
|
|
138
66
|
// Handle the result
|
|
@@ -190,7 +118,7 @@ async function run() {
|
|
|
190
118
|
},
|
|
191
119
|
],
|
|
192
120
|
},
|
|
193
|
-
|
|
121
|
+
type: "snippet",
|
|
194
122
|
});
|
|
195
123
|
|
|
196
124
|
if (!res.ok) {
|
|
@@ -225,9 +153,9 @@ run();
|
|
|
225
153
|
| --------------- | --------------- | --------------- |
|
|
226
154
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
227
155
|
|
|
228
|
-
##
|
|
156
|
+
## createVersion
|
|
229
157
|
|
|
230
|
-
|
|
158
|
+
Create a new prompt version
|
|
231
159
|
|
|
232
160
|
### Example Usage
|
|
233
161
|
|
|
@@ -239,7 +167,7 @@ const orq = new Orq({
|
|
|
239
167
|
});
|
|
240
168
|
|
|
241
169
|
async function run() {
|
|
242
|
-
const result = await orq.prompts.
|
|
170
|
+
const result = await orq.prompts.createVersion({
|
|
243
171
|
id: "<id>",
|
|
244
172
|
});
|
|
245
173
|
|
|
@@ -256,7 +184,7 @@ The standalone function version of this method:
|
|
|
256
184
|
|
|
257
185
|
```typescript
|
|
258
186
|
import { OrqCore } from "@orq-ai/node/core.js";
|
|
259
|
-
import {
|
|
187
|
+
import { promptsCreateVersion } from "@orq-ai/node/funcs/promptsCreateVersion.js";
|
|
260
188
|
|
|
261
189
|
// Use `OrqCore` for best tree-shaking performance.
|
|
262
190
|
// You can create one instance of it to use across an application.
|
|
@@ -265,7 +193,7 @@ const orq = new OrqCore({
|
|
|
265
193
|
});
|
|
266
194
|
|
|
267
195
|
async function run() {
|
|
268
|
-
const res = await
|
|
196
|
+
const res = await promptsCreateVersion(orq, {
|
|
269
197
|
id: "<id>",
|
|
270
198
|
});
|
|
271
199
|
|
|
@@ -286,14 +214,14 @@ run();
|
|
|
286
214
|
|
|
287
215
|
| Parameter | Type | Required | Description |
|
|
288
216
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
289
|
-
| `request` | [operations.
|
|
217
|
+
| `request` | [operations.CreatePromptVersionRequest](../../models/operations/createpromptversionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
290
218
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
291
219
|
| `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. |
|
|
292
220
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
293
221
|
|
|
294
222
|
### Response
|
|
295
223
|
|
|
296
|
-
**Promise\<[operations.
|
|
224
|
+
**Promise\<[operations.CreatePromptVersionResponseBody](../../models/operations/createpromptversionresponsebody.md)\>**
|
|
297
225
|
|
|
298
226
|
### Errors
|
|
299
227
|
|
|
@@ -301,9 +229,9 @@ run();
|
|
|
301
229
|
| --------------- | --------------- | --------------- |
|
|
302
230
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
303
231
|
|
|
304
|
-
##
|
|
232
|
+
## delete
|
|
305
233
|
|
|
306
|
-
|
|
234
|
+
Delete a prompt
|
|
307
235
|
|
|
308
236
|
### Example Usage
|
|
309
237
|
|
|
@@ -315,12 +243,11 @@ const orq = new Orq({
|
|
|
315
243
|
});
|
|
316
244
|
|
|
317
245
|
async function run() {
|
|
318
|
-
|
|
246
|
+
await orq.prompts.delete({
|
|
319
247
|
id: "<id>",
|
|
320
248
|
});
|
|
321
249
|
|
|
322
|
-
|
|
323
|
-
console.log(result);
|
|
250
|
+
|
|
324
251
|
}
|
|
325
252
|
|
|
326
253
|
run();
|
|
@@ -332,7 +259,7 @@ The standalone function version of this method:
|
|
|
332
259
|
|
|
333
260
|
```typescript
|
|
334
261
|
import { OrqCore } from "@orq-ai/node/core.js";
|
|
335
|
-
import {
|
|
262
|
+
import { promptsDelete } from "@orq-ai/node/funcs/promptsDelete.js";
|
|
336
263
|
|
|
337
264
|
// Use `OrqCore` for best tree-shaking performance.
|
|
338
265
|
// You can create one instance of it to use across an application.
|
|
@@ -341,7 +268,7 @@ const orq = new OrqCore({
|
|
|
341
268
|
});
|
|
342
269
|
|
|
343
270
|
async function run() {
|
|
344
|
-
const res = await
|
|
271
|
+
const res = await promptsDelete(orq, {
|
|
345
272
|
id: "<id>",
|
|
346
273
|
});
|
|
347
274
|
|
|
@@ -351,8 +278,7 @@ async function run() {
|
|
|
351
278
|
|
|
352
279
|
const { value: result } = res;
|
|
353
280
|
|
|
354
|
-
|
|
355
|
-
console.log(result);
|
|
281
|
+
|
|
356
282
|
}
|
|
357
283
|
|
|
358
284
|
run();
|
|
@@ -362,25 +288,24 @@ run();
|
|
|
362
288
|
|
|
363
289
|
| Parameter | Type | Required | Description |
|
|
364
290
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
365
|
-
| `request` | [operations.
|
|
291
|
+
| `request` | [operations.DeletePromptRequest](../../models/operations/deletepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
366
292
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
367
293
|
| `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. |
|
|
368
294
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
369
295
|
|
|
370
296
|
### Response
|
|
371
297
|
|
|
372
|
-
**Promise\<
|
|
298
|
+
**Promise\<void\>**
|
|
373
299
|
|
|
374
300
|
### Errors
|
|
375
301
|
|
|
376
|
-
| Error Type
|
|
377
|
-
|
|
|
378
|
-
| errors.
|
|
379
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
302
|
+
| Error Type | Status Code | Content Type |
|
|
303
|
+
| --------------- | --------------- | --------------- |
|
|
304
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
380
305
|
|
|
381
|
-
##
|
|
306
|
+
## getOne
|
|
382
307
|
|
|
383
|
-
|
|
308
|
+
Get one prompt
|
|
384
309
|
|
|
385
310
|
### Example Usage
|
|
386
311
|
|
|
@@ -392,7 +317,7 @@ const orq = new Orq({
|
|
|
392
317
|
});
|
|
393
318
|
|
|
394
319
|
async function run() {
|
|
395
|
-
await orq.prompts.
|
|
320
|
+
await orq.prompts.getOne({
|
|
396
321
|
id: "<id>",
|
|
397
322
|
});
|
|
398
323
|
|
|
@@ -408,7 +333,7 @@ The standalone function version of this method:
|
|
|
408
333
|
|
|
409
334
|
```typescript
|
|
410
335
|
import { OrqCore } from "@orq-ai/node/core.js";
|
|
411
|
-
import {
|
|
336
|
+
import { promptsGetOne } from "@orq-ai/node/funcs/promptsGetOne.js";
|
|
412
337
|
|
|
413
338
|
// Use `OrqCore` for best tree-shaking performance.
|
|
414
339
|
// You can create one instance of it to use across an application.
|
|
@@ -417,7 +342,7 @@ const orq = new OrqCore({
|
|
|
417
342
|
});
|
|
418
343
|
|
|
419
344
|
async function run() {
|
|
420
|
-
const res = await
|
|
345
|
+
const res = await promptsGetOne(orq, {
|
|
421
346
|
id: "<id>",
|
|
422
347
|
});
|
|
423
348
|
|
|
@@ -437,7 +362,7 @@ run();
|
|
|
437
362
|
|
|
438
363
|
| Parameter | Type | Required | Description |
|
|
439
364
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
440
|
-
| `request` | [operations.
|
|
365
|
+
| `request` | [operations.GetOnePromptRequest](../../models/operations/getonepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
441
366
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
442
367
|
| `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. |
|
|
443
368
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
@@ -452,9 +377,9 @@ run();
|
|
|
452
377
|
| --------------- | --------------- | --------------- |
|
|
453
378
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
454
379
|
|
|
455
|
-
##
|
|
380
|
+
## update
|
|
456
381
|
|
|
457
|
-
|
|
382
|
+
Update a prompt
|
|
458
383
|
|
|
459
384
|
### Example Usage
|
|
460
385
|
|
|
@@ -466,8 +391,8 @@ const orq = new Orq({
|
|
|
466
391
|
});
|
|
467
392
|
|
|
468
393
|
async function run() {
|
|
469
|
-
const result = await orq.prompts.
|
|
470
|
-
|
|
394
|
+
const result = await orq.prompts.update({
|
|
395
|
+
id: "<id>",
|
|
471
396
|
});
|
|
472
397
|
|
|
473
398
|
// Handle the result
|
|
@@ -483,7 +408,7 @@ The standalone function version of this method:
|
|
|
483
408
|
|
|
484
409
|
```typescript
|
|
485
410
|
import { OrqCore } from "@orq-ai/node/core.js";
|
|
486
|
-
import {
|
|
411
|
+
import { promptsUpdate } from "@orq-ai/node/funcs/promptsUpdate.js";
|
|
487
412
|
|
|
488
413
|
// Use `OrqCore` for best tree-shaking performance.
|
|
489
414
|
// You can create one instance of it to use across an application.
|
|
@@ -492,8 +417,8 @@ const orq = new OrqCore({
|
|
|
492
417
|
});
|
|
493
418
|
|
|
494
419
|
async function run() {
|
|
495
|
-
const res = await
|
|
496
|
-
|
|
420
|
+
const res = await promptsUpdate(orq, {
|
|
421
|
+
id: "<id>",
|
|
497
422
|
});
|
|
498
423
|
|
|
499
424
|
if (!res.ok) {
|
|
@@ -513,14 +438,89 @@ run();
|
|
|
513
438
|
|
|
514
439
|
| Parameter | Type | Required | Description |
|
|
515
440
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
516
|
-
| `request` | [operations.
|
|
441
|
+
| `request` | [operations.UpdatePromptRequest](../../models/operations/updatepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
517
442
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
518
443
|
| `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. |
|
|
519
444
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
520
445
|
|
|
521
446
|
### Response
|
|
522
447
|
|
|
523
|
-
**Promise\<[operations.
|
|
448
|
+
**Promise\<[operations.UpdatePromptResponseBody](../../models/operations/updatepromptresponsebody.md)\>**
|
|
449
|
+
|
|
450
|
+
### Errors
|
|
451
|
+
|
|
452
|
+
| Error Type | Status Code | Content Type |
|
|
453
|
+
| ------------------------------- | ------------------------------- | ------------------------------- |
|
|
454
|
+
| errors.UpdatePromptResponseBody | 404 | application/json |
|
|
455
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
456
|
+
|
|
457
|
+
## duplicate
|
|
458
|
+
|
|
459
|
+
Duplicate a prompt
|
|
460
|
+
|
|
461
|
+
### Example Usage
|
|
462
|
+
|
|
463
|
+
```typescript
|
|
464
|
+
import { Orq } from "@orq-ai/node";
|
|
465
|
+
|
|
466
|
+
const orq = new Orq({
|
|
467
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
468
|
+
});
|
|
469
|
+
|
|
470
|
+
async function run() {
|
|
471
|
+
await orq.prompts.duplicate({
|
|
472
|
+
id: "<id>",
|
|
473
|
+
});
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
run();
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
### Standalone function
|
|
482
|
+
|
|
483
|
+
The standalone function version of this method:
|
|
484
|
+
|
|
485
|
+
```typescript
|
|
486
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
487
|
+
import { promptsDuplicate } from "@orq-ai/node/funcs/promptsDuplicate.js";
|
|
488
|
+
|
|
489
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
490
|
+
// You can create one instance of it to use across an application.
|
|
491
|
+
const orq = new OrqCore({
|
|
492
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
493
|
+
});
|
|
494
|
+
|
|
495
|
+
async function run() {
|
|
496
|
+
const res = await promptsDuplicate(orq, {
|
|
497
|
+
id: "<id>",
|
|
498
|
+
});
|
|
499
|
+
|
|
500
|
+
if (!res.ok) {
|
|
501
|
+
throw res.error;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
const { value: result } = res;
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
run();
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
### Parameters
|
|
513
|
+
|
|
514
|
+
| Parameter | Type | Required | Description |
|
|
515
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
516
|
+
| `request` | [operations.DuplicatePromptRequest](../../models/operations/duplicatepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
517
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
518
|
+
| `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. |
|
|
519
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
520
|
+
|
|
521
|
+
### Response
|
|
522
|
+
|
|
523
|
+
**Promise\<void\>**
|
|
524
524
|
|
|
525
525
|
### Errors
|
|
526
526
|
|
|
@@ -528,9 +528,9 @@ run();
|
|
|
528
528
|
| --------------- | --------------- | --------------- |
|
|
529
529
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
530
530
|
|
|
531
|
-
##
|
|
531
|
+
## getAll
|
|
532
532
|
|
|
533
|
-
|
|
533
|
+
Get all prompts
|
|
534
534
|
|
|
535
535
|
### Example Usage
|
|
536
536
|
|
|
@@ -542,10 +542,7 @@ const orq = new Orq({
|
|
|
542
542
|
});
|
|
543
543
|
|
|
544
544
|
async function run() {
|
|
545
|
-
const result = await orq.prompts.
|
|
546
|
-
promptId: "<id>",
|
|
547
|
-
versionId: "<id>",
|
|
548
|
-
});
|
|
545
|
+
const result = await orq.prompts.getAll();
|
|
549
546
|
|
|
550
547
|
// Handle the result
|
|
551
548
|
console.log(result);
|
|
@@ -560,7 +557,7 @@ The standalone function version of this method:
|
|
|
560
557
|
|
|
561
558
|
```typescript
|
|
562
559
|
import { OrqCore } from "@orq-ai/node/core.js";
|
|
563
|
-
import {
|
|
560
|
+
import { promptsGetAll } from "@orq-ai/node/funcs/promptsGetAll.js";
|
|
564
561
|
|
|
565
562
|
// Use `OrqCore` for best tree-shaking performance.
|
|
566
563
|
// You can create one instance of it to use across an application.
|
|
@@ -569,10 +566,7 @@ const orq = new OrqCore({
|
|
|
569
566
|
});
|
|
570
567
|
|
|
571
568
|
async function run() {
|
|
572
|
-
const res = await
|
|
573
|
-
promptId: "<id>",
|
|
574
|
-
versionId: "<id>",
|
|
575
|
-
});
|
|
569
|
+
const res = await promptsGetAll(orq);
|
|
576
570
|
|
|
577
571
|
if (!res.ok) {
|
|
578
572
|
throw res.error;
|
|
@@ -591,18 +585,17 @@ run();
|
|
|
591
585
|
|
|
592
586
|
| Parameter | Type | Required | Description |
|
|
593
587
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
594
|
-
| `request` | [operations.
|
|
588
|
+
| `request` | [operations.GetAllPromptsRequestBody](../../models/operations/getallpromptsrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
595
589
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
596
590
|
| `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. |
|
|
597
591
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
598
592
|
|
|
599
593
|
### Response
|
|
600
594
|
|
|
601
|
-
**Promise\<[operations.
|
|
595
|
+
**Promise\<[operations.GetAllPromptsResponseBody](../../models/operations/getallpromptsresponsebody.md)\>**
|
|
602
596
|
|
|
603
597
|
### Errors
|
|
604
598
|
|
|
605
|
-
| Error Type
|
|
606
|
-
|
|
|
607
|
-
| errors.
|
|
608
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
599
|
+
| Error Type | Status Code | Content Type |
|
|
600
|
+
| --------------- | --------------- | --------------- |
|
|
601
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Snippets
|
|
2
|
+
(*prompt.snippets*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [findOne](#findone) - Get one prompt snippet
|
|
9
|
+
|
|
10
|
+
## findOne
|
|
11
|
+
|
|
12
|
+
Get one prompt snippet
|
|
13
|
+
|
|
14
|
+
### Example Usage
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { Orq } from "@orq-ai/node";
|
|
18
|
+
|
|
19
|
+
const orq = new Orq({
|
|
20
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
async function run() {
|
|
24
|
+
const result = await orq.prompt.snippets.findOne({
|
|
25
|
+
key: "<key>",
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// Handle the result
|
|
29
|
+
console.log(result);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
run();
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Standalone function
|
|
36
|
+
|
|
37
|
+
The standalone function version of this method:
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
41
|
+
import { promptSnippetsFindOne } from "@orq-ai/node/funcs/promptSnippetsFindOne.js";
|
|
42
|
+
|
|
43
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
44
|
+
// You can create one instance of it to use across an application.
|
|
45
|
+
const orq = new OrqCore({
|
|
46
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
async function run() {
|
|
50
|
+
const res = await promptSnippetsFindOne(orq, {
|
|
51
|
+
key: "<key>",
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
if (!res.ok) {
|
|
55
|
+
throw res.error;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const { value: result } = res;
|
|
59
|
+
|
|
60
|
+
// Handle the result
|
|
61
|
+
console.log(result);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
run();
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Parameters
|
|
68
|
+
|
|
69
|
+
| Parameter | Type | Required | Description |
|
|
70
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
71
|
+
| `request` | [operations.FindOnePromptSnippetRequest](../../models/operations/findonepromptsnippetrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
72
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
73
|
+
| `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. |
|
|
74
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
75
|
+
|
|
76
|
+
### Response
|
|
77
|
+
|
|
78
|
+
**Promise\<[operations.FindOnePromptSnippetResponseBody](../../models/operations/findonepromptsnippetresponsebody.md)\>**
|
|
79
|
+
|
|
80
|
+
### Errors
|
|
81
|
+
|
|
82
|
+
| Error Type | Status Code | Content Type |
|
|
83
|
+
| --------------- | --------------- | --------------- |
|
|
84
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|