@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
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Developer-friendly & type-safe Typescript SDK specifically catered to leverage *
|
|
|
12
12
|
<!-- Start Summary [summary] -->
|
|
13
13
|
## Summary
|
|
14
14
|
|
|
15
|
-
[Dev] orq.ai API:
|
|
15
|
+
[Dev] orq.ai API: orq.ai API documentation
|
|
16
16
|
|
|
17
17
|
For more information about the API: [orq.ai Documentation](https://docs.orq.ai)
|
|
18
18
|
<!-- End Summary [summary] -->
|
|
@@ -150,9 +150,10 @@ run();
|
|
|
150
150
|
|
|
151
151
|
### [deployments](docs/sdks/deployments/README.md)
|
|
152
152
|
|
|
153
|
-
* [
|
|
153
|
+
* [list](docs/sdks/deployments/README.md#list) - List all deployments
|
|
154
154
|
* [getConfig](docs/sdks/deployments/README.md#getconfig) - Get config
|
|
155
155
|
* [invoke](docs/sdks/deployments/README.md#invoke) - Invoke
|
|
156
|
+
* [stream](docs/sdks/deployments/README.md#stream) - Stream
|
|
156
157
|
|
|
157
158
|
#### [deployments.metrics](docs/sdks/metrics/README.md)
|
|
158
159
|
|
|
@@ -167,31 +168,27 @@ run();
|
|
|
167
168
|
* [upload](docs/sdks/files/README.md#upload) - Upload file
|
|
168
169
|
* [list](docs/sdks/files/README.md#list) - List all files
|
|
169
170
|
* [get](docs/sdks/files/README.md#get) - Get file by ID
|
|
170
|
-
* [update](docs/sdks/files/README.md#update) - Update file name
|
|
171
171
|
* [delete](docs/sdks/files/README.md#delete) - Delete file
|
|
172
|
-
* [bulkUpload](docs/sdks/files/README.md#bulkupload) - Bulk upload file
|
|
173
172
|
|
|
174
173
|
|
|
175
|
-
### [prompt](docs/sdks/prompt/README.md)
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
#### [prompt.snippets](docs/sdks/snippets/README.md)
|
|
179
|
-
|
|
180
|
-
* [findOne](docs/sdks/snippets/README.md#findone) - Get one prompt snippet
|
|
181
|
-
|
|
182
|
-
#### [prompt.templates](docs/sdks/templates/README.md)
|
|
183
|
-
|
|
184
|
-
* [getAll](docs/sdks/templates/README.md#getall) - Get all prompt templates
|
|
185
|
-
|
|
186
174
|
### [prompts](docs/sdks/prompts/README.md)
|
|
187
175
|
|
|
188
|
-
* [
|
|
189
|
-
* [
|
|
190
|
-
* [
|
|
191
|
-
* [getOne](docs/sdks/prompts/README.md#getone) - Get one prompt
|
|
176
|
+
* [list](docs/sdks/prompts/README.md#list) - List all prompts
|
|
177
|
+
* [create](docs/sdks/prompts/README.md#create) - Create a prompt
|
|
178
|
+
* [retrieve](docs/sdks/prompts/README.md#retrieve) - Retrieve a prompt
|
|
192
179
|
* [update](docs/sdks/prompts/README.md#update) - Update a prompt
|
|
193
|
-
* [
|
|
194
|
-
* [
|
|
180
|
+
* [delete](docs/sdks/prompts/README.md#delete) - Delete a prompt
|
|
181
|
+
* [listVersions](docs/sdks/prompts/README.md#listversions) - List all prompt versions
|
|
182
|
+
* [getVersion](docs/sdks/prompts/README.md#getversion) - Retrieve a prompt version
|
|
183
|
+
|
|
184
|
+
### [promptSnippets](docs/sdks/promptsnippets/README.md)
|
|
185
|
+
|
|
186
|
+
* [list](docs/sdks/promptsnippets/README.md#list) - List all prompts snippets
|
|
187
|
+
* [create](docs/sdks/promptsnippets/README.md#create) - Create a prompt snippet
|
|
188
|
+
* [update](docs/sdks/promptsnippets/README.md#update) - Update a prompt snippet
|
|
189
|
+
* [delete](docs/sdks/promptsnippets/README.md#delete) - Delete a prompt snippet
|
|
190
|
+
* [get](docs/sdks/promptsnippets/README.md#get) - Retrieve a prompt snippet
|
|
191
|
+
* [getByKey](docs/sdks/promptsnippets/README.md#getbykey) - Retrieve a prompt snippet by key
|
|
195
192
|
|
|
196
193
|
### [remoteconfig](docs/sdks/remoteconfig/README.md)
|
|
197
194
|
|
|
@@ -216,26 +213,29 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
216
213
|
<summary>Available standalone functions</summary>
|
|
217
214
|
|
|
218
215
|
- [`contactsCreate`](docs/sdks/contacts/README.md#create) - Update user information
|
|
219
|
-
- [`deploymentsAll`](docs/sdks/deployments/README.md#all) - List all deployments
|
|
220
216
|
- [`deploymentsGetConfig`](docs/sdks/deployments/README.md#getconfig) - Get config
|
|
221
217
|
- [`deploymentsInvoke`](docs/sdks/deployments/README.md#invoke) - Invoke
|
|
218
|
+
- [`deploymentsList`](docs/sdks/deployments/README.md#list) - List all deployments
|
|
222
219
|
- [`deploymentsMetricsCreate`](docs/sdks/metrics/README.md#create) - Add metrics
|
|
220
|
+
- [`deploymentsStream`](docs/sdks/deployments/README.md#stream) - Stream
|
|
223
221
|
- [`feedbackCreate`](docs/sdks/feedback/README.md#create) - Submit feedback
|
|
224
|
-
- [`filesBulkUpload`](docs/sdks/files/README.md#bulkupload) - Bulk upload file
|
|
225
222
|
- [`filesDelete`](docs/sdks/files/README.md#delete) - Delete file
|
|
226
223
|
- [`filesGet`](docs/sdks/files/README.md#get) - Get file by ID
|
|
227
224
|
- [`filesList`](docs/sdks/files/README.md#list) - List all files
|
|
228
|
-
- [`filesUpdate`](docs/sdks/files/README.md#update) - Update file name
|
|
229
225
|
- [`filesUpload`](docs/sdks/files/README.md#upload) - Upload file
|
|
230
|
-
- [`promptsCreate`](docs/sdks/prompts/README.md#create) - Create a
|
|
231
|
-
- [`promptsCreateVersion`](docs/sdks/prompts/README.md#createversion) - Create a new prompt version
|
|
226
|
+
- [`promptsCreate`](docs/sdks/prompts/README.md#create) - Create a prompt
|
|
232
227
|
- [`promptsDelete`](docs/sdks/prompts/README.md#delete) - Delete a prompt
|
|
233
|
-
- [`
|
|
234
|
-
- [`
|
|
235
|
-
- [`
|
|
236
|
-
- [`
|
|
228
|
+
- [`promptsGetVersion`](docs/sdks/prompts/README.md#getversion) - Retrieve a prompt version
|
|
229
|
+
- [`promptsList`](docs/sdks/prompts/README.md#list) - List all prompts
|
|
230
|
+
- [`promptsListVersions`](docs/sdks/prompts/README.md#listversions) - List all prompt versions
|
|
231
|
+
- [`promptSnippetsCreate`](docs/sdks/promptsnippets/README.md#create) - Create a prompt snippet
|
|
232
|
+
- [`promptSnippetsDelete`](docs/sdks/promptsnippets/README.md#delete) - Delete a prompt snippet
|
|
233
|
+
- [`promptSnippetsGet`](docs/sdks/promptsnippets/README.md#get) - Retrieve a prompt snippet
|
|
234
|
+
- [`promptSnippetsGetByKey`](docs/sdks/promptsnippets/README.md#getbykey) - Retrieve a prompt snippet by key
|
|
235
|
+
- [`promptSnippetsList`](docs/sdks/promptsnippets/README.md#list) - List all prompts snippets
|
|
236
|
+
- [`promptSnippetsUpdate`](docs/sdks/promptsnippets/README.md#update) - Update a prompt snippet
|
|
237
|
+
- [`promptsRetrieve`](docs/sdks/prompts/README.md#retrieve) - Retrieve a prompt
|
|
237
238
|
- [`promptsUpdate`](docs/sdks/prompts/README.md#update) - Update a prompt
|
|
238
|
-
- [`promptTemplatesGetAll`](docs/sdks/templates/README.md#getall) - Get all prompt templates
|
|
239
239
|
- [`remoteconfigGetConfig`](docs/sdks/remoteconfig/README.md#getconfig) - Get Configurations
|
|
240
240
|
|
|
241
241
|
</details>
|
|
@@ -258,7 +258,7 @@ const orq = new Orq({
|
|
|
258
258
|
});
|
|
259
259
|
|
|
260
260
|
async function run() {
|
|
261
|
-
const result = await orq.deployments.
|
|
261
|
+
const result = await orq.deployments.stream({
|
|
262
262
|
key: "<key>",
|
|
263
263
|
});
|
|
264
264
|
|
|
@@ -381,7 +381,7 @@ run();
|
|
|
381
381
|
<!-- Start Error Handling [errors] -->
|
|
382
382
|
## Error Handling
|
|
383
383
|
|
|
384
|
-
Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `
|
|
384
|
+
Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `list` method may throw the following errors:
|
|
385
385
|
|
|
386
386
|
| Error Type | Status Code | Content Type |
|
|
387
387
|
| ------------------- | ----------- | ---------------- |
|
|
@@ -401,7 +401,7 @@ const orq = new Orq({
|
|
|
401
401
|
async function run() {
|
|
402
402
|
let result;
|
|
403
403
|
try {
|
|
404
|
-
result = await orq.deployments.
|
|
404
|
+
result = await orq.deployments.list({});
|
|
405
405
|
|
|
406
406
|
// Handle the result
|
|
407
407
|
console.log(result);
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
### Available Operations
|
|
7
7
|
|
|
8
|
-
* [
|
|
8
|
+
* [list](#list) - List all deployments
|
|
9
9
|
* [getConfig](#getconfig) - Get config
|
|
10
10
|
* [invoke](#invoke) - Invoke
|
|
11
|
+
* [stream](#stream) - Stream
|
|
11
12
|
|
|
12
|
-
##
|
|
13
|
+
## list
|
|
13
14
|
|
|
14
15
|
Returns a list of your deployments. The deployments are returned sorted by creation date, with the most recent deployments appearing first.
|
|
15
16
|
|
|
@@ -23,7 +24,7 @@ const orq = new Orq({
|
|
|
23
24
|
});
|
|
24
25
|
|
|
25
26
|
async function run() {
|
|
26
|
-
const result = await orq.deployments.
|
|
27
|
+
const result = await orq.deployments.list({});
|
|
27
28
|
|
|
28
29
|
// Handle the result
|
|
29
30
|
console.log(result);
|
|
@@ -38,7 +39,7 @@ The standalone function version of this method:
|
|
|
38
39
|
|
|
39
40
|
```typescript
|
|
40
41
|
import { OrqCore } from "@orq-ai/node/core.js";
|
|
41
|
-
import {
|
|
42
|
+
import { deploymentsList } from "@orq-ai/node/funcs/deploymentsList.js";
|
|
42
43
|
|
|
43
44
|
// Use `OrqCore` for best tree-shaking performance.
|
|
44
45
|
// You can create one instance of it to use across an application.
|
|
@@ -47,7 +48,7 @@ const orq = new OrqCore({
|
|
|
47
48
|
});
|
|
48
49
|
|
|
49
50
|
async function run() {
|
|
50
|
-
const res = await
|
|
51
|
+
const res = await deploymentsList(orq, {});
|
|
51
52
|
|
|
52
53
|
if (!res.ok) {
|
|
53
54
|
throw res.error;
|
|
@@ -176,6 +177,82 @@ async function run() {
|
|
|
176
177
|
key: "<key>",
|
|
177
178
|
});
|
|
178
179
|
|
|
180
|
+
// Handle the result
|
|
181
|
+
console.log(result);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
run();
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Standalone function
|
|
188
|
+
|
|
189
|
+
The standalone function version of this method:
|
|
190
|
+
|
|
191
|
+
```typescript
|
|
192
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
193
|
+
import { deploymentsInvoke } from "@orq-ai/node/funcs/deploymentsInvoke.js";
|
|
194
|
+
|
|
195
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
196
|
+
// You can create one instance of it to use across an application.
|
|
197
|
+
const orq = new OrqCore({
|
|
198
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
async function run() {
|
|
202
|
+
const res = await deploymentsInvoke(orq, {
|
|
203
|
+
key: "<key>",
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
if (!res.ok) {
|
|
207
|
+
throw res.error;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const { value: result } = res;
|
|
211
|
+
|
|
212
|
+
// Handle the result
|
|
213
|
+
console.log(result);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
run();
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Parameters
|
|
220
|
+
|
|
221
|
+
| Parameter | Type | Required | Description |
|
|
222
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
223
|
+
| `request` | [components.Deployments](../../models/components/deployments.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
224
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
225
|
+
| `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. |
|
|
226
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
227
|
+
|
|
228
|
+
### Response
|
|
229
|
+
|
|
230
|
+
**Promise\<[operations.DeploymentInvokeResponseBody](../../models/operations/deploymentinvokeresponsebody.md)\>**
|
|
231
|
+
|
|
232
|
+
### Errors
|
|
233
|
+
|
|
234
|
+
| Error Type | Status Code | Content Type |
|
|
235
|
+
| --------------- | --------------- | --------------- |
|
|
236
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
237
|
+
|
|
238
|
+
## stream
|
|
239
|
+
|
|
240
|
+
Stream deployment generation. Only supported for completions and chat completions.
|
|
241
|
+
|
|
242
|
+
### Example Usage
|
|
243
|
+
|
|
244
|
+
```typescript
|
|
245
|
+
import { Orq } from "@orq-ai/node";
|
|
246
|
+
|
|
247
|
+
const orq = new Orq({
|
|
248
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
async function run() {
|
|
252
|
+
const result = await orq.deployments.stream({
|
|
253
|
+
key: "<key>",
|
|
254
|
+
});
|
|
255
|
+
|
|
179
256
|
for await (const event of result) {
|
|
180
257
|
// Handle the event
|
|
181
258
|
console.log(event);
|
|
@@ -191,7 +268,7 @@ The standalone function version of this method:
|
|
|
191
268
|
|
|
192
269
|
```typescript
|
|
193
270
|
import { OrqCore } from "@orq-ai/node/core.js";
|
|
194
|
-
import {
|
|
271
|
+
import { deploymentsStream } from "@orq-ai/node/funcs/deploymentsStream.js";
|
|
195
272
|
|
|
196
273
|
// Use `OrqCore` for best tree-shaking performance.
|
|
197
274
|
// You can create one instance of it to use across an application.
|
|
@@ -200,7 +277,7 @@ const orq = new OrqCore({
|
|
|
200
277
|
});
|
|
201
278
|
|
|
202
279
|
async function run() {
|
|
203
|
-
const res = await
|
|
280
|
+
const res = await deploymentsStream(orq, {
|
|
204
281
|
key: "<key>",
|
|
205
282
|
});
|
|
206
283
|
|
|
@@ -223,14 +300,14 @@ run();
|
|
|
223
300
|
|
|
224
301
|
| Parameter | Type | Required | Description |
|
|
225
302
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
226
|
-
| `request` | [
|
|
303
|
+
| `request` | [operations.DeploymentStreamRequestBody](../../models/operations/deploymentstreamrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
227
304
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
228
305
|
| `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. |
|
|
229
306
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
230
307
|
|
|
231
308
|
### Response
|
|
232
309
|
|
|
233
|
-
**Promise\<[operations.
|
|
310
|
+
**Promise\<[EventStream<operations.DeploymentStreamResponseBody>](../../models/.md)\>**
|
|
234
311
|
|
|
235
312
|
### Errors
|
|
236
313
|
|
|
@@ -8,9 +8,7 @@
|
|
|
8
8
|
* [upload](#upload) - Upload file
|
|
9
9
|
* [list](#list) - List all files
|
|
10
10
|
* [get](#get) - Get file by ID
|
|
11
|
-
* [update](#update) - Update file name
|
|
12
11
|
* [delete](#delete) - Delete file
|
|
13
|
-
* [bulkUpload](#bulkupload) - Bulk upload file
|
|
14
12
|
|
|
15
13
|
## upload
|
|
16
14
|
|
|
@@ -98,9 +96,7 @@ const orq = new Orq({
|
|
|
98
96
|
});
|
|
99
97
|
|
|
100
98
|
async function run() {
|
|
101
|
-
const result = await orq.files.list({
|
|
102
|
-
limit: 50,
|
|
103
|
-
});
|
|
99
|
+
const result = await orq.files.list({});
|
|
104
100
|
|
|
105
101
|
// Handle the result
|
|
106
102
|
console.log(result);
|
|
@@ -124,9 +120,7 @@ const orq = new OrqCore({
|
|
|
124
120
|
});
|
|
125
121
|
|
|
126
122
|
async function run() {
|
|
127
|
-
const res = await filesList(orq, {
|
|
128
|
-
limit: 50,
|
|
129
|
-
});
|
|
123
|
+
const res = await filesList(orq, {});
|
|
130
124
|
|
|
131
125
|
if (!res.ok) {
|
|
132
126
|
throw res.error;
|
|
@@ -236,82 +230,6 @@ run();
|
|
|
236
230
|
| --------------- | --------------- | --------------- |
|
|
237
231
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
238
232
|
|
|
239
|
-
## update
|
|
240
|
-
|
|
241
|
-
Update file name
|
|
242
|
-
|
|
243
|
-
### Example Usage
|
|
244
|
-
|
|
245
|
-
```typescript
|
|
246
|
-
import { Orq } from "@orq-ai/node";
|
|
247
|
-
|
|
248
|
-
const orq = new Orq({
|
|
249
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
250
|
-
});
|
|
251
|
-
|
|
252
|
-
async function run() {
|
|
253
|
-
const result = await orq.files.update({
|
|
254
|
-
fileId: "<id>",
|
|
255
|
-
});
|
|
256
|
-
|
|
257
|
-
// Handle the result
|
|
258
|
-
console.log(result);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
run();
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
### Standalone function
|
|
265
|
-
|
|
266
|
-
The standalone function version of this method:
|
|
267
|
-
|
|
268
|
-
```typescript
|
|
269
|
-
import { OrqCore } from "@orq-ai/node/core.js";
|
|
270
|
-
import { filesUpdate } from "@orq-ai/node/funcs/filesUpdate.js";
|
|
271
|
-
|
|
272
|
-
// Use `OrqCore` for best tree-shaking performance.
|
|
273
|
-
// You can create one instance of it to use across an application.
|
|
274
|
-
const orq = new OrqCore({
|
|
275
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
276
|
-
});
|
|
277
|
-
|
|
278
|
-
async function run() {
|
|
279
|
-
const res = await filesUpdate(orq, {
|
|
280
|
-
fileId: "<id>",
|
|
281
|
-
});
|
|
282
|
-
|
|
283
|
-
if (!res.ok) {
|
|
284
|
-
throw res.error;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
const { value: result } = res;
|
|
288
|
-
|
|
289
|
-
// Handle the result
|
|
290
|
-
console.log(result);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
run();
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
### Parameters
|
|
297
|
-
|
|
298
|
-
| Parameter | Type | Required | Description |
|
|
299
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
300
|
-
| `request` | [operations.FileUpdateRequest](../../models/operations/fileupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
301
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
302
|
-
| `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. |
|
|
303
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
304
|
-
|
|
305
|
-
### Response
|
|
306
|
-
|
|
307
|
-
**Promise\<[operations.FileUpdateResponseBody](../../models/operations/fileupdateresponsebody.md)\>**
|
|
308
|
-
|
|
309
|
-
### Errors
|
|
310
|
-
|
|
311
|
-
| Error Type | Status Code | Content Type |
|
|
312
|
-
| --------------- | --------------- | --------------- |
|
|
313
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
314
|
-
|
|
315
233
|
## delete
|
|
316
234
|
|
|
317
235
|
Delete file
|
|
@@ -382,96 +300,6 @@ run();
|
|
|
382
300
|
|
|
383
301
|
### Errors
|
|
384
302
|
|
|
385
|
-
| Error Type | Status Code | Content Type |
|
|
386
|
-
| --------------- | --------------- | --------------- |
|
|
387
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
388
|
-
|
|
389
|
-
## bulkUpload
|
|
390
|
-
|
|
391
|
-
Files are used to upload documents that can be used with features like [Deployments](https://docs.orq.ai/reference/post_v2-deployments-get-config).
|
|
392
|
-
|
|
393
|
-
### Example Usage
|
|
394
|
-
|
|
395
|
-
```typescript
|
|
396
|
-
import { Orq } from "@orq-ai/node";
|
|
397
|
-
import { openAsBlob } from "node:fs";
|
|
398
|
-
|
|
399
|
-
const orq = new Orq({
|
|
400
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
401
|
-
});
|
|
402
|
-
|
|
403
|
-
async function run() {
|
|
404
|
-
const result = await orq.files.bulkUpload({
|
|
405
|
-
files: [
|
|
406
|
-
{
|
|
407
|
-
fileName: "example.file",
|
|
408
|
-
content: await openAsBlob("example.file"),
|
|
409
|
-
},
|
|
410
|
-
],
|
|
411
|
-
purpose: "knowledge_datasource",
|
|
412
|
-
});
|
|
413
|
-
|
|
414
|
-
// Handle the result
|
|
415
|
-
console.log(result);
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
run();
|
|
419
|
-
```
|
|
420
|
-
|
|
421
|
-
### Standalone function
|
|
422
|
-
|
|
423
|
-
The standalone function version of this method:
|
|
424
|
-
|
|
425
|
-
```typescript
|
|
426
|
-
import { OrqCore } from "@orq-ai/node/core.js";
|
|
427
|
-
import { filesBulkUpload } from "@orq-ai/node/funcs/filesBulkUpload.js";
|
|
428
|
-
import { openAsBlob } from "node:fs";
|
|
429
|
-
|
|
430
|
-
// Use `OrqCore` for best tree-shaking performance.
|
|
431
|
-
// You can create one instance of it to use across an application.
|
|
432
|
-
const orq = new OrqCore({
|
|
433
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
434
|
-
});
|
|
435
|
-
|
|
436
|
-
async function run() {
|
|
437
|
-
const res = await filesBulkUpload(orq, {
|
|
438
|
-
files: [
|
|
439
|
-
{
|
|
440
|
-
fileName: "example.file",
|
|
441
|
-
content: await openAsBlob("example.file"),
|
|
442
|
-
},
|
|
443
|
-
],
|
|
444
|
-
purpose: "knowledge_datasource",
|
|
445
|
-
});
|
|
446
|
-
|
|
447
|
-
if (!res.ok) {
|
|
448
|
-
throw res.error;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
const { value: result } = res;
|
|
452
|
-
|
|
453
|
-
// Handle the result
|
|
454
|
-
console.log(result);
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
run();
|
|
458
|
-
```
|
|
459
|
-
|
|
460
|
-
### Parameters
|
|
461
|
-
|
|
462
|
-
| Parameter | Type | Required | Description |
|
|
463
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
464
|
-
| `request` | [operations.BulkFileUploadRequestBody](../../models/operations/bulkfileuploadrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
465
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
466
|
-
| `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. |
|
|
467
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
468
|
-
|
|
469
|
-
### Response
|
|
470
|
-
|
|
471
|
-
**Promise\<[operations.ResponseBody[]](../../models/.md)\>**
|
|
472
|
-
|
|
473
|
-
### Errors
|
|
474
|
-
|
|
475
303
|
| Error Type | Status Code | Content Type |
|
|
476
304
|
| --------------- | --------------- | --------------- |
|
|
477
305
|
| errors.APIError | 4XX, 5XX | \*/\* |
|