@orq-ai/node 4.11.0-rc.53 → 4.11.0-rc.55

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 (238) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +2 -2
  3. package/lib/config.js +2 -2
  4. package/models/components/createskillrequest.d.ts +6 -6
  5. package/models/components/createskillrequest.d.ts.map +1 -1
  6. package/models/components/createskillrequest.js +6 -7
  7. package/models/components/createskillrequest.js.map +1 -1
  8. package/models/components/evaluatorresponsefunction.d.ts +270 -0
  9. package/models/components/evaluatorresponsefunction.d.ts.map +1 -0
  10. package/models/components/evaluatorresponsefunction.js +491 -0
  11. package/models/components/evaluatorresponsefunction.js.map +1 -0
  12. package/models/components/evaluatorresponsehttp.d.ts +76 -0
  13. package/models/components/evaluatorresponsehttp.d.ts.map +1 -0
  14. package/models/components/evaluatorresponsehttp.js +146 -0
  15. package/models/components/evaluatorresponsehttp.js.map +1 -0
  16. package/models/components/evaluatorresponsejsonschema.d.ts +62 -0
  17. package/models/components/evaluatorresponsejsonschema.d.ts.map +1 -0
  18. package/models/components/evaluatorresponsejsonschema.js +135 -0
  19. package/models/components/evaluatorresponsejsonschema.js.map +1 -0
  20. package/models/components/evaluatorresponsellm.d.ts +140 -0
  21. package/models/components/evaluatorresponsellm.d.ts.map +1 -0
  22. package/models/components/evaluatorresponsellm.js +250 -0
  23. package/models/components/evaluatorresponsellm.js.map +1 -0
  24. package/models/components/evaluatorresponsepython.d.ts +62 -0
  25. package/models/components/evaluatorresponsepython.d.ts.map +1 -0
  26. package/models/components/evaluatorresponsepython.js +136 -0
  27. package/models/components/evaluatorresponsepython.js.map +1 -0
  28. package/models/components/evaluatorresponseragas.d.ts +80 -0
  29. package/models/components/evaluatorresponseragas.d.ts.map +1 -0
  30. package/models/components/evaluatorresponseragas.js +155 -0
  31. package/models/components/evaluatorresponseragas.js.map +1 -0
  32. package/models/components/evaluatorresponsetypescript.d.ts +62 -0
  33. package/models/components/evaluatorresponsetypescript.d.ts.map +1 -0
  34. package/models/components/evaluatorresponsetypescript.js +136 -0
  35. package/models/components/evaluatorresponsetypescript.js.map +1 -0
  36. package/models/components/index.d.ts +8 -0
  37. package/models/components/index.d.ts.map +1 -1
  38. package/models/components/index.js +8 -0
  39. package/models/components/index.js.map +1 -1
  40. package/models/components/invokedeploymentrequest.d.ts +36 -36
  41. package/models/components/invokedeploymentrequest.d.ts.map +1 -1
  42. package/models/components/invokedeploymentrequest.js +33 -34
  43. package/models/components/invokedeploymentrequest.js.map +1 -1
  44. package/models/components/modelsconfig.d.ts +5 -5
  45. package/models/components/modelsconfig.d.ts.map +1 -1
  46. package/models/components/modelsconfig.js +6 -6
  47. package/models/components/modelsconfig.js.map +1 -1
  48. package/models/components/piiredactionpluginauto.d.ts +127 -0
  49. package/models/components/piiredactionpluginauto.d.ts.map +1 -0
  50. package/models/components/piiredactionpluginauto.js +157 -0
  51. package/models/components/piiredactionpluginauto.js.map +1 -0
  52. package/models/components/piiredactionpluginen.d.ts +31 -17
  53. package/models/components/piiredactionpluginen.d.ts.map +1 -1
  54. package/models/components/piiredactionpluginen.js +29 -20
  55. package/models/components/piiredactionpluginen.js.map +1 -1
  56. package/models/components/piiredactionpluginnl.d.ts +16 -2
  57. package/models/components/piiredactionpluginnl.d.ts.map +1 -1
  58. package/models/components/piiredactionpluginnl.js +13 -3
  59. package/models/components/piiredactionpluginnl.js.map +1 -1
  60. package/models/components/reasoningpart.js +1 -1
  61. package/models/components/textcontentpartschema.d.ts +10 -10
  62. package/models/components/textcontentpartschema.d.ts.map +1 -1
  63. package/models/components/textcontentpartschema.js +11 -11
  64. package/models/components/textcontentpartschema.js.map +1 -1
  65. package/models/operations/createagentrequest.d.ts +12 -12
  66. package/models/operations/createagentrequest.d.ts.map +1 -1
  67. package/models/operations/createagentrequest.js +8 -0
  68. package/models/operations/createagentrequest.js.map +1 -1
  69. package/models/operations/createchatcompletion.d.ts +4 -4
  70. package/models/operations/createchatcompletion.d.ts.map +1 -1
  71. package/models/operations/createchatcompletion.js +2 -0
  72. package/models/operations/createchatcompletion.js.map +1 -1
  73. package/models/operations/createcompletion.d.ts +4 -4
  74. package/models/operations/createcompletion.d.ts.map +1 -1
  75. package/models/operations/createcompletion.js +2 -0
  76. package/models/operations/createcompletion.js.map +1 -1
  77. package/models/operations/createdataset.js +1 -1
  78. package/models/operations/createdatasetitem.js +4 -4
  79. package/models/operations/createdatasource.js +1 -1
  80. package/models/operations/createeval.d.ts +22 -852
  81. package/models/operations/createeval.d.ts.map +1 -1
  82. package/models/operations/createeval.js +30 -1341
  83. package/models/operations/createeval.js.map +1 -1
  84. package/models/operations/createimage.d.ts +4 -4
  85. package/models/operations/createimage.d.ts.map +1 -1
  86. package/models/operations/createimage.js +2 -0
  87. package/models/operations/createimage.js.map +1 -1
  88. package/models/operations/createprompt.d.ts +14 -14
  89. package/models/operations/createprompt.d.ts.map +1 -1
  90. package/models/operations/createprompt.js +14 -10
  91. package/models/operations/createprompt.js.map +1 -1
  92. package/models/operations/creatererank.d.ts +4 -4
  93. package/models/operations/creatererank.d.ts.map +1 -1
  94. package/models/operations/creatererank.js +2 -0
  95. package/models/operations/creatererank.js.map +1 -1
  96. package/models/operations/createtool.d.ts +8 -8
  97. package/models/operations/createtool.d.ts.map +1 -1
  98. package/models/operations/createtool.js +16 -16
  99. package/models/operations/createtool.js.map +1 -1
  100. package/models/operations/deploymentgetconfig.d.ts +8 -8
  101. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  102. package/models/operations/deploymentgetconfig.js +10 -10
  103. package/models/operations/deploymentgetconfig.js.map +1 -1
  104. package/models/operations/getallprompts.d.ts +2 -2
  105. package/models/operations/getallprompts.d.ts.map +1 -1
  106. package/models/operations/getallprompts.js +2 -0
  107. package/models/operations/getallprompts.js.map +1 -1
  108. package/models/operations/getalltools.d.ts +20 -20
  109. package/models/operations/getalltools.d.ts.map +1 -1
  110. package/models/operations/getalltools.js +28 -26
  111. package/models/operations/getalltools.js.map +1 -1
  112. package/models/operations/getevals.d.ts +3 -833
  113. package/models/operations/getevals.d.ts.map +1 -1
  114. package/models/operations/getevals.js +16 -1314
  115. package/models/operations/getevals.js.map +1 -1
  116. package/models/operations/getoneprompt.d.ts +2 -2
  117. package/models/operations/getoneprompt.d.ts.map +1 -1
  118. package/models/operations/getoneprompt.js +2 -0
  119. package/models/operations/getoneprompt.js.map +1 -1
  120. package/models/operations/getpromptversion.d.ts +2 -2
  121. package/models/operations/getpromptversion.d.ts.map +1 -1
  122. package/models/operations/getpromptversion.js +2 -0
  123. package/models/operations/getpromptversion.js.map +1 -1
  124. package/models/operations/getv2humanevalsets.js +2 -2
  125. package/models/operations/getv2humanevalsetsid.js +2 -2
  126. package/models/operations/invokeeval.d.ts +7 -7
  127. package/models/operations/invokeeval.d.ts.map +1 -1
  128. package/models/operations/invokeeval.js +11 -11
  129. package/models/operations/invokeeval.js.map +1 -1
  130. package/models/operations/listagents.d.ts +4 -4
  131. package/models/operations/listagents.d.ts.map +1 -1
  132. package/models/operations/listagents.js +4 -0
  133. package/models/operations/listagents.js.map +1 -1
  134. package/models/operations/listdatasetdatapoints.js +4 -4
  135. package/models/operations/listdatasets.js +1 -1
  136. package/models/operations/listdatasources.js +1 -1
  137. package/models/operations/listpromptversions.d.ts +2 -2
  138. package/models/operations/listpromptversions.d.ts.map +1 -1
  139. package/models/operations/listpromptversions.js +2 -0
  140. package/models/operations/listpromptversions.js.map +1 -1
  141. package/models/operations/patchv2humanevalsetsid.js +2 -2
  142. package/models/operations/postv2feedbackevaluation.js +3 -3
  143. package/models/operations/postv2humanevalsets.js +2 -2
  144. package/models/operations/retrieveagentrequest.d.ts +4 -4
  145. package/models/operations/retrieveagentrequest.d.ts.map +1 -1
  146. package/models/operations/retrieveagentrequest.js +4 -0
  147. package/models/operations/retrieveagentrequest.js.map +1 -1
  148. package/models/operations/retrievedatapoint.js +4 -4
  149. package/models/operations/retrievedataset.js +1 -1
  150. package/models/operations/retrievedatasource.js +1 -1
  151. package/models/operations/retrievetool.js +6 -6
  152. package/models/operations/runagent.d.ts +8 -8
  153. package/models/operations/runagent.d.ts.map +1 -1
  154. package/models/operations/runagent.js +5 -1
  155. package/models/operations/runagent.js.map +1 -1
  156. package/models/operations/streamrunagent.d.ts +8 -8
  157. package/models/operations/streamrunagent.d.ts.map +1 -1
  158. package/models/operations/streamrunagent.js +5 -1
  159. package/models/operations/streamrunagent.js.map +1 -1
  160. package/models/operations/updateagent.d.ts +12 -12
  161. package/models/operations/updateagent.d.ts.map +1 -1
  162. package/models/operations/updateagent.js +8 -0
  163. package/models/operations/updateagent.js.map +1 -1
  164. package/models/operations/updatedatapoint.js +4 -4
  165. package/models/operations/updatedataset.js +1 -1
  166. package/models/operations/updatedatasource.js +1 -1
  167. package/models/operations/updateeval.d.ts +2 -832
  168. package/models/operations/updateeval.d.ts.map +1 -1
  169. package/models/operations/updateeval.js +9 -1304
  170. package/models/operations/updateeval.js.map +1 -1
  171. package/models/operations/updateprompt.d.ts +6 -6
  172. package/models/operations/updateprompt.d.ts.map +1 -1
  173. package/models/operations/updateprompt.js +4 -0
  174. package/models/operations/updateprompt.js.map +1 -1
  175. package/models/operations/updatetool.js +7 -7
  176. package/package.json +1 -1
  177. package/sdk/feedback.d.ts +2 -2
  178. package/sdk/feedback.js +2 -2
  179. package/src/lib/config.ts +2 -2
  180. package/src/models/components/createskillrequest.ts +27 -20
  181. package/src/models/components/evaluatorresponsefunction.ts +1107 -0
  182. package/src/models/components/evaluatorresponsehttp.ts +247 -0
  183. package/src/models/components/evaluatorresponsejsonschema.ts +214 -0
  184. package/src/models/components/evaluatorresponsellm.ts +442 -0
  185. package/src/models/components/evaluatorresponsepython.ts +234 -0
  186. package/src/models/components/evaluatorresponseragas.ts +257 -0
  187. package/src/models/components/evaluatorresponsetypescript.ts +247 -0
  188. package/src/models/components/index.ts +8 -0
  189. package/src/models/components/invokedeploymentrequest.ts +119 -95
  190. package/src/models/components/modelsconfig.ts +11 -10
  191. package/src/models/components/piiredactionpluginauto.ts +186 -0
  192. package/src/models/components/piiredactionpluginen.ts +59 -29
  193. package/src/models/components/piiredactionpluginnl.ts +26 -4
  194. package/src/models/components/reasoningpart.ts +1 -1
  195. package/src/models/components/textcontentpartschema.ts +23 -19
  196. package/src/models/operations/createagentrequest.ts +42 -10
  197. package/src/models/operations/createchatcompletion.ts +12 -3
  198. package/src/models/operations/createcompletion.ts +12 -3
  199. package/src/models/operations/createdataset.ts +1 -1
  200. package/src/models/operations/createdatasetitem.ts +4 -4
  201. package/src/models/operations/createdatasource.ts +1 -1
  202. package/src/models/operations/createeval.ts +673 -3909
  203. package/src/models/operations/createimage.ts +12 -3
  204. package/src/models/operations/createprompt.ts +39 -27
  205. package/src/models/operations/creatererank.ts +12 -3
  206. package/src/models/operations/createtool.ts +22 -24
  207. package/src/models/operations/deploymentgetconfig.ts +16 -18
  208. package/src/models/operations/getallprompts.ts +9 -2
  209. package/src/models/operations/getalltools.ts +47 -53
  210. package/src/models/operations/getevals.ts +29 -3214
  211. package/src/models/operations/getoneprompt.ts +9 -2
  212. package/src/models/operations/getpromptversion.ts +9 -2
  213. package/src/models/operations/getv2humanevalsets.ts +2 -2
  214. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  215. package/src/models/operations/invokeeval.ts +18 -18
  216. package/src/models/operations/listagents.ts +18 -4
  217. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  218. package/src/models/operations/listdatasets.ts +1 -1
  219. package/src/models/operations/listdatasources.ts +1 -1
  220. package/src/models/operations/listpromptversions.ts +9 -2
  221. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  222. package/src/models/operations/postv2feedbackevaluation.ts +3 -3
  223. package/src/models/operations/postv2humanevalsets.ts +2 -2
  224. package/src/models/operations/retrieveagentrequest.ts +18 -4
  225. package/src/models/operations/retrievedatapoint.ts +4 -4
  226. package/src/models/operations/retrievedataset.ts +1 -1
  227. package/src/models/operations/retrievedatasource.ts +1 -1
  228. package/src/models/operations/retrievetool.ts +6 -6
  229. package/src/models/operations/runagent.ts +25 -7
  230. package/src/models/operations/streamrunagent.ts +25 -7
  231. package/src/models/operations/updateagent.ts +42 -10
  232. package/src/models/operations/updatedatapoint.ts +4 -4
  233. package/src/models/operations/updatedataset.ts +1 -1
  234. package/src/models/operations/updatedatasource.ts +1 -1
  235. package/src/models/operations/updateeval.ts +306 -3524
  236. package/src/models/operations/updateprompt.ts +21 -5
  237. package/src/models/operations/updatetool.ts +7 -7
  238. package/src/sdk/feedback.ts +2 -2
