@orq-ai/node 1.31.11 → 1.32.0-rc.5

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 (155) hide show
  1. package/README.md +1 -1
  2. package/funcs/contactsCreate.d.ts.map +1 -1
  3. package/funcs/contactsCreate.js +1 -0
  4. package/funcs/contactsCreate.js.map +1 -1
  5. package/funcs/deploymentsAll.d.ts.map +1 -1
  6. package/funcs/deploymentsAll.js +1 -0
  7. package/funcs/deploymentsAll.js.map +1 -1
  8. package/funcs/deploymentsGetConfig.d.ts.map +1 -1
  9. package/funcs/deploymentsGetConfig.js +1 -0
  10. package/funcs/deploymentsGetConfig.js.map +1 -1
  11. package/funcs/deploymentsInvalidate.d.ts.map +1 -1
  12. package/funcs/deploymentsInvalidate.js +1 -0
  13. package/funcs/deploymentsInvalidate.js.map +1 -1
  14. package/funcs/deploymentsInvoke.d.ts.map +1 -1
  15. package/funcs/deploymentsInvoke.js +1 -0
  16. package/funcs/deploymentsInvoke.js.map +1 -1
  17. package/funcs/deploymentsMetricsCreate.d.ts.map +1 -1
  18. package/funcs/deploymentsMetricsCreate.js +1 -0
  19. package/funcs/deploymentsMetricsCreate.js.map +1 -1
  20. package/funcs/feedbackCreate.d.ts.map +1 -1
  21. package/funcs/feedbackCreate.js +1 -0
  22. package/funcs/feedbackCreate.js.map +1 -1
  23. package/funcs/filesBulkUpload.d.ts.map +1 -1
  24. package/funcs/filesBulkUpload.js +1 -0
  25. package/funcs/filesBulkUpload.js.map +1 -1
  26. package/funcs/filesUpload.d.ts.map +1 -1
  27. package/funcs/filesUpload.js +1 -0
  28. package/funcs/filesUpload.js.map +1 -1
  29. package/funcs/remoteconfigGetConfig.d.ts.map +1 -1
  30. package/funcs/remoteconfigGetConfig.js +1 -0
  31. package/funcs/remoteconfigGetConfig.js.map +1 -1
  32. package/lib/config.d.ts +4 -4
  33. package/lib/config.d.ts.map +1 -1
  34. package/lib/config.js +4 -4
  35. package/lib/config.js.map +1 -1
  36. package/lib/sdks.d.ts +5 -1
  37. package/lib/sdks.d.ts.map +1 -1
  38. package/lib/sdks.js +1 -0
  39. package/lib/sdks.js.map +1 -1
  40. package/package.json +3 -2
  41. package/src/funcs/contactsCreate.ts +1 -0
  42. package/src/funcs/deploymentsAll.ts +1 -0
  43. package/src/funcs/deploymentsGetConfig.ts +1 -0
  44. package/src/funcs/deploymentsInvalidate.ts +1 -0
  45. package/src/funcs/deploymentsInvoke.ts +1 -0
  46. package/src/funcs/deploymentsMetricsCreate.ts +1 -0
  47. package/src/funcs/feedbackCreate.ts +1 -0
  48. package/src/funcs/filesBulkUpload.ts +1 -0
  49. package/src/funcs/filesUpload.ts +1 -0
  50. package/src/funcs/remoteconfigGetConfig.ts +1 -0
  51. package/src/lib/config.ts +4 -4
  52. package/src/lib/sdks.ts +6 -1
  53. package/packages/orq-rc/README.md +0 -556
  54. package/packages/orq-rc/docs/sdks/contacts/README.md +0 -84
  55. package/packages/orq-rc/docs/sdks/deployments/README.md +0 -314
  56. package/packages/orq-rc/docs/sdks/feedback/README.md +0 -92
  57. package/packages/orq-rc/docs/sdks/files/README.md +0 -171
  58. package/packages/orq-rc/docs/sdks/metrics/README.md +0 -86
  59. package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
  60. package/packages/orq-rc/docs/sdks/prompt/README.md +0 -6
  61. package/packages/orq-rc/docs/sdks/prompts/README.md +0 -533
  62. package/packages/orq-rc/docs/sdks/remoteconfig/README.md +0 -80
  63. package/packages/orq-rc/docs/sdks/snippets/README.md +0 -84
  64. package/packages/orq-rc/docs/sdks/templates/README.md +0 -80
  65. package/packages/orq-rc/src/core.ts +0 -13
  66. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -123
  67. package/packages/orq-rc/src/funcs/deploymentsAll.ts +0 -137
  68. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -131
  69. package/packages/orq-rc/src/funcs/deploymentsInvalidate.ts +0 -132
  70. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -134
  71. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -131
  72. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -123
  73. package/packages/orq-rc/src/funcs/filesBulkUpload.ts +0 -125
  74. package/packages/orq-rc/src/funcs/filesUpload.ts +0 -144
  75. package/packages/orq-rc/src/funcs/promptSnippetsFindOne.ts +0 -127
  76. package/packages/orq-rc/src/funcs/promptTemplatesGetAll.ts +0 -129
  77. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -123
  78. package/packages/orq-rc/src/funcs/promptsCreateVersion.ts +0 -128
  79. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -127
  80. package/packages/orq-rc/src/funcs/promptsDuplicate.ts +0 -127
  81. package/packages/orq-rc/src/funcs/promptsGetAll.ts +0 -127
  82. package/packages/orq-rc/src/funcs/promptsGetOne.ts +0 -127
  83. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -135
  84. package/packages/orq-rc/src/funcs/remoteconfigGetConfig.ts +0 -124
  85. package/packages/orq-rc/src/hooks/hooks.ts +0 -112
  86. package/packages/orq-rc/src/hooks/index.ts +0 -6
  87. package/packages/orq-rc/src/hooks/registration.ts +0 -14
  88. package/packages/orq-rc/src/hooks/types.ts +0 -102
  89. package/packages/orq-rc/src/index.ts +0 -7
  90. package/packages/orq-rc/src/lib/base64.ts +0 -37
  91. package/packages/orq-rc/src/lib/config.ts +0 -60
  92. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  93. package/packages/orq-rc/src/lib/encodings.ts +0 -449
  94. package/packages/orq-rc/src/lib/env.ts +0 -41
  95. package/packages/orq-rc/src/lib/event-streams.ts +0 -264
  96. package/packages/orq-rc/src/lib/files.ts +0 -40
  97. package/packages/orq-rc/src/lib/http.ts +0 -323
  98. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  99. package/packages/orq-rc/src/lib/logger.ts +0 -9
  100. package/packages/orq-rc/src/lib/matchers.ts +0 -325
  101. package/packages/orq-rc/src/lib/primitives.ts +0 -122
  102. package/packages/orq-rc/src/lib/retries.ts +0 -219
  103. package/packages/orq-rc/src/lib/schemas.ts +0 -86
  104. package/packages/orq-rc/src/lib/sdks.ts +0 -392
  105. package/packages/orq-rc/src/lib/security.ts +0 -254
  106. package/packages/orq-rc/src/lib/url.ts +0 -33
  107. package/packages/orq-rc/src/models/components/deployments.ts +0 -1607
  108. package/packages/orq-rc/src/models/components/index.ts +0 -6
  109. package/packages/orq-rc/src/models/components/security.ts +0 -71
  110. package/packages/orq-rc/src/models/errors/apierror.ts +0 -27
  111. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -82
  112. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  113. package/packages/orq-rc/src/models/errors/index.ts +0 -9
  114. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -97
  115. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -71
  116. package/packages/orq-rc/src/models/operations/bulkfileupload.ts +0 -304
  117. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -256
  118. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
  119. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -3455
  120. package/packages/orq-rc/src/models/operations/createpromptversion.ts +0 -3697
  121. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
  122. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -1790
  123. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -3417
  124. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -2384
  125. package/packages/orq-rc/src/models/operations/deployments.ts +0 -2086
  126. package/packages/orq-rc/src/models/operations/duplicateprompt.ts +0 -69
  127. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -311
  128. package/packages/orq-rc/src/models/operations/findonepromptsnippet.ts +0 -13629
  129. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -13390
  130. package/packages/orq-rc/src/models/operations/getallprompttemplates.ts +0 -13690
  131. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -69
  132. package/packages/orq-rc/src/models/operations/index.ts +0 -23
  133. package/packages/orq-rc/src/models/operations/invaliddeployment.ts +0 -75
  134. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
  135. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -14407
  136. package/packages/orq-rc/src/sdk/contacts.ts +0 -27
  137. package/packages/orq-rc/src/sdk/deployments.ts +0 -93
  138. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  139. package/packages/orq-rc/src/sdk/files.ts +0 -45
  140. package/packages/orq-rc/src/sdk/index.ts +0 -5
  141. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  142. package/packages/orq-rc/src/sdk/prompt.ts +0 -19
  143. package/packages/orq-rc/src/sdk/prompts.ts +0 -114
  144. package/packages/orq-rc/src/sdk/remoteconfig.ts +0 -24
  145. package/packages/orq-rc/src/sdk/sdk.ts +0 -49
  146. package/packages/orq-rc/src/sdk/snippets.ts +0 -24
  147. package/packages/orq-rc/src/sdk/templates.ts +0 -24
  148. package/packages/orq-rc/src/types/blobs.ts +0 -31
  149. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  150. package/packages/orq-rc/src/types/enums.ts +0 -16
  151. package/packages/orq-rc/src/types/fp.ts +0 -50
  152. package/packages/orq-rc/src/types/index.ts +0 -11
  153. package/packages/orq-rc/src/types/operations.ts +0 -105
  154. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  155. package/packages/orq-rc/src/types/streams.ts +0 -21
