@orq-ai/node 3.6.10 → 3.6.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/bin/mcp-server.js +40 -40
  2. package/bin/mcp-server.js.map +21 -21
  3. package/jsr.json +1 -1
  4. package/lib/config.d.ts +3 -3
  5. package/lib/config.js +3 -3
  6. package/mcp-server/mcp-server.js +1 -1
  7. package/mcp-server/server.js +1 -1
  8. package/models/operations/bulkcreatedatapoints.js +2 -2
  9. package/models/operations/createcontact.js +2 -2
  10. package/models/operations/createdataset.js +2 -2
  11. package/models/operations/createdatasetitem.js +2 -2
  12. package/models/operations/createdatasource.js +2 -2
  13. package/models/operations/fileget.js +2 -2
  14. package/models/operations/filelist.js +2 -2
  15. package/models/operations/fileupload.js +2 -2
  16. package/models/operations/listdatasetdatapoints.js +2 -2
  17. package/models/operations/listdatasets.js +2 -2
  18. package/models/operations/listdatasources.js +2 -2
  19. package/models/operations/retrievedatapoint.js +2 -2
  20. package/models/operations/retrievedataset.js +2 -2
  21. package/models/operations/retrievedatasource.js +2 -2
  22. package/models/operations/updatedatapoint.js +2 -2
  23. package/models/operations/updatedataset.js +2 -2
  24. package/models/operations/updatedatasource.js +2 -2
  25. package/package.json +1 -1
  26. package/packages/orq-rc/README.md +92 -79
  27. package/packages/orq-rc/docs/sdks/evals/README.md +315 -14
  28. package/packages/orq-rc/jsr.json +1 -1
  29. package/packages/orq-rc/package-lock.json +2 -2
  30. package/packages/orq-rc/package.json +1 -1
  31. package/packages/orq-rc/src/funcs/evalsAll.ts +169 -0
  32. package/packages/orq-rc/src/funcs/{evalsRunBertScore.ts → evalsBertScore.ts} +19 -17
  33. package/packages/orq-rc/src/funcs/evalsDelete.ts +169 -0
  34. package/packages/orq-rc/src/funcs/evalsInvoke.ts +173 -0
  35. package/packages/orq-rc/src/funcs/evalsUpdate.ts +169 -0
  36. package/packages/orq-rc/src/lib/config.ts +2 -2
  37. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  38. package/packages/orq-rc/src/mcp-server/server.ts +11 -3
  39. package/packages/orq-rc/src/mcp-server/tools/evalsAll.ts +35 -0
  40. package/packages/orq-rc/src/mcp-server/tools/{evalsRunBertScore.ts → evalsBertScore.ts} +5 -5
  41. package/packages/orq-rc/src/mcp-server/tools/evalsDelete.ts +33 -0
  42. package/packages/orq-rc/src/mcp-server/tools/evalsInvoke.ts +35 -0
  43. package/packages/orq-rc/src/mcp-server/tools/evalsUpdate.ts +35 -0
  44. package/packages/orq-rc/src/models/errors/deleteeval.ts +71 -0
  45. package/packages/orq-rc/src/models/errors/evalsbertscore.ts +137 -0
  46. package/packages/orq-rc/src/models/errors/getevals.ts +71 -0
  47. package/packages/orq-rc/src/models/errors/index.ts +5 -1
  48. package/packages/orq-rc/src/models/errors/invokeeval.ts +137 -0
  49. package/packages/orq-rc/src/models/errors/updateeval.ts +71 -0
  50. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  51. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  52. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
  53. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  54. package/packages/orq-rc/src/models/operations/createeval.ts +16 -16
  55. package/packages/orq-rc/src/models/operations/deleteeval.ts +66 -0
  56. package/packages/orq-rc/src/models/operations/evalsbertscore.ts +197 -0
  57. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  58. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  59. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  60. package/packages/orq-rc/src/models/operations/getevals.ts +6187 -0
  61. package/packages/orq-rc/src/models/operations/index.ts +5 -1
  62. package/packages/orq-rc/src/models/operations/invokeeval.ts +2492 -0
  63. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  64. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
  65. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  66. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  67. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  68. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
  69. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  70. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  71. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  72. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
  73. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  74. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  75. package/packages/orq-rc/src/models/operations/updateeval.ts +4131 -0
  76. package/packages/orq-rc/src/sdk/evals.ts +65 -5
  77. package/src/lib/config.ts +3 -3
  78. package/src/mcp-server/mcp-server.ts +1 -1
  79. package/src/mcp-server/server.ts +1 -1
  80. package/src/models/operations/bulkcreatedatapoints.ts +2 -2
  81. package/src/models/operations/createcontact.ts +2 -2
  82. package/src/models/operations/createdataset.ts +2 -2
  83. package/src/models/operations/createdatasetitem.ts +2 -2
  84. package/src/models/operations/createdatasource.ts +2 -2
  85. package/src/models/operations/fileget.ts +2 -2
  86. package/src/models/operations/filelist.ts +2 -2
  87. package/src/models/operations/fileupload.ts +2 -2
  88. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  89. package/src/models/operations/listdatasets.ts +2 -2
  90. package/src/models/operations/listdatasources.ts +2 -2
  91. package/src/models/operations/retrievedatapoint.ts +2 -2
  92. package/src/models/operations/retrievedataset.ts +2 -2
  93. package/src/models/operations/retrievedatasource.ts +2 -2
  94. package/src/models/operations/updatedatapoint.ts +2 -2
  95. package/src/models/operations/updatedataset.ts +2 -2
  96. package/src/models/operations/updatedatasource.ts +2 -2
  97. package/packages/orq-rc/src/models/errors/runbertscore.ts +0 -137
  98. package/packages/orq-rc/src/models/operations/runbertscore.ts +0 -197