@@ -46,7 +46,8 @@ import {
46
46
  TextContentPartSchema$outboundSchema,
47
47
  } from "./textcontentpartschema.js";
48
48
 
49
- export type InvokeDeploymentRequestContent2 = TextContentPartSchema;
49
+ export type InvokeDeploymentRequestContentPrefixMessages2 =
50
+ TextContentPartSchema;
50
51
 
51
52
  /**
52
53
  * The contents of the tool message.
@@ -128,7 +129,7 @@ export type ToolMessage = {
128
129
  cacheControl?: PrefixMessagesCacheControl | undefined;
129
130
  };
130
131
 
131
- export type Content2 =
132
+ export type InvokeDeploymentRequestContent2 =
132
133
  | (TextContentPartSchema & { type: "text" })
133
134
  | RefusalPartSchema
134
135
  | ReasoningPartSchema
@@ -287,7 +288,7 @@ export type TwoCacheControl = {
287
288
  ttl?: TwoTtl | undefined;
288
289
  };
289
290
 
290
- export type Four = {
291
+ export type Two4 = {
291
292
  /**
292
293
  * The type of the content part. Always `file`.
293
294
  */
@@ -299,11 +300,11 @@ export type Four = {
299
300
  file: FileContentPartSchema;
300
301
  };
