@orq-ai/node 3.1.2 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -34
- package/docs/sdks/deployments/README.md +86 -9
- package/docs/sdks/files/README.md +2 -174
- package/docs/sdks/orq/README.md +1 -1
- package/docs/sdks/prompts/README.md +135 -128
- package/docs/sdks/promptsnippets/README.md +488 -0
- package/funcs/deploymentsInvoke.d.ts +1 -7
- package/funcs/deploymentsInvoke.d.ts.map +1 -1
- package/funcs/deploymentsInvoke.js +10 -11
- package/funcs/deploymentsInvoke.js.map +1 -1
- package/funcs/{deploymentsAll.d.ts → deploymentsList.d.ts} +2 -2
- package/funcs/deploymentsList.d.ts.map +1 -0
- package/funcs/{deploymentsAll.js → deploymentsList.js} +5 -4
- package/funcs/deploymentsList.js.map +1 -0
- package/funcs/deploymentsStream.d.ts +16 -0
- package/funcs/deploymentsStream.d.ts.map +1 -0
- package/funcs/deploymentsStream.js +125 -0
- package/funcs/deploymentsStream.js.map +1 -0
- package/funcs/{promptSnippetsFindOne.d.ts → promptSnippetsCreate.d.ts} +3 -3
- package/funcs/promptSnippetsCreate.d.ts.map +1 -0
- package/funcs/{promptsGetAll.js → promptSnippetsCreate.js} +8 -8
- package/funcs/promptSnippetsCreate.js.map +1 -0
- package/funcs/{filesUpdate.d.ts → promptSnippetsDelete.d.ts} +3 -3
- package/funcs/{promptsCreateVersion.d.ts.map → promptSnippetsDelete.d.ts.map} +1 -1
- package/funcs/{promptsDuplicate.js → promptSnippetsDelete.js} +8 -8
- package/funcs/promptSnippetsDelete.js.map +1 -0
- package/funcs/{promptsGetAll.d.ts → promptSnippetsGet.d.ts} +3 -3
- package/funcs/promptSnippetsGet.d.ts.map +1 -0
- package/funcs/{promptSnippetsFindOne.js → promptSnippetsGet.js} +6 -6
- package/funcs/promptSnippetsGet.js.map +1 -0
- package/funcs/{promptTemplatesGetAll.d.ts → promptSnippetsGetByKey.d.ts} +3 -3
- package/funcs/promptSnippetsGetByKey.d.ts.map +1 -0
- package/funcs/promptSnippetsGetByKey.js +109 -0
- package/funcs/promptSnippetsGetByKey.js.map +1 -0
- package/funcs/{promptsDuplicate.d.ts → promptSnippetsList.d.ts} +3 -3
- package/funcs/promptSnippetsList.d.ts.map +1 -0
- package/funcs/{promptTemplatesGetAll.js → promptSnippetsList.js} +13 -13
- package/funcs/promptSnippetsList.js.map +1 -0
- package/funcs/promptSnippetsUpdate.d.ts +13 -0
- package/funcs/promptSnippetsUpdate.d.ts.map +1 -0
- package/funcs/{promptsCreateVersion.js → promptSnippetsUpdate.js} +14 -10
- package/funcs/promptSnippetsUpdate.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/promptsDelete.js +1 -1
- package/funcs/promptsDelete.js.map +1 -1
- package/funcs/promptsGetVersion.d.ts +16 -0
- package/funcs/promptsGetVersion.d.ts.map +1 -0
- package/funcs/{filesUpdate.js → promptsGetVersion.js} +22 -12
- package/funcs/promptsGetVersion.js.map +1 -0
- package/funcs/promptsList.d.ts +15 -0
- package/funcs/promptsList.d.ts.map +1 -0
- package/funcs/promptsList.js +112 -0
- package/funcs/promptsList.js.map +1 -0
- package/funcs/promptsListVersions.d.ts +15 -0
- package/funcs/promptsListVersions.d.ts.map +1 -0
- package/funcs/promptsListVersions.js +118 -0
- package/funcs/promptsListVersions.js.map +1 -0
- package/funcs/{promptsCreateVersion.d.ts → promptsRetrieve.d.ts} +6 -3
- package/funcs/promptsRetrieve.d.ts.map +1 -0
- package/funcs/{promptsGetOne.js → promptsRetrieve.js} +10 -8
- package/funcs/promptsRetrieve.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 +10 -2
- 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 +13 -0
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +17 -0
- 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 +0 -5
- package/models/components/deployments.d.ts.map +1 -1
- package/models/components/deployments.js +0 -2
- package/models/components/deployments.js.map +1 -1
- package/models/errors/getpromptversion.d.ts +36 -0
- package/models/errors/getpromptversion.d.ts.map +1 -0
- package/models/errors/getpromptversion.js +79 -0
- package/models/errors/getpromptversion.js.map +1 -0
- package/models/errors/index.d.ts +2 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +2 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/updatepromptsnippet.d.ts +36 -0
- package/models/errors/updatepromptsnippet.d.ts.map +1 -0
- package/models/errors/updatepromptsnippet.js +79 -0
- package/models/errors/updatepromptsnippet.js.map +1 -0
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createprompt.d.ts +702 -381
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +642 -482
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createpromptsnippet.d.ts +3567 -0
- package/models/operations/createpromptsnippet.d.ts.map +1 -0
- package/models/operations/createpromptsnippet.js +3056 -0
- package/models/operations/createpromptsnippet.js.map +1 -0
- package/models/operations/deleteprompt.d.ts +1 -1
- package/models/operations/deletepromptsnippet.d.ts +32 -0
- package/models/operations/deletepromptsnippet.d.ts.map +1 -0
- package/models/operations/{duplicateprompt.js → deletepromptsnippet.js} +17 -17
- package/models/operations/deletepromptsnippet.js.map +1 -0
- package/models/operations/deploymentgetconfig.d.ts +39 -0
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +29 -4
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deploymentinvoke.d.ts +23 -683
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +23 -614
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deployments.d.ts +54 -8
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +44 -13
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/deploymentstream.d.ts +1622 -0
- package/models/operations/deploymentstream.d.ts.map +1 -0
- package/models/operations/deploymentstream.js +1571 -0
- package/models/operations/deploymentstream.js.map +1 -0
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.d.ts +1 -5
- package/models/operations/filelist.d.ts.map +1 -1
- package/models/operations/filelist.js +4 -12
- package/models/operations/filelist.js.map +1 -1
- package/models/operations/fileupload.js +2 -2
- package/models/operations/findonebykeypromptsnippet.d.ts +2448 -0
- package/models/operations/findonebykeypromptsnippet.d.ts.map +1 -0
- package/models/operations/findonebykeypromptsnippet.js +2133 -0
- package/models/operations/findonebykeypromptsnippet.js.map +1 -0
- package/models/operations/findonepromptsnippet.d.ts +938 -4768
- package/models/operations/findonepromptsnippet.d.ts.map +1 -1
- package/models/operations/findonepromptsnippet.js +972 -4739
- package/models/operations/findonepromptsnippet.js.map +1 -1
- package/models/operations/getallprompts.d.ts +565 -9945
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +556 -8804
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getallpromptsnippets.d.ts +2512 -0
- package/models/operations/getallpromptsnippets.d.ts.map +1 -0
- package/models/operations/getallpromptsnippets.js +2195 -0
- package/models/operations/getallpromptsnippets.js.map +1 -0
- package/models/operations/getoneprompt.d.ts +1203 -1
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +1011 -1
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +1228 -0
- package/models/operations/getpromptversion.d.ts.map +1 -0
- package/models/operations/getpromptversion.js +1080 -0
- package/models/operations/getpromptversion.js.map +1 -0
- package/models/operations/index.d.ts +8 -5
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +8 -5
- package/models/operations/index.js.map +1 -1
- package/models/operations/listpromptversions.d.ts +1286 -0
- package/models/operations/listpromptversions.d.ts.map +1 -0
- package/models/operations/listpromptversions.js +1142 -0
- package/models/operations/listpromptversions.js.map +1 -0
- package/models/operations/updateprompt.d.ts +1113 -5971
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +1121 -5731
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatepromptsnippet.d.ts +3595 -0
- package/models/operations/updatepromptsnippet.d.ts.map +1 -0
- package/models/operations/updatepromptsnippet.js +3116 -0
- package/models/operations/updatepromptsnippet.js.map +1 -0
- package/package.json +1 -1
- package/sdk/deployments.d.ts +10 -6
- package/sdk/deployments.d.ts.map +1 -1
- package/sdk/deployments.js +14 -6
- package/sdk/deployments.js.map +1 -1
- package/sdk/files.d.ts +0 -11
- package/sdk/files.d.ts.map +1 -1
- package/sdk/files.js +0 -17
- package/sdk/files.js.map +1 -1
- package/sdk/prompts.d.ts +26 -14
- package/sdk/prompts.d.ts.map +1 -1
- package/sdk/prompts.js +37 -25
- package/sdk/prompts.js.map +1 -1
- package/sdk/promptsnippets.d.ts +29 -0
- package/sdk/promptsnippets.d.ts.map +1 -0
- package/sdk/promptsnippets.js +54 -0
- package/sdk/promptsnippets.js.map +1 -0
- 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/src/funcs/deploymentsInvoke.ts +21 -16
- package/src/funcs/{deploymentsAll.ts → deploymentsList.ts} +3 -2
- package/src/funcs/deploymentsStream.ts +150 -0
- package/src/funcs/{promptsGetAll.ts → promptSnippetsCreate.ts} +9 -9
- package/src/funcs/{promptsDuplicate.ts → promptSnippetsDelete.ts} +8 -7
- package/src/funcs/{promptSnippetsFindOne.ts → promptSnippetsGet.ts} +4 -4
- package/src/funcs/{filesUpdate.ts → promptSnippetsGetByKey.ts} +18 -16
- package/src/funcs/{promptTemplatesGetAll.ts → promptSnippetsList.ts} +16 -16
- package/src/funcs/{promptsCreateVersion.ts → promptSnippetsUpdate.ts} +20 -12
- package/src/funcs/promptsCreate.ts +2 -2
- package/src/funcs/promptsDelete.ts +1 -1
- package/src/funcs/promptsGetVersion.ts +146 -0
- package/src/funcs/promptsList.ts +133 -0
- package/src/funcs/promptsListVersions.ts +139 -0
- package/src/funcs/{promptsGetOne.ts → promptsRetrieve.ts} +10 -8
- package/src/funcs/promptsUpdate.ts +1 -1
- package/src/lib/config.ts +12 -2
- package/src/lib/env.ts +32 -0
- package/src/lib/sdks.ts +2 -2
- package/src/models/components/deployments.ts +0 -7
- package/src/models/errors/getpromptversion.ts +71 -0
- package/src/models/errors/index.ts +2 -0
- package/src/models/errors/updatepromptsnippet.ts +71 -0
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createprompt.ts +1049 -691
- package/src/models/operations/createpromptsnippet.ts +6239 -0
- package/src/models/operations/deleteprompt.ts +1 -1
- package/src/models/operations/deletepromptsnippet.ts +69 -0
- package/src/models/operations/deploymentgetconfig.ts +44 -0
- package/src/models/operations/deploymentinvoke.ts +182 -1423
- package/src/models/operations/deployments.ts +68 -18
- package/src/models/operations/deploymentstream.ts +3062 -0
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +5 -17
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/findonebykeypromptsnippet.ts +4483 -0
- package/src/models/operations/findonepromptsnippet.ts +1815 -11101
- package/src/models/operations/getallprompts.ts +1316 -17840
- package/src/models/operations/getallpromptsnippets.ts +4472 -0
- package/src/models/operations/getoneprompt.ts +1914 -1
- package/src/models/operations/getpromptversion.ts +2012 -0
- package/src/models/operations/index.ts +8 -5
- package/src/models/operations/listpromptversions.ts +2146 -0
- package/src/models/operations/updateprompt.ts +2003 -12493
- package/src/models/operations/updatepromptsnippet.ts +6544 -0
- package/src/sdk/deployments.ts +25 -11
- package/src/sdk/files.ts +0 -33
- package/src/sdk/prompts.ts +51 -39
- package/src/sdk/promptsnippets.ts +99 -0
- package/src/sdk/sdk.ts +4 -4
- package/docs/sdks/prompt/README.md +0 -6
- package/docs/sdks/snippets/README.md +0 -84
- package/docs/sdks/templates/README.md +0 -80
- package/funcs/deploymentsAll.d.ts.map +0 -1
- package/funcs/deploymentsAll.js.map +0 -1
- package/funcs/filesBulkUpload.d.ts +0 -15
- package/funcs/filesBulkUpload.d.ts.map +0 -1
- package/funcs/filesBulkUpload.js +0 -109
- package/funcs/filesBulkUpload.js.map +0 -1
- package/funcs/filesUpdate.d.ts.map +0 -1
- package/funcs/filesUpdate.js.map +0 -1
- package/funcs/promptSnippetsFindOne.d.ts.map +0 -1
- package/funcs/promptSnippetsFindOne.js.map +0 -1
- package/funcs/promptTemplatesGetAll.d.ts.map +0 -1
- package/funcs/promptTemplatesGetAll.js.map +0 -1
- package/funcs/promptsCreateVersion.js.map +0 -1
- package/funcs/promptsDuplicate.d.ts.map +0 -1
- package/funcs/promptsDuplicate.js.map +0 -1
- package/funcs/promptsGetAll.d.ts.map +0 -1
- package/funcs/promptsGetAll.js.map +0 -1
- package/funcs/promptsGetOne.d.ts +0 -12
- package/funcs/promptsGetOne.d.ts.map +0 -1
- package/funcs/promptsGetOne.js.map +0 -1
- package/models/operations/bulkfileupload.d.ts +0 -173
- package/models/operations/bulkfileupload.d.ts.map +0 -1
- package/models/operations/bulkfileupload.js +0 -210
- package/models/operations/bulkfileupload.js.map +0 -1
- package/models/operations/createpromptversion.d.ts +0 -2003
- package/models/operations/createpromptversion.d.ts.map +0 -1
- package/models/operations/createpromptversion.js +0 -1852
- package/models/operations/createpromptversion.js.map +0 -1
- package/models/operations/duplicateprompt.d.ts +0 -32
- package/models/operations/duplicateprompt.d.ts.map +0 -1
- package/models/operations/duplicateprompt.js.map +0 -1
- package/models/operations/fileupdate.d.ts +0 -143
- package/models/operations/fileupdate.d.ts.map +0 -1
- package/models/operations/fileupdate.js +0 -193
- package/models/operations/fileupdate.js.map +0 -1
- package/models/operations/getallprompttemplates.d.ts +0 -6607
- package/models/operations/getallprompttemplates.d.ts.map +0 -1
- package/models/operations/getallprompttemplates.js +0 -6225
- package/models/operations/getallprompttemplates.js.map +0 -1
- package/sdk/prompt.d.ts +0 -10
- package/sdk/prompt.d.ts.map +0 -1
- package/sdk/prompt.js +0 -19
- package/sdk/prompt.js.map +0 -1
- package/sdk/snippets.d.ts +0 -9
- package/sdk/snippets.d.ts.map +0 -1
- package/sdk/snippets.js +0 -19
- package/sdk/snippets.js.map +0 -1
- package/sdk/templates.d.ts +0 -9
- package/sdk/templates.d.ts.map +0 -1
- package/sdk/templates.js +0 -19
- package/sdk/templates.js.map +0 -1
- package/src/funcs/filesBulkUpload.ts +0 -129
- package/src/models/operations/bulkfileupload.ts +0 -315
- package/src/models/operations/createpromptversion.ts +0 -3703
- package/src/models/operations/duplicateprompt.ts +0 -69
- package/src/models/operations/fileupdate.ts +0 -298
- package/src/models/operations/getallprompttemplates.ts +0 -13690
- package/src/sdk/prompt.ts +0 -19
- package/src/sdk/snippets.ts +0 -24
- package/src/sdk/templates.ts +0 -24
|
@@ -5,17 +5,89 @@
|
|
|
5
5
|
|
|
6
6
|
### Available Operations
|
|
7
7
|
|
|
8
|
-
* [
|
|
9
|
-
* [
|
|
10
|
-
* [
|
|
11
|
-
* [getOne](#getone) - Get one prompt
|
|
8
|
+
* [list](#list) - List all prompts
|
|
9
|
+
* [create](#create) - Create a prompt
|
|
10
|
+
* [retrieve](#retrieve) - Retrieve a prompt
|
|
12
11
|
* [update](#update) - Update a prompt
|
|
13
|
-
* [
|
|
14
|
-
* [
|
|
12
|
+
* [delete](#delete) - Delete a prompt
|
|
13
|
+
* [listVersions](#listversions) - List all prompt versions
|
|
14
|
+
* [getVersion](#getversion) - Retrieve a prompt version
|
|
15
|
+
|
|
16
|
+
## list
|
|
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 | \*/\* |
|
|
15
87
|
|
|
16
88
|
## create
|
|
17
89
|
|
|
18
|
-
Create a
|
|
90
|
+
Create a prompt
|
|
19
91
|
|
|
20
92
|
### Example Usage
|
|
21
93
|
|
|
@@ -60,7 +132,7 @@ async function run() {
|
|
|
60
132
|
},
|
|
61
133
|
],
|
|
62
134
|
},
|
|
63
|
-
|
|
135
|
+
path: "Customer Service/Billing/Refund",
|
|
64
136
|
});
|
|
65
137
|
|
|
66
138
|
// Handle the result
|
|
@@ -118,7 +190,7 @@ async function run() {
|
|
|
118
190
|
},
|
|
119
191
|
],
|
|
120
192
|
},
|
|
121
|
-
|
|
193
|
+
path: "Customer Service/Billing/Refund",
|
|
122
194
|
});
|
|
123
195
|
|
|
124
196
|
if (!res.ok) {
|
|
@@ -153,9 +225,9 @@ run();
|
|
|
153
225
|
| --------------- | --------------- | --------------- |
|
|
154
226
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
155
227
|
|
|
156
|
-
##
|
|
228
|
+
## retrieve
|
|
157
229
|
|
|
158
|
-
|
|
230
|
+
Retrieves a prompt object
|
|
159
231
|
|
|
160
232
|
### Example Usage
|
|
161
233
|
|
|
@@ -167,7 +239,7 @@ const orq = new Orq({
|
|
|
167
239
|
});
|
|
168
240
|
|
|
169
241
|
async function run() {
|
|
170
|
-
const result = await orq.prompts.
|
|
242
|
+
const result = await orq.prompts.retrieve({
|
|
171
243
|
id: "<id>",
|
|
172
244
|
});
|
|
173
245
|
|
|
@@ -184,7 +256,7 @@ The standalone function version of this method:
|
|
|
184
256
|
|
|
185
257
|
```typescript
|
|
186
258
|
import { OrqCore } from "@orq-ai/node/core.js";
|
|
187
|
-
import {
|
|
259
|
+
import { promptsRetrieve } from "@orq-ai/node/funcs/promptsRetrieve.js";
|
|
188
260
|
|
|
189
261
|
// Use `OrqCore` for best tree-shaking performance.
|
|
190
262
|
// You can create one instance of it to use across an application.
|
|
@@ -193,7 +265,7 @@ const orq = new OrqCore({
|
|
|
193
265
|
});
|
|
194
266
|
|
|
195
267
|
async function run() {
|
|
196
|
-
const res = await
|
|
268
|
+
const res = await promptsRetrieve(orq, {
|
|
197
269
|
id: "<id>",
|
|
198
270
|
});
|
|
199
271
|
|
|
@@ -214,14 +286,14 @@ run();
|
|
|
214
286
|
|
|
215
287
|
| Parameter | Type | Required | Description |
|
|
216
288
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
217
|
-
| `request` | [operations.
|
|
289
|
+
| `request` | [operations.GetOnePromptRequest](../../models/operations/getonepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
218
290
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
219
291
|
| `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. |
|
|
220
292
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
221
293
|
|
|
222
294
|
### Response
|
|
223
295
|
|
|
224
|
-
**Promise\<[operations.
|
|
296
|
+
**Promise\<[operations.GetOnePromptResponseBody](../../models/operations/getonepromptresponsebody.md)\>**
|
|
225
297
|
|
|
226
298
|
### Errors
|
|
227
299
|
|
|
@@ -229,9 +301,9 @@ run();
|
|
|
229
301
|
| --------------- | --------------- | --------------- |
|
|
230
302
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
231
303
|
|
|
232
|
-
##
|
|
304
|
+
## update
|
|
233
305
|
|
|
234
|
-
|
|
306
|
+
Update a prompt
|
|
235
307
|
|
|
236
308
|
### Example Usage
|
|
237
309
|
|
|
@@ -243,11 +315,12 @@ const orq = new Orq({
|
|
|
243
315
|
});
|
|
244
316
|
|
|
245
317
|
async function run() {
|
|
246
|
-
await orq.prompts.
|
|
318
|
+
const result = await orq.prompts.update({
|
|
247
319
|
id: "<id>",
|
|
248
320
|
});
|
|
249
321
|
|
|
250
|
-
|
|
322
|
+
// Handle the result
|
|
323
|
+
console.log(result);
|
|
251
324
|
}
|
|
252
325
|
|
|
253
326
|
run();
|
|
@@ -259,7 +332,7 @@ The standalone function version of this method:
|
|
|
259
332
|
|
|
260
333
|
```typescript
|
|
261
334
|
import { OrqCore } from "@orq-ai/node/core.js";
|
|
262
|
-
import {
|
|
335
|
+
import { promptsUpdate } from "@orq-ai/node/funcs/promptsUpdate.js";
|
|
263
336
|
|
|
264
337
|
// Use `OrqCore` for best tree-shaking performance.
|
|
265
338
|
// You can create one instance of it to use across an application.
|
|
@@ -268,7 +341,7 @@ const orq = new OrqCore({
|
|
|
268
341
|
});
|
|
269
342
|
|
|
270
343
|
async function run() {
|
|
271
|
-
const res = await
|
|
344
|
+
const res = await promptsUpdate(orq, {
|
|
272
345
|
id: "<id>",
|
|
273
346
|
});
|
|
274
347
|
|
|
@@ -278,7 +351,8 @@ async function run() {
|
|
|
278
351
|
|
|
279
352
|
const { value: result } = res;
|
|
280
353
|
|
|
281
|
-
|
|
354
|
+
// Handle the result
|
|
355
|
+
console.log(result);
|
|
282
356
|
}
|
|
283
357
|
|
|
284
358
|
run();
|
|
@@ -288,24 +362,25 @@ run();
|
|
|
288
362
|
|
|
289
363
|
| Parameter | Type | Required | Description |
|
|
290
364
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
291
|
-
| `request` | [operations.
|
|
365
|
+
| `request` | [operations.UpdatePromptRequest](../../models/operations/updatepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
292
366
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
293
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. |
|
|
294
368
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
295
369
|
|
|
296
370
|
### Response
|
|
297
371
|
|
|
298
|
-
**Promise\<
|
|
372
|
+
**Promise\<[operations.UpdatePromptResponseBody](../../models/operations/updatepromptresponsebody.md)\>**
|
|
299
373
|
|
|
300
374
|
### Errors
|
|
301
375
|
|
|
302
|
-
| Error Type
|
|
303
|
-
|
|
|
304
|
-
| errors.
|
|
376
|
+
| Error Type | Status Code | Content Type |
|
|
377
|
+
| ------------------------------- | ------------------------------- | ------------------------------- |
|
|
378
|
+
| errors.UpdatePromptResponseBody | 404 | application/json |
|
|
379
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
305
380
|
|
|
306
|
-
##
|
|
381
|
+
## delete
|
|
307
382
|
|
|
308
|
-
|
|
383
|
+
Delete a prompt
|
|
309
384
|
|
|
310
385
|
### Example Usage
|
|
311
386
|
|
|
@@ -317,7 +392,7 @@ const orq = new Orq({
|
|
|
317
392
|
});
|
|
318
393
|
|
|
319
394
|
async function run() {
|
|
320
|
-
await orq.prompts.
|
|
395
|
+
await orq.prompts.delete({
|
|
321
396
|
id: "<id>",
|
|
322
397
|
});
|
|
323
398
|
|
|
@@ -333,7 +408,7 @@ The standalone function version of this method:
|
|
|
333
408
|
|
|
334
409
|
```typescript
|
|
335
410
|
import { OrqCore } from "@orq-ai/node/core.js";
|
|
336
|
-
import {
|
|
411
|
+
import { promptsDelete } from "@orq-ai/node/funcs/promptsDelete.js";
|
|
337
412
|
|
|
338
413
|
// Use `OrqCore` for best tree-shaking performance.
|
|
339
414
|
// You can create one instance of it to use across an application.
|
|
@@ -342,7 +417,7 @@ const orq = new OrqCore({
|
|
|
342
417
|
});
|
|
343
418
|
|
|
344
419
|
async function run() {
|
|
345
|
-
const res = await
|
|
420
|
+
const res = await promptsDelete(orq, {
|
|
346
421
|
id: "<id>",
|
|
347
422
|
});
|
|
348
423
|
|
|
@@ -362,7 +437,7 @@ run();
|
|
|
362
437
|
|
|
363
438
|
| Parameter | Type | Required | Description |
|
|
364
439
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
365
|
-
| `request` | [operations.
|
|
440
|
+
| `request` | [operations.DeletePromptRequest](../../models/operations/deletepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
366
441
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
367
442
|
| `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
443
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
@@ -377,9 +452,9 @@ run();
|
|
|
377
452
|
| --------------- | --------------- | --------------- |
|
|
378
453
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
379
454
|
|
|
380
|
-
##
|
|
455
|
+
## listVersions
|
|
381
456
|
|
|
382
|
-
|
|
457
|
+
Returns a list of your prompt versions. The prompt versions are returned sorted by creation date, with the most recent prompt versions appearing first
|
|
383
458
|
|
|
384
459
|
### Example Usage
|
|
385
460
|
|
|
@@ -391,8 +466,8 @@ const orq = new Orq({
|
|
|
391
466
|
});
|
|
392
467
|
|
|
393
468
|
async function run() {
|
|
394
|
-
const result = await orq.prompts.
|
|
395
|
-
|
|
469
|
+
const result = await orq.prompts.listVersions({
|
|
470
|
+
promptId: "<id>",
|
|
396
471
|
});
|
|
397
472
|
|
|
398
473
|
// Handle the result
|
|
@@ -408,7 +483,7 @@ The standalone function version of this method:
|
|
|
408
483
|
|
|
409
484
|
```typescript
|
|
410
485
|
import { OrqCore } from "@orq-ai/node/core.js";
|
|
411
|
-
import {
|
|
486
|
+
import { promptsListVersions } from "@orq-ai/node/funcs/promptsListVersions.js";
|
|
412
487
|
|
|
413
488
|
// Use `OrqCore` for best tree-shaking performance.
|
|
414
489
|
// You can create one instance of it to use across an application.
|
|
@@ -417,8 +492,8 @@ const orq = new OrqCore({
|
|
|
417
492
|
});
|
|
418
493
|
|
|
419
494
|
async function run() {
|
|
420
|
-
const res = await
|
|
421
|
-
|
|
495
|
+
const res = await promptsListVersions(orq, {
|
|
496
|
+
promptId: "<id>",
|
|
422
497
|
});
|
|
423
498
|
|
|
424
499
|
if (!res.ok) {
|
|
@@ -438,89 +513,14 @@ run();
|
|
|
438
513
|
|
|
439
514
|
| Parameter | Type | Required | Description |
|
|
440
515
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
441
|
-
| `request` | [operations.
|
|
516
|
+
| `request` | [operations.ListPromptVersionsRequest](../../models/operations/listpromptversionsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
442
517
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
443
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. |
|
|
444
519
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
445
520
|
|
|
446
521
|
### Response
|
|
447
522
|
|
|
448
|
-
**Promise\<[operations.
|
|
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\>**
|
|
523
|
+
**Promise\<[operations.ListPromptVersionsResponseBody](../../models/operations/listpromptversionsresponsebody.md)\>**
|
|
524
524
|
|
|
525
525
|
### Errors
|
|
526
526
|
|
|
@@ -528,9 +528,9 @@ run();
|
|
|
528
528
|
| --------------- | --------------- | --------------- |
|
|
529
529
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
530
530
|
|
|
531
|
-
##
|
|
531
|
+
## getVersion
|
|
532
532
|
|
|
533
|
-
|
|
533
|
+
Retrieves a specific version of a prompt by its ID and version ID.
|
|
534
534
|
|
|
535
535
|
### Example Usage
|
|
536
536
|
|
|
@@ -542,7 +542,10 @@ const orq = new Orq({
|
|
|
542
542
|
});
|
|
543
543
|
|
|
544
544
|
async function run() {
|
|
545
|
-
const result = await orq.prompts.
|
|
545
|
+
const result = await orq.prompts.getVersion({
|
|
546
|
+
promptId: "<id>",
|
|
547
|
+
versionId: "<id>",
|
|
548
|
+
});
|
|
546
549
|
|
|
547
550
|
// Handle the result
|
|
548
551
|
console.log(result);
|
|
@@ -557,7 +560,7 @@ The standalone function version of this method:
|
|
|
557
560
|
|
|
558
561
|
```typescript
|
|
559
562
|
import { OrqCore } from "@orq-ai/node/core.js";
|
|
560
|
-
import {
|
|
563
|
+
import { promptsGetVersion } from "@orq-ai/node/funcs/promptsGetVersion.js";
|
|
561
564
|
|
|
562
565
|
// Use `OrqCore` for best tree-shaking performance.
|
|
563
566
|
// You can create one instance of it to use across an application.
|
|
@@ -566,7 +569,10 @@ const orq = new OrqCore({
|
|
|
566
569
|
});
|
|
567
570
|
|
|
568
571
|
async function run() {
|
|
569
|
-
const res = await
|
|
572
|
+
const res = await promptsGetVersion(orq, {
|
|
573
|
+
promptId: "<id>",
|
|
574
|
+
versionId: "<id>",
|
|
575
|
+
});
|
|
570
576
|
|
|
571
577
|
if (!res.ok) {
|
|
572
578
|
throw res.error;
|
|
@@ -585,17 +591,18 @@ run();
|
|
|
585
591
|
|
|
586
592
|
| Parameter | Type | Required | Description |
|
|
587
593
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
588
|
-
| `request` | [operations.
|
|
594
|
+
| `request` | [operations.GetPromptVersionRequest](../../models/operations/getpromptversionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
589
595
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
590
596
|
| `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. |
|
|
591
597
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
592
598
|
|
|
593
599
|
### Response
|
|
594
600
|
|
|
595
|
-
**Promise\<[operations.
|
|
601
|
+
**Promise\<[operations.GetPromptVersionResponseBody](../../models/operations/getpromptversionresponsebody.md)\>**
|
|
596
602
|
|
|
597
603
|
### Errors
|
|
598
604
|
|
|
599
|
-
| Error Type
|
|
600
|
-
|
|
|
601
|
-
| errors.
|
|
605
|
+
| Error Type | Status Code | Content Type |
|
|
606
|
+
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
|
607
|
+
| errors.GetPromptVersionResponseBody | 404 | application/json |
|
|
608
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|