@@ -5,8 +5,11 @@
5
5
 
6
6
  ### Available Operations
7
7
 
8
+ * [all](#all) - Get all Evaluators
8
9
  * [create](#create) - Create an Evaluator
9
- * [runBertScore](#runbertscore) - Run BertScore Evaluator
10
+ * [update](#update) - Update an Evaluator
11
+ * [delete](#delete) - Delete an Evaluator
12
+ * [bertScore](#bertscore) - Run BertScore Evaluator
10
13
  * [bleuScore](#bleuscore) - Run BLEU Score Evaluator
11
14
  * [containsAll](#containsall) - Run Contains All Evaluator
12
15
  * [containsAny](#containsany) - Run Contains Any Evaluator
@@ -40,6 +43,76 @@
40
43
  * [ragasMaliciousness](#ragasmaliciousness) - Run Maliciousness Evaluator
41
44
  * [ragasResponseRelevancy](#ragasresponserelevancy) - Run Response Relevancy Evaluator
42
45
  * [ragasSummarization](#ragassummarization) - Run Summarization Evaluator
46
+ * [invoke](#invoke) - Invoke a Custom Evaluator
47
+
48
+ ## all
49
+
50
+ Get all Evaluators
51
+
52
+ ### Example Usage
53
+
54
+ ```typescript
55
+ import { Orq } from "@orq-ai/node";
56
+
57
+ const orq = new Orq({
58
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
59
+ });
60
+
61
+ async function run() {
62
+ const result = await orq.evals.all({});
63
+
64
+ console.log(result);
65
+ }
66
+
67
+ run();
68
+ ```
69
+
70
+ ### Standalone function
71
+
72
+ The standalone function version of this method:
73
+
74
+ ```typescript
75
+ import { OrqCore } from "@orq-ai/node/core.js";
76
+ import { evalsAll } from "@orq-ai/node/funcs/evalsAll.js";
77
+
78
+ // Use `OrqCore` for best tree-shaking performance.
79
+ // You can create one instance of it to use across an application.
80
+ const orq = new OrqCore({
81
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
82
+ });
83
+
84
+ async function run() {
85
+ const res = await evalsAll(orq, {});
86
+ if (res.ok) {
87
+ const { value: result } = res;
88
+ console.log(result);
89
+ } else {
90
+ console.log("evalsAll failed:", res.error);
91
+ }
92
+ }
93
+
94
+ run();
95
+ ```
96
+
97
+ ### Parameters
98
+
99
+ | Parameter | Type | Required | Description |
100
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
101
+ | `request` | [operations.GetEvalsRequest](../../models/operations/getevalsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
102
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
103
+ | `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. |
104
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
105
+
106
+ ### Response
107
+
108
+ **Promise\<[operations.GetEvalsResponseBody](../../models/operations/getevalsresponsebody.md)\>**
109
+
110
+ ### Errors
111
+
112
+ | Error Type | Status Code | Content Type |
113
+ | --------------------------- | --------------------------- | --------------------------- |
114
+ | errors.GetEvalsResponseBody | 404 | application/json |
115
+ | errors.APIError | 4XX, 5XX | \*/\* |
43
116
 
44
117
  ## create
45
118
 
@@ -140,7 +213,161 @@ run();
140
213
  | errors.CreateEvalResponseBody | 404 | application/json |
141
214
  | errors.APIError | 4XX, 5XX | \*/\* |
142
215
 
143
- ## runBertScore
216
+ ## update
217
+
218
+ Update an Evaluator
219
+
220
+ ### Example Usage
221
+
222
+ ```typescript
223
+ import { Orq } from "@orq-ai/node";
224
+
225
+ const orq = new Orq({
226
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
227
+ });
228
+
229
+ async function run() {
230
+ const result = await orq.evals.update({
231
+ id: "<id>",
232
+ requestBody: {
233
+ type: "llm_eval",
234
+ path: "Default",
235
+ },
236
+ });
237
+
238
+ console.log(result);
239
+ }
240
+
241
+ run();
242
+ ```
243
+
244
+ ### Standalone function
245
+
246
+ The standalone function version of this method:
247
+
248
+ ```typescript
249
+ import { OrqCore } from "@orq-ai/node/core.js";
250
+ import { evalsUpdate } from "@orq-ai/node/funcs/evalsUpdate.js";
251
+
252
+ // Use `OrqCore` for best tree-shaking performance.
253
+ // You can create one instance of it to use across an application.
254
+ const orq = new OrqCore({
255
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
256
+ });
257
+
258
+ async function run() {
259
+ const res = await evalsUpdate(orq, {
260
+ id: "<id>",
261
+ requestBody: {
262
+ type: "llm_eval",
263
+ path: "Default",
264
+ },
265
+ });
266
+ if (res.ok) {
267
+ const { value: result } = res;
268
+ console.log(result);
269
+ } else {
270
+ console.log("evalsUpdate failed:", res.error);
271
+ }
272
+ }
273
+
274
+ run();
275
+ ```
276
+
277
+ ### Parameters
278
+
279
+ | Parameter | Type | Required | Description |
280
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
281
+ | `request` | [operations.UpdateEvalRequest](../../models/operations/updateevalrequest.md) | :heavy_check_mark: | The request object to use for the request. |
282
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
283
+ | `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. |
284
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
285
+
286
+ ### Response
287
+
288
+ **Promise\<[operations.UpdateEvalResponseBody](../../models/operations/updateevalresponsebody.md)\>**
289
+
290
+ ### Errors
291
+
292
+ | Error Type | Status Code | Content Type |
293
+ | ----------------------------- | ----------------------------- | ----------------------------- |
294
+ | errors.UpdateEvalResponseBody | 404 | application/json |
295
+ | errors.APIError | 4XX, 5XX | \*/\* |
296
+
297
+ ## delete
298
+
299
+ Delete an Evaluator
300
+
301
+ ### Example Usage
302
+
303
+ ```typescript
304
+ import { Orq } from "@orq-ai/node";
305
+
306
+ const orq = new Orq({
307
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
308
+ });
309
+
310
+ async function run() {
311
+ await orq.evals.delete({
312
+ id: "<id>",
313
+ });
314
+
315
+
316
+ }
317
+
318
+ run();
319
+ ```
320
+
321
+ ### Standalone function
322
+
323
+ The standalone function version of this method:
324
+
325
+ ```typescript
326
+ import { OrqCore } from "@orq-ai/node/core.js";
327
+ import { evalsDelete } from "@orq-ai/node/funcs/evalsDelete.js";
328
+
329
+ // Use `OrqCore` for best tree-shaking performance.
330
+ // You can create one instance of it to use across an application.
331
+ const orq = new OrqCore({
332
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
333
+ });
334
+
335
+ async function run() {
336
+ const res = await evalsDelete(orq, {
337
+ id: "<id>",
338
+ });
339
+ if (res.ok) {
340
+ const { value: result } = res;
341
+
342
+ } else {
343
+ console.log("evalsDelete failed:", res.error);
344
+ }
345
+ }
346
+
347
+ run();
348
+ ```
349
+
350
+ ### Parameters
351
+
352
+ | Parameter | Type | Required | Description |
353
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
354
+ | `request` | [operations.DeleteEvalRequest](../../models/operations/deleteevalrequest.md) | :heavy_check_mark: | The request object to use for the request. |
355
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
356
+ | `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. |
357
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
358
+
359
+ ### Response
360
+
361
+ **Promise\<void\>**
362
+
363
+ ### Errors
364
+
365
+ | Error Type | Status Code | Content Type |
366
+ | ----------------------------- | ----------------------------- | ----------------------------- |
367
+ | errors.DeleteEvalResponseBody | 404 | application/json |
368
+ | errors.APIError | 4XX, 5XX | \*/\* |
369
+
370
+ ## bertScore
144
371
 
145
372
  Run BertScore Evaluator
146
373
 
@@ -154,7 +381,7 @@ const orq = new Orq({
154
381
  });
155
382
 
156
383
  async function run() {
157
- const result = await orq.evals.runBertScore();
384
+ const result = await orq.evals.bertScore();
158
385
 
159
386
  console.log(result);
160
387
  }
@@ -168,7 +395,7 @@ The standalone function version of this method:
168
395
 
169
396
  ```typescript
170
397
  import { OrqCore } from "@orq-ai/node/core.js";
171
- import { evalsRunBertScore } from "@orq-ai/node/funcs/evalsRunBertScore.js";
398
+ import { evalsBertScore } from "@orq-ai/node/funcs/evalsBertScore.js";
172
399
 
173
400
  // Use `OrqCore` for best tree-shaking performance.
174
401
  // You can create one instance of it to use across an application.
@@ -177,12 +404,12 @@ const orq = new OrqCore({
177
404
  });
178
405
 
179
406
  async function run() {
180
- const res = await evalsRunBertScore(orq);
407
+ const res = await evalsBertScore(orq);
181
408
  if (res.ok) {
182
409
  const { value: result } = res;
183
410
  console.log(result);
184
411
  } else {
185
- console.log("evalsRunBertScore failed:", res.error);
412
+ console.log("evalsBertScore failed:", res.error);
186
413
  }
187
414
  }
188
415
 
@@ -193,22 +420,22 @@ run();
193
420
 
194
421
  | Parameter | Type | Required | Description |
195
422
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
196
- | `request` | [operations.RunBertScoreRequestBody](../../models/operations/runbertscorerequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
423
+ | `request` | [operations.EvalsBertScoreRequestBody](../../models/operations/evalsbertscorerequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
197
424
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
198
425
  | `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. |
199
426
  | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
200
427
 
201
428
  ### Response
202
429
 
203
- **Promise\<[operations.RunBertScoreResponseBody](../../models/operations/runbertscoreresponsebody.md)\>**
430
+ **Promise\<[operations.EvalsBertScoreResponseBody](../../models/operations/evalsbertscoreresponsebody.md)\>**
204
431
 
205
432
  ### Errors
206
433
 
207
- | Error Type | Status Code | Content Type |
208
- | ------------------------------------ | ------------------------------------ | ------------------------------------ |
209
- | errors.RunBertScoreResponseBody | 404 | application/json |
210
- | errors.RunBertScoreEvalsResponseBody | 500 | application/json |
211
- | errors.APIError | 4XX, 5XX | \*/\* |
434
+ | Error Type | Status Code | Content Type |
435
+ | -------------------------------------- | -------------------------------------- | -------------------------------------- |
436
+ | errors.EvalsBertScoreResponseBody | 404 | application/json |
437
+ | errors.EvalsBertScoreEvalsResponseBody | 500 | application/json |
438
+ | errors.APIError | 4XX, 5XX | \*/\* |
212
439
 
213
440
  ## bleuScore
214
441
 
@@ -2518,4 +2745,78 @@ run();
2518
2745
  | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
2519
2746
  | errors.EvalsRagasSummarizationResponseBody | 404 | application/json |
2520
2747
  | errors.EvalsRagasSummarizationEvalsResponseBody | 500 | application/json |
2521
- | errors.APIError | 4XX, 5XX | \*/\* |
2748
+ | errors.APIError | 4XX, 5XX | \*/\* |
2749
+
2750
+ ## invoke
2751
+
2752
+ Invoke a Custom Evaluator
2753
+
2754
+ ### Example Usage
2755
+
2756
+ ```typescript
2757
+ import { Orq } from "@orq-ai/node";
2758
+
2759
+ const orq = new Orq({
2760
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
2761
+ });
2762
+
2763
+ async function run() {
2764
+ const result = await orq.evals.invoke({
2765
+ id: "<id>",
2766
+ });
2767
+
2768
+ console.log(result);
2769
+ }
2770
+
2771
+ run();
2772
+ ```
2773
+
2774
+ ### Standalone function
2775
+
2776
+ The standalone function version of this method:
2777
+
2778
+ ```typescript
2779
+ import { OrqCore } from "@orq-ai/node/core.js";
2780
+ import { evalsInvoke } from "@orq-ai/node/funcs/evalsInvoke.js";
2781
+
2782
+ // Use `OrqCore` for best tree-shaking performance.
2783
+ // You can create one instance of it to use across an application.
2784
+ const orq = new OrqCore({
2785
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
2786
+ });
2787
+
2788
+ async function run() {
2789
+ const res = await evalsInvoke(orq, {
2790
+ id: "<id>",
2791
+ });
2792
+ if (res.ok) {
2793
+ const { value: result } = res;
2794
+ console.log(result);
2795
+ } else {
2796
+ console.log("evalsInvoke failed:", res.error);
2797
+ }
2798
+ }
2799
+
2800
+ run();
2801
+ ```
2802
+
2803
+ ### Parameters
2804
+
2805
+ | Parameter | Type | Required | Description |
2806
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
2807
+ | `request` | [operations.InvokeEvalRequest](../../models/operations/invokeevalrequest.md) | :heavy_check_mark: | The request object to use for the request. |
2808
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
2809
+ | `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. |
2810
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
2811
+
2812
+ ### Response
2813
+
2814
+ **Promise\<[operations.InvokeEvalResponseBody](../../models/operations/invokeevalresponsebody.md)\>**
2815
+
2816
+ ### Errors
2817
+
2818
+ | Error Type | Status Code | Content Type |
2819
+ | ---------------------------------- | ---------------------------------- | ---------------------------------- |
2820
+ | errors.InvokeEvalResponseBody | 404 | application/json |
2821
+ | errors.InvokeEvalEvalsResponseBody | 500 | application/json |
2822
+ | errors.APIError | 4XX, 5XX | \*/\* |
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@orq-ai/node",
5
- "version": "3.8.0-rc.1",
5
+ "version": "3.8.0-rc.2",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@orq-ai/node",
3
- "version": "3.8.0-rc.1",
3
+ "version": "3.8.0-rc.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@orq-ai/node",
9
- "version": "3.8.0-rc.1",
9
+ "version": "3.8.0-rc.2",
10
10
  "bin": {
11
11
  "mcp": "bin/mcp-server.js"
12
12
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orq-ai/node",
3
- "version": "3.8.0-rc.1",
3
+ "version": "3.8.0-rc.2",
4
4
  "author": "Orq",
5
5
  "bin": {
6
6
  "mcp": "bin/mcp-server.js"
@@ -0,0 +1,169 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { OrqCore } from "../core.js";
6
+ import { encodeFormQuery } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import { APIError } from "../models/errors/apierror.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
+ import * as operations from "../models/operations/index.js";
24
+ import { APICall, APIPromise } from "../types/async.js";
25
+ import { Result } from "../types/fp.js";
26
+
27
+ /**
28
+ * Get all Evaluators
29
+ */
30
+ export function evalsAll(
31
+ client: OrqCore,
32
+ request?: operations.GetEvalsRequest | undefined,
33
+ options?: RequestOptions,
34
+ ): APIPromise<
35
+ Result<
36
+ operations.GetEvalsResponseBody,
37
+ | errors.GetEvalsResponseBody
38
+ | APIError
39
+ | SDKValidationError
40
+ | UnexpectedClientError
41
+ | InvalidRequestError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | ConnectionError
45
+ >
46
+ > {
47
+ return new APIPromise($do(
48
+ client,
49
+ request,
50
+ options,
51
+ ));
52
+ }
53
+
54
+ async function $do(
55
+ client: OrqCore,
56
+ request?: operations.GetEvalsRequest | undefined,
57
+ options?: RequestOptions,
58
+ ): Promise<
59
+ [
60
+ Result<
61
+ operations.GetEvalsResponseBody,
62
+ | errors.GetEvalsResponseBody
63
+ | APIError
64
+ | SDKValidationError
65
+ | UnexpectedClientError
66
+ | InvalidRequestError
67
+ | RequestAbortedError
68
+ | RequestTimeoutError
69
+ | ConnectionError
70
+ >,
71
+ APICall,
72
+ ]
73
+ > {
74
+ const parsed = safeParse(
75
+ request,
76
+ (value) =>
77
+ operations.GetEvalsRequest$outboundSchema.optional().parse(value),
78
+ "Input validation failed",
79
+ );
80
+ if (!parsed.ok) {
81
+ return [parsed, { status: "invalid" }];
82
+ }
83
+ const payload = parsed.value;
84
+ const body = null;
85
+
86
+ const path = pathToFunc("/v2/evaluators")();
87
+
88
+ const query = encodeFormQuery({
89
+ "ending_before": payload?.ending_before,
90
+ "limit": payload?.limit,
91
+ "starting_after": payload?.starting_after,
92
+ });
93
+
94
+ const headers = new Headers(compactMap({
95
+ Accept: "application/json",
96
+ }));
97
+
98
+ const secConfig = await extractSecurity(client._options.apiKey);
99
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
100
+ const requestSecurity = resolveGlobalSecurity(securityInput);
101
+
102
+ const context = {
103
+ options: client._options,
104
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
105
+ operationID: "GetEvals",
106
+ oAuth2Scopes: [],
107
+
108
+ resolvedSecurity: requestSecurity,
109
+
110
+ securitySource: client._options.apiKey,
111
+ retryConfig: options?.retries
112
+ || client._options.retryConfig
113
+ || { strategy: "none" },
114
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
115
+ };
116
+
117
+ const requestRes = client._createRequest(context, {
118
+ security: requestSecurity,
119
+ method: "GET",
120
+ baseURL: options?.serverURL,
121
+ path: path,
122
+ headers: headers,
123
+ query: query,
124
+ body: body,
125
+ userAgent: client._options.userAgent,
126
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
127
+ }, options);
128
+ if (!requestRes.ok) {
129
+ return [requestRes, { status: "invalid" }];
130
+ }
131
+ const req = requestRes.value;
132
+
133
+ const doResult = await client._do(req, {
134
+ context,
135
+ errorCodes: ["404", "4XX", "5XX"],
136
+ retryConfig: context.retryConfig,
137
+ retryCodes: context.retryCodes,
138
+ });
139
+ if (!doResult.ok) {
140
+ return [doResult, { status: "request-error", request: req }];
141
+ }
142
+ const response = doResult.value;
143
+
144
+ const responseFields = {
145
+ HttpMeta: { Response: response, Request: req },
146
+ };
147
+
148
+ const [result] = await M.match<
149
+ operations.GetEvalsResponseBody,
150
+ | errors.GetEvalsResponseBody
151
+ | APIError
152
+ | SDKValidationError
153
+ | UnexpectedClientError
154
+ | InvalidRequestError
155
+ | RequestAbortedError
156
+ | RequestTimeoutError
157
+ | ConnectionError
158
+ >(
159
+ M.json(200, operations.GetEvalsResponseBody$inboundSchema),
160
+ M.jsonErr(404, errors.GetEvalsResponseBody$inboundSchema),
161
+ M.fail("4XX"),
162
+ M.fail("5XX"),
163
+ )(response, { extraFields: responseFields });
164
+ if (!result.ok) {
165
+ return [result, { status: "complete", request: req, response }];
166
+ }
167
+
168
+ return [result, { status: "complete", request: req, response }];
169
+ }