301
302
 
302
- export type InvokeDeploymentRequestContentPrefixMessages2 =
303
+ export type Content2 =
303
304
  | (TextContentPartSchema & { type: "text" })
304
305
  | ImageContentPartSchema
305
306
  | AudioContentPartSchema
306
- | Four;
307
+ | Two4;
307
308
 
308
309
  /**
309
310
  * The contents of the user message.
@@ -314,7 +315,7 @@ export type InvokeDeploymentRequestPrefixMessagesContent =
314
315
  | (TextContentPartSchema & { type: "text" })
315
316
  | ImageContentPartSchema
316
317
  | AudioContentPartSchema
317
- | Four
318
+ | Two4
318
319
  >;
319
320
 
320
321
  export type UserMessage = {
@@ -335,7 +336,7 @@ export type UserMessage = {
335
336
  | (TextContentPartSchema & { type: "text" })
336
337
  | ImageContentPartSchema
337
338
  | AudioContentPartSchema
338
- | Four
339
+ | Two4
339
340
  >;
340
341
  };
341
342
 
@@ -632,7 +633,7 @@ export type InvokeDeploymentRequest2CacheControl = {
632
633
  ttl?: InvokeDeploymentRequest2Ttl | undefined;
633
634
  };
634
635
 
635
- export type Two4 = {
636
+ export type InvokeDeploymentRequest24 = {
636
637
  /**
637
638
  * The type of the content part. Always `file`.
638
639
  */
