@orq-ai/node 3.2.4 → 3.2.6
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 +39 -1
- package/bin/mcp-server.js +2424 -704
- package/bin/mcp-server.js.map +28 -24
- package/docs/sdks/deployments/README.md +81 -0
- package/docs/sdks/prompts/README.md +110 -110
- package/funcs/deploymentsStream.d.ts +17 -0
- package/funcs/deploymentsStream.d.ts.map +1 -0
- package/funcs/deploymentsStream.js +130 -0
- package/funcs/deploymentsStream.js.map +1 -0
- package/funcs/promptsList.js +1 -1
- package/funcs/promptsList.js.map +1 -1
- package/jsr.json +2 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/lib/event-streams.d.ts +17 -0
- package/lib/event-streams.d.ts.map +1 -0
- package/lib/event-streams.js +220 -0
- package/lib/event-streams.js.map +1 -0
- package/lib/matchers.d.ts.map +1 -1
- package/lib/matchers.js +4 -1
- package/lib/matchers.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +4 -2
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/deploymentsStream.d.ts +8 -0
- package/mcp-server/tools/deploymentsStream.d.ts.map +1 -0
- package/mcp-server/tools/deploymentsStream.js +64 -0
- package/mcp-server/tools/deploymentsStream.js.map +1 -0
- package/models/operations/bulkcreatedatapoints.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/createprompt.d.ts +317 -317
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +444 -442
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/deploymentstream.d.ts +2938 -0
- package/models/operations/deploymentstream.d.ts.map +1 -0
- package/models/operations/deploymentstream.js +2828 -0
- package/models/operations/deploymentstream.js.map +1 -0
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updateprompt.d.ts +317 -317
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +444 -444
- package/models/operations/updateprompt.js.map +1 -1
- package/package.json +1 -1
- package/sdk/deployments.d.ts +8 -0
- package/sdk/deployments.d.ts.map +1 -1
- package/sdk/deployments.js +10 -0
- package/sdk/deployments.js.map +1 -1
- package/sdk/prompts.d.ts +4 -4
- package/sdk/prompts.d.ts.map +1 -1
- package/sdk/prompts.js +6 -6
- package/sdk/prompts.js.map +1 -1
- package/src/funcs/deploymentsStream.ts +178 -0
- package/src/funcs/promptsList.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/lib/event-streams.ts +264 -0
- package/src/lib/matchers.ts +4 -1
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +4 -2
- package/src/mcp-server/tools/deploymentsStream.ts +37 -0
- package/src/models/operations/bulkcreatedatapoints.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +2 -2
- package/src/models/operations/createprompt.ts +599 -680
- package/src/models/operations/deploymentstream.ts +5960 -0
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updateprompt.ts +682 -599
- package/src/sdk/deployments.ts +19 -0
- package/src/sdk/prompts.ts +14 -14
|
@@ -8,6 +8,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
|
|
|
@@ -230,6 +231,86 @@ run();
|
|
|
230
231
|
|
|
231
232
|
### Errors
|
|
232
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
|
+
|
|
256
|
+
for await (const event of result) {
|
|
257
|
+
// Handle the event
|
|
258
|
+
console.log(event);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
run();
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### Standalone function
|
|
266
|
+
|
|
267
|
+
The standalone function version of this method:
|
|
268
|
+
|
|
269
|
+
```typescript
|
|
270
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
271
|
+
import { deploymentsStream } from "@orq-ai/node/funcs/deploymentsStream.js";
|
|
272
|
+
|
|
273
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
274
|
+
// You can create one instance of it to use across an application.
|
|
275
|
+
const orq = new OrqCore({
|
|
276
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
async function run() {
|
|
280
|
+
const res = await deploymentsStream(orq, {
|
|
281
|
+
key: "<key>",
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
if (!res.ok) {
|
|
285
|
+
throw res.error;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
const { value: result } = res;
|
|
289
|
+
|
|
290
|
+
for await (const event of result) {
|
|
291
|
+
// Handle the event
|
|
292
|
+
console.log(event);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
run();
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### Parameters
|
|
300
|
+
|
|
301
|
+
| Parameter | Type | Required | Description |
|
|
302
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
303
|
+
| `request` | [operations.DeploymentStreamRequestBody](../../models/operations/deploymentstreamrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
304
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
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. |
|
|
306
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
307
|
+
|
|
308
|
+
### Response
|
|
309
|
+
|
|
310
|
+
**Promise\<[EventStream<operations.DeploymentStreamResponseBody>](../../models/.md)\>**
|
|
311
|
+
|
|
312
|
+
### Errors
|
|
313
|
+
|
|
233
314
|
| Error Type | Status Code | Content Type |
|
|
234
315
|
| --------------- | --------------- | --------------- |
|
|
235
316
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
### Available Operations
|
|
7
7
|
|
|
8
8
|
* [list](#list) - List all prompts
|
|
9
|
+
* [create](#create) - Create a prompt
|
|
9
10
|
* [retrieve](#retrieve) - Retrieve a prompt
|
|
10
11
|
* [update](#update) - Update a prompt
|
|
11
12
|
* [delete](#delete) - Delete a prompt
|
|
12
|
-
* [create](#create) - Create a prompt
|
|
13
13
|
* [listVersions](#listversions) - List all prompt versions
|
|
14
14
|
* [getVersion](#getversion) - Retrieve a prompt version
|
|
15
15
|
|
|
@@ -85,9 +85,9 @@ run();
|
|
|
85
85
|
| --------------- | --------------- | --------------- |
|
|
86
86
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
87
87
|
|
|
88
|
-
##
|
|
88
|
+
## create
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
Create a prompt
|
|
91
91
|
|
|
92
92
|
### Example Usage
|
|
93
93
|
|
|
@@ -99,8 +99,40 @@ const orq = new Orq({
|
|
|
99
99
|
});
|
|
100
100
|
|
|
101
101
|
async function run() {
|
|
102
|
-
const result = await orq.prompts.
|
|
103
|
-
|
|
102
|
+
const result = await orq.prompts.create({
|
|
103
|
+
displayName: "Jed6",
|
|
104
|
+
promptConfig: {
|
|
105
|
+
messages: [
|
|
106
|
+
{
|
|
107
|
+
role: "system",
|
|
108
|
+
content: "<value>",
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
role: "system",
|
|
112
|
+
content: [
|
|
113
|
+
{
|
|
114
|
+
type: "image_url",
|
|
115
|
+
imageUrl: {
|
|
116
|
+
url: "https://well-worn-formation.biz",
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
type: "text",
|
|
121
|
+
text: "<value>",
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
type: "text",
|
|
125
|
+
text: "<value>",
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
role: "assistant",
|
|
131
|
+
content: "<value>",
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
path: "Customer Service/Billing/Refund",
|
|
104
136
|
});
|
|
105
137
|
|
|
106
138
|
// Handle the result
|
|
@@ -116,7 +148,7 @@ The standalone function version of this method:
|
|
|
116
148
|
|
|
117
149
|
```typescript
|
|
118
150
|
import { OrqCore } from "@orq-ai/node/core.js";
|
|
119
|
-
import {
|
|
151
|
+
import { promptsCreate } from "@orq-ai/node/funcs/promptsCreate.js";
|
|
120
152
|
|
|
121
153
|
// Use `OrqCore` for best tree-shaking performance.
|
|
122
154
|
// You can create one instance of it to use across an application.
|
|
@@ -125,8 +157,40 @@ const orq = new OrqCore({
|
|
|
125
157
|
});
|
|
126
158
|
|
|
127
159
|
async function run() {
|
|
128
|
-
const res = await
|
|
129
|
-
|
|
160
|
+
const res = await promptsCreate(orq, {
|
|
161
|
+
displayName: "Jed6",
|
|
162
|
+
promptConfig: {
|
|
163
|
+
messages: [
|
|
164
|
+
{
|
|
165
|
+
role: "system",
|
|
166
|
+
content: "<value>",
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
role: "system",
|
|
170
|
+
content: [
|
|
171
|
+
{
|
|
172
|
+
type: "image_url",
|
|
173
|
+
imageUrl: {
|
|
174
|
+
url: "https://well-worn-formation.biz",
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
type: "text",
|
|
179
|
+
text: "<value>",
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
type: "text",
|
|
183
|
+
text: "<value>",
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
role: "assistant",
|
|
189
|
+
content: "<value>",
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
},
|
|
193
|
+
path: "Customer Service/Billing/Refund",
|
|
130
194
|
});
|
|
131
195
|
|
|
132
196
|
if (!res.ok) {
|
|
@@ -146,14 +210,14 @@ run();
|
|
|
146
210
|
|
|
147
211
|
| Parameter | Type | Required | Description |
|
|
148
212
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
149
|
-
| `request` | [operations.
|
|
213
|
+
| `request` | [operations.CreatePromptRequestBody](../../models/operations/createpromptrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
150
214
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
151
215
|
| `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. |
|
|
152
216
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
153
217
|
|
|
154
218
|
### Response
|
|
155
219
|
|
|
156
|
-
**Promise\<[operations.
|
|
220
|
+
**Promise\<[operations.CreatePromptResponseBody](../../models/operations/createpromptresponsebody.md)\>**
|
|
157
221
|
|
|
158
222
|
### Errors
|
|
159
223
|
|
|
@@ -161,9 +225,9 @@ run();
|
|
|
161
225
|
| --------------- | --------------- | --------------- |
|
|
162
226
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
163
227
|
|
|
164
|
-
##
|
|
228
|
+
## retrieve
|
|
165
229
|
|
|
166
|
-
|
|
230
|
+
Retrieves a prompt object
|
|
167
231
|
|
|
168
232
|
### Example Usage
|
|
169
233
|
|
|
@@ -175,7 +239,7 @@ const orq = new Orq({
|
|
|
175
239
|
});
|
|
176
240
|
|
|
177
241
|
async function run() {
|
|
178
|
-
const result = await orq.prompts.
|
|
242
|
+
const result = await orq.prompts.retrieve({
|
|
179
243
|
id: "<id>",
|
|
180
244
|
});
|
|
181
245
|
|
|
@@ -192,7 +256,7 @@ The standalone function version of this method:
|
|
|
192
256
|
|
|
193
257
|
```typescript
|
|
194
258
|
import { OrqCore } from "@orq-ai/node/core.js";
|
|
195
|
-
import {
|
|
259
|
+
import { promptsRetrieve } from "@orq-ai/node/funcs/promptsRetrieve.js";
|
|
196
260
|
|
|
197
261
|
// Use `OrqCore` for best tree-shaking performance.
|
|
198
262
|
// You can create one instance of it to use across an application.
|
|
@@ -201,7 +265,7 @@ const orq = new OrqCore({
|
|
|
201
265
|
});
|
|
202
266
|
|
|
203
267
|
async function run() {
|
|
204
|
-
const res = await
|
|
268
|
+
const res = await promptsRetrieve(orq, {
|
|
205
269
|
id: "<id>",
|
|
206
270
|
});
|
|
207
271
|
|
|
@@ -222,25 +286,24 @@ run();
|
|
|
222
286
|
|
|
223
287
|
| Parameter | Type | Required | Description |
|
|
224
288
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
225
|
-
| `request` | [operations.
|
|
289
|
+
| `request` | [operations.GetOnePromptRequest](../../models/operations/getonepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
226
290
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
227
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. |
|
|
228
292
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
229
293
|
|
|
230
294
|
### Response
|
|
231
295
|
|
|
232
|
-
**Promise\<[operations.
|
|
296
|
+
**Promise\<[operations.GetOnePromptResponseBody](../../models/operations/getonepromptresponsebody.md)\>**
|
|
233
297
|
|
|
234
298
|
### Errors
|
|
235
299
|
|
|
236
|
-
| Error Type
|
|
237
|
-
|
|
|
238
|
-
| errors.
|
|
239
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
300
|
+
| Error Type | Status Code | Content Type |
|
|
301
|
+
| --------------- | --------------- | --------------- |
|
|
302
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
240
303
|
|
|
241
|
-
##
|
|
304
|
+
## update
|
|
242
305
|
|
|
243
|
-
|
|
306
|
+
Update a prompt
|
|
244
307
|
|
|
245
308
|
### Example Usage
|
|
246
309
|
|
|
@@ -252,11 +315,12 @@ const orq = new Orq({
|
|
|
252
315
|
});
|
|
253
316
|
|
|
254
317
|
async function run() {
|
|
255
|
-
await orq.prompts.
|
|
318
|
+
const result = await orq.prompts.update({
|
|
256
319
|
id: "<id>",
|
|
257
320
|
});
|
|
258
321
|
|
|
259
|
-
|
|
322
|
+
// Handle the result
|
|
323
|
+
console.log(result);
|
|
260
324
|
}
|
|
261
325
|
|
|
262
326
|
run();
|
|
@@ -268,7 +332,7 @@ The standalone function version of this method:
|
|
|
268
332
|
|
|
269
333
|
```typescript
|
|
270
334
|
import { OrqCore } from "@orq-ai/node/core.js";
|
|
271
|
-
import {
|
|
335
|
+
import { promptsUpdate } from "@orq-ai/node/funcs/promptsUpdate.js";
|
|
272
336
|
|
|
273
337
|
// Use `OrqCore` for best tree-shaking performance.
|
|
274
338
|
// You can create one instance of it to use across an application.
|
|
@@ -277,7 +341,7 @@ const orq = new OrqCore({
|
|
|
277
341
|
});
|
|
278
342
|
|
|
279
343
|
async function run() {
|
|
280
|
-
const res = await
|
|
344
|
+
const res = await promptsUpdate(orq, {
|
|
281
345
|
id: "<id>",
|
|
282
346
|
});
|
|
283
347
|
|
|
@@ -287,7 +351,8 @@ async function run() {
|
|
|
287
351
|
|
|
288
352
|
const { value: result } = res;
|
|
289
353
|
|
|
290
|
-
|
|
354
|
+
// Handle the result
|
|
355
|
+
console.log(result);
|
|
291
356
|
}
|
|
292
357
|
|
|
293
358
|
run();
|
|
@@ -297,24 +362,25 @@ run();
|
|
|
297
362
|
|
|
298
363
|
| Parameter | Type | Required | Description |
|
|
299
364
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
300
|
-
| `request` | [operations.
|
|
365
|
+
| `request` | [operations.UpdatePromptRequest](../../models/operations/updatepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
301
366
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
302
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. |
|
|
303
368
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
304
369
|
|
|
305
370
|
### Response
|
|
306
371
|
|
|
307
|
-
**Promise\<
|
|
372
|
+
**Promise\<[operations.UpdatePromptResponseBody](../../models/operations/updatepromptresponsebody.md)\>**
|
|
308
373
|
|
|
309
374
|
### Errors
|
|
310
375
|
|
|
311
|
-
| Error Type
|
|
312
|
-
|
|
|
313
|
-
| errors.
|
|
376
|
+
| Error Type | Status Code | Content Type |
|
|
377
|
+
| ------------------------------- | ------------------------------- | ------------------------------- |
|
|
378
|
+
| errors.UpdatePromptResponseBody | 404 | application/json |
|
|
379
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
314
380
|
|
|
315
|
-
##
|
|
381
|
+
## delete
|
|
316
382
|
|
|
317
|
-
|
|
383
|
+
Delete a prompt
|
|
318
384
|
|
|
319
385
|
### Example Usage
|
|
320
386
|
|
|
@@ -326,44 +392,11 @@ const orq = new Orq({
|
|
|
326
392
|
});
|
|
327
393
|
|
|
328
394
|
async function run() {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
promptConfig: {
|
|
332
|
-
messages: [
|
|
333
|
-
{
|
|
334
|
-
role: "system",
|
|
335
|
-
content: "<value>",
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
role: "system",
|
|
339
|
-
content: [
|
|
340
|
-
{
|
|
341
|
-
type: "image_url",
|
|
342
|
-
imageUrl: {
|
|
343
|
-
url: "https://well-worn-formation.biz",
|
|
344
|
-
},
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
type: "text",
|
|
348
|
-
text: "<value>",
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
type: "text",
|
|
352
|
-
text: "<value>",
|
|
353
|
-
},
|
|
354
|
-
],
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
role: "assistant",
|
|
358
|
-
content: "<value>",
|
|
359
|
-
},
|
|
360
|
-
],
|
|
361
|
-
},
|
|
362
|
-
path: "Customer Service/Billing/Refund",
|
|
395
|
+
await orq.prompts.delete({
|
|
396
|
+
id: "<id>",
|
|
363
397
|
});
|
|
364
398
|
|
|
365
|
-
|
|
366
|
-
console.log(result);
|
|
399
|
+
|
|
367
400
|
}
|
|
368
401
|
|
|
369
402
|
run();
|
|
@@ -375,7 +408,7 @@ The standalone function version of this method:
|
|
|
375
408
|
|
|
376
409
|
```typescript
|
|
377
410
|
import { OrqCore } from "@orq-ai/node/core.js";
|
|
378
|
-
import {
|
|
411
|
+
import { promptsDelete } from "@orq-ai/node/funcs/promptsDelete.js";
|
|
379
412
|
|
|
380
413
|
// Use `OrqCore` for best tree-shaking performance.
|
|
381
414
|
// You can create one instance of it to use across an application.
|
|
@@ -384,40 +417,8 @@ const orq = new OrqCore({
|
|
|
384
417
|
});
|
|
385
418
|
|
|
386
419
|
async function run() {
|
|
387
|
-
const res = await
|
|
388
|
-
|
|
389
|
-
promptConfig: {
|
|
390
|
-
messages: [
|
|
391
|
-
{
|
|
392
|
-
role: "system",
|
|
393
|
-
content: "<value>",
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
role: "system",
|
|
397
|
-
content: [
|
|
398
|
-
{
|
|
399
|
-
type: "image_url",
|
|
400
|
-
imageUrl: {
|
|
401
|
-
url: "https://well-worn-formation.biz",
|
|
402
|
-
},
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
type: "text",
|
|
406
|
-
text: "<value>",
|
|
407
|
-
},
|
|
408
|
-
{
|
|
409
|
-
type: "text",
|
|
410
|
-
text: "<value>",
|
|
411
|
-
},
|
|
412
|
-
],
|
|
413
|
-
},
|
|
414
|
-
{
|
|
415
|
-
role: "assistant",
|
|
416
|
-
content: "<value>",
|
|
417
|
-
},
|
|
418
|
-
],
|
|
419
|
-
},
|
|
420
|
-
path: "Customer Service/Billing/Refund",
|
|
420
|
+
const res = await promptsDelete(orq, {
|
|
421
|
+
id: "<id>",
|
|
421
422
|
});
|
|
422
423
|
|
|
423
424
|
if (!res.ok) {
|
|
@@ -426,8 +427,7 @@ async function run() {
|
|
|
426
427
|
|
|
427
428
|
const { value: result } = res;
|
|
428
429
|
|
|
429
|
-
|
|
430
|
-
console.log(result);
|
|
430
|
+
|
|
431
431
|
}
|
|
432
432
|
|
|
433
433
|
run();
|
|
@@ -437,14 +437,14 @@ run();
|
|
|
437
437
|
|
|
438
438
|
| Parameter | Type | Required | Description |
|
|
439
439
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
440
|
-
| `request` | [operations.
|
|
440
|
+
| `request` | [operations.DeletePromptRequest](../../models/operations/deletepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
441
441
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
442
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. |
|
|
443
443
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
444
444
|
|
|
445
445
|
### Response
|
|
446
446
|
|
|
447
|
-
**Promise\<
|
|
447
|
+
**Promise\<void\>**
|
|
448
448
|
|
|
449
449
|
### Errors
|
|
450
450
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OrqCore } from "../core.js";
|
|
2
|
+
import { EventStream } from "../lib/event-streams.js";
|
|
3
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
4
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
5
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
6
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
7
|
+
import * as operations from "../models/operations/index.js";
|
|
8
|
+
import { APIPromise } from "../types/async.js";
|
|
9
|
+
import { Result } from "../types/fp.js";
|
|
10
|
+
/**
|
|
11
|
+
* Stream
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* Stream deployment generation. Only supported for completions and chat completions.
|
|
15
|
+
*/
|
|
16
|
+
export declare function deploymentsStream(client: OrqCore, request: operations.DeploymentStreamRequestBody, options?: RequestOptions): APIPromise<Result<EventStream<operations.DeploymentStreamResponseBody>, APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
17
|
+
//# sourceMappingURL=deploymentsStream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploymentsStream.d.ts","sourceRoot":"","sources":["../src/funcs/deploymentsStream.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,2BAA2B,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,WAAW,CAAC,UAAU,CAAC,4BAA4B,CAAC,EAClD,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAMA"}
|