@@ -1,84 +0,0 @@
1
- # Contacts
2
- (*contacts*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [create](#create) - Update user information
9
-
10
- ## create
11
-
12
- Update or add user information to workspace
13
-
14
- ### Example Usage
15
-
16
- ```typescript
17
- import { Orq } from "@orq-ai/node";
18
-
19
- const orq = new Orq({
20
- apiKey: process.env["ORQ_API_KEY"] ?? "",
21
- });
22
-
23
- async function run() {
24
- const result = await orq.contacts.create({
25
- externalId: "<id>",
26
- });
27
-
28
- // Handle the result
29
- console.log(result);
30
- }
31
-
32
- run();
33
- ```
34
-
35
- ### Standalone function
36
-
37
- The standalone function version of this method:
38
-
39
- ```typescript
40
- import { OrqCore } from "@orq-ai/node/core.js";
41
- import { contactsCreate } from "@orq-ai/node/funcs/contactsCreate.js";
42
-
43
- // Use `OrqCore` for best tree-shaking performance.
44
- // You can create one instance of it to use across an application.
45
- const orq = new OrqCore({
46
- apiKey: process.env["ORQ_API_KEY"] ?? "",
47
- });
48
-
49
- async function run() {
50
- const res = await contactsCreate(orq, {
51
- externalId: "<id>",
52
- });
53
-
54
- if (!res.ok) {
55
- throw res.error;
56
- }
57
-
58
- const { value: result } = res;
59
-
60
- // Handle the result
61
- console.log(result);
62
- }
63
-
64
- run();
65
- ```
66
-
67
- ### Parameters
68
-
69
- | Parameter | Type | Required | Description |
70
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
71
- | `request` | [operations.CreateContactRequestBody](../../models/operations/createcontactrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
72
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
73
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
74
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
75
-
76
- ### Response
77
-
78
- **Promise\<[operations.CreateContactResponseBody](../../models/operations/createcontactresponsebody.md)\>**
79
-
80
- ### Errors
81
-
82
- | Error Type | Status Code | Content Type |
83
- | --------------- | --------------- | --------------- |
84
- | errors.APIError | 4XX, 5XX | \*/\* |
@@ -1,314 +0,0 @@
1
- # Deployments
2
- (*deployments*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [all](#all) - List all deployments
9
- * [invalidate](#invalidate) - Invalidates cache
10
- * [getConfig](#getconfig) - Get config
11
- * [invoke](#invoke) - Invoke
12
-
13
- ## all
14
-
15
- Returns a list of your deployments. The deployments are returned sorted by creation date, with the most recent deployments appearing first.
16
-
17
- ### Example Usage
18
-
19
- ```typescript
20
- import { Orq } from "@orq-ai/node";
21
-
22
- const orq = new Orq({
23
- apiKey: process.env["ORQ_API_KEY"] ?? "",
24
- });
25
-
26
- async function run() {
27
- const result = await orq.deployments.all();
28
-
29
- // Handle the result
30
- console.log(result);
31
- }
32
-
33
- run();
34
- ```
35
-
36
- ### Standalone function
37
-
38
- The standalone function version of this method:
39
-
40
- ```typescript
41
- import { OrqCore } from "@orq-ai/node/core.js";
42
- import { deploymentsAll } from "@orq-ai/node/funcs/deploymentsAll.js";
43
-
44
- // Use `OrqCore` for best tree-shaking performance.
45
- // You can create one instance of it to use across an application.
46
- const orq = new OrqCore({
47
- apiKey: process.env["ORQ_API_KEY"] ?? "",
48
- });
49
-
50
- async function run() {
51
- const res = await deploymentsAll(orq);
52
-
53
- if (!res.ok) {
54
- throw res.error;
55
- }
56
-
57
- const { value: result } = res;
58
-
59
- // Handle the result
60
- console.log(result);
61
- }
62
-
63
- run();
64
- ```
65
-
66
- ### Parameters
67
-
68
- | Parameter | Type | Required | Description |
69
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
70
- | `request` | [operations.DeploymentsRequest](../../models/operations/deploymentsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
71
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
72
- | `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. |
73
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
74
-
75
- ### Response
76
-
77
- **Promise\<[operations.DeploymentsResponseBody](../../models/operations/deploymentsresponsebody.md)\>**
78
-
79
- ### Errors
80
-
81
- | Error Type | Status Code | Content Type |
82
- | ------------------- | ------------------- | ------------------- |
83
- | errors.HonoApiError | 500 | application/json |
84
- | errors.APIError | 4XX, 5XX | \*/\* |
85
-
86
- ## invalidate
87
-
88
- Explicitly invalidate a cache of a deployment
89
-
90
- ### Example Usage
91
-
92
- ```typescript
93
- import { Orq } from "@orq-ai/node";
94
-
95
- const orq = new Orq({
96
- apiKey: process.env["ORQ_API_KEY"] ?? "",
97
- });
98
-
99
- async function run() {
100
- await orq.deployments.invalidate({
101
- deploymentId: "e1106c66-dcfb-4003-a0e1-3c49405187d4",
102
- });
103
-
104
-
105
- }
106
-
107
- run();
108
- ```
109
-
110
- ### Standalone function
111
-
112
- The standalone function version of this method:
113
-
114
- ```typescript
115
- import { OrqCore } from "@orq-ai/node/core.js";
116
- import { deploymentsInvalidate } from "@orq-ai/node/funcs/deploymentsInvalidate.js";
117
-
118
- // Use `OrqCore` for best tree-shaking performance.
119
- // You can create one instance of it to use across an application.
120
- const orq = new OrqCore({
121
- apiKey: process.env["ORQ_API_KEY"] ?? "",
122
- });
123
-
124
- async function run() {
125
- const res = await deploymentsInvalidate(orq, {
126
- deploymentId: "e1106c66-dcfb-4003-a0e1-3c49405187d4",
127
- });
128
-
129
- if (!res.ok) {
130
- throw res.error;
131
- }
132
-
133
- const { value: result } = res;
134
-
135
-
136
- }
137
-
138
- run();
139
- ```
140
-
141
- ### Parameters
142
-
143
- | Parameter | Type | Required | Description |
144
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
145
- | `request` | [operations.InvalidDeploymentRequest](../../models/operations/invaliddeploymentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
146
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
147
- | `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. |
148
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
149
-
150
- ### Response
151
-
152
- **Promise\<void\>**
153
-
154
- ### Errors
155
-
156
- | Error Type | Status Code | Content Type |
157
- | --------------- | --------------- | --------------- |
158
- | errors.APIError | 4XX, 5XX | \*/\* |
159
-
160
- ## getConfig
161
-
162
- Retrieve the deployment configuration
163
-
164
- ### Example Usage
165
-
166
- ```typescript
167
- import { Orq } from "@orq-ai/node";
168
-
169
- const orq = new Orq({
170
- apiKey: process.env["ORQ_API_KEY"] ?? "",
171
- });
172
-
173
- async function run() {
174
- const result = await orq.deployments.getConfig({
175
- key: "<key>",
176
- });
177
-
178
- // Handle the result
179
- console.log(result);
180
- }
181
-
182
- run();
183
- ```
184
-
185
- ### Standalone function
186
-
187
- The standalone function version of this method:
188
-
189
- ```typescript
190
- import { OrqCore } from "@orq-ai/node/core.js";
191
- import { deploymentsGetConfig } from "@orq-ai/node/funcs/deploymentsGetConfig.js";
192
-
193
- // Use `OrqCore` for best tree-shaking performance.
194
- // You can create one instance of it to use across an application.
195
- const orq = new OrqCore({
196
- apiKey: process.env["ORQ_API_KEY"] ?? "",
197
- });
198
-
199
- async function run() {
200
- const res = await deploymentsGetConfig(orq, {
201
- key: "<key>",
202
- });
203
-
204
- if (!res.ok) {
205
- throw res.error;
206
- }
207
-
208
- const { value: result } = res;
209
-
210
- // Handle the result
211
- console.log(result);
212
- }
213
-
214
- run();
215
- ```
216
-
217
- ### Parameters
218
-
219
- | Parameter | Type | Required | Description |
220
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
221
- | `request` | [operations.DeploymentGetConfigRequestBody](../../models/operations/deploymentgetconfigrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
222
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
223
- | `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. |
224
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
225
-
226
- ### Response
227
-
228
- **Promise\<[operations.DeploymentGetConfigResponseBody](../../models/operations/deploymentgetconfigresponsebody.md)\>**
229
-
230
- ### Errors
231
-
232
- | Error Type | Status Code | Content Type |
233
- | --------------- | --------------- | --------------- |
234
- | errors.APIError | 4XX, 5XX | \*/\* |
235
-
236
- ## invoke
237
-
238
- Invoke a deployment with a given payload
239
-
240
- ### Example Usage
241
-
242
- ```typescript
243
- import { Orq } from "@orq-ai/node";
244
-
245
- const orq = new Orq({
246
- apiKey: process.env["ORQ_API_KEY"] ?? "",
247
- });
248
-
249
- async function run() {
250
- const result = await orq.deployments.invoke({
251
- key: "<key>",
252
- });
253
-
254
- for await (const event of result) {
255
- // Handle the event
256
- console.log(event);
257
- }
258
- }
259
-
260
- run();
261
- ```
262
-
263
- ### Standalone function
264
-
265
- The standalone function version of this method:
266
-
267
- ```typescript
268
- import { OrqCore } from "@orq-ai/node/core.js";
269
- import { deploymentsInvoke } from "@orq-ai/node/funcs/deploymentsInvoke.js";
270
-
271
- // Use `OrqCore` for best tree-shaking performance.
272
- // You can create one instance of it to use across an application.
273
- const orq = new OrqCore({
274
- apiKey: process.env["ORQ_API_KEY"] ?? "",
275
- });
276
-
277
- async function run() {
278
- const res = await deploymentsInvoke(orq, {
279
- key: "<key>",
280
- });
281
-
282
- if (!res.ok) {
283
- throw res.error;
284
- }
285
-
286
- const { value: result } = res;
287
-
288
- for await (const event of result) {
289
- // Handle the event
290
- console.log(event);
291
- }
292
- }
293
-
294
- run();
295
- ```
296
-
297
- ### Parameters
298
-
299
- | Parameter | Type | Required | Description |
300
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
301
- | `request` | [components.Deployments](../../models/components/deployments.md) | :heavy_check_mark: | The request object to use for the request. |
302
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
303
- | `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. |
304
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
305
-
306
- ### Response
307
-
308
- **Promise\<[operations.DeploymentInvokeResponse](../../models/operations/deploymentinvokeresponse.md)\>**
309
-
310
- ### Errors
311
-
312
- | Error Type | Status Code | Content Type |
313
- | --------------- | --------------- | --------------- |
314
- | errors.APIError | 4XX, 5XX | \*/\* |
@@ -1,92 +0,0 @@
1
- # Feedback
2
- (*feedback*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [create](#create) - Submit feedback
9
-
10
- ## create
11
-
12
- Submit feedback for the LLM transaction via the API
13
-
14
- ### Example Usage
15
-
16
- ```typescript
17
- import { Orq } from "@orq-ai/node";
18
-
19
- const orq = new Orq({
20
- apiKey: process.env["ORQ_API_KEY"] ?? "",
21
- });
22
-
23
- async function run() {
24
- const result = await orq.feedback.create({
25
- field: "rating",
26
- value: [
27
- "good",
28
- ],
29
- traceId: "67HTZ65Z9W91HSF51CW68KK1QH",
30
- });
31
-
32
- // Handle the result
33
- console.log(result);
34
- }
35
-
36
- run();
37
- ```
38
-
39
- ### Standalone function
40
-
41
- The standalone function version of this method:
42
-
43
- ```typescript
44
- import { OrqCore } from "@orq-ai/node/core.js";
45
- import { feedbackCreate } from "@orq-ai/node/funcs/feedbackCreate.js";
46
-
47
- // Use `OrqCore` for best tree-shaking performance.
48
- // You can create one instance of it to use across an application.
49
- const orq = new OrqCore({
50
- apiKey: process.env["ORQ_API_KEY"] ?? "",
51
- });
52
-
53
- async function run() {
54
- const res = await feedbackCreate(orq, {
55
- field: "rating",
56
- value: [
57
- "good",
58
- ],
59
- traceId: "67HTZ65Z9W91HSF51CW68KK1QH",
60
- });
61
-
62
- if (!res.ok) {
63
- throw res.error;
64
- }
65
-
66
- const { value: result } = res;
67
-
68
- // Handle the result
69
- console.log(result);
70
- }
71
-
72
- run();
73
- ```
74
-
75
- ### Parameters
76
-
77
- | Parameter | Type | Required | Description |
78
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
79
- | `request` | [operations.CreateFeedbackRequestBody](../../models/operations/createfeedbackrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
80
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
81
- | `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. |
82
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
83
-
84
- ### Response
85
-
86
- **Promise\<[operations.CreateFeedbackResponseBody](../../models/operations/createfeedbackresponsebody.md)\>**
87
-
88
- ### Errors
89
-
90
- | Error Type | Status Code | Content Type |
91
- | --------------- | --------------- | --------------- |
92
- | errors.APIError | 4XX, 5XX | \*/\* |