@@ -648,7 +649,7 @@ export type InvokeDeploymentRequestContentMessages2 =
648
649
  | (TextContentPartSchema & { type: "text" })
649
650
  | ImageContentPartSchema
650
651
  | AudioContentPartSchema
651
- | Two4;
652
+ | InvokeDeploymentRequest24;
652
653
 
653
654
  /**
654
655
  * The contents of the user message.
@@ -659,7 +660,7 @@ export type InvokeDeploymentRequestMessages3Content =
659
660
  | (TextContentPartSchema & { type: "text" })
660
661
  | ImageContentPartSchema
661
662
  | AudioContentPartSchema
662
- | Two4
663
+ | InvokeDeploymentRequest24
663
664
  >;
664
665
 
665
666
  export type MessagesUserMessage = {
@@ -680,7 +681,7 @@ export type MessagesUserMessage = {
680
681
  | (TextContentPartSchema & { type: "text" })
681
682
  | ImageContentPartSchema
682
683
  | AudioContentPartSchema
683
- | Two4
684
+ | InvokeDeploymentRequest24
684
685
  >;
685
686
  };
686
687
 
@@ -1066,7 +1067,16 @@ export type OneEq = {
1066
1067
  eq: string | number | boolean;
1067
1068
  };
1068
1069
 
1069
- export type One = OneEq | OneNe | Gt | Gte | Lt | Lte | OneIn | OneNin | Exists;
1070
+ export type KnowledgeFilter1 =
1071
+ | OneEq
1072
+ | OneNe
1073
+ | Gt
1074
+ | Gte
1075
+ | Lt
1076
+ | Lte
1077
+ | OneIn
1078
+ | OneNin
1079
+ | Exists;
1070
1080
 
1071
1081
  /**
1072
1082
  * A filter to apply to the knowledge base chunk metadata when using knowledge bases in the deployment.
@@ -1150,22 +1160,24 @@ export type InvokeDeploymentRequest = {
1150
1160
  };
1151
1161
 
1152
1162
  /** @internal */
1153
- export type InvokeDeploymentRequestContent2$Outbound =
1163
+ export type InvokeDeploymentRequestContentPrefixMessages2$Outbound =
1154
1164
  TextContentPartSchema$Outbound;
1155
1165
 
1156
1166
  /** @internal */
1157
- export const InvokeDeploymentRequestContent2$outboundSchema: z.ZodType<
1158
- InvokeDeploymentRequestContent2$Outbound,
1159
- z.ZodTypeDef,
1160
- InvokeDeploymentRequestContent2
1161
- > = TextContentPartSchema$outboundSchema;
1167
+ export const InvokeDeploymentRequestContentPrefixMessages2$outboundSchema:
1168
+ z.ZodType<
1169
+ InvokeDeploymentRequestContentPrefixMessages2$Outbound,
1170
+ z.ZodTypeDef,
1171
+ InvokeDeploymentRequestContentPrefixMessages2
1172
+ > = TextContentPartSchema$outboundSchema;
1162
1173
 
1163
- export function invokeDeploymentRequestContent2ToJSON(
1164
- invokeDeploymentRequestContent2: InvokeDeploymentRequestContent2,
1174
+ export function invokeDeploymentRequestContentPrefixMessages2ToJSON(
1175
+ invokeDeploymentRequestContentPrefixMessages2:
1176
+ InvokeDeploymentRequestContentPrefixMessages2,
1165
1177
  ): string {
1166
1178
  return JSON.stringify(
1167
- InvokeDeploymentRequestContent2$outboundSchema.parse(
1168
- invokeDeploymentRequestContent2,
1179
+ InvokeDeploymentRequestContentPrefixMessages2$outboundSchema.parse(
1180
+ invokeDeploymentRequestContentPrefixMessages2,
1169
1181
  ),
1170
1182
  );
1171
1183
  }
@@ -1259,17 +1271,17 @@ export function toolMessageToJSON(toolMessage: ToolMessage): string {
1259
1271
  }
1260
1272
 
1261
1273
  /** @internal */
1262
- export type Content2$Outbound =
1274
+ export type InvokeDeploymentRequestContent2$Outbound =
1263
1275
  | (TextContentPartSchema$Outbound & { type: "text" })
1264
1276
  | RefusalPartSchema$Outbound
1265
1277
  | ReasoningPartSchema$Outbound
1266
1278
  | RedactedReasoningPartSchema$Outbound;
1267
1279
 
1268
1280
  /** @internal */
1269
- export const Content2$outboundSchema: z.ZodType<
1270
- Content2$Outbound,
1281
+ export const InvokeDeploymentRequestContent2$outboundSchema: z.ZodType<
1282
+ InvokeDeploymentRequestContent2$Outbound,
1271
1283
  z.ZodTypeDef,
1272
- Content2
1284
+ InvokeDeploymentRequestContent2
1273
1285
  > = z.union([
1274
1286
  TextContentPartSchema$outboundSchema.and(
1275
1287
  z.object({ type: z.literal("text") }),
@@ -1279,8 +1291,14 @@ export const Content2$outboundSchema: z.ZodType<
1279
1291
  RedactedReasoningPartSchema$outboundSchema,
1280
1292
  ]);
1281
1293
 
1282
- export function content2ToJSON(content2: Content2): string {
1283
- return JSON.stringify(Content2$outboundSchema.parse(content2));
1294
+ export function invokeDeploymentRequestContent2ToJSON(
1295
+ invokeDeploymentRequestContent2: InvokeDeploymentRequestContent2,
1296
+ ): string {
1297
+ return JSON.stringify(
1298
+ InvokeDeploymentRequestContent2$outboundSchema.parse(
1299
+ invokeDeploymentRequestContent2,
1300
+ ),
1301
+ );
1284
1302
  }
1285
1303
 
1286
1304
  /** @internal */
@@ -1490,14 +1508,14 @@ export function twoCacheControlToJSON(
1490
1508
  }
1491
1509
 
1492
1510
  /** @internal */
1493
- export type Four$Outbound = {
1511
+ export type Two4$Outbound = {
1494
1512
  type: "file";
1495
1513
  cache_control?: TwoCacheControl$Outbound | undefined;
1496
1514
  file: FileContentPartSchema$Outbound;
1497
1515
  };
1498
1516
 
1499
1517
  /** @internal */
1500
- export const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four> =
1518
+ export const Two4$outboundSchema: z.ZodType<Two4$Outbound, z.ZodTypeDef, Two4> =
1501
1519
  z.object({
1502
1520
  type: z.literal("file"),
1503
1521
  cacheControl: z.lazy(() => TwoCacheControl$outboundSchema).optional(),
@@ -1508,41 +1526,33 @@ export const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four> =
1508
1526
  });
1509
1527
  });
1510
1528
 
1511
- export function fourToJSON(four: Four): string {
1512
- return JSON.stringify(Four$outboundSchema.parse(four));
1529
+ export function two4ToJSON(two4: Two4): string {
1530
+ return JSON.stringify(Two4$outboundSchema.parse(two4));
1513
1531
  }
1514
1532
 
1515
1533
  /** @internal */
1516
- export type InvokeDeploymentRequestContentPrefixMessages2$Outbound =
1534
+ export type Content2$Outbound =
1517
1535
  | (TextContentPartSchema$Outbound & { type: "text" })
1518
1536
  | ImageContentPartSchema$Outbound
1519
1537
  | AudioContentPartSchema$Outbound
1520
- | Four$Outbound;
1538
+ | Two4$Outbound;
1521
1539
 
1522
1540
  /** @internal */
1523
- export const InvokeDeploymentRequestContentPrefixMessages2$outboundSchema:
1524
- z.ZodType<
1525
- InvokeDeploymentRequestContentPrefixMessages2$Outbound,
1526
- z.ZodTypeDef,
1527
- InvokeDeploymentRequestContentPrefixMessages2
1528
- > = z.union([
1529
- TextContentPartSchema$outboundSchema.and(
1530
- z.object({ type: z.literal("text") }),
1531
- ),
1532
- ImageContentPartSchema$outboundSchema,
1533
- AudioContentPartSchema$outboundSchema,
1534
- z.lazy(() => Four$outboundSchema),
1535
- ]);
1541
+ export const Content2$outboundSchema: z.ZodType<
1542
+ Content2$Outbound,
1543
+ z.ZodTypeDef,
1544
+ Content2
1545
+ > = z.union([
1546
+ TextContentPartSchema$outboundSchema.and(
1547
+ z.object({ type: z.literal("text") }),
1548
+ ),
1549
+ ImageContentPartSchema$outboundSchema,
1550
+ AudioContentPartSchema$outboundSchema,
1551
+ z.lazy(() => Two4$outboundSchema),
1552
+ ]);
1536
1553
 
1537
- export function invokeDeploymentRequestContentPrefixMessages2ToJSON(
1538
- invokeDeploymentRequestContentPrefixMessages2:
1539
- InvokeDeploymentRequestContentPrefixMessages2,
1540
- ): string {
1541
- return JSON.stringify(
1542
- InvokeDeploymentRequestContentPrefixMessages2$outboundSchema.parse(
1543
- invokeDeploymentRequestContentPrefixMessages2,
1544
- ),
1545
- );
1554
+ export function content2ToJSON(content2: Content2): string {
1555
+ return JSON.stringify(Content2$outboundSchema.parse(content2));
1546
1556
  }
1547
1557
 
1548
1558
  /** @internal */
@@ -1552,7 +1562,7 @@ export type InvokeDeploymentRequestPrefixMessagesContent$Outbound =
1552
1562
  | (TextContentPartSchema$Outbound & { type: "text" })
1553
1563
  | ImageContentPartSchema$Outbound
1554
1564
  | AudioContentPartSchema$Outbound
1555
- | Four$Outbound
1565
+ | Two4$Outbound
1556
1566
  >;
1557
1567
 
1558
1568
  /** @internal */
@@ -1570,7 +1580,7 @@ export const InvokeDeploymentRequestPrefixMessagesContent$outboundSchema:
1570
1580
  ),
1571
1581
  ImageContentPartSchema$outboundSchema,
1572
1582
  AudioContentPartSchema$outboundSchema,
1573
- z.lazy(() => Four$outboundSchema),
1583
+ z.lazy(() => Two4$outboundSchema),
1574
1584
  ]),
1575
1585
  ),
1576
1586
  ]);
@@ -1596,7 +1606,7 @@ export type UserMessage$Outbound = {
1596
1606
  | (TextContentPartSchema$Outbound & { type: "text" })
1597
1607
  | ImageContentPartSchema$Outbound
1598
1608
  | AudioContentPartSchema$Outbound
1599
- | Four$Outbound
1609
+ | Two4$Outbound
1600
1610
  >;
1601
1611
  };
1602
1612
 
@@ -1617,7 +1627,7 @@ export const UserMessage$outboundSchema: z.ZodType<
1617
1627
  ),
1618
1628
  ImageContentPartSchema$outboundSchema,
1619
1629
  AudioContentPartSchema$outboundSchema,
1620
- z.lazy(() => Four$outboundSchema),
1630
+ z.lazy(() => Two4$outboundSchema),
1621
1631
  ]),
1622
1632
  ),
1623
1633
  ]),
@@ -2093,28 +2103,35 @@ export function invokeDeploymentRequest2CacheControlToJSON(
2093
2103
  }
2094
2104
 
2095
2105
  /** @internal */
2096
- export type Two4$Outbound = {
2106
+ export type InvokeDeploymentRequest24$Outbound = {
2097
2107
  type: "file";
2098
2108
  cache_control?: InvokeDeploymentRequest2CacheControl$Outbound | undefined;
2099
2109
  file: FileContentPartSchema$Outbound;
2100
2110
  };
2101
2111
 
2102
2112
  /** @internal */
2103
- export const Two4$outboundSchema: z.ZodType<Two4$Outbound, z.ZodTypeDef, Two4> =
2104
- z.object({
2105
- type: z.literal("file"),
2106
- cacheControl: z.lazy(() =>
2107
- InvokeDeploymentRequest2CacheControl$outboundSchema
2108
- ).optional(),
2109
- file: FileContentPartSchema$outboundSchema,
2110
- }).transform((v) => {
2111
- return remap$(v, {
2112
- cacheControl: "cache_control",
2113
- });
2113
+ export const InvokeDeploymentRequest24$outboundSchema: z.ZodType<
2114
+ InvokeDeploymentRequest24$Outbound,
2115
+ z.ZodTypeDef,
2116
+ InvokeDeploymentRequest24
2117
+ > = z.object({
2118
+ type: z.literal("file"),
2119
+ cacheControl: z.lazy(() =>
2120
+ InvokeDeploymentRequest2CacheControl$outboundSchema
2121
+ ).optional(),
2122
+ file: FileContentPartSchema$outboundSchema,
2123
+ }).transform((v) => {
2124
+ return remap$(v, {
2125
+ cacheControl: "cache_control",
2114
2126
  });
2127
+ });
2115
2128
 
2116
- export function two4ToJSON(two4: Two4): string {
2117
- return JSON.stringify(Two4$outboundSchema.parse(two4));
2129
+ export function invokeDeploymentRequest24ToJSON(
2130
+ invokeDeploymentRequest24: InvokeDeploymentRequest24,
2131
+ ): string {
2132
+ return JSON.stringify(
2133
+ InvokeDeploymentRequest24$outboundSchema.parse(invokeDeploymentRequest24),
2134
+ );
2118
2135
  }
2119
2136
 
2120
2137
  /** @internal */
@@ -2122,7 +2139,7 @@ export type InvokeDeploymentRequestContentMessages2$Outbound =
2122
2139
  | (TextContentPartSchema$Outbound & { type: "text" })
2123
2140
  | ImageContentPartSchema$Outbound
2124
2141
  | AudioContentPartSchema$Outbound
2125
- | Two4$Outbound;
2142
+ | InvokeDeploymentRequest24$Outbound;
2126
2143
 
2127
2144
  /** @internal */
2128
2145
  export const InvokeDeploymentRequestContentMessages2$outboundSchema: z.ZodType<
@@ -2135,7 +2152,7 @@ export const InvokeDeploymentRequestContentMessages2$outboundSchema: z.ZodType<
2135
2152
  ),
2136
2153
  ImageContentPartSchema$outboundSchema,
2137
2154
  AudioContentPartSchema$outboundSchema,
2138
- z.lazy(() => Two4$outboundSchema),
2155
+ z.lazy(() => InvokeDeploymentRequest24$outboundSchema),
2139
2156
  ]);
2140
2157
 
2141
2158
  export function invokeDeploymentRequestContentMessages2ToJSON(
@@ -2156,7 +2173,7 @@ export type InvokeDeploymentRequestMessages3Content$Outbound =
2156
2173
  | (TextContentPartSchema$Outbound & { type: "text" })
2157
2174
  | ImageContentPartSchema$Outbound
2158
2175
  | AudioContentPartSchema$Outbound
2159
- | Two4$Outbound
2176
+ | InvokeDeploymentRequest24$Outbound
2160
2177
  >;
2161
2178
 
2162
2179
  /** @internal */
@@ -2173,7 +2190,7 @@ export const InvokeDeploymentRequestMessages3Content$outboundSchema: z.ZodType<
2173
2190
  ),
2174
2191
  ImageContentPartSchema$outboundSchema,
2175
2192
  AudioContentPartSchema$outboundSchema,
2176
- z.lazy(() => Two4$outboundSchema),
2193
+ z.lazy(() => InvokeDeploymentRequest24$outboundSchema),
2177
2194
  ]),
2178
2195
  ),
2179
2196
  ]);
@@ -2199,7 +2216,7 @@ export type MessagesUserMessage$Outbound = {
2199
2216
  | (TextContentPartSchema$Outbound & { type: "text" })
2200
2217
  | ImageContentPartSchema$Outbound
2201
2218
  | AudioContentPartSchema$Outbound
2202
- | Two4$Outbound
2219
+ | InvokeDeploymentRequest24$Outbound
2203
2220
  >;
2204
2221
  };
2205
2222
 
@@ -2220,7 +2237,7 @@ export const MessagesUserMessage$outboundSchema: z.ZodType<
2220
2237
  ),
2221
2238
  ImageContentPartSchema$outboundSchema,
2222
2239
  AudioContentPartSchema$outboundSchema,
2223
- z.lazy(() => Two4$outboundSchema),
2240
+ z.lazy(() => InvokeDeploymentRequest24$outboundSchema),
2224
2241
  ]),
2225
2242
  ),
2226
2243
  ]),
@@ -3277,7 +3294,7 @@ export function oneEqToJSON(oneEq: OneEq): string {
3277
3294
  }
3278
3295
 
3279
3296
  /** @internal */
3280
- export type One$Outbound =
3297
+ export type KnowledgeFilter1$Outbound =
3281
3298
  | OneEq$Outbound
3282
3299
  | OneNe$Outbound
3283
3300
  | Gt$Outbound
@@ -3289,21 +3306,28 @@ export type One$Outbound =
3289
3306
  | Exists$Outbound;
3290
3307
 
3291
3308
  /** @internal */
3292
- export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
3293
- .union([
3294
- z.lazy(() => OneEq$outboundSchema),
3295
- z.lazy(() => OneNe$outboundSchema),
3296
- z.lazy(() => Gt$outboundSchema),
3297
- z.lazy(() => Gte$outboundSchema),
3298
- z.lazy(() => Lt$outboundSchema),
3299
- z.lazy(() => Lte$outboundSchema),
3300
- z.lazy(() => OneIn$outboundSchema),
3301
- z.lazy(() => OneNin$outboundSchema),
3302
- z.lazy(() => Exists$outboundSchema),
3303
- ]);
3309
+ export const KnowledgeFilter1$outboundSchema: z.ZodType<
3310
+ KnowledgeFilter1$Outbound,
3311
+ z.ZodTypeDef,
3312
+ KnowledgeFilter1
3313
+ > = z.union([
3314
+ z.lazy(() => OneEq$outboundSchema),
3315
+ z.lazy(() => OneNe$outboundSchema),
3316
+ z.lazy(() => Gt$outboundSchema),
3317
+ z.lazy(() => Gte$outboundSchema),
3318
+ z.lazy(() => Lt$outboundSchema),
3319
+ z.lazy(() => Lte$outboundSchema),
3320
+ z.lazy(() => OneIn$outboundSchema),
3321
+ z.lazy(() => OneNin$outboundSchema),
3322
+ z.lazy(() => Exists$outboundSchema),
3323
+ ]);
3304
3324
 
3305
- export function oneToJSON(one: One): string {
3306
- return JSON.stringify(One$outboundSchema.parse(one));
3325
+ export function knowledgeFilter1ToJSON(
3326
+ knowledgeFilter1: KnowledgeFilter1,
3327
+ ): string {
3328
+ return JSON.stringify(
3329
+ KnowledgeFilter1$outboundSchema.parse(knowledgeFilter1),
3330
+ );
3307
3331
  }
3308
3332
 
3309
3333
  /** @internal */
@@ -14,25 +14,26 @@ import {
14
14
  ModelRef$outboundSchema,
15
15
  } from "./modelref.js";
16
16
 
17
- export const Mode = {
17
+ export const ModelsConfigMode = {
18
18
  Fallback: "fallback",
19
19
  Weighted: "weighted",
20
20
  RoundRobin: "round_robin",
21
21
  } as const;
22
- export type Mode = ClosedEnum<typeof Mode>;
22
+ export type ModelsConfigMode = ClosedEnum<typeof ModelsConfigMode>;
23
23
 
24
24
  export type ModelsConfig = {
25
- mode: Mode;
25
+ mode: ModelsConfigMode;
26
26
  models: Array<ModelRef> | null;
27
27
  };
28
28
 
29
29
  /** @internal */
30
- export const Mode$inboundSchema: z.ZodNativeEnum<typeof Mode> = z.nativeEnum(
31
- Mode,
32
- );
30
+ export const ModelsConfigMode$inboundSchema: z.ZodNativeEnum<
31
+ typeof ModelsConfigMode
32
+ > = z.nativeEnum(ModelsConfigMode);
33
33
  /** @internal */
34
- export const Mode$outboundSchema: z.ZodNativeEnum<typeof Mode> =
35
- Mode$inboundSchema;
34
+ export const ModelsConfigMode$outboundSchema: z.ZodNativeEnum<
35
+ typeof ModelsConfigMode
36
+ > = ModelsConfigMode$inboundSchema;
36
37
 
37
38
  /** @internal */
38
39
  export const ModelsConfig$inboundSchema: z.ZodType<
@@ -40,7 +41,7 @@ export const ModelsConfig$inboundSchema: z.ZodType<
40
41
  z.ZodTypeDef,
41
42
  unknown
42
43
  > = z.object({
43
- mode: Mode$inboundSchema,
44
+ mode: ModelsConfigMode$inboundSchema,
44
45
  models: z.nullable(z.array(ModelRef$inboundSchema)),
45
46
  });
46
47
  /** @internal */
@@ -55,7 +56,7 @@ export const ModelsConfig$outboundSchema: z.ZodType<
55
56
  z.ZodTypeDef,
56
57
  ModelsConfig
57
58
  > = z.object({
58
- mode: Mode$outboundSchema,
59
+ mode: ModelsConfigMode$outboundSchema,
59
60
  models: z.nullable(z.array(ModelRef$outboundSchema)),
60
61
  });
61
62
 
@@ -0,0 +1,186 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * Plugin discriminator. Must be `pii_redaction`.
14
+ */
15
+ export const Id = {
16
+ PiiRedaction: "pii_redaction",
17
+ } as const;
18
+ /**
19
+ * Plugin discriminator. Must be `pii_redaction`.
20
+ */
21
+ export type Id = ClosedEnum<typeof Id>;
22
+
23
+ /**
24
+ * Behavior when redaction is unavailable. `block` (default) fails the request; `passthrough` sends the original text.
25
+ */
26
+ export const OnFailure = {
27
+ Block: "block",
28
+ Passthrough: "passthrough",
29
+ } as const;
30
+ /**
31
+ * Behavior when redaction is unavailable. `block` (default) fails the request; `passthrough` sends the original text.
32
+ */
33
+ export type OnFailure = ClosedEnum<typeof OnFailure>;
34
+
35
+ export const Entities = {
36
+ Age: "AGE",
37
+ ApiKey: "API_KEY",
38
+ BankRouting: "BANK_ROUTING",
39
+ Bic: "BIC",
40
+ BiometricId: "BIOMETRIC_ID",
41
+ BloodType: "BLOOD_TYPE",
42
+ Bsn: "BSN",
43
+ CreditCard: "CREDIT_CARD",
44
+ Crypto: "CRYPTO",
45
+ DateTime: "DATE_TIME",
46
+ DeviceId: "DEVICE_ID",
47
+ EducationLevel: "EDUCATION_LEVEL",
48
+ Email: "EMAIL",
49
+ EmailAddress: "EMAIL_ADDRESS",
50
+ EmploymentStatus: "EMPLOYMENT_STATUS",
51
+ Gender: "GENDER",
52
+ HealthPlanId: "HEALTH_PLAN_ID",
53
+ HttpCookie: "HTTP_COOKIE",
54
+ IbanCode: "IBAN_CODE",
55
+ Id: "ID",
56
+ IdCard: "ID_CARD",
57
+ Imei: "IMEI",
58
+ IpAddress: "IP_ADDRESS",
59
+ Jobtitle: "JOBTITLE",
60
+ Jwt: "JWT",
61
+ KvkNumber: "KVK_NUMBER",
62
+ Language: "LANGUAGE",
63
+ LicenseNumber: "LICENSE_NUMBER",
64
+ LicensePlate: "LICENSE_PLATE",
65
+ Location: "LOCATION",
66
+ MacAddress: "MAC_ADDRESS",
67
+ MedicalLicense: "MEDICAL_LICENSE",
68
+ MedicalRecord: "MEDICAL_RECORD",
69
+ Nrp: "NRP",
70
+ Organization: "ORGANIZATION",
71
+ Passport: "PASSPORT",
72
+ Password: "PASSWORD",
73
+ Person: "PERSON",
74
+ PhoneNumber: "PHONE_NUMBER",
75
+ Pin: "PIN",
76
+ PoliticalView: "POLITICAL_VIEW",
77
+ RaceEthnicity: "RACE_ETHNICITY",
78
+ ReligiousBelief: "RELIGIOUS_BELIEF",
79
+ Sexuality: "SEXUALITY",
80
+ TaxId: "TAX_ID",
81
+ Title: "TITLE",
82
+ UkNhs: "UK_NHS",
83
+ Url: "URL",
84
+ UsBankNumber: "US_BANK_NUMBER",
85
+ UsDriverLicense: "US_DRIVER_LICENSE",
86
+ UsItin: "US_ITIN",
87
+ UsPassport: "US_PASSPORT",
88
+ UsSsn: "US_SSN",
89
+ Uuid: "UUID",
90
+ VehicleId: "VEHICLE_ID",
91
+ } as const;
92
+ export type Entities = ClosedEnum<typeof Entities>;
93
+
94
+ export type PIIRedactionPluginAuto = {
95
+ /**
96
+ * Plugin discriminator. Must be `pii_redaction`.
97
+ */
98
+ id: Id;
99
+ /**
100
+ * Behavior when redaction is unavailable. `block` (default) fails the request; `passthrough` sends the original text.
101
+ */
102
+ onFailure?: OnFailure | undefined;
103
+ /**
104
+ * Detector confidence cutoff in [0,1].
105
+ */
106
+ threshold?: number | undefined;
107
+ /**
108
+ * Entity types to redact when no detector language is configured. Omit to redact every detected type.
109
+ */
110
+ entities?: Array<Entities> | undefined;
111
+ };
112
+
113
+ /** @internal */
114
+ export const Id$inboundSchema: z.ZodNativeEnum<typeof Id> = z.nativeEnum(Id);
115
+ /** @internal */
116
+ export const Id$outboundSchema: z.ZodNativeEnum<typeof Id> = Id$inboundSchema;
117
+
118
+ /** @internal */
119
+ export const OnFailure$inboundSchema: z.ZodNativeEnum<typeof OnFailure> = z
120
+ .nativeEnum(OnFailure);
121
+ /** @internal */
122
+ export const OnFailure$outboundSchema: z.ZodNativeEnum<typeof OnFailure> =
123
+ OnFailure$inboundSchema;
124
+
125
+ /** @internal */
126
+ export const Entities$inboundSchema: z.ZodNativeEnum<typeof Entities> = z
127
+ .nativeEnum(Entities);
128
+ /** @internal */
129
+ export const Entities$outboundSchema: z.ZodNativeEnum<typeof Entities> =
130
+ Entities$inboundSchema;
131
+
132
+ /** @internal */
133
+ export const PIIRedactionPluginAuto$inboundSchema: z.ZodType<
134
+ PIIRedactionPluginAuto,
135
+ z.ZodTypeDef,
136
+ unknown
137
+ > = z.object({
138
+ id: Id$inboundSchema,
139
+ on_failure: OnFailure$inboundSchema.optional(),
140
+ threshold: z.number().optional(),
141
+ entities: z.array(Entities$inboundSchema).optional(),
142
+ }).transform((v) => {
143
+ return remap$(v, {
144
+ "on_failure": "onFailure",
145
+ });
146
+ });
147
+ /** @internal */
148
+ export type PIIRedactionPluginAuto$Outbound = {
149
+ id: string;
150
+ on_failure?: string | undefined;
151
+ threshold?: number | undefined;
152
+ entities?: Array<string> | undefined;
153
+ };
154
+
155
+ /** @internal */
156
+ export const PIIRedactionPluginAuto$outboundSchema: z.ZodType<
157
+ PIIRedactionPluginAuto$Outbound,
158
+ z.ZodTypeDef,
159
+ PIIRedactionPluginAuto
160
+ > = z.object({
161
+ id: Id$outboundSchema,
162
+ onFailure: OnFailure$outboundSchema.optional(),
163
+ threshold: z.number().optional(),
164
+ entities: z.array(Entities$outboundSchema).optional(),
165
+ }).transform((v) => {
166
+ return remap$(v, {
167
+ onFailure: "on_failure",
168
+ });
169
+ });
170
+
171
+ export function piiRedactionPluginAutoToJSON(
172
+ piiRedactionPluginAuto: PIIRedactionPluginAuto,
173
+ ): string {
174
+ return JSON.stringify(
175
+ PIIRedactionPluginAuto$outboundSchema.parse(piiRedactionPluginAuto),
176
+ );
177
+ }
178
+ export function piiRedactionPluginAutoFromJSON(
179
+ jsonString: string,
180
+ ): SafeParseResult<PIIRedactionPluginAuto, SDKValidationError> {
181
+ return safeParse(
182
+ jsonString,
183
+ (x) => PIIRedactionPluginAuto$inboundSchema.parse(JSON.parse(x)),
184
+ `Failed to parse 'PIIRedactionPluginAuto' from JSON`,
185
+ );
186
+ }