@orq-ai/node 4.15.0-rc.9 → 4.16.0-rc.0

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 (1020) hide show
  1. package/FUNCTIONS.md +38 -3
  2. package/README.md +285 -72
  3. package/examples/deploymentsInvoke.example.ts +62 -0
  4. package/funcs/agentsCreate.js +1 -1
  5. package/funcs/agentsCreate.js.map +1 -1
  6. package/funcs/agentsDelete.js +1 -1
  7. package/funcs/agentsDelete.js.map +1 -1
  8. package/funcs/agentsList.js +1 -1
  9. package/funcs/agentsList.js.map +1 -1
  10. package/funcs/agentsResponsesGet.js +1 -1
  11. package/funcs/agentsResponsesGet.js.map +1 -1
  12. package/funcs/agentsRetrieve.js +1 -1
  13. package/funcs/agentsRetrieve.js.map +1 -1
  14. package/funcs/agentsStream.js +1 -1
  15. package/funcs/agentsStream.js.map +1 -1
  16. package/funcs/agentsStreamRun.js +1 -1
  17. package/funcs/agentsStreamRun.js.map +1 -1
  18. package/funcs/agentsUpdate.js +1 -1
  19. package/funcs/agentsUpdate.js.map +1 -1
  20. package/funcs/annotationQueuesAddItems.d.ts +1 -1
  21. package/funcs/annotationQueuesAddItems.d.ts.map +1 -1
  22. package/funcs/annotationQueuesAddItems.js +2 -1
  23. package/funcs/annotationQueuesAddItems.js.map +1 -1
  24. package/funcs/annotationQueuesClear.d.ts +1 -2
  25. package/funcs/annotationQueuesClear.d.ts.map +1 -1
  26. package/funcs/annotationQueuesClear.js +3 -3
  27. package/funcs/annotationQueuesClear.js.map +1 -1
  28. package/funcs/annotationQueuesDelete.d.ts +1 -2
  29. package/funcs/annotationQueuesDelete.d.ts.map +1 -1
  30. package/funcs/annotationQueuesDelete.js +3 -3
  31. package/funcs/annotationQueuesDelete.js.map +1 -1
  32. package/funcs/annotationQueuesRemoveItems.d.ts +1 -2
  33. package/funcs/annotationQueuesRemoveItems.d.ts.map +1 -1
  34. package/funcs/annotationQueuesRemoveItems.js +3 -3
  35. package/funcs/annotationQueuesRemoveItems.js.map +1 -1
  36. package/funcs/budgetsCreate.d.ts +1 -1
  37. package/funcs/budgetsCreate.js +1 -1
  38. package/funcs/budgetsDelete.d.ts +1 -1
  39. package/funcs/budgetsDelete.js +1 -1
  40. package/funcs/budgetsGet.d.ts +1 -1
  41. package/funcs/budgetsGet.js +1 -1
  42. package/funcs/budgetsList.d.ts +1 -1
  43. package/funcs/budgetsList.js +1 -1
  44. package/funcs/budgetsResetConsumption.d.ts +1 -1
  45. package/funcs/budgetsResetConsumption.js +1 -1
  46. package/funcs/budgetsUpdate.d.ts +1 -1
  47. package/funcs/budgetsUpdate.js +1 -1
  48. package/funcs/datasetsCreateDatapoint.d.ts +2 -1
  49. package/funcs/datasetsCreateDatapoint.d.ts.map +1 -1
  50. package/funcs/datasetsCreateDatapoint.js +5 -1
  51. package/funcs/datasetsCreateDatapoint.js.map +1 -1
  52. package/funcs/datasetsList.js +1 -0
  53. package/funcs/datasetsList.js.map +1 -1
  54. package/funcs/deploymentsInvoke.d.ts +18 -0
  55. package/funcs/deploymentsInvoke.d.ts.map +1 -0
  56. package/funcs/deploymentsInvoke.js +116 -0
  57. package/funcs/deploymentsInvoke.js.map +1 -0
  58. package/funcs/deploymentsStream.d.ts +18 -0
  59. package/funcs/deploymentsStream.d.ts.map +1 -0
  60. package/funcs/deploymentsStream.js +129 -0
  61. package/funcs/deploymentsStream.js.map +1 -0
  62. package/funcs/evalsAll.d.ts +2 -2
  63. package/funcs/evalsAll.d.ts.map +1 -1
  64. package/funcs/evalsAll.js +5 -2
  65. package/funcs/evalsAll.js.map +1 -1
  66. package/funcs/evalsCreate.d.ts +2 -2
  67. package/funcs/evalsCreate.d.ts.map +1 -1
  68. package/funcs/evalsCreate.js +20 -5
  69. package/funcs/evalsCreate.js.map +1 -1
  70. package/funcs/evalsDelete.d.ts +2 -2
  71. package/funcs/evalsDelete.d.ts.map +1 -1
  72. package/funcs/evalsDelete.js +6 -2
  73. package/funcs/evalsDelete.js.map +1 -1
  74. package/funcs/evalsGet.d.ts +2 -2
  75. package/funcs/evalsGet.d.ts.map +1 -1
  76. package/funcs/evalsGet.js +5 -2
  77. package/funcs/evalsGet.js.map +1 -1
  78. package/funcs/evalsGetVersion.d.ts +1 -2
  79. package/funcs/evalsGetVersion.d.ts.map +1 -1
  80. package/funcs/evalsGetVersion.js +1 -2
  81. package/funcs/evalsGetVersion.js.map +1 -1
  82. package/funcs/evalsInvoke.d.ts +1 -1
  83. package/funcs/evalsInvoke.d.ts.map +1 -1
  84. package/funcs/evalsInvoke.js +1 -1
  85. package/funcs/evalsInvoke.js.map +1 -1
  86. package/funcs/evalsUpdate.d.ts +2 -2
  87. package/funcs/evalsUpdate.d.ts.map +1 -1
  88. package/funcs/evalsUpdate.js +5 -2
  89. package/funcs/evalsUpdate.js.map +1 -1
  90. package/funcs/hubGet.d.ts +18 -0
  91. package/funcs/hubGet.d.ts.map +1 -0
  92. package/funcs/hubGet.js +121 -0
  93. package/funcs/hubGet.js.map +1 -0
  94. package/funcs/hubSearch.d.ts +18 -0
  95. package/funcs/hubSearch.d.ts.map +1 -0
  96. package/funcs/hubSearch.js +120 -0
  97. package/funcs/hubSearch.js.map +1 -0
  98. package/funcs/knowledgeCreate.js +1 -1
  99. package/funcs/knowledgeCreate.js.map +1 -1
  100. package/funcs/knowledgeDelete.js +1 -1
  101. package/funcs/knowledgeDelete.js.map +1 -1
  102. package/funcs/knowledgeList.js +1 -1
  103. package/funcs/knowledgeList.js.map +1 -1
  104. package/funcs/knowledgeRetrieve.js +1 -1
  105. package/funcs/knowledgeRetrieve.js.map +1 -1
  106. package/funcs/knowledgeRetrieveFileUrl.js +1 -1
  107. package/funcs/knowledgeRetrieveFileUrl.js.map +1 -1
  108. package/funcs/knowledgeSearch.js +1 -1
  109. package/funcs/knowledgeSearch.js.map +1 -1
  110. package/funcs/knowledgeUpdate.js +1 -1
  111. package/funcs/knowledgeUpdate.js.map +1 -1
  112. package/funcs/logsListFacets.d.ts +2 -3
  113. package/funcs/logsListFacets.d.ts.map +1 -1
  114. package/funcs/logsListFacets.js +5 -12
  115. package/funcs/logsListFacets.js.map +1 -1
  116. package/funcs/modelsAzureFoundryDeployments.js +1 -1
  117. package/funcs/modelsAzureFoundryDeployments.js.map +1 -1
  118. package/funcs/modelsCreate.js +1 -1
  119. package/funcs/modelsCreate.js.map +1 -1
  120. package/funcs/modelsCreateAwsBedrock.js +1 -1
  121. package/funcs/modelsCreateAwsBedrock.js.map +1 -1
  122. package/funcs/modelsCreateOpenaiLike.js +1 -1
  123. package/funcs/modelsCreateOpenaiLike.js.map +1 -1
  124. package/funcs/modelsCreateVertex.js +1 -1
  125. package/funcs/modelsCreateVertex.js.map +1 -1
  126. package/funcs/modelsImportLitellm.js +1 -1
  127. package/funcs/modelsImportLitellm.js.map +1 -1
  128. package/funcs/modelsListLitellm.js +1 -1
  129. package/funcs/modelsListLitellm.js.map +1 -1
  130. package/funcs/modelsUpdate.js +1 -1
  131. package/funcs/modelsUpdate.js.map +1 -1
  132. package/funcs/modelsUpdateAwsBedrock.js +1 -1
  133. package/funcs/modelsUpdateAwsBedrock.js.map +1 -1
  134. package/funcs/modelsUpdateOpenaiLike.js +1 -1
  135. package/funcs/modelsUpdateOpenaiLike.js.map +1 -1
  136. package/funcs/modelsValidate.js +1 -1
  137. package/funcs/modelsValidate.js.map +1 -1
  138. package/funcs/modelsValidateAwsBedrock.js +1 -1
  139. package/funcs/modelsValidateAwsBedrock.js.map +1 -1
  140. package/funcs/piiCapabilities.d.ts +17 -0
  141. package/funcs/piiCapabilities.d.ts.map +1 -0
  142. package/funcs/piiCapabilities.js +105 -0
  143. package/funcs/piiCapabilities.js.map +1 -0
  144. package/funcs/projectsCreate.d.ts +1 -1
  145. package/funcs/projectsCreate.js +1 -1
  146. package/funcs/projectsDelete.d.ts +1 -1
  147. package/funcs/projectsDelete.js +1 -1
  148. package/funcs/projectsUpdate.d.ts +1 -1
  149. package/funcs/projectsUpdate.js +1 -1
  150. package/funcs/reportingQuery.d.ts +1 -1
  151. package/funcs/reportingQuery.js +1 -1
  152. package/funcs/sessionsCreate.d.ts +17 -0
  153. package/funcs/sessionsCreate.d.ts.map +1 -0
  154. package/funcs/sessionsCreate.js +115 -0
  155. package/funcs/sessionsCreate.js.map +1 -0
  156. package/funcs/sessionsDelete.d.ts +17 -0
  157. package/funcs/sessionsDelete.d.ts.map +1 -0
  158. package/funcs/sessionsDelete.js +121 -0
  159. package/funcs/sessionsDelete.js.map +1 -0
  160. package/funcs/sessionsGet.d.ts +18 -0
  161. package/funcs/sessionsGet.d.ts.map +1 -0
  162. package/funcs/sessionsGet.js +121 -0
  163. package/funcs/sessionsGet.js.map +1 -0
  164. package/funcs/sessionsGetCount.d.ts +17 -0
  165. package/funcs/sessionsGetCount.d.ts.map +1 -0
  166. package/funcs/sessionsGetCount.js +115 -0
  167. package/funcs/sessionsGetCount.js.map +1 -0
  168. package/funcs/sessionsList.d.ts +17 -0
  169. package/funcs/sessionsList.d.ts.map +1 -0
  170. package/funcs/sessionsList.js +115 -0
  171. package/funcs/sessionsList.js.map +1 -0
  172. package/funcs/sessionsListTags.d.ts +16 -0
  173. package/funcs/sessionsListTags.d.ts.map +1 -0
  174. package/funcs/sessionsListTags.js +105 -0
  175. package/funcs/sessionsListTags.js.map +1 -0
  176. package/funcs/sessionsUpdate.d.ts +18 -0
  177. package/funcs/sessionsUpdate.d.ts.map +1 -0
  178. package/funcs/sessionsUpdate.js +124 -0
  179. package/funcs/sessionsUpdate.js.map +1 -0
  180. package/funcs/skillsUpdate.d.ts +1 -1
  181. package/funcs/skillsUpdate.js +1 -1
  182. package/funcs/tracesAggregate.d.ts +1 -1
  183. package/funcs/tracesAggregate.js +1 -1
  184. package/funcs/webhooksGet.d.ts +1 -1
  185. package/funcs/webhooksGet.js +1 -1
  186. package/funcs/workspaceSettingsUpdate.d.ts +1 -1
  187. package/funcs/workspaceSettingsUpdate.js +1 -1
  188. package/jsr.json +1 -1
  189. package/lib/config.d.ts +3 -3
  190. package/lib/config.js +3 -3
  191. package/lib/config.js.map +1 -1
  192. package/models/components/agentresponserequest.d.ts +14 -14
  193. package/models/components/agentresponserequest.d.ts.map +1 -1
  194. package/models/components/agentresponserequest.js +15 -14
  195. package/models/components/agentresponserequest.js.map +1 -1
  196. package/models/components/agentstartedstreamingevent.d.ts +13 -1
  197. package/models/components/agentstartedstreamingevent.d.ts.map +1 -1
  198. package/models/components/agentstartedstreamingevent.js +2 -0
  199. package/models/components/agentstartedstreamingevent.js.map +1 -1
  200. package/models/components/agentthoughtstreamingevent.d.ts +12 -12
  201. package/models/components/agentthoughtstreamingevent.d.ts.map +1 -1
  202. package/models/components/agentthoughtstreamingevent.js +17 -17
  203. package/models/components/agentthoughtstreamingevent.js.map +1 -1
  204. package/models/components/aggregatelogsrequest.d.ts +3 -3
  205. package/models/components/auditlogfilter.d.ts +1 -1
  206. package/models/components/budgetlimit.d.ts +5 -5
  207. package/models/components/budgetlimit.d.ts.map +1 -1
  208. package/models/components/budgetlimit.js +6 -7
  209. package/models/components/budgetlimit.js.map +1 -1
  210. package/models/components/capabilitiesresponse.d.ts +62 -0
  211. package/models/components/capabilitiesresponse.d.ts.map +1 -0
  212. package/models/components/capabilitiesresponse.js +68 -0
  213. package/models/components/capabilitiesresponse.js.map +1 -0
  214. package/models/components/chatkitresource.d.ts +18 -0
  215. package/models/components/chatkitresource.d.ts.map +1 -0
  216. package/models/components/chatkitresource.js +59 -0
  217. package/models/components/chatkitresource.js.map +1 -0
  218. package/models/components/chatkitresources.d.ts +13 -0
  219. package/models/components/chatkitresources.d.ts.map +1 -0
  220. package/models/components/chatkitresources.js +50 -0
  221. package/models/components/chatkitresources.js.map +1 -0
  222. package/models/components/chunkingconfiguration.d.ts +30 -30
  223. package/models/components/chunkingconfiguration.d.ts.map +1 -1
  224. package/models/components/chunkingconfiguration.js +36 -37
  225. package/models/components/chunkingconfiguration.js.map +1 -1
  226. package/models/components/createmcpgatewayrequest.d.ts +6 -0
  227. package/models/components/createmcpgatewayrequest.d.ts.map +1 -1
  228. package/models/components/createmcpgatewayrequest.js +2 -0
  229. package/models/components/createmcpgatewayrequest.js.map +1 -1
  230. package/models/components/createthreadrequest.d.ts +41 -0
  231. package/models/components/createthreadrequest.d.ts.map +1 -0
  232. package/models/components/createthreadrequest.js +75 -0
  233. package/models/components/createthreadrequest.js.map +1 -0
  234. package/models/components/detectrequest.d.ts +48 -0
  235. package/models/components/detectrequest.d.ts.map +1 -1
  236. package/models/components/detectrequest.js +4 -0
  237. package/models/components/detectrequest.js.map +1 -1
  238. package/models/components/entitylist.d.ts +16 -0
  239. package/models/components/entitylist.d.ts.map +1 -0
  240. package/models/components/{deleteevaluatorresponse.js → entitylist.js} +8 -6
  241. package/models/components/entitylist.js.map +1 -0
  242. package/models/components/evaluationcontext.d.ts +7 -9
  243. package/models/components/evaluationcontext.d.ts.map +1 -1
  244. package/models/components/evaluationcontext.js +2 -8
  245. package/models/components/evaluationcontext.js.map +1 -1
  246. package/models/components/evaluationresult.d.ts +7 -11
  247. package/models/components/evaluationresult.d.ts.map +1 -1
  248. package/models/components/evaluationresult.js.map +1 -1
  249. package/models/components/evaluatorresponsefunction.d.ts +230 -0
  250. package/models/components/evaluatorresponsefunction.d.ts.map +1 -0
  251. package/models/components/evaluatorresponsefunction.js +420 -0
  252. package/models/components/evaluatorresponsefunction.js.map +1 -0
  253. package/models/components/evaluatorresponsehttp.d.ts +37 -0
  254. package/models/components/evaluatorresponsehttp.d.ts.map +1 -0
  255. package/models/components/evaluatorresponsehttp.js +77 -0
  256. package/models/components/evaluatorresponsehttp.js.map +1 -0
  257. package/models/components/evaluatorresponsejsonschema.d.ts +22 -0
  258. package/models/components/evaluatorresponsejsonschema.d.ts.map +1 -0
  259. package/models/components/{listevaluatorsresponse.js → evaluatorresponsejsonschema.js} +20 -16
  260. package/models/components/evaluatorresponsejsonschema.js.map +1 -0
  261. package/models/components/evaluatorresponsellm.d.ts +101 -0
  262. package/models/components/evaluatorresponsellm.d.ts.map +1 -0
  263. package/models/components/evaluatorresponsellm.js +181 -0
  264. package/models/components/evaluatorresponsellm.js.map +1 -0
  265. package/models/components/evaluatorresponsepython.d.ts +22 -0
  266. package/models/components/evaluatorresponsepython.d.ts.map +1 -0
  267. package/models/components/evaluatorresponsepython.js +67 -0
  268. package/models/components/evaluatorresponsepython.js.map +1 -0
  269. package/models/components/evaluatorresponseragas.d.ts +41 -0
  270. package/models/components/evaluatorresponseragas.d.ts.map +1 -0
  271. package/models/components/evaluatorresponseragas.js +86 -0
  272. package/models/components/evaluatorresponseragas.js.map +1 -0
  273. package/models/components/evaluatorresponsetypescript.d.ts +22 -0
  274. package/models/components/evaluatorresponsetypescript.d.ts.map +1 -0
  275. package/models/components/{getevaluatorversionresponse.js → evaluatorresponsetypescript.js} +24 -14
  276. package/models/components/evaluatorresponsetypescript.js.map +1 -0
  277. package/models/components/filter.d.ts +5 -5
  278. package/models/components/filter.d.ts.map +1 -1
  279. package/models/components/filter.js +6 -7
  280. package/models/components/filter.js.map +1 -1
  281. package/models/components/gethubitemresponse.d.ts +11 -0
  282. package/models/components/gethubitemresponse.d.ts.map +1 -0
  283. package/models/components/{invokeevaluatorresponse.js → gethubitemresponse.js} +13 -8
  284. package/models/components/gethubitemresponse.js.map +1 -0
  285. package/models/components/getthreadcountrequest.d.ts +17 -0
  286. package/models/components/getthreadcountrequest.d.ts.map +1 -0
  287. package/models/components/getthreadcountrequest.js +52 -0
  288. package/models/components/getthreadcountrequest.js.map +1 -0
  289. package/models/components/getthreadcountresponse.d.ts +10 -0
  290. package/models/components/getthreadcountresponse.d.ts.map +1 -0
  291. package/models/components/{clearannotationqueueresponse.js → getthreadcountresponse.js} +8 -6
  292. package/models/components/getthreadcountresponse.js.map +1 -0
  293. package/models/components/guardrailruleplugin.d.ts +25 -0
  294. package/models/components/guardrailruleplugin.d.ts.map +1 -1
  295. package/models/components/guardrailruleplugin.js +6 -0
  296. package/models/components/guardrailruleplugin.js.map +1 -1
  297. package/models/components/hubitem.d.ts +71 -0
  298. package/models/components/hubitem.d.ts.map +1 -0
  299. package/models/components/hubitem.js +83 -0
  300. package/models/components/hubitem.js.map +1 -0
  301. package/models/components/hubitemsummary.d.ts +29 -0
  302. package/models/components/hubitemsummary.d.ts.map +1 -0
  303. package/models/components/{addannotationqueueitemsresponse.js → hubitemsummary.js} +17 -8
  304. package/models/components/hubitemsummary.js.map +1 -0
  305. package/models/components/hubsearchhit.d.ts +11 -0
  306. package/models/components/hubsearchhit.d.ts.map +1 -0
  307. package/models/components/{deleteannotationqueueresponse.js → hubsearchhit.js} +9 -6
  308. package/models/components/hubsearchhit.js.map +1 -0
  309. package/models/components/index.d.ts +33 -12
  310. package/models/components/index.d.ts.map +1 -1
  311. package/models/components/index.js +33 -12
  312. package/models/components/index.js.map +1 -1
  313. package/models/components/invokedeploymentrequest.d.ts +1544 -0
  314. package/models/components/invokedeploymentrequest.d.ts.map +1 -0
  315. package/models/components/invokedeploymentrequest.js +1109 -0
  316. package/models/components/invokedeploymentrequest.js.map +1 -0
  317. package/models/components/invokeevaluatorrequest.d.ts +9 -11
  318. package/models/components/invokeevaluatorrequest.d.ts.map +1 -1
  319. package/models/components/invokeevaluatorrequest.js +2 -9
  320. package/models/components/invokeevaluatorrequest.js.map +1 -1
  321. package/models/{operations/listlogfacets.d.ts → components/listlogfacetsrequest.d.ts} +8 -1
  322. package/models/components/listlogfacetsrequest.d.ts.map +1 -0
  323. package/models/{operations/listlogfacets.js → components/listlogfacetsrequest.js} +6 -1
  324. package/models/components/listlogfacetsrequest.js.map +1 -0
  325. package/models/components/listthreadsrequest.d.ts +17 -0
  326. package/models/components/listthreadsrequest.d.ts.map +1 -0
  327. package/models/components/listthreadsrequest.js +52 -0
  328. package/models/components/listthreadsrequest.js.map +1 -0
  329. package/models/components/listthreadsresponse.d.ts +13 -0
  330. package/models/components/listthreadsresponse.d.ts.map +1 -0
  331. package/models/components/listthreadsresponse.js +58 -0
  332. package/models/components/listthreadsresponse.js.map +1 -0
  333. package/models/components/managementkey.d.ts +3 -4
  334. package/models/components/managementkey.d.ts.map +1 -1
  335. package/models/components/managementkey.js.map +1 -1
  336. package/models/components/mcpgateway.d.ts +5 -0
  337. package/models/components/mcpgateway.d.ts.map +1 -1
  338. package/models/components/mcpgateway.js +2 -0
  339. package/models/components/mcpgateway.js.map +1 -1
  340. package/models/components/mcpgatewayplugin.d.ts +30 -0
  341. package/models/components/mcpgatewayplugin.d.ts.map +1 -0
  342. package/models/components/mcpgatewayplugin.js +77 -0
  343. package/models/components/mcpgatewayplugin.js.map +1 -0
  344. package/models/components/memorystoreembeddingconfig.d.ts +1 -1
  345. package/models/components/modelmetadata.d.ts +2 -0
  346. package/models/components/modelmetadata.d.ts.map +1 -1
  347. package/models/components/modelmetadata.js +4 -0
  348. package/models/components/modelmetadata.js.map +1 -1
  349. package/models/components/modelsconfig.d.ts +5 -5
  350. package/models/components/modelsconfig.d.ts.map +1 -1
  351. package/models/components/modelsconfig.js +6 -6
  352. package/models/components/modelsconfig.js.map +1 -1
  353. package/models/components/monitorfilter.d.ts +13 -5
  354. package/models/components/monitorfilter.d.ts.map +1 -1
  355. package/models/components/monitorfilter.js +14 -6
  356. package/models/components/monitorfilter.js.map +1 -1
  357. package/models/components/openaipromptcacheoptions.d.ts +37 -0
  358. package/models/components/openaipromptcacheoptions.d.ts.map +1 -0
  359. package/models/components/openaipromptcacheoptions.js +75 -0
  360. package/models/components/openaipromptcacheoptions.js.map +1 -0
  361. package/models/components/piiredactionconfig.d.ts +20 -0
  362. package/models/components/piiredactionconfig.d.ts.map +1 -1
  363. package/models/components/piiredactionconfig.js +6 -0
  364. package/models/components/piiredactionconfig.js.map +1 -1
  365. package/models/components/piiredactionplugin.d.ts +84 -0
  366. package/models/components/piiredactionplugin.d.ts.map +1 -0
  367. package/models/components/piiredactionplugin.js +103 -0
  368. package/models/components/piiredactionplugin.js.map +1 -0
  369. package/models/components/publicplugin.d.ts +17 -16
  370. package/models/components/publicplugin.d.ts.map +1 -1
  371. package/models/components/publicplugin.js +5 -11
  372. package/models/components/publicplugin.js.map +1 -1
  373. package/models/components/publicresponseresource.d.ts +2 -0
  374. package/models/components/publicresponseresource.d.ts.map +1 -1
  375. package/models/components/publicresponseresource.js +3 -0
  376. package/models/components/publicresponseresource.js.map +1 -1
  377. package/models/components/reasoningpart.js +1 -1
  378. package/models/components/redactrequest.d.ts +48 -0
  379. package/models/components/redactrequest.d.ts.map +1 -1
  380. package/models/components/redactrequest.js +8 -0
  381. package/models/components/redactrequest.js.map +1 -1
  382. package/models/components/responsehealingplugin.d.ts +2 -17
  383. package/models/components/responsehealingplugin.d.ts.map +1 -1
  384. package/models/components/responsehealingplugin.js +3 -13
  385. package/models/components/responsehealingplugin.js.map +1 -1
  386. package/models/components/responsemeta.d.ts +4 -4
  387. package/models/components/responsemeta.d.ts.map +1 -1
  388. package/models/components/responsemeta.js +5 -4
  389. package/models/components/responsemeta.js.map +1 -1
  390. package/models/components/routingruleplugin.d.ts +25 -0
  391. package/models/components/routingruleplugin.d.ts.map +1 -1
  392. package/models/components/routingruleplugin.js +6 -0
  393. package/models/components/routingruleplugin.js.map +1 -1
  394. package/models/components/searchhubitemsresponse.d.ts +11 -0
  395. package/models/components/searchhubitemsresponse.d.ts.map +1 -0
  396. package/models/components/{removeannotationqueueitemsresponse.js → searchhubitemsresponse.js} +9 -6
  397. package/models/components/searchhubitemsresponse.js.map +1 -0
  398. package/models/components/searchknowledgematch.d.ts +1 -4
  399. package/models/components/searchknowledgematch.d.ts.map +1 -1
  400. package/models/components/searchknowledgematch.js.map +1 -1
  401. package/models/components/searchknowledgerequest.d.ts +180 -180
  402. package/models/components/searchknowledgerequest.d.ts.map +1 -1
  403. package/models/components/searchknowledgerequest.js +211 -222
  404. package/models/components/searchknowledgerequest.js.map +1 -1
  405. package/models/components/searchretrievalconfig.d.ts +1 -1
  406. package/models/components/sessioninterval.d.ts +19 -0
  407. package/models/components/sessioninterval.d.ts.map +1 -0
  408. package/models/components/sessioninterval.js +56 -0
  409. package/models/components/sessioninterval.js.map +1 -0
  410. package/models/components/skill.d.ts +2 -3
  411. package/models/components/skill.d.ts.map +1 -1
  412. package/models/components/skill.js.map +1 -1
  413. package/models/components/spansummary.d.ts +12 -0
  414. package/models/components/spansummary.d.ts.map +1 -1
  415. package/models/components/spansummary.js +9 -0
  416. package/models/components/spansummary.js.map +1 -1
  417. package/models/components/textcontentpartschema.d.ts +5 -5
  418. package/models/components/textcontentpartschema.d.ts.map +1 -1
  419. package/models/components/textcontentpartschema.js +6 -6
  420. package/models/components/textcontentpartschema.js.map +1 -1
  421. package/models/components/thread.d.ts +54 -0
  422. package/models/components/thread.d.ts.map +1 -0
  423. package/models/components/thread.js +79 -0
  424. package/models/components/thread.js.map +1 -0
  425. package/models/components/threadbilling.d.ts +21 -0
  426. package/models/components/threadbilling.d.ts.map +1 -0
  427. package/models/components/{evaluatordocumentresponse.js → threadbilling.js} +31 -12
  428. package/models/components/threadbilling.js.map +1 -0
  429. package/models/components/threadfilters.d.ts +34 -0
  430. package/models/components/threadfilters.d.ts.map +1 -0
  431. package/models/components/threadfilters.js +65 -0
  432. package/models/components/threadfilters.js.map +1 -0
  433. package/models/components/threadkind.d.ts +13 -0
  434. package/models/components/threadkind.d.ts.map +1 -0
  435. package/models/components/threadkind.js +51 -0
  436. package/models/components/threadkind.js.map +1 -0
  437. package/models/components/threadusage.d.ts +21 -0
  438. package/models/components/threadusage.d.ts.map +1 -0
  439. package/models/components/threadusage.js +75 -0
  440. package/models/components/threadusage.js.map +1 -0
  441. package/models/components/toolexecutionfailedstreamingevent.d.ts +1 -0
  442. package/models/components/toolexecutionfailedstreamingevent.d.ts.map +1 -1
  443. package/models/components/toolexecutionfailedstreamingevent.js +1 -0
  444. package/models/components/toolexecutionfailedstreamingevent.js.map +1 -1
  445. package/models/components/toolexecutionfinishedstreamingevent.d.ts +1 -0
  446. package/models/components/toolexecutionfinishedstreamingevent.d.ts.map +1 -1
  447. package/models/components/toolexecutionfinishedstreamingevent.js +1 -0
  448. package/models/components/toolexecutionfinishedstreamingevent.js.map +1 -1
  449. package/models/components/toolexecutionstartedstreamingevent.d.ts +1 -0
  450. package/models/components/toolexecutionstartedstreamingevent.d.ts.map +1 -1
  451. package/models/components/toolexecutionstartedstreamingevent.js +1 -0
  452. package/models/components/toolexecutionstartedstreamingevent.js.map +1 -1
  453. package/models/components/tracescrubbingplugin.d.ts +2 -16
  454. package/models/components/tracescrubbingplugin.d.ts.map +1 -1
  455. package/models/components/tracescrubbingplugin.js +3 -13
  456. package/models/components/tracescrubbingplugin.js.map +1 -1
  457. package/models/components/traceusage.d.ts +1 -0
  458. package/models/components/traceusage.d.ts.map +1 -1
  459. package/models/components/traceusage.js +2 -0
  460. package/models/components/traceusage.js.map +1 -1
  461. package/models/components/updatemcpgatewayrequest.d.ts +6 -0
  462. package/models/components/updatemcpgatewayrequest.d.ts.map +1 -1
  463. package/models/components/updatemcpgatewayrequest.js +2 -0
  464. package/models/components/updatemcpgatewayrequest.js.map +1 -1
  465. package/models/components/updatememorystorerequest.d.ts +5 -0
  466. package/models/components/updatememorystorerequest.d.ts.map +1 -1
  467. package/models/components/updatememorystorerequest.js +6 -0
  468. package/models/components/updatememorystorerequest.js.map +1 -1
  469. package/models/components/updateskillrequest.d.ts +1 -1
  470. package/models/components/updatethreadrequest.d.ts +51 -0
  471. package/models/components/updatethreadrequest.d.ts.map +1 -0
  472. package/models/components/updatethreadrequest.js +79 -0
  473. package/models/components/updatethreadrequest.js.map +1 -0
  474. package/models/components/updateworkspacerequest.d.ts +3 -0
  475. package/models/components/updateworkspacerequest.d.ts.map +1 -1
  476. package/models/components/updateworkspacerequest.js +3 -0
  477. package/models/components/updateworkspacerequest.js.map +1 -1
  478. package/models/components/updateworkspacesettingsrequest.d.ts +3 -3
  479. package/models/components/webhook.d.ts +2 -2
  480. package/models/errors/createeval.d.ts +23 -0
  481. package/models/errors/createeval.d.ts.map +1 -0
  482. package/models/errors/createeval.js +68 -0
  483. package/models/errors/createeval.js.map +1 -0
  484. package/models/errors/deleteeval.d.ts +43 -0
  485. package/models/errors/deleteeval.d.ts.map +1 -0
  486. package/models/errors/deleteeval.js +94 -0
  487. package/models/errors/deleteeval.js.map +1 -0
  488. package/models/errors/geteval.d.ts +23 -0
  489. package/models/errors/geteval.d.ts.map +1 -0
  490. package/models/errors/geteval.js +68 -0
  491. package/models/errors/geteval.js.map +1 -0
  492. package/models/errors/getevals.d.ts +23 -0
  493. package/models/errors/getevals.d.ts.map +1 -0
  494. package/models/errors/getevals.js +68 -0
  495. package/models/errors/getevals.js.map +1 -0
  496. package/models/errors/index.d.ts +5 -0
  497. package/models/errors/index.d.ts.map +1 -1
  498. package/models/errors/index.js +5 -0
  499. package/models/errors/index.js.map +1 -1
  500. package/models/errors/updateeval.d.ts +23 -0
  501. package/models/errors/updateeval.d.ts.map +1 -0
  502. package/models/errors/updateeval.js +68 -0
  503. package/models/errors/updateeval.js.map +1 -0
  504. package/models/operations/budgetlist.d.ts +2 -3
  505. package/models/operations/budgetlist.d.ts.map +1 -1
  506. package/models/operations/budgetlist.js.map +1 -1
  507. package/models/operations/createagentrequest.d.ts +68 -14
  508. package/models/operations/createagentrequest.d.ts.map +1 -1
  509. package/models/operations/createagentrequest.js +20 -32
  510. package/models/operations/createagentrequest.js.map +1 -1
  511. package/models/operations/createchatcompletion.d.ts +75 -67
  512. package/models/operations/createchatcompletion.d.ts.map +1 -1
  513. package/models/operations/createchatcompletion.js +85 -88
  514. package/models/operations/createchatcompletion.js.map +1 -1
  515. package/models/operations/createcompletion.d.ts +6 -12
  516. package/models/operations/createcompletion.d.ts.map +1 -1
  517. package/models/operations/createcompletion.js +3 -17
  518. package/models/operations/createcompletion.js.map +1 -1
  519. package/models/operations/createdataset.js +1 -1
  520. package/models/operations/createdatasetitem.js +5 -5
  521. package/models/operations/createeval.d.ts +312 -2
  522. package/models/operations/createeval.d.ts.map +1 -1
  523. package/models/operations/createeval.js +264 -2
  524. package/models/operations/createeval.js.map +1 -1
  525. package/models/operations/createimage.d.ts +2 -8
  526. package/models/operations/createimage.d.ts.map +1 -1
  527. package/models/operations/createimage.js +2 -16
  528. package/models/operations/createimage.js.map +1 -1
  529. package/models/operations/createimageedit.d.ts +1 -1
  530. package/models/operations/createprompt.d.ts +24 -12
  531. package/models/operations/createprompt.d.ts.map +1 -1
  532. package/models/operations/createprompt.js +13 -22
  533. package/models/operations/createprompt.js.map +1 -1
  534. package/models/operations/creatererank.d.ts +2 -8
  535. package/models/operations/creatererank.d.ts.map +1 -1
  536. package/models/operations/creatererank.js +2 -16
  537. package/models/operations/creatererank.js.map +1 -1
  538. package/models/operations/createrouterresponse.d.ts +80 -8
  539. package/models/operations/createrouterresponse.d.ts.map +1 -1
  540. package/models/operations/createrouterresponse.js +48 -5
  541. package/models/operations/createrouterresponse.js.map +1 -1
  542. package/models/operations/createtool.d.ts +4 -4
  543. package/models/operations/createtool.d.ts.map +1 -1
  544. package/models/operations/createtool.js +9 -9
  545. package/models/operations/createtool.js.map +1 -1
  546. package/models/operations/deletesession.d.ts +12 -0
  547. package/models/operations/deletesession.d.ts.map +1 -0
  548. package/models/operations/deletesession.js +54 -0
  549. package/models/operations/deletesession.js.map +1 -0
  550. package/models/operations/deploymentgetconfig.d.ts +442 -442
  551. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  552. package/models/operations/deploymentgetconfig.js +481 -485
  553. package/models/operations/deploymentgetconfig.js.map +1 -1
  554. package/models/operations/deploymentinvoke.d.ts +367 -0
  555. package/models/operations/deploymentinvoke.d.ts.map +1 -0
  556. package/models/operations/deploymentinvoke.js +373 -0
  557. package/models/operations/deploymentinvoke.js.map +1 -0
  558. package/models/operations/deployments.d.ts +16 -16
  559. package/models/operations/deployments.d.ts.map +1 -1
  560. package/models/operations/deployments.js +16 -18
  561. package/models/operations/deployments.js.map +1 -1
  562. package/models/operations/deploymentstream.d.ts +1899 -0
  563. package/models/operations/deploymentstream.d.ts.map +1 -0
  564. package/models/operations/deploymentstream.js +1488 -0
  565. package/models/operations/deploymentstream.js.map +1 -0
  566. package/models/operations/getallprompts.d.ts +7 -3
  567. package/models/operations/getallprompts.d.ts.map +1 -1
  568. package/models/operations/getallprompts.js +4 -8
  569. package/models/operations/getallprompts.js.map +1 -1
  570. package/models/operations/getalltools.js +4 -4
  571. package/models/operations/geteval.d.ts +811 -0
  572. package/models/operations/geteval.d.ts.map +1 -1
  573. package/models/operations/geteval.js +1250 -1
  574. package/models/operations/geteval.js.map +1 -1
  575. package/models/operations/getevals.d.ts +41 -3
  576. package/models/operations/getevals.d.ts.map +1 -1
  577. package/models/operations/getevals.js +52 -3
  578. package/models/operations/getevals.js.map +1 -1
  579. package/models/operations/getevalversion.d.ts +9 -0
  580. package/models/operations/getevalversion.d.ts.map +1 -1
  581. package/models/operations/getevalversion.js +8 -1
  582. package/models/operations/getevalversion.js.map +1 -1
  583. package/models/operations/getoneprompt.d.ts +7 -3
  584. package/models/operations/getoneprompt.d.ts.map +1 -1
  585. package/models/operations/getoneprompt.js +4 -8
  586. package/models/operations/getoneprompt.js.map +1 -1
  587. package/models/operations/getpromptversion.d.ts +7 -3
  588. package/models/operations/getpromptversion.d.ts.map +1 -1
  589. package/models/operations/getpromptversion.js +4 -8
  590. package/models/operations/getpromptversion.js.map +1 -1
  591. package/models/operations/getsession.d.ts +12 -0
  592. package/models/operations/getsession.d.ts.map +1 -0
  593. package/models/operations/getsession.js +54 -0
  594. package/models/operations/getsession.js.map +1 -0
  595. package/models/operations/getv2humanevalsets.js +2 -2
  596. package/models/operations/getv2humanevalsetsid.js +2 -2
  597. package/models/operations/hubget.d.ts +12 -0
  598. package/models/operations/hubget.d.ts.map +1 -0
  599. package/models/operations/hubget.js +49 -0
  600. package/models/operations/hubget.js.map +1 -0
  601. package/models/operations/hubsearch.d.ts +14 -0
  602. package/models/operations/hubsearch.d.ts.map +1 -0
  603. package/models/operations/hubsearch.js +50 -0
  604. package/models/operations/hubsearch.js.map +1 -0
  605. package/models/operations/index.d.ts +7 -1
  606. package/models/operations/index.d.ts.map +1 -1
  607. package/models/operations/index.js +7 -1
  608. package/models/operations/index.js.map +1 -1
  609. package/models/operations/listagents.d.ts +25 -5
  610. package/models/operations/listagents.d.ts.map +1 -1
  611. package/models/operations/listagents.js +10 -16
  612. package/models/operations/listagents.js.map +1 -1
  613. package/models/operations/listdatasetdatapoints.js +5 -5
  614. package/models/operations/listdatasets.d.ts +5 -0
  615. package/models/operations/listdatasets.d.ts.map +1 -1
  616. package/models/operations/listdatasets.js +3 -1
  617. package/models/operations/listdatasets.js.map +1 -1
  618. package/models/operations/listdatasources.js +1 -1
  619. package/models/operations/listdatasources.js.map +1 -1
  620. package/models/operations/listpromptversions.d.ts +7 -3
  621. package/models/operations/listpromptversions.d.ts.map +1 -1
  622. package/models/operations/listpromptversions.js +4 -8
  623. package/models/operations/listpromptversions.js.map +1 -1
  624. package/models/operations/modelcreateawsbedrock.d.ts +4 -0
  625. package/models/operations/modelcreateawsbedrock.d.ts.map +1 -1
  626. package/models/operations/modelcreateawsbedrock.js +4 -0
  627. package/models/operations/modelcreateawsbedrock.js.map +1 -1
  628. package/models/operations/modelcreateopenailike.d.ts +4 -0
  629. package/models/operations/modelcreateopenailike.d.ts.map +1 -1
  630. package/models/operations/modelcreateopenailike.js +4 -0
  631. package/models/operations/modelcreateopenailike.js.map +1 -1
  632. package/models/operations/modelupdateawsbedrock.d.ts +4 -0
  633. package/models/operations/modelupdateawsbedrock.d.ts.map +1 -1
  634. package/models/operations/modelupdateawsbedrock.js +4 -0
  635. package/models/operations/modelupdateawsbedrock.js.map +1 -1
  636. package/models/operations/modelupdateopenailike.d.ts +4 -0
  637. package/models/operations/modelupdateopenailike.d.ts.map +1 -1
  638. package/models/operations/modelupdateopenailike.js +4 -0
  639. package/models/operations/modelupdateopenailike.js.map +1 -1
  640. package/models/operations/parse.d.ts +3 -3
  641. package/models/operations/patchv2humanevalsetsid.js +2 -2
  642. package/models/operations/postv2feedback.d.ts +2 -0
  643. package/models/operations/postv2feedback.d.ts.map +1 -1
  644. package/models/operations/postv2feedback.js +2 -0
  645. package/models/operations/postv2feedback.js.map +1 -1
  646. package/models/operations/postv2feedbackevaluation.js +4 -4
  647. package/models/operations/postv2feedbackremove.d.ts +2 -0
  648. package/models/operations/postv2feedbackremove.d.ts.map +1 -1
  649. package/models/operations/postv2feedbackremove.js +2 -0
  650. package/models/operations/postv2feedbackremove.js.map +1 -1
  651. package/models/operations/postv2humanevalsets.js +2 -2
  652. package/models/operations/postv2routerocr.d.ts +24 -0
  653. package/models/operations/postv2routerocr.d.ts.map +1 -1
  654. package/models/operations/postv2routerocr.js +12 -0
  655. package/models/operations/postv2routerocr.js.map +1 -1
  656. package/models/operations/retrieveagentrequest.d.ts +25 -5
  657. package/models/operations/retrieveagentrequest.d.ts.map +1 -1
  658. package/models/operations/retrieveagentrequest.js +10 -16
  659. package/models/operations/retrieveagentrequest.js.map +1 -1
  660. package/models/operations/retrievedatapoint.js +5 -5
  661. package/models/operations/retrievedataset.js +1 -1
  662. package/models/operations/retrieveresponse.d.ts +1 -0
  663. package/models/operations/retrieveresponse.d.ts.map +1 -1
  664. package/models/operations/retrieveresponse.js +2 -0
  665. package/models/operations/retrieveresponse.js.map +1 -1
  666. package/models/operations/retrievetool.js +4 -4
  667. package/models/operations/runagent.d.ts +43 -9
  668. package/models/operations/runagent.d.ts.map +1 -1
  669. package/models/operations/runagent.js +11 -17
  670. package/models/operations/runagent.js.map +1 -1
  671. package/models/operations/streamrunagent.d.ts +43 -9
  672. package/models/operations/streamrunagent.d.ts.map +1 -1
  673. package/models/operations/streamrunagent.js +11 -17
  674. package/models/operations/streamrunagent.js.map +1 -1
  675. package/models/operations/updateagent.d.ts +68 -14
  676. package/models/operations/updateagent.d.ts.map +1 -1
  677. package/models/operations/updateagent.js +20 -32
  678. package/models/operations/updateagent.js.map +1 -1
  679. package/models/operations/updatedatapoint.js +5 -5
  680. package/models/operations/updatedataset.js +1 -1
  681. package/models/operations/updateeval.d.ts +201 -4
  682. package/models/operations/updateeval.d.ts.map +1 -1
  683. package/models/operations/updateeval.js +161 -3
  684. package/models/operations/updateeval.js.map +1 -1
  685. package/models/operations/updateprompt.d.ts +20 -8
  686. package/models/operations/updateprompt.d.ts.map +1 -1
  687. package/models/operations/updateprompt.js +8 -16
  688. package/models/operations/updateprompt.js.map +1 -1
  689. package/models/operations/updatesession.d.ts +15 -0
  690. package/models/operations/updatesession.d.ts.map +1 -0
  691. package/models/operations/updatesession.js +57 -0
  692. package/models/operations/updatesession.js.map +1 -0
  693. package/models/operations/updatetool.js +4 -4
  694. package/package.json +5 -5
  695. package/sdk/annotationqueues.d.ts +4 -4
  696. package/sdk/annotationqueues.d.ts.map +1 -1
  697. package/sdk/budgets.d.ts +6 -6
  698. package/sdk/budgets.js +6 -6
  699. package/sdk/deployments.d.ts +16 -0
  700. package/sdk/deployments.d.ts.map +1 -1
  701. package/sdk/deployments.js +20 -0
  702. package/sdk/deployments.js.map +1 -1
  703. package/sdk/evals.d.ts +7 -7
  704. package/sdk/evals.d.ts.map +1 -1
  705. package/sdk/evals.js.map +1 -1
  706. package/sdk/hub.d.ts +20 -0
  707. package/sdk/hub.d.ts.map +1 -0
  708. package/sdk/hub.js +32 -0
  709. package/sdk/hub.js.map +1 -0
  710. package/sdk/logs.d.ts +2 -2
  711. package/sdk/logs.d.ts.map +1 -1
  712. package/sdk/logs.js +1 -1
  713. package/sdk/logs.js.map +1 -1
  714. package/sdk/pii.d.ts +7 -0
  715. package/sdk/pii.d.ts.map +1 -1
  716. package/sdk/pii.js +10 -0
  717. package/sdk/pii.js.map +1 -1
  718. package/sdk/projects.d.ts +3 -3
  719. package/sdk/projects.js +3 -3
  720. package/sdk/reporting.d.ts +1 -1
  721. package/sdk/reporting.js +1 -1
  722. package/sdk/sdk.d.ts +12 -6
  723. package/sdk/sdk.d.ts.map +1 -1
  724. package/sdk/sdk.js +17 -9
  725. package/sdk/sdk.js.map +1 -1
  726. package/sdk/sessions.d.ts +55 -0
  727. package/sdk/sessions.d.ts.map +1 -0
  728. package/sdk/sessions.js +82 -0
  729. package/sdk/sessions.js.map +1 -0
  730. package/sdk/skills.d.ts +1 -1
  731. package/sdk/skills.js +1 -1
  732. package/sdk/traces.d.ts +1 -1
  733. package/sdk/traces.js +1 -1
  734. package/sdk/webhooks.d.ts +1 -1
  735. package/sdk/webhooks.js +1 -1
  736. package/sdk/workspacesettings.d.ts +1 -1
  737. package/sdk/workspacesettings.js +1 -1
  738. package/src/funcs/agentsCreate.ts +1 -1
  739. package/src/funcs/agentsDelete.ts +1 -1
  740. package/src/funcs/agentsList.ts +1 -1
  741. package/src/funcs/agentsResponsesGet.ts +1 -1
  742. package/src/funcs/agentsRetrieve.ts +1 -1
  743. package/src/funcs/agentsStream.ts +1 -1
  744. package/src/funcs/agentsStreamRun.ts +1 -1
  745. package/src/funcs/agentsUpdate.ts +1 -1
  746. package/src/funcs/annotationQueuesAddItems.ts +5 -4
  747. package/src/funcs/annotationQueuesClear.ts +6 -6
  748. package/src/funcs/annotationQueuesDelete.ts +6 -6
  749. package/src/funcs/annotationQueuesRemoveItems.ts +6 -6
  750. package/src/funcs/budgetsCreate.ts +1 -1
  751. package/src/funcs/budgetsDelete.ts +1 -1
  752. package/src/funcs/budgetsGet.ts +1 -1
  753. package/src/funcs/budgetsList.ts +1 -1
  754. package/src/funcs/budgetsResetConsumption.ts +1 -1
  755. package/src/funcs/budgetsUpdate.ts +1 -1
  756. package/src/funcs/datasetsCreateDatapoint.ts +10 -1
  757. package/src/funcs/datasetsList.ts +1 -0
  758. package/src/funcs/deploymentsInvoke.ts +170 -0
  759. package/src/funcs/deploymentsStream.ts +180 -0
  760. package/src/funcs/evalsAll.ts +14 -6
  761. package/src/funcs/evalsCreate.ts +35 -10
  762. package/src/funcs/evalsDelete.ts +19 -6
  763. package/src/funcs/evalsGet.ts +14 -6
  764. package/src/funcs/evalsGetVersion.ts +4 -5
  765. package/src/funcs/evalsInvoke.ts +4 -4
  766. package/src/funcs/evalsUpdate.ts +14 -6
  767. package/src/funcs/hubGet.ts +168 -0
  768. package/src/funcs/hubSearch.ts +169 -0
  769. package/src/funcs/knowledgeCreate.ts +1 -1
  770. package/src/funcs/knowledgeDelete.ts +1 -1
  771. package/src/funcs/knowledgeList.ts +1 -1
  772. package/src/funcs/knowledgeRetrieve.ts +1 -1
  773. package/src/funcs/knowledgeRetrieveFileUrl.ts +1 -1
  774. package/src/funcs/knowledgeSearch.ts +1 -1
  775. package/src/funcs/knowledgeUpdate.ts +1 -1
  776. package/src/funcs/logsListFacets.ts +8 -17
  777. package/src/funcs/modelsAzureFoundryDeployments.ts +1 -1
  778. package/src/funcs/modelsCreate.ts +1 -1
  779. package/src/funcs/modelsCreateAwsBedrock.ts +1 -1
  780. package/src/funcs/modelsCreateOpenaiLike.ts +1 -1
  781. package/src/funcs/modelsCreateVertex.ts +1 -1
  782. package/src/funcs/modelsImportLitellm.ts +1 -1
  783. package/src/funcs/modelsListLitellm.ts +1 -1
  784. package/src/funcs/modelsUpdate.ts +1 -1
  785. package/src/funcs/modelsUpdateAwsBedrock.ts +1 -1
  786. package/src/funcs/modelsUpdateOpenaiLike.ts +1 -1
  787. package/src/funcs/modelsValidate.ts +1 -1
  788. package/src/funcs/modelsValidateAwsBedrock.ts +1 -1
  789. package/src/funcs/piiCapabilities.ts +144 -0
  790. package/src/funcs/projectsCreate.ts +1 -1
  791. package/src/funcs/projectsDelete.ts +1 -1
  792. package/src/funcs/projectsUpdate.ts +1 -1
  793. package/src/funcs/reportingQuery.ts +1 -1
  794. package/src/funcs/sessionsCreate.ts +162 -0
  795. package/src/funcs/sessionsDelete.ts +168 -0
  796. package/src/funcs/sessionsGet.ts +168 -0
  797. package/src/funcs/sessionsGetCount.ts +162 -0
  798. package/src/funcs/sessionsList.ts +162 -0
  799. package/src/funcs/sessionsListTags.ts +144 -0
  800. package/src/funcs/sessionsUpdate.ts +171 -0
  801. package/src/funcs/skillsUpdate.ts +1 -1
  802. package/src/funcs/tracesAggregate.ts +1 -1
  803. package/src/funcs/webhooksGet.ts +1 -1
  804. package/src/funcs/workspaceSettingsUpdate.ts +1 -1
  805. package/src/lib/config.ts +3 -3
  806. package/src/models/components/agentresponserequest.ts +31 -22
  807. package/src/models/components/agentstartedstreamingevent.ts +11 -1
  808. package/src/models/components/agentthoughtstreamingevent.ts +55 -43
  809. package/src/models/components/aggregatelogsrequest.ts +3 -3
  810. package/src/models/components/auditlogfilter.ts +1 -1
  811. package/src/models/components/budgetlimit.ts +11 -9
  812. package/src/models/components/capabilitiesresponse.ts +96 -0
  813. package/src/models/components/chatkitresource.ts +45 -0
  814. package/src/models/components/chatkitresources.ts +36 -0
  815. package/src/models/components/chunkingconfiguration.ts +150 -110
  816. package/src/models/components/createmcpgatewayrequest.ts +11 -0
  817. package/src/models/components/createthreadrequest.ts +91 -0
  818. package/src/models/components/detectrequest.ts +48 -0
  819. package/src/models/components/entitylist.ts +37 -0
  820. package/src/models/components/evaluationcontext.ts +4 -20
  821. package/src/models/components/evaluationresult.ts +7 -11
  822. package/src/models/components/evaluatorresponsefunction.ts +928 -0
  823. package/src/models/components/evaluatorresponsehttp.ts +77 -0
  824. package/src/models/components/evaluatorresponsejsonschema.ts +60 -0
  825. package/src/models/components/evaluatorresponsellm.ts +310 -0
  826. package/src/models/components/evaluatorresponsepython.ts +60 -0
  827. package/src/models/components/evaluatorresponseragas.ts +84 -0
  828. package/src/models/components/evaluatorresponsetypescript.ts +60 -0
  829. package/src/models/components/filter.ts +7 -9
  830. package/src/models/components/gethubitemresponse.ts +37 -0
  831. package/src/models/components/getthreadcountrequest.ts +42 -0
  832. package/src/models/components/getthreadcountresponse.ts +31 -0
  833. package/src/models/components/guardrailruleplugin.ts +27 -0
  834. package/src/models/components/hubitem.ts +136 -0
  835. package/src/models/components/hubitemsummary.ts +60 -0
  836. package/src/models/components/hubsearchhit.ts +35 -0
  837. package/src/models/components/index.ts +33 -12
  838. package/src/models/components/invokedeploymentrequest.ts +3444 -0
  839. package/src/models/components/invokeevaluatorrequest.ts +6 -29
  840. package/src/models/{operations/listlogfacets.ts → components/listlogfacetsrequest.ts} +15 -0
  841. package/src/models/components/listthreadsrequest.ts +42 -0
  842. package/src/models/components/listthreadsresponse.ts +41 -0
  843. package/src/models/components/managementkey.ts +3 -4
  844. package/src/models/components/mcpgateway.ts +9 -0
  845. package/src/models/components/mcpgatewayplugin.ts +83 -0
  846. package/src/models/components/memorystoreembeddingconfig.ts +1 -1
  847. package/src/models/components/modelmetadata.ts +6 -0
  848. package/src/models/components/modelsconfig.ts +11 -10
  849. package/src/models/components/monitorfilter.ts +19 -7
  850. package/src/models/components/openaipromptcacheoptions.ts +84 -0
  851. package/src/models/components/piiredactionconfig.ts +22 -0
  852. package/src/models/components/piiredactionplugin.ts +143 -0
  853. package/src/models/components/publicplugin.ts +17 -21
  854. package/src/models/components/publicresponseresource.ts +7 -0
  855. package/src/models/components/reasoningpart.ts +1 -1
  856. package/src/models/components/redactrequest.ts +52 -0
  857. package/src/models/components/responsehealingplugin.ts +4 -27
  858. package/src/models/components/responsemeta.ts +6 -7
  859. package/src/models/components/routingruleplugin.ts +27 -0
  860. package/src/models/components/searchhubitemsresponse.ts +32 -0
  861. package/src/models/components/searchknowledgematch.ts +1 -4
  862. package/src/models/components/searchknowledgerequest.ts +684 -473
  863. package/src/models/components/searchretrievalconfig.ts +1 -1
  864. package/src/models/components/sessioninterval.ts +26 -0
  865. package/src/models/components/skill.ts +2 -3
  866. package/src/models/components/spansummary.ts +21 -0
  867. package/src/models/components/textcontentpartschema.ts +13 -8
  868. package/src/models/components/thread.ts +101 -0
  869. package/src/models/components/threadbilling.ts +68 -0
  870. package/src/models/components/threadfilters.ts +66 -0
  871. package/src/models/components/threadkind.ts +20 -0
  872. package/src/models/components/threadusage.ts +68 -0
  873. package/src/models/components/toolexecutionfailedstreamingevent.ts +1 -0
  874. package/src/models/components/toolexecutionfinishedstreamingevent.ts +1 -0
  875. package/src/models/components/toolexecutionstartedstreamingevent.ts +1 -0
  876. package/src/models/components/tracescrubbingplugin.ts +4 -24
  877. package/src/models/components/traceusage.ts +3 -0
  878. package/src/models/components/updatemcpgatewayrequest.ts +11 -0
  879. package/src/models/components/updatememorystorerequest.ts +11 -0
  880. package/src/models/components/updateskillrequest.ts +1 -1
  881. package/src/models/components/updatethreadrequest.ts +105 -0
  882. package/src/models/components/updateworkspacerequest.ts +9 -0
  883. package/src/models/components/updateworkspacesettingsrequest.ts +3 -3
  884. package/src/models/components/webhook.ts +2 -2
  885. package/src/models/errors/createeval.ts +51 -0
  886. package/src/models/errors/deleteeval.ts +96 -0
  887. package/src/models/errors/geteval.ts +51 -0
  888. package/src/models/errors/getevals.ts +51 -0
  889. package/src/models/errors/index.ts +5 -0
  890. package/src/models/errors/updateeval.ts +51 -0
  891. package/src/models/operations/budgetlist.ts +2 -3
  892. package/src/models/operations/createagentrequest.ts +86 -88
  893. package/src/models/operations/createchatcompletion.ts +336 -279
  894. package/src/models/operations/createcompletion.ts +7 -55
  895. package/src/models/operations/createdataset.ts +1 -1
  896. package/src/models/operations/createdatasetitem.ts +5 -5
  897. package/src/models/operations/createeval.ts +650 -3
  898. package/src/models/operations/createimage.ts +3 -51
  899. package/src/models/operations/createimageedit.ts +1 -1
  900. package/src/models/operations/createprompt.ts +40 -51
  901. package/src/models/operations/creatererank.ts +3 -51
  902. package/src/models/operations/createrouterresponse.ts +128 -9
  903. package/src/models/operations/createtool.ts +13 -11
  904. package/src/models/operations/deletesession.ts +36 -0
  905. package/src/models/operations/deploymentgetconfig.ts +1631 -1141
  906. package/src/models/operations/deploymentinvoke.ts +732 -0
  907. package/src/models/operations/deployments.ts +46 -42
  908. package/src/models/operations/deploymentstream.ts +4102 -0
  909. package/src/models/operations/getallprompts.ts +14 -18
  910. package/src/models/operations/getalltools.ts +4 -4
  911. package/src/models/operations/geteval.ts +2773 -0
  912. package/src/models/operations/getevals.ts +123 -5
  913. package/src/models/operations/getevalversion.ts +25 -0
  914. package/src/models/operations/getoneprompt.ts +14 -18
  915. package/src/models/operations/getpromptversion.ts +14 -18
  916. package/src/models/operations/getsession.ts +36 -0
  917. package/src/models/operations/getv2humanevalsets.ts +2 -2
  918. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  919. package/src/models/operations/hubget.ts +27 -0
  920. package/src/models/operations/hubsearch.ts +34 -0
  921. package/src/models/operations/index.ts +7 -1
  922. package/src/models/operations/listagents.ts +37 -35
  923. package/src/models/operations/listdatasetdatapoints.ts +5 -5
  924. package/src/models/operations/listdatasets.ts +8 -1
  925. package/src/models/operations/listdatasources.ts +1 -1
  926. package/src/models/operations/listpromptversions.ts +14 -18
  927. package/src/models/operations/modelcreateawsbedrock.ts +8 -0
  928. package/src/models/operations/modelcreateopenailike.ts +8 -0
  929. package/src/models/operations/modelupdateawsbedrock.ts +8 -0
  930. package/src/models/operations/modelupdateopenailike.ts +8 -0
  931. package/src/models/operations/parse.ts +3 -3
  932. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  933. package/src/models/operations/postv2feedback.ts +2 -0
  934. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  935. package/src/models/operations/postv2feedbackremove.ts +2 -0
  936. package/src/models/operations/postv2humanevalsets.ts +2 -2
  937. package/src/models/operations/postv2routerocr.ts +36 -0
  938. package/src/models/operations/retrieveagentrequest.ts +37 -35
  939. package/src/models/operations/retrievedatapoint.ts +5 -5
  940. package/src/models/operations/retrievedataset.ts +1 -1
  941. package/src/models/operations/retrieveresponse.ts +5 -0
  942. package/src/models/operations/retrievetool.ts +4 -4
  943. package/src/models/operations/runagent.ts +50 -54
  944. package/src/models/operations/streamrunagent.ts +50 -54
  945. package/src/models/operations/updateagent.ts +86 -88
  946. package/src/models/operations/updatedatapoint.ts +5 -5
  947. package/src/models/operations/updatedataset.ts +1 -1
  948. package/src/models/operations/updateeval.ts +415 -6
  949. package/src/models/operations/updateprompt.ts +33 -45
  950. package/src/models/operations/updatesession.ts +41 -0
  951. package/src/models/operations/updatetool.ts +4 -4
  952. package/src/sdk/annotationqueues.ts +4 -4
  953. package/src/sdk/budgets.ts +6 -6
  954. package/src/sdk/deployments.ts +38 -0
  955. package/src/sdk/evals.ts +8 -8
  956. package/src/sdk/hub.ts +46 -0
  957. package/src/sdk/logs.ts +2 -2
  958. package/src/sdk/pii.ts +16 -0
  959. package/src/sdk/projects.ts +3 -3
  960. package/src/sdk/reporting.ts +1 -1
  961. package/src/sdk/sdk.ts +27 -15
  962. package/src/sdk/sessions.ts +134 -0
  963. package/src/sdk/skills.ts +1 -1
  964. package/src/sdk/traces.ts +1 -1
  965. package/src/sdk/webhooks.ts +1 -1
  966. package/src/sdk/workspacesettings.ts +1 -1
  967. package/examples/deploymentsList.example.ts +0 -26
  968. package/models/components/addannotationqueueitemsresponse.d.ts +0 -14
  969. package/models/components/addannotationqueueitemsresponse.d.ts.map +0 -1
  970. package/models/components/addannotationqueueitemsresponse.js.map +0 -1
  971. package/models/components/clearannotationqueueresponse.d.ts +0 -8
  972. package/models/components/clearannotationqueueresponse.d.ts.map +0 -1
  973. package/models/components/clearannotationqueueresponse.js.map +0 -1
  974. package/models/components/deleteannotationqueueresponse.d.ts +0 -8
  975. package/models/components/deleteannotationqueueresponse.d.ts.map +0 -1
  976. package/models/components/deleteannotationqueueresponse.js.map +0 -1
  977. package/models/components/deleteevaluatorresponse.d.ts +0 -8
  978. package/models/components/deleteevaluatorresponse.d.ts.map +0 -1
  979. package/models/components/deleteevaluatorresponse.js.map +0 -1
  980. package/models/components/evaluatordocumentresponse.d.ts +0 -14
  981. package/models/components/evaluatordocumentresponse.d.ts.map +0 -1
  982. package/models/components/evaluatordocumentresponse.js.map +0 -1
  983. package/models/components/getevaluatorversionresponse.d.ts +0 -20
  984. package/models/components/getevaluatorversionresponse.d.ts.map +0 -1
  985. package/models/components/getevaluatorversionresponse.js.map +0 -1
  986. package/models/components/invokeevaluatorresponse.d.ts +0 -23
  987. package/models/components/invokeevaluatorresponse.d.ts.map +0 -1
  988. package/models/components/invokeevaluatorresponse.js.map +0 -1
  989. package/models/components/listevaluatorsresponse.d.ts +0 -16
  990. package/models/components/listevaluatorsresponse.d.ts.map +0 -1
  991. package/models/components/listevaluatorsresponse.js.map +0 -1
  992. package/models/components/piiredactionpluginauto.d.ts +0 -126
  993. package/models/components/piiredactionpluginauto.d.ts.map +0 -1
  994. package/models/components/piiredactionpluginauto.js +0 -156
  995. package/models/components/piiredactionpluginauto.js.map +0 -1
  996. package/models/components/piiredactionpluginen.d.ts +0 -145
  997. package/models/components/piiredactionpluginen.d.ts.map +0 -1
  998. package/models/components/piiredactionpluginen.js +0 -167
  999. package/models/components/piiredactionpluginen.js.map +0 -1
  1000. package/models/components/piiredactionpluginnl.d.ts +0 -137
  1001. package/models/components/piiredactionpluginnl.d.ts.map +0 -1
  1002. package/models/components/piiredactionpluginnl.js +0 -158
  1003. package/models/components/piiredactionpluginnl.js.map +0 -1
  1004. package/models/components/removeannotationqueueitemsresponse.d.ts +0 -8
  1005. package/models/components/removeannotationqueueitemsresponse.d.ts.map +0 -1
  1006. package/models/components/removeannotationqueueitemsresponse.js.map +0 -1
  1007. package/models/operations/listlogfacets.d.ts.map +0 -1
  1008. package/models/operations/listlogfacets.js.map +0 -1
  1009. package/src/models/components/addannotationqueueitemsresponse.ts +0 -38
  1010. package/src/models/components/clearannotationqueueresponse.ts +0 -27
  1011. package/src/models/components/deleteannotationqueueresponse.ts +0 -27
  1012. package/src/models/components/deleteevaluatorresponse.ts +0 -27
  1013. package/src/models/components/evaluatordocumentresponse.ts +0 -50
  1014. package/src/models/components/getevaluatorversionresponse.ts +0 -58
  1015. package/src/models/components/invokeevaluatorresponse.ts +0 -47
  1016. package/src/models/components/listevaluatorsresponse.ts +0 -59
  1017. package/src/models/components/piiredactionpluginauto.ts +0 -185
  1018. package/src/models/components/piiredactionpluginen.ts +0 -222
  1019. package/src/models/components/piiredactionpluginnl.ts +0 -218
  1020. package/src/models/components/removeannotationqueueitemsresponse.ts +0 -28
@@ -0,0 +1,3444 @@
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 { ClosedEnum } from "../../types/enums.js";
8
+ import {
9
+ AudioContentPartSchema,
10
+ AudioContentPartSchema$Outbound,
11
+ AudioContentPartSchema$outboundSchema,
12
+ } from "./audiocontentpartschema.js";
13
+ import {
14
+ FileContentPartSchema,
15
+ FileContentPartSchema$Outbound,
16
+ FileContentPartSchema$outboundSchema,
17
+ } from "./filecontentpartschema.js";
18
+ import {
19
+ ImageContentPartSchema,
20
+ ImageContentPartSchema$Outbound,
21
+ ImageContentPartSchema$outboundSchema,
22
+ } from "./imagecontentpartschema.js";
23
+ import {
24
+ PublicIdentity,
25
+ PublicIdentity$Outbound,
26
+ PublicIdentity$outboundSchema,
27
+ } from "./publicidentity.js";
28
+ import {
29
+ ReasoningPartSchema,
30
+ ReasoningPartSchema$Outbound,
31
+ ReasoningPartSchema$outboundSchema,
32
+ } from "./reasoningpartschema.js";
33
+ import {
34
+ RedactedReasoningPartSchema,
35
+ RedactedReasoningPartSchema$Outbound,
36
+ RedactedReasoningPartSchema$outboundSchema,
37
+ } from "./redactedreasoningpartschema.js";
38
+ import {
39
+ RefusalPartSchema,
40
+ RefusalPartSchema$Outbound,
41
+ RefusalPartSchema$outboundSchema,
42
+ } from "./refusalpartschema.js";
43
+ import {
44
+ TextContentPartSchema,
45
+ TextContentPartSchema$Outbound,
46
+ TextContentPartSchema$outboundSchema,
47
+ } from "./textcontentpartschema.js";
48
+
49
+ export type InvokeDeploymentRequestContent2 = TextContentPartSchema;
50
+
51
+ /**
52
+ * The contents of the tool message.
53
+ */
54
+ export type InvokeDeploymentRequestPrefixMessages5Content =
55
+ | string
56
+ | Array<TextContentPartSchema>;
57
+
58
+ /**
59
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
60
+ */
61
+ export const InvokeDeploymentRequestPrefixMessagesType = {
62
+ Ephemeral: "ephemeral",
63
+ } as const;
64
+ /**
65
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
66
+ */
67
+ export type InvokeDeploymentRequestPrefixMessagesType = ClosedEnum<
68
+ typeof InvokeDeploymentRequestPrefixMessagesType
69
+ >;
70
+
71
+ /**
72
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
73
+ *
74
+ * @remarks
75
+ *
76
+ * - `5m`: 5 minutes
77
+ * - `1h`: 1 hour
78
+ *
79
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
80
+ */
81
+ export const PrefixMessagesTtl = {
82
+ Fivem: "5m",
83
+ Oneh: "1h",
84
+ } as const;
85
+ /**
86
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
87
+ *
88
+ * @remarks
89
+ *
90
+ * - `5m`: 5 minutes
91
+ * - `1h`: 1 hour
92
+ *
93
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
94
+ */
95
+ export type PrefixMessagesTtl = ClosedEnum<typeof PrefixMessagesTtl>;
96
+
97
+ export type PrefixMessagesCacheControl = {
98
+ /**
99
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
100
+ */
101
+ type: InvokeDeploymentRequestPrefixMessagesType;
102
+ /**
103
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
104
+ *
105
+ * @remarks
106
+ *
107
+ * - `5m`: 5 minutes
108
+ * - `1h`: 1 hour
109
+ *
110
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
111
+ */
112
+ ttl?: PrefixMessagesTtl | undefined;
113
+ };
114
+
115
+ export type ToolMessage = {
116
+ /**
117
+ * The role of the messages author, in this case tool.
118
+ */
119
+ role: "tool";
120
+ /**
121
+ * The contents of the tool message.
122
+ */
123
+ content: string | Array<TextContentPartSchema>;
124
+ /**
125
+ * Tool call that this message is responding to.
126
+ */
127
+ toolCallId: string | null;
128
+ cacheControl?: PrefixMessagesCacheControl | undefined;
129
+ };
130
+
131
+ export type Content2 =
132
+ | (TextContentPartSchema & { type: "text" })
133
+ | RefusalPartSchema
134
+ | ReasoningPartSchema
135
+ | RedactedReasoningPartSchema;
136
+
137
+ /**
138
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
139
+ */
140
+ export type InvokeDeploymentRequestPrefixMessages4Content =
141
+ | string
142
+ | Array<
143
+ | (TextContentPartSchema & { type: "text" })
144
+ | RefusalPartSchema
145
+ | ReasoningPartSchema
146
+ | RedactedReasoningPartSchema
147
+ >;
148
+
149
+ /**
150
+ * Data about a previous audio response from the model.
151
+ */
152
+ export type Audio = {
153
+ /**
154
+ * Unique identifier for a previous audio response from the model.
155
+ */
156
+ id: string;
157
+ };
158
+
159
+ /**
160
+ * The type of the tool. Currently, only `function` is supported.
161
+ */
162
+ export const PrefixMessagesType = {
163
+ Function: "function",
164
+ } as const;
165
+ /**
166
+ * The type of the tool. Currently, only `function` is supported.
167
+ */
168
+ export type PrefixMessagesType = ClosedEnum<typeof PrefixMessagesType>;
169
+
170
+ export type PrefixMessagesFunction = {
171
+ /**
172
+ * The name of the function to call.
173
+ */
174
+ name?: string | undefined;
175
+ /**
176
+ * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
177
+ */
178
+ arguments?: string | undefined;
179
+ };
180
+
181
+ export type ToolCalls = {
182
+ /**
183
+ * The ID of the tool call.
184
+ */
185
+ id: string;
186
+ /**
187
+ * The type of the tool. Currently, only `function` is supported.
188
+ */
189
+ type: PrefixMessagesType;
190
+ function: PrefixMessagesFunction;
191
+ /**
192
+ * Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call.
193
+ */
194
+ thoughtSignature?: string | undefined;
195
+ };
196
+
197
+ export type AssistantMessage = {
198
+ /**
199
+ * Provider reasoning content that must be replayed with assistant tool calls when continuing a reasoning-model conversation.
200
+ */
201
+ reasoningContent?: string | undefined;
202
+ /**
203
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
204
+ */
205
+ content?:
206
+ | string
207
+ | Array<
208
+ | (TextContentPartSchema & { type: "text" })
209
+ | RefusalPartSchema
210
+ | ReasoningPartSchema
211
+ | RedactedReasoningPartSchema
212
+ >
213
+ | null
214
+ | undefined;
215
+ /**
216
+ * The refusal message by the assistant.
217
+ */
218
+ refusal?: string | null | undefined;
219
+ /**
220
+ * The role of the messages author, in this case `assistant`.
221
+ */
222
+ role: "assistant";
223
+ /**
224
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
225
+ */
226
+ name?: string | undefined;
227
+ /**
228
+ * Data about a previous audio response from the model.
229
+ */
230
+ audio?: Audio | null | undefined;
231
+ /**
232
+ * The tool calls generated by the model, such as function calls.
233
+ */
234
+ toolCalls?: Array<ToolCalls> | undefined;
235
+ };
236
+
237
+ /**
238
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
239
+ */
240
+ export const InvokeDeploymentRequest2PrefixMessagesType = {
241
+ Ephemeral: "ephemeral",
242
+ } as const;
243
+ /**
244
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
245
+ */
246
+ export type InvokeDeploymentRequest2PrefixMessagesType = ClosedEnum<
247
+ typeof InvokeDeploymentRequest2PrefixMessagesType
248
+ >;
249
+
250
+ /**
251
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
252
+ *
253
+ * @remarks
254
+ *
255
+ * - `5m`: 5 minutes
256
+ * - `1h`: 1 hour
257
+ *
258
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
259
+ */
260
+ export const TwoTtl = {
261
+ Fivem: "5m",
262
+ Oneh: "1h",
263
+ } as const;
264
+ /**
265
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
266
+ *
267
+ * @remarks
268
+ *
269
+ * - `5m`: 5 minutes
270
+ * - `1h`: 1 hour
271
+ *
272
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
273
+ */
274
+ export type TwoTtl = ClosedEnum<typeof TwoTtl>;
275
+
276
+ export type TwoCacheControl = {
277
+ /**
278
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
279
+ */
280
+ type: InvokeDeploymentRequest2PrefixMessagesType;
281
+ /**
282
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
283
+ *
284
+ * @remarks
285
+ *
286
+ * - `5m`: 5 minutes
287
+ * - `1h`: 1 hour
288
+ *
289
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
290
+ */
291
+ ttl?: TwoTtl | undefined;
292
+ };
293
+
294
+ export type InvokeDeploymentRequest24 = {
295
+ /**
296
+ * The type of the content part. Always `file`.
297
+ */
298
+ type: "file";
299
+ cacheControl?: TwoCacheControl | undefined;
300
+ /**
301
+ * File data for the content part. Must contain either file_data or uri, but not both.
302
+ */
303
+ file: FileContentPartSchema;
304
+ };
305
+
306
+ export type InvokeDeploymentRequestContentPrefixMessages2 =
307
+ | (TextContentPartSchema & { type: "text" })
308
+ | ImageContentPartSchema
309
+ | AudioContentPartSchema
310
+ | InvokeDeploymentRequest24;
311
+
312
+ /**
313
+ * The contents of the user message.
314
+ */
315
+ export type InvokeDeploymentRequestPrefixMessagesContent =
316
+ | string
317
+ | Array<
318
+ | (TextContentPartSchema & { type: "text" })
319
+ | ImageContentPartSchema
320
+ | AudioContentPartSchema
321
+ | InvokeDeploymentRequest24
322
+ >;
323
+
324
+ export type UserMessage = {
325
+ /**
326
+ * The role of the messages author, in this case `user`.
327
+ */
328
+ role: "user";
329
+ /**
330
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
331
+ */
332
+ name?: string | undefined;
333
+ /**
334
+ * The contents of the user message.
335
+ */
336
+ content:
337
+ | string
338
+ | Array<
339
+ | (TextContentPartSchema & { type: "text" })
340
+ | ImageContentPartSchema
341
+ | AudioContentPartSchema
342
+ | InvokeDeploymentRequest24
343
+ >;
344
+ };
345
+
346
+ /**
347
+ * The contents of the developer message.
348
+ */
349
+ export type PrefixMessagesContent = string | Array<TextContentPartSchema>;
350
+
351
+ export type DeveloperMessage = {
352
+ /**
353
+ * The role of the messages author, in this case `developer`.
354
+ */
355
+ role: "developer";
356
+ /**
357
+ * The contents of the developer message.
358
+ */
359
+ content: string | Array<TextContentPartSchema>;
360
+ /**
361
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
362
+ */
363
+ name?: string | undefined;
364
+ };
365
+
366
+ /**
367
+ * The contents of the system message.
368
+ */
369
+ export type Content = string | Array<TextContentPartSchema>;
370
+
371
+ /**
372
+ * Developer-provided instructions that the model should follow, regardless of messages sent by the user.
373
+ */
374
+ export type SystemMessage = {
375
+ /**
376
+ * The role of the messages author, in this case `system`.
377
+ */
378
+ role: "system";
379
+ /**
380
+ * The contents of the system message.
381
+ */
382
+ content: string | Array<TextContentPartSchema>;
383
+ /**
384
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
385
+ */
386
+ name?: string | undefined;
387
+ };
388
+
389
+ export type PrefixMessages =
390
+ | SystemMessage
391
+ | DeveloperMessage
392
+ | UserMessage
393
+ | AssistantMessage
394
+ | ToolMessage;
395
+
396
+ export type InvokeDeploymentRequestContentMessages52 = TextContentPartSchema;
397
+
398
+ /**
399
+ * The contents of the tool message.
400
+ */
401
+ export type InvokeDeploymentRequestMessages5Content =
402
+ | string
403
+ | Array<TextContentPartSchema>;
404
+
405
+ /**
406
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
407
+ */
408
+ export const InvokeDeploymentRequestMessagesType = {
409
+ Ephemeral: "ephemeral",
410
+ } as const;
411
+ /**
412
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
413
+ */
414
+ export type InvokeDeploymentRequestMessagesType = ClosedEnum<
415
+ typeof InvokeDeploymentRequestMessagesType
416
+ >;
417
+
418
+ /**
419
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
420
+ *
421
+ * @remarks
422
+ *
423
+ * - `5m`: 5 minutes
424
+ * - `1h`: 1 hour
425
+ *
426
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
427
+ */
428
+ export const MessagesTtl = {
429
+ Fivem: "5m",
430
+ Oneh: "1h",
431
+ } as const;
432
+ /**
433
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
434
+ *
435
+ * @remarks
436
+ *
437
+ * - `5m`: 5 minutes
438
+ * - `1h`: 1 hour
439
+ *
440
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
441
+ */
442
+ export type MessagesTtl = ClosedEnum<typeof MessagesTtl>;
443
+
444
+ export type MessagesCacheControl = {
445
+ /**
446
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
447
+ */
448
+ type: InvokeDeploymentRequestMessagesType;
449
+ /**
450
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
451
+ *
452
+ * @remarks
453
+ *
454
+ * - `5m`: 5 minutes
455
+ * - `1h`: 1 hour
456
+ *
457
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
458
+ */
459
+ ttl?: MessagesTtl | undefined;
460
+ };
461
+
462
+ export type MessagesToolMessage = {
463
+ /**
464
+ * The role of the messages author, in this case tool.
465
+ */
466
+ role: "tool";
467
+ /**
468
+ * The contents of the tool message.
469
+ */
470
+ content: string | Array<TextContentPartSchema>;
471
+ /**
472
+ * Tool call that this message is responding to.
473
+ */
474
+ toolCallId: string | null;
475
+ cacheControl?: MessagesCacheControl | undefined;
476
+ };
477
+
478
+ export type InvokeDeploymentRequestContentMessages42 =
479
+ | (TextContentPartSchema & { type: "text" })
480
+ | RefusalPartSchema
481
+ | ReasoningPartSchema
482
+ | RedactedReasoningPartSchema;
483
+
484
+ /**
485
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
486
+ */
487
+ export type InvokeDeploymentRequestMessages4Content =
488
+ | string
489
+ | Array<
490
+ | (TextContentPartSchema & { type: "text" })
491
+ | RefusalPartSchema
492
+ | ReasoningPartSchema
493
+ | RedactedReasoningPartSchema
494
+ >;
495
+
496
+ /**
497
+ * Data about a previous audio response from the model.
498
+ */
499
+ export type MessagesAudio = {
500
+ /**
501
+ * Unique identifier for a previous audio response from the model.
502
+ */
503
+ id: string;
504
+ };
505
+
506
+ /**
507
+ * The type of the tool. Currently, only `function` is supported.
508
+ */
509
+ export const MessagesType = {
510
+ Function: "function",
511
+ } as const;
512
+ /**
513
+ * The type of the tool. Currently, only `function` is supported.
514
+ */
515
+ export type MessagesType = ClosedEnum<typeof MessagesType>;
516
+
517
+ export type MessagesFunction = {
518
+ /**
519
+ * The name of the function to call.
520
+ */
521
+ name?: string | undefined;
522
+ /**
523
+ * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
524
+ */
525
+ arguments?: string | undefined;
526
+ };
527
+
528
+ export type MessagesToolCalls = {
529
+ /**
530
+ * The ID of the tool call.
531
+ */
532
+ id: string;
533
+ /**
534
+ * The type of the tool. Currently, only `function` is supported.
535
+ */
536
+ type: MessagesType;
537
+ function: MessagesFunction;
538
+ /**
539
+ * Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call.
540
+ */
541
+ thoughtSignature?: string | undefined;
542
+ };
543
+
544
+ export type MessagesAssistantMessage = {
545
+ /**
546
+ * Provider reasoning content that must be replayed with assistant tool calls when continuing a reasoning-model conversation.
547
+ */
548
+ reasoningContent?: string | undefined;
549
+ /**
550
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
551
+ */
552
+ content?:
553
+ | string
554
+ | Array<
555
+ | (TextContentPartSchema & { type: "text" })
556
+ | RefusalPartSchema
557
+ | ReasoningPartSchema
558
+ | RedactedReasoningPartSchema
559
+ >
560
+ | null
561
+ | undefined;
562
+ /**
563
+ * The refusal message by the assistant.
564
+ */
565
+ refusal?: string | null | undefined;
566
+ /**
567
+ * The role of the messages author, in this case `assistant`.
568
+ */
569
+ role: "assistant";
570
+ /**
571
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
572
+ */
573
+ name?: string | undefined;
574
+ /**
575
+ * Data about a previous audio response from the model.
576
+ */
577
+ audio?: MessagesAudio | null | undefined;
578
+ /**
579
+ * The tool calls generated by the model, such as function calls.
580
+ */
581
+ toolCalls?: Array<MessagesToolCalls> | undefined;
582
+ };
583
+
584
+ /**
585
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
586
+ */
587
+ export const InvokeDeploymentRequest2MessagesType = {
588
+ Ephemeral: "ephemeral",
589
+ } as const;
590
+ /**
591
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
592
+ */
593
+ export type InvokeDeploymentRequest2MessagesType = ClosedEnum<
594
+ typeof InvokeDeploymentRequest2MessagesType
595
+ >;
596
+
597
+ /**
598
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
599
+ *
600
+ * @remarks
601
+ *
602
+ * - `5m`: 5 minutes
603
+ * - `1h`: 1 hour
604
+ *
605
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
606
+ */
607
+ export const InvokeDeploymentRequest2Ttl = {
608
+ Fivem: "5m",
609
+ Oneh: "1h",
610
+ } as const;
611
+ /**
612
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
613
+ *
614
+ * @remarks
615
+ *
616
+ * - `5m`: 5 minutes
617
+ * - `1h`: 1 hour
618
+ *
619
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
620
+ */
621
+ export type InvokeDeploymentRequest2Ttl = ClosedEnum<
622
+ typeof InvokeDeploymentRequest2Ttl
623
+ >;
624
+
625
+ export type InvokeDeploymentRequest2CacheControl = {
626
+ /**
627
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
628
+ */
629
+ type: InvokeDeploymentRequest2MessagesType;
630
+ /**
631
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
632
+ *
633
+ * @remarks
634
+ *
635
+ * - `5m`: 5 minutes
636
+ * - `1h`: 1 hour
637
+ *
638
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
639
+ */
640
+ ttl?: InvokeDeploymentRequest2Ttl | undefined;
641
+ };
642
+
643
+ export type Two4 = {
644
+ /**
645
+ * The type of the content part. Always `file`.
646
+ */
647
+ type: "file";
648
+ cacheControl?: InvokeDeploymentRequest2CacheControl | undefined;
649
+ /**
650
+ * File data for the content part. Must contain either file_data or uri, but not both.
651
+ */
652
+ file: FileContentPartSchema;
653
+ };
654
+
655
+ export type InvokeDeploymentRequestContentMessages2 =
656
+ | (TextContentPartSchema & { type: "text" })
657
+ | ImageContentPartSchema
658
+ | AudioContentPartSchema
659
+ | Two4;
660
+
661
+ /**
662
+ * The contents of the user message.
663
+ */
664
+ export type InvokeDeploymentRequestMessages3Content =
665
+ | string
666
+ | Array<
667
+ | (TextContentPartSchema & { type: "text" })
668
+ | ImageContentPartSchema
669
+ | AudioContentPartSchema
670
+ | Two4
671
+ >;
672
+
673
+ export type MessagesUserMessage = {
674
+ /**
675
+ * The role of the messages author, in this case `user`.
676
+ */
677
+ role: "user";
678
+ /**
679
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
680
+ */
681
+ name?: string | undefined;
682
+ /**
683
+ * The contents of the user message.
684
+ */
685
+ content:
686
+ | string
687
+ | Array<
688
+ | (TextContentPartSchema & { type: "text" })
689
+ | ImageContentPartSchema
690
+ | AudioContentPartSchema
691
+ | Two4
692
+ >;
693
+ };
694
+
695
+ /**
696
+ * The contents of the developer message.
697
+ */
698
+ export type InvokeDeploymentRequestMessagesContent =
699
+ | string
700
+ | Array<TextContentPartSchema>;
701
+
702
+ export type MessagesDeveloperMessage = {
703
+ /**
704
+ * The role of the messages author, in this case `developer`.
705
+ */
706
+ role: "developer";
707
+ /**
708
+ * The contents of the developer message.
709
+ */
710
+ content: string | Array<TextContentPartSchema>;
711
+ /**
712
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
713
+ */
714
+ name?: string | undefined;
715
+ };
716
+
717
+ /**
718
+ * The contents of the system message.
719
+ */
720
+ export type MessagesContent = string | Array<TextContentPartSchema>;
721
+
722
+ /**
723
+ * Developer-provided instructions that the model should follow, regardless of messages sent by the user.
724
+ */
725
+ export type MessagesSystemMessage = {
726
+ /**
727
+ * The role of the messages author, in this case `system`.
728
+ */
729
+ role: "system";
730
+ /**
731
+ * The contents of the system message.
732
+ */
733
+ content: string | Array<TextContentPartSchema>;
734
+ /**
735
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
736
+ */
737
+ name?: string | undefined;
738
+ };
739
+
740
+ export type Messages =
741
+ | MessagesSystemMessage
742
+ | MessagesDeveloperMessage
743
+ | MessagesUserMessage
744
+ | MessagesAssistantMessage
745
+ | MessagesToolMessage;
746
+
747
+ /**
748
+ * Metadata about the document
749
+ */
750
+ export type InvokeDeploymentRequestMetadata = {
751
+ /**
752
+ * Name of the file the text is from.
753
+ */
754
+ fileName?: string | undefined;
755
+ /**
756
+ * Content type of the file the text is from.
757
+ */
758
+ fileType?: string | undefined;
759
+ /**
760
+ * The page number the text is from.
761
+ */
762
+ pageNumber?: number | undefined;
763
+ };
764
+
765
+ export type Documents = {
766
+ /**
767
+ * The text content of the document
768
+ */
769
+ text: string;
770
+ /**
771
+ * Metadata about the document
772
+ */
773
+ metadata?: InvokeDeploymentRequestMetadata | undefined;
774
+ };
775
+
776
+ export type InvokeOptions = {
777
+ /**
778
+ * Whether to include the retrieved knowledge chunks in the response.
779
+ */
780
+ includeRetrievals?: boolean | undefined;
781
+ /**
782
+ * Whether to include the usage metrics in the response.
783
+ */
784
+ includeUsage?: boolean | undefined;
785
+ /**
786
+ * A mock response to use instead of calling the LLM API. This is useful for testing purposes. When provided, the system will return a response object with this content as the completion, without making an actual API call to the LLM provider. This works for both streaming and non-streaming requests. Mock responses will not generate logs, traces or be counted for your plan usage.
787
+ */
788
+ mockResponse?: string | undefined;
789
+ };
790
+
791
+ export type InvokeDeploymentRequestThread = {
792
+ /**
793
+ * Unique thread identifier to group related invocations.
794
+ */
795
+ id: string;
796
+ /**
797
+ * Optional tags to differentiate or categorize threads
798
+ */
799
+ tags?: Array<string> | undefined;
800
+ };
801
+
802
+ export type OrNin = string | number | boolean;
803
+
804
+ /**
805
+ * Not in
806
+ */
807
+ export type InvokeDeploymentRequestOrNin = {
808
+ nin: Array<string | number | boolean>;
809
+ };
810
+
811
+ export type OrIn = string | number | boolean;
812
+
813
+ /**
814
+ * In
815
+ */
816
+ export type InvokeDeploymentRequestOrIn = {
817
+ in: Array<string | number | boolean>;
818
+ };
819
+
820
+ /**
821
+ * Less than or equal to
822
+ */
823
+ export type OrLte = {
824
+ lte: number;
825
+ };
826
+
827
+ /**
828
+ * Less than
829
+ */
830
+ export type OrLt = {
831
+ lt: number;
832
+ };
833
+
834
+ /**
835
+ * Greater than or equal to
836
+ */
837
+ export type OrGte = {
838
+ gte: number;
839
+ };
840
+
841
+ /**
842
+ * Greater than
843
+ */
844
+ export type OrGt = {
845
+ gt: number;
846
+ };
847
+
848
+ export type OrNe = string | number | boolean;
849
+
850
+ /**
851
+ * Not equal to
852
+ */
853
+ export type InvokeDeploymentRequestOrNe = {
854
+ ne: string | number | boolean;
855
+ };
856
+
857
+ export type OrEq = string | number | boolean;
858
+
859
+ /**
860
+ * Equal to
861
+ */
862
+ export type InvokeDeploymentRequestOrEq = {
863
+ eq: string | number | boolean;
864
+ };
865
+
866
+ export type Or =
867
+ | InvokeDeploymentRequestOrEq
868
+ | InvokeDeploymentRequestOrNe
869
+ | OrGt
870
+ | OrGte
871
+ | OrLt
872
+ | OrLte
873
+ | InvokeDeploymentRequestOrIn
874
+ | InvokeDeploymentRequestOrNin;
875
+
876
+ /**
877
+ * Or
878
+ */
879
+ export type KnowledgeFilterOr = {
880
+ or: Array<
881
+ {
882
+ [k: string]:
883
+ | InvokeDeploymentRequestOrEq
884
+ | InvokeDeploymentRequestOrNe
885
+ | OrGt
886
+ | OrGte
887
+ | OrLt
888
+ | OrLte
889
+ | InvokeDeploymentRequestOrIn
890
+ | InvokeDeploymentRequestOrNin;
891
+ }
892
+ >;
893
+ };
894
+
895
+ export type AndNin = string | number | boolean;
896
+
897
+ /**
898
+ * Not in
899
+ */
900
+ export type InvokeDeploymentRequestAndNin = {
901
+ nin: Array<string | number | boolean>;
902
+ };
903
+
904
+ export type AndIn = string | number | boolean;
905
+
906
+ /**
907
+ * In
908
+ */
909
+ export type InvokeDeploymentRequestAndIn = {
910
+ in: Array<string | number | boolean>;
911
+ };
912
+
913
+ /**
914
+ * Less than or equal to
915
+ */
916
+ export type AndLte = {
917
+ lte: number;
918
+ };
919
+
920
+ /**
921
+ * Less than
922
+ */
923
+ export type AndLt = {
924
+ lt: number;
925
+ };
926
+
927
+ /**
928
+ * Greater than or equal to
929
+ */
930
+ export type AndGte = {
931
+ gte: number;
932
+ };
933
+
934
+ /**
935
+ * Greater than
936
+ */
937
+ export type AndGt = {
938
+ gt: number;
939
+ };
940
+
941
+ export type AndNe = string | number | boolean;
942
+
943
+ /**
944
+ * Not equal to
945
+ */
946
+ export type InvokeDeploymentRequestAndNe = {
947
+ ne: string | number | boolean;
948
+ };
949
+
950
+ export type AndEq = string | number | boolean;
951
+
952
+ /**
953
+ * Equal to
954
+ */
955
+ export type InvokeDeploymentRequestAndEq = {
956
+ eq: string | number | boolean;
957
+ };
958
+
959
+ export type And =
960
+ | InvokeDeploymentRequestAndEq
961
+ | InvokeDeploymentRequestAndNe
962
+ | AndGt
963
+ | AndGte
964
+ | AndLt
965
+ | AndLte
966
+ | InvokeDeploymentRequestAndIn
967
+ | InvokeDeploymentRequestAndNin;
968
+
969
+ /**
970
+ * And
971
+ */
972
+ export type KnowledgeFilterAnd = {
973
+ and: Array<
974
+ {
975
+ [k: string]:
976
+ | InvokeDeploymentRequestAndEq
977
+ | InvokeDeploymentRequestAndNe
978
+ | AndGt
979
+ | AndGte
980
+ | AndLt
981
+ | AndLte
982
+ | InvokeDeploymentRequestAndIn
983
+ | InvokeDeploymentRequestAndNin;
984
+ }
985
+ >;
986
+ };
987
+
988
+ export type Nin = string | number | boolean;
989
+
990
+ /**
991
+ * Not in
992
+ */
993
+ export type InvokeDeploymentRequest1Nin = {
994
+ nin: Array<string | number | boolean>;
995
+ };
996
+
997
+ export type In = string | number | boolean;
998
+
999
+ /**
1000
+ * In
1001
+ */
1002
+ export type InvokeDeploymentRequest1In = {
1003
+ in: Array<string | number | boolean>;
1004
+ };
1005
+
1006
+ /**
1007
+ * Less than or equal to
1008
+ */
1009
+ export type Lte = {
1010
+ lte: number;
1011
+ };
1012
+
1013
+ /**
1014
+ * Less than
1015
+ */
1016
+ export type Lt = {
1017
+ lt: number;
1018
+ };
1019
+
1020
+ /**
1021
+ * Greater than or equal to
1022
+ */
1023
+ export type Gte = {
1024
+ gte: number;
1025
+ };
1026
+
1027
+ /**
1028
+ * Greater than
1029
+ */
1030
+ export type Gt = {
1031
+ gt: number;
1032
+ };
1033
+
1034
+ export type Ne = string | number | boolean;
1035
+
1036
+ /**
1037
+ * Not equal to
1038
+ */
1039
+ export type InvokeDeploymentRequest1Ne = {
1040
+ ne: string | number | boolean;
1041
+ };
1042
+
1043
+ export type Eq = string | number | boolean;
1044
+
1045
+ /**
1046
+ * Equal to
1047
+ */
1048
+ export type InvokeDeploymentRequest1Eq = {
1049
+ eq: string | number | boolean;
1050
+ };
1051
+
1052
+ export type One =
1053
+ | InvokeDeploymentRequest1Eq
1054
+ | InvokeDeploymentRequest1Ne
1055
+ | Gt
1056
+ | Gte
1057
+ | Lt
1058
+ | Lte
1059
+ | InvokeDeploymentRequest1In
1060
+ | InvokeDeploymentRequest1Nin;
1061
+
1062
+ /**
1063
+ * A filter to apply to the knowledge base chunk metadata when using knowledge bases in the deployment.
1064
+ */
1065
+ export type KnowledgeFilter = KnowledgeFilterAnd | KnowledgeFilterOr | {
1066
+ [k: string]:
1067
+ | InvokeDeploymentRequest1Eq
1068
+ | InvokeDeploymentRequest1Ne
1069
+ | Gt
1070
+ | Gte
1071
+ | Lt
1072
+ | Lte
1073
+ | InvokeDeploymentRequest1In
1074
+ | InvokeDeploymentRequest1Nin;
1075
+ };
1076
+
1077
+ /**
1078
+ * The deployment request payload
1079
+ */
1080
+ export type InvokeDeploymentRequest = {
1081
+ /**
1082
+ * The deployment key to invoke
1083
+ */
1084
+ key: string;
1085
+ /**
1086
+ * If set, partial message content will be sent. Tokens will be sent as data-only `server-sent events` as they become available, with the stream terminated by a `data: [DONE]` message.
1087
+ */
1088
+ stream?: boolean | undefined;
1089
+ /**
1090
+ * Key-value pairs variables to replace in your prompts. If a variable is not provided that is defined in the prompt, the default variables are used.
1091
+ */
1092
+ inputs?: { [k: string]: any } | undefined;
1093
+ /**
1094
+ * Key-value pairs that match your data model and fields declared in your deployment routing configuration
1095
+ */
1096
+ context?: { [k: string]: any } | undefined;
1097
+ /**
1098
+ * A list of messages to include after the `System` message, but before the `User` and `Assistant` pairs configured in your deployment.
1099
+ */
1100
+ prefixMessages?:
1101
+ | Array<
1102
+ | SystemMessage
1103
+ | DeveloperMessage
1104
+ | UserMessage
1105
+ | AssistantMessage
1106
+ | ToolMessage
1107
+ >
1108
+ | undefined;
1109
+ /**
1110
+ * A list of messages to send to the deployment.
1111
+ */
1112
+ messages?:
1113
+ | Array<
1114
+ | MessagesSystemMessage
1115
+ | MessagesDeveloperMessage
1116
+ | MessagesUserMessage
1117
+ | MessagesAssistantMessage
1118
+ | MessagesToolMessage
1119
+ >
1120
+ | undefined;
1121
+ /**
1122
+ * Information about the identity making the request. If the identity does not exist, it will be created automatically.
1123
+ */
1124
+ identity?: PublicIdentity | undefined;
1125
+ /**
1126
+ * A list of file IDs that are associated with the deployment request.
1127
+ */
1128
+ fileIds?: Array<string> | undefined;
1129
+ /**
1130
+ * Key-value pairs that you want to attach to the log generated by this request.
1131
+ */
1132
+ metadata?: { [k: string]: any } | undefined;
1133
+ /**
1134
+ * Utilized for passing additional parameters to the model provider. Exercise caution when using this feature, as the included parameters will overwrite any parameters specified in the deployment prompt configuration.
1135
+ */
1136
+ extraParams?: { [k: string]: any } | undefined;
1137
+ /**
1138
+ * A list of documents from your external knowledge base (e.g., chunks retrieved from your own vector database or RAG pipeline) that provide context for the model response. These documents can be used by evaluators and guardrails to assess the relevance and accuracy of the model output against the provided context.
1139
+ */
1140
+ documents?: Array<Documents> | undefined;
1141
+ invokeOptions?: InvokeOptions | undefined;
1142
+ thread?: InvokeDeploymentRequestThread | undefined;
1143
+ /**
1144
+ * A filter to apply to the knowledge base chunk metadata when using knowledge bases in the deployment.
1145
+ */
1146
+ knowledgeFilter?: KnowledgeFilterAnd | KnowledgeFilterOr | {
1147
+ [k: string]:
1148
+ | InvokeDeploymentRequest1Eq
1149
+ | InvokeDeploymentRequest1Ne
1150
+ | Gt
1151
+ | Gte
1152
+ | Lt
1153
+ | Lte
1154
+ | InvokeDeploymentRequest1In
1155
+ | InvokeDeploymentRequest1Nin;
1156
+ } | undefined;
1157
+ };
1158
+
1159
+ /** @internal */
1160
+ export type InvokeDeploymentRequestContent2$Outbound =
1161
+ TextContentPartSchema$Outbound;
1162
+
1163
+ /** @internal */
1164
+ export const InvokeDeploymentRequestContent2$outboundSchema: z.ZodType<
1165
+ InvokeDeploymentRequestContent2$Outbound,
1166
+ z.ZodTypeDef,
1167
+ InvokeDeploymentRequestContent2
1168
+ > = TextContentPartSchema$outboundSchema;
1169
+
1170
+ export function invokeDeploymentRequestContent2ToJSON(
1171
+ invokeDeploymentRequestContent2: InvokeDeploymentRequestContent2,
1172
+ ): string {
1173
+ return JSON.stringify(
1174
+ InvokeDeploymentRequestContent2$outboundSchema.parse(
1175
+ invokeDeploymentRequestContent2,
1176
+ ),
1177
+ );
1178
+ }
1179
+
1180
+ /** @internal */
1181
+ export type InvokeDeploymentRequestPrefixMessages5Content$Outbound =
1182
+ | string
1183
+ | Array<TextContentPartSchema$Outbound>;
1184
+
1185
+ /** @internal */
1186
+ export const InvokeDeploymentRequestPrefixMessages5Content$outboundSchema:
1187
+ z.ZodType<
1188
+ InvokeDeploymentRequestPrefixMessages5Content$Outbound,
1189
+ z.ZodTypeDef,
1190
+ InvokeDeploymentRequestPrefixMessages5Content
1191
+ > = z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]);
1192
+
1193
+ export function invokeDeploymentRequestPrefixMessages5ContentToJSON(
1194
+ invokeDeploymentRequestPrefixMessages5Content:
1195
+ InvokeDeploymentRequestPrefixMessages5Content,
1196
+ ): string {
1197
+ return JSON.stringify(
1198
+ InvokeDeploymentRequestPrefixMessages5Content$outboundSchema.parse(
1199
+ invokeDeploymentRequestPrefixMessages5Content,
1200
+ ),
1201
+ );
1202
+ }
1203
+
1204
+ /** @internal */
1205
+ export const InvokeDeploymentRequestPrefixMessagesType$outboundSchema:
1206
+ z.ZodNativeEnum<typeof InvokeDeploymentRequestPrefixMessagesType> = z
1207
+ .nativeEnum(InvokeDeploymentRequestPrefixMessagesType);
1208
+
1209
+ /** @internal */
1210
+ export const PrefixMessagesTtl$outboundSchema: z.ZodNativeEnum<
1211
+ typeof PrefixMessagesTtl
1212
+ > = z.nativeEnum(PrefixMessagesTtl);
1213
+
1214
+ /** @internal */
1215
+ export type PrefixMessagesCacheControl$Outbound = {
1216
+ type: string;
1217
+ ttl: string;
1218
+ };
1219
+
1220
+ /** @internal */
1221
+ export const PrefixMessagesCacheControl$outboundSchema: z.ZodType<
1222
+ PrefixMessagesCacheControl$Outbound,
1223
+ z.ZodTypeDef,
1224
+ PrefixMessagesCacheControl
1225
+ > = z.object({
1226
+ type: InvokeDeploymentRequestPrefixMessagesType$outboundSchema,
1227
+ ttl: PrefixMessagesTtl$outboundSchema.default("5m"),
1228
+ });
1229
+
1230
+ export function prefixMessagesCacheControlToJSON(
1231
+ prefixMessagesCacheControl: PrefixMessagesCacheControl,
1232
+ ): string {
1233
+ return JSON.stringify(
1234
+ PrefixMessagesCacheControl$outboundSchema.parse(prefixMessagesCacheControl),
1235
+ );
1236
+ }
1237
+
1238
+ /** @internal */
1239
+ export type ToolMessage$Outbound = {
1240
+ role: "tool";
1241
+ content: string | Array<TextContentPartSchema$Outbound>;
1242
+ tool_call_id: string | null;
1243
+ cache_control?: PrefixMessagesCacheControl$Outbound | undefined;
1244
+ };
1245
+
1246
+ /** @internal */
1247
+ export const ToolMessage$outboundSchema: z.ZodType<
1248
+ ToolMessage$Outbound,
1249
+ z.ZodTypeDef,
1250
+ ToolMessage
1251
+ > = z.object({
1252
+ role: z.literal("tool"),
1253
+ content: z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]),
1254
+ toolCallId: z.nullable(z.string()),
1255
+ cacheControl: z.lazy(() => PrefixMessagesCacheControl$outboundSchema)
1256
+ .optional(),
1257
+ }).transform((v) => {
1258
+ return remap$(v, {
1259
+ toolCallId: "tool_call_id",
1260
+ cacheControl: "cache_control",
1261
+ });
1262
+ });
1263
+
1264
+ export function toolMessageToJSON(toolMessage: ToolMessage): string {
1265
+ return JSON.stringify(ToolMessage$outboundSchema.parse(toolMessage));
1266
+ }
1267
+
1268
+ /** @internal */
1269
+ export type Content2$Outbound =
1270
+ | (TextContentPartSchema$Outbound & { type: "text" })
1271
+ | RefusalPartSchema$Outbound
1272
+ | ReasoningPartSchema$Outbound
1273
+ | RedactedReasoningPartSchema$Outbound;
1274
+
1275
+ /** @internal */
1276
+ export const Content2$outboundSchema: z.ZodType<
1277
+ Content2$Outbound,
1278
+ z.ZodTypeDef,
1279
+ Content2
1280
+ > = z.union([
1281
+ TextContentPartSchema$outboundSchema.and(
1282
+ z.object({ type: z.literal("text") }),
1283
+ ),
1284
+ RefusalPartSchema$outboundSchema,
1285
+ ReasoningPartSchema$outboundSchema,
1286
+ RedactedReasoningPartSchema$outboundSchema,
1287
+ ]);
1288
+
1289
+ export function content2ToJSON(content2: Content2): string {
1290
+ return JSON.stringify(Content2$outboundSchema.parse(content2));
1291
+ }
1292
+
1293
+ /** @internal */
1294
+ export type InvokeDeploymentRequestPrefixMessages4Content$Outbound =
1295
+ | string
1296
+ | Array<
1297
+ | (TextContentPartSchema$Outbound & { type: "text" })
1298
+ | RefusalPartSchema$Outbound
1299
+ | ReasoningPartSchema$Outbound
1300
+ | RedactedReasoningPartSchema$Outbound
1301
+ >;
1302
+
1303
+ /** @internal */
1304
+ export const InvokeDeploymentRequestPrefixMessages4Content$outboundSchema:
1305
+ z.ZodType<
1306
+ InvokeDeploymentRequestPrefixMessages4Content$Outbound,
1307
+ z.ZodTypeDef,
1308
+ InvokeDeploymentRequestPrefixMessages4Content
1309
+ > = z.union([
1310
+ z.string(),
1311
+ z.array(
1312
+ z.union([
1313
+ TextContentPartSchema$outboundSchema.and(
1314
+ z.object({ type: z.literal("text") }),
1315
+ ),
1316
+ RefusalPartSchema$outboundSchema,
1317
+ ReasoningPartSchema$outboundSchema,
1318
+ RedactedReasoningPartSchema$outboundSchema,
1319
+ ]),
1320
+ ),
1321
+ ]);
1322
+
1323
+ export function invokeDeploymentRequestPrefixMessages4ContentToJSON(
1324
+ invokeDeploymentRequestPrefixMessages4Content:
1325
+ InvokeDeploymentRequestPrefixMessages4Content,
1326
+ ): string {
1327
+ return JSON.stringify(
1328
+ InvokeDeploymentRequestPrefixMessages4Content$outboundSchema.parse(
1329
+ invokeDeploymentRequestPrefixMessages4Content,
1330
+ ),
1331
+ );
1332
+ }
1333
+
1334
+ /** @internal */
1335
+ export type Audio$Outbound = {
1336
+ id: string;
1337
+ };
1338
+
1339
+ /** @internal */
1340
+ export const Audio$outboundSchema: z.ZodType<
1341
+ Audio$Outbound,
1342
+ z.ZodTypeDef,
1343
+ Audio
1344
+ > = z.object({
1345
+ id: z.string(),
1346
+ });
1347
+
1348
+ export function audioToJSON(audio: Audio): string {
1349
+ return JSON.stringify(Audio$outboundSchema.parse(audio));
1350
+ }
1351
+
1352
+ /** @internal */
1353
+ export const PrefixMessagesType$outboundSchema: z.ZodNativeEnum<
1354
+ typeof PrefixMessagesType
1355
+ > = z.nativeEnum(PrefixMessagesType);
1356
+
1357
+ /** @internal */
1358
+ export type PrefixMessagesFunction$Outbound = {
1359
+ name?: string | undefined;
1360
+ arguments?: string | undefined;
1361
+ };
1362
+
1363
+ /** @internal */
1364
+ export const PrefixMessagesFunction$outboundSchema: z.ZodType<
1365
+ PrefixMessagesFunction$Outbound,
1366
+ z.ZodTypeDef,
1367
+ PrefixMessagesFunction
1368
+ > = z.object({
1369
+ name: z.string().optional(),
1370
+ arguments: z.string().optional(),
1371
+ });
1372
+
1373
+ export function prefixMessagesFunctionToJSON(
1374
+ prefixMessagesFunction: PrefixMessagesFunction,
1375
+ ): string {
1376
+ return JSON.stringify(
1377
+ PrefixMessagesFunction$outboundSchema.parse(prefixMessagesFunction),
1378
+ );
1379
+ }
1380
+
1381
+ /** @internal */
1382
+ export type ToolCalls$Outbound = {
1383
+ id: string;
1384
+ type: string;
1385
+ function: PrefixMessagesFunction$Outbound;
1386
+ thought_signature?: string | undefined;
1387
+ };
1388
+
1389
+ /** @internal */
1390
+ export const ToolCalls$outboundSchema: z.ZodType<
1391
+ ToolCalls$Outbound,
1392
+ z.ZodTypeDef,
1393
+ ToolCalls
1394
+ > = z.object({
1395
+ id: z.string(),
1396
+ type: PrefixMessagesType$outboundSchema,
1397
+ function: z.lazy(() => PrefixMessagesFunction$outboundSchema),
1398
+ thoughtSignature: z.string().optional(),
1399
+ }).transform((v) => {
1400
+ return remap$(v, {
1401
+ thoughtSignature: "thought_signature",
1402
+ });
1403
+ });
1404
+
1405
+ export function toolCallsToJSON(toolCalls: ToolCalls): string {
1406
+ return JSON.stringify(ToolCalls$outboundSchema.parse(toolCalls));
1407
+ }
1408
+
1409
+ /** @internal */
1410
+ export type AssistantMessage$Outbound = {
1411
+ reasoning_content?: string | undefined;
1412
+ content?:
1413
+ | string
1414
+ | Array<
1415
+ | (TextContentPartSchema$Outbound & { type: "text" })
1416
+ | RefusalPartSchema$Outbound
1417
+ | ReasoningPartSchema$Outbound
1418
+ | RedactedReasoningPartSchema$Outbound
1419
+ >
1420
+ | null
1421
+ | undefined;
1422
+ refusal?: string | null | undefined;
1423
+ role: "assistant";
1424
+ name?: string | undefined;
1425
+ audio?: Audio$Outbound | null | undefined;
1426
+ tool_calls?: Array<ToolCalls$Outbound> | undefined;
1427
+ };
1428
+
1429
+ /** @internal */
1430
+ export const AssistantMessage$outboundSchema: z.ZodType<
1431
+ AssistantMessage$Outbound,
1432
+ z.ZodTypeDef,
1433
+ AssistantMessage
1434
+ > = z.object({
1435
+ reasoningContent: z.string().optional(),
1436
+ content: z.nullable(
1437
+ z.union([
1438
+ z.string(),
1439
+ z.array(
1440
+ z.union([
1441
+ TextContentPartSchema$outboundSchema.and(
1442
+ z.object({ type: z.literal("text") }),
1443
+ ),
1444
+ RefusalPartSchema$outboundSchema,
1445
+ ReasoningPartSchema$outboundSchema,
1446
+ RedactedReasoningPartSchema$outboundSchema,
1447
+ ]),
1448
+ ),
1449
+ ]),
1450
+ ).optional(),
1451
+ refusal: z.nullable(z.string()).optional(),
1452
+ role: z.literal("assistant"),
1453
+ name: z.string().optional(),
1454
+ audio: z.nullable(z.lazy(() => Audio$outboundSchema)).optional(),
1455
+ toolCalls: z.array(z.lazy(() => ToolCalls$outboundSchema)).optional(),
1456
+ }).transform((v) => {
1457
+ return remap$(v, {
1458
+ reasoningContent: "reasoning_content",
1459
+ toolCalls: "tool_calls",
1460
+ });
1461
+ });
1462
+
1463
+ export function assistantMessageToJSON(
1464
+ assistantMessage: AssistantMessage,
1465
+ ): string {
1466
+ return JSON.stringify(
1467
+ AssistantMessage$outboundSchema.parse(assistantMessage),
1468
+ );
1469
+ }
1470
+
1471
+ /** @internal */
1472
+ export const InvokeDeploymentRequest2PrefixMessagesType$outboundSchema:
1473
+ z.ZodNativeEnum<typeof InvokeDeploymentRequest2PrefixMessagesType> = z
1474
+ .nativeEnum(InvokeDeploymentRequest2PrefixMessagesType);
1475
+
1476
+ /** @internal */
1477
+ export const TwoTtl$outboundSchema: z.ZodNativeEnum<typeof TwoTtl> = z
1478
+ .nativeEnum(TwoTtl);
1479
+
1480
+ /** @internal */
1481
+ export type TwoCacheControl$Outbound = {
1482
+ type: string;
1483
+ ttl: string;
1484
+ };
1485
+
1486
+ /** @internal */
1487
+ export const TwoCacheControl$outboundSchema: z.ZodType<
1488
+ TwoCacheControl$Outbound,
1489
+ z.ZodTypeDef,
1490
+ TwoCacheControl
1491
+ > = z.object({
1492
+ type: InvokeDeploymentRequest2PrefixMessagesType$outboundSchema,
1493
+ ttl: TwoTtl$outboundSchema.default("5m"),
1494
+ });
1495
+
1496
+ export function twoCacheControlToJSON(
1497
+ twoCacheControl: TwoCacheControl,
1498
+ ): string {
1499
+ return JSON.stringify(TwoCacheControl$outboundSchema.parse(twoCacheControl));
1500
+ }
1501
+
1502
+ /** @internal */
1503
+ export type InvokeDeploymentRequest24$Outbound = {
1504
+ type: "file";
1505
+ cache_control?: TwoCacheControl$Outbound | undefined;
1506
+ file: FileContentPartSchema$Outbound;
1507
+ };
1508
+
1509
+ /** @internal */
1510
+ export const InvokeDeploymentRequest24$outboundSchema: z.ZodType<
1511
+ InvokeDeploymentRequest24$Outbound,
1512
+ z.ZodTypeDef,
1513
+ InvokeDeploymentRequest24
1514
+ > = z.object({
1515
+ type: z.literal("file"),
1516
+ cacheControl: z.lazy(() => TwoCacheControl$outboundSchema).optional(),
1517
+ file: FileContentPartSchema$outboundSchema,
1518
+ }).transform((v) => {
1519
+ return remap$(v, {
1520
+ cacheControl: "cache_control",
1521
+ });
1522
+ });
1523
+
1524
+ export function invokeDeploymentRequest24ToJSON(
1525
+ invokeDeploymentRequest24: InvokeDeploymentRequest24,
1526
+ ): string {
1527
+ return JSON.stringify(
1528
+ InvokeDeploymentRequest24$outboundSchema.parse(invokeDeploymentRequest24),
1529
+ );
1530
+ }
1531
+
1532
+ /** @internal */
1533
+ export type InvokeDeploymentRequestContentPrefixMessages2$Outbound =
1534
+ | (TextContentPartSchema$Outbound & { type: "text" })
1535
+ | ImageContentPartSchema$Outbound
1536
+ | AudioContentPartSchema$Outbound
1537
+ | InvokeDeploymentRequest24$Outbound;
1538
+
1539
+ /** @internal */
1540
+ export const InvokeDeploymentRequestContentPrefixMessages2$outboundSchema:
1541
+ z.ZodType<
1542
+ InvokeDeploymentRequestContentPrefixMessages2$Outbound,
1543
+ z.ZodTypeDef,
1544
+ InvokeDeploymentRequestContentPrefixMessages2
1545
+ > = z.union([
1546
+ TextContentPartSchema$outboundSchema.and(
1547
+ z.object({ type: z.literal("text") }),
1548
+ ),
1549
+ ImageContentPartSchema$outboundSchema,
1550
+ AudioContentPartSchema$outboundSchema,
1551
+ z.lazy(() => InvokeDeploymentRequest24$outboundSchema),
1552
+ ]);
1553
+
1554
+ export function invokeDeploymentRequestContentPrefixMessages2ToJSON(
1555
+ invokeDeploymentRequestContentPrefixMessages2:
1556
+ InvokeDeploymentRequestContentPrefixMessages2,
1557
+ ): string {
1558
+ return JSON.stringify(
1559
+ InvokeDeploymentRequestContentPrefixMessages2$outboundSchema.parse(
1560
+ invokeDeploymentRequestContentPrefixMessages2,
1561
+ ),
1562
+ );
1563
+ }
1564
+
1565
+ /** @internal */
1566
+ export type InvokeDeploymentRequestPrefixMessagesContent$Outbound =
1567
+ | string
1568
+ | Array<
1569
+ | (TextContentPartSchema$Outbound & { type: "text" })
1570
+ | ImageContentPartSchema$Outbound
1571
+ | AudioContentPartSchema$Outbound
1572
+ | InvokeDeploymentRequest24$Outbound
1573
+ >;
1574
+
1575
+ /** @internal */
1576
+ export const InvokeDeploymentRequestPrefixMessagesContent$outboundSchema:
1577
+ z.ZodType<
1578
+ InvokeDeploymentRequestPrefixMessagesContent$Outbound,
1579
+ z.ZodTypeDef,
1580
+ InvokeDeploymentRequestPrefixMessagesContent
1581
+ > = z.union([
1582
+ z.string(),
1583
+ z.array(
1584
+ z.union([
1585
+ TextContentPartSchema$outboundSchema.and(
1586
+ z.object({ type: z.literal("text") }),
1587
+ ),
1588
+ ImageContentPartSchema$outboundSchema,
1589
+ AudioContentPartSchema$outboundSchema,
1590
+ z.lazy(() => InvokeDeploymentRequest24$outboundSchema),
1591
+ ]),
1592
+ ),
1593
+ ]);
1594
+
1595
+ export function invokeDeploymentRequestPrefixMessagesContentToJSON(
1596
+ invokeDeploymentRequestPrefixMessagesContent:
1597
+ InvokeDeploymentRequestPrefixMessagesContent,
1598
+ ): string {
1599
+ return JSON.stringify(
1600
+ InvokeDeploymentRequestPrefixMessagesContent$outboundSchema.parse(
1601
+ invokeDeploymentRequestPrefixMessagesContent,
1602
+ ),
1603
+ );
1604
+ }
1605
+
1606
+ /** @internal */
1607
+ export type UserMessage$Outbound = {
1608
+ role: "user";
1609
+ name?: string | undefined;
1610
+ content:
1611
+ | string
1612
+ | Array<
1613
+ | (TextContentPartSchema$Outbound & { type: "text" })
1614
+ | ImageContentPartSchema$Outbound
1615
+ | AudioContentPartSchema$Outbound
1616
+ | InvokeDeploymentRequest24$Outbound
1617
+ >;
1618
+ };
1619
+
1620
+ /** @internal */
1621
+ export const UserMessage$outboundSchema: z.ZodType<
1622
+ UserMessage$Outbound,
1623
+ z.ZodTypeDef,
1624
+ UserMessage
1625
+ > = z.object({
1626
+ role: z.literal("user"),
1627
+ name: z.string().optional(),
1628
+ content: z.union([
1629
+ z.string(),
1630
+ z.array(
1631
+ z.union([
1632
+ TextContentPartSchema$outboundSchema.and(
1633
+ z.object({ type: z.literal("text") }),
1634
+ ),
1635
+ ImageContentPartSchema$outboundSchema,
1636
+ AudioContentPartSchema$outboundSchema,
1637
+ z.lazy(() => InvokeDeploymentRequest24$outboundSchema),
1638
+ ]),
1639
+ ),
1640
+ ]),
1641
+ });
1642
+
1643
+ export function userMessageToJSON(userMessage: UserMessage): string {
1644
+ return JSON.stringify(UserMessage$outboundSchema.parse(userMessage));
1645
+ }
1646
+
1647
+ /** @internal */
1648
+ export type PrefixMessagesContent$Outbound =
1649
+ | string
1650
+ | Array<TextContentPartSchema$Outbound>;
1651
+
1652
+ /** @internal */
1653
+ export const PrefixMessagesContent$outboundSchema: z.ZodType<
1654
+ PrefixMessagesContent$Outbound,
1655
+ z.ZodTypeDef,
1656
+ PrefixMessagesContent
1657
+ > = z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]);
1658
+
1659
+ export function prefixMessagesContentToJSON(
1660
+ prefixMessagesContent: PrefixMessagesContent,
1661
+ ): string {
1662
+ return JSON.stringify(
1663
+ PrefixMessagesContent$outboundSchema.parse(prefixMessagesContent),
1664
+ );
1665
+ }
1666
+
1667
+ /** @internal */
1668
+ export type DeveloperMessage$Outbound = {
1669
+ role: "developer";
1670
+ content: string | Array<TextContentPartSchema$Outbound>;
1671
+ name?: string | undefined;
1672
+ };
1673
+
1674
+ /** @internal */
1675
+ export const DeveloperMessage$outboundSchema: z.ZodType<
1676
+ DeveloperMessage$Outbound,
1677
+ z.ZodTypeDef,
1678
+ DeveloperMessage
1679
+ > = z.object({
1680
+ role: z.literal("developer"),
1681
+ content: z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]),
1682
+ name: z.string().optional(),
1683
+ });
1684
+
1685
+ export function developerMessageToJSON(
1686
+ developerMessage: DeveloperMessage,
1687
+ ): string {
1688
+ return JSON.stringify(
1689
+ DeveloperMessage$outboundSchema.parse(developerMessage),
1690
+ );
1691
+ }
1692
+
1693
+ /** @internal */
1694
+ export type Content$Outbound = string | Array<TextContentPartSchema$Outbound>;
1695
+
1696
+ /** @internal */
1697
+ export const Content$outboundSchema: z.ZodType<
1698
+ Content$Outbound,
1699
+ z.ZodTypeDef,
1700
+ Content
1701
+ > = z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]);
1702
+
1703
+ export function contentToJSON(content: Content): string {
1704
+ return JSON.stringify(Content$outboundSchema.parse(content));
1705
+ }
1706
+
1707
+ /** @internal */
1708
+ export type SystemMessage$Outbound = {
1709
+ role: "system";
1710
+ content: string | Array<TextContentPartSchema$Outbound>;
1711
+ name?: string | undefined;
1712
+ };
1713
+
1714
+ /** @internal */
1715
+ export const SystemMessage$outboundSchema: z.ZodType<
1716
+ SystemMessage$Outbound,
1717
+ z.ZodTypeDef,
1718
+ SystemMessage
1719
+ > = z.object({
1720
+ role: z.literal("system"),
1721
+ content: z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]),
1722
+ name: z.string().optional(),
1723
+ });
1724
+
1725
+ export function systemMessageToJSON(systemMessage: SystemMessage): string {
1726
+ return JSON.stringify(SystemMessage$outboundSchema.parse(systemMessage));
1727
+ }
1728
+
1729
+ /** @internal */
1730
+ export type PrefixMessages$Outbound =
1731
+ | SystemMessage$Outbound
1732
+ | DeveloperMessage$Outbound
1733
+ | UserMessage$Outbound
1734
+ | AssistantMessage$Outbound
1735
+ | ToolMessage$Outbound;
1736
+
1737
+ /** @internal */
1738
+ export const PrefixMessages$outboundSchema: z.ZodType<
1739
+ PrefixMessages$Outbound,
1740
+ z.ZodTypeDef,
1741
+ PrefixMessages
1742
+ > = z.union([
1743
+ z.lazy(() => SystemMessage$outboundSchema),
1744
+ z.lazy(() => DeveloperMessage$outboundSchema),
1745
+ z.lazy(() => UserMessage$outboundSchema),
1746
+ z.lazy(() => AssistantMessage$outboundSchema),
1747
+ z.lazy(() => ToolMessage$outboundSchema),
1748
+ ]);
1749
+
1750
+ export function prefixMessagesToJSON(prefixMessages: PrefixMessages): string {
1751
+ return JSON.stringify(PrefixMessages$outboundSchema.parse(prefixMessages));
1752
+ }
1753
+
1754
+ /** @internal */
1755
+ export type InvokeDeploymentRequestContentMessages52$Outbound =
1756
+ TextContentPartSchema$Outbound;
1757
+
1758
+ /** @internal */
1759
+ export const InvokeDeploymentRequestContentMessages52$outboundSchema: z.ZodType<
1760
+ InvokeDeploymentRequestContentMessages52$Outbound,
1761
+ z.ZodTypeDef,
1762
+ InvokeDeploymentRequestContentMessages52
1763
+ > = TextContentPartSchema$outboundSchema;
1764
+
1765
+ export function invokeDeploymentRequestContentMessages52ToJSON(
1766
+ invokeDeploymentRequestContentMessages52:
1767
+ InvokeDeploymentRequestContentMessages52,
1768
+ ): string {
1769
+ return JSON.stringify(
1770
+ InvokeDeploymentRequestContentMessages52$outboundSchema.parse(
1771
+ invokeDeploymentRequestContentMessages52,
1772
+ ),
1773
+ );
1774
+ }
1775
+
1776
+ /** @internal */
1777
+ export type InvokeDeploymentRequestMessages5Content$Outbound =
1778
+ | string
1779
+ | Array<TextContentPartSchema$Outbound>;
1780
+
1781
+ /** @internal */
1782
+ export const InvokeDeploymentRequestMessages5Content$outboundSchema: z.ZodType<
1783
+ InvokeDeploymentRequestMessages5Content$Outbound,
1784
+ z.ZodTypeDef,
1785
+ InvokeDeploymentRequestMessages5Content
1786
+ > = z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]);
1787
+
1788
+ export function invokeDeploymentRequestMessages5ContentToJSON(
1789
+ invokeDeploymentRequestMessages5Content:
1790
+ InvokeDeploymentRequestMessages5Content,
1791
+ ): string {
1792
+ return JSON.stringify(
1793
+ InvokeDeploymentRequestMessages5Content$outboundSchema.parse(
1794
+ invokeDeploymentRequestMessages5Content,
1795
+ ),
1796
+ );
1797
+ }
1798
+
1799
+ /** @internal */
1800
+ export const InvokeDeploymentRequestMessagesType$outboundSchema:
1801
+ z.ZodNativeEnum<typeof InvokeDeploymentRequestMessagesType> = z.nativeEnum(
1802
+ InvokeDeploymentRequestMessagesType,
1803
+ );
1804
+
1805
+ /** @internal */
1806
+ export const MessagesTtl$outboundSchema: z.ZodNativeEnum<typeof MessagesTtl> = z
1807
+ .nativeEnum(MessagesTtl);
1808
+
1809
+ /** @internal */
1810
+ export type MessagesCacheControl$Outbound = {
1811
+ type: string;
1812
+ ttl: string;
1813
+ };
1814
+
1815
+ /** @internal */
1816
+ export const MessagesCacheControl$outboundSchema: z.ZodType<
1817
+ MessagesCacheControl$Outbound,
1818
+ z.ZodTypeDef,
1819
+ MessagesCacheControl
1820
+ > = z.object({
1821
+ type: InvokeDeploymentRequestMessagesType$outboundSchema,
1822
+ ttl: MessagesTtl$outboundSchema.default("5m"),
1823
+ });
1824
+
1825
+ export function messagesCacheControlToJSON(
1826
+ messagesCacheControl: MessagesCacheControl,
1827
+ ): string {
1828
+ return JSON.stringify(
1829
+ MessagesCacheControl$outboundSchema.parse(messagesCacheControl),
1830
+ );
1831
+ }
1832
+
1833
+ /** @internal */
1834
+ export type MessagesToolMessage$Outbound = {
1835
+ role: "tool";
1836
+ content: string | Array<TextContentPartSchema$Outbound>;
1837
+ tool_call_id: string | null;
1838
+ cache_control?: MessagesCacheControl$Outbound | undefined;
1839
+ };
1840
+
1841
+ /** @internal */
1842
+ export const MessagesToolMessage$outboundSchema: z.ZodType<
1843
+ MessagesToolMessage$Outbound,
1844
+ z.ZodTypeDef,
1845
+ MessagesToolMessage
1846
+ > = z.object({
1847
+ role: z.literal("tool"),
1848
+ content: z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]),
1849
+ toolCallId: z.nullable(z.string()),
1850
+ cacheControl: z.lazy(() => MessagesCacheControl$outboundSchema).optional(),
1851
+ }).transform((v) => {
1852
+ return remap$(v, {
1853
+ toolCallId: "tool_call_id",
1854
+ cacheControl: "cache_control",
1855
+ });
1856
+ });
1857
+
1858
+ export function messagesToolMessageToJSON(
1859
+ messagesToolMessage: MessagesToolMessage,
1860
+ ): string {
1861
+ return JSON.stringify(
1862
+ MessagesToolMessage$outboundSchema.parse(messagesToolMessage),
1863
+ );
1864
+ }
1865
+
1866
+ /** @internal */
1867
+ export type InvokeDeploymentRequestContentMessages42$Outbound =
1868
+ | (TextContentPartSchema$Outbound & { type: "text" })
1869
+ | RefusalPartSchema$Outbound
1870
+ | ReasoningPartSchema$Outbound
1871
+ | RedactedReasoningPartSchema$Outbound;
1872
+
1873
+ /** @internal */
1874
+ export const InvokeDeploymentRequestContentMessages42$outboundSchema: z.ZodType<
1875
+ InvokeDeploymentRequestContentMessages42$Outbound,
1876
+ z.ZodTypeDef,
1877
+ InvokeDeploymentRequestContentMessages42
1878
+ > = z.union([
1879
+ TextContentPartSchema$outboundSchema.and(
1880
+ z.object({ type: z.literal("text") }),
1881
+ ),
1882
+ RefusalPartSchema$outboundSchema,
1883
+ ReasoningPartSchema$outboundSchema,
1884
+ RedactedReasoningPartSchema$outboundSchema,
1885
+ ]);
1886
+
1887
+ export function invokeDeploymentRequestContentMessages42ToJSON(
1888
+ invokeDeploymentRequestContentMessages42:
1889
+ InvokeDeploymentRequestContentMessages42,
1890
+ ): string {
1891
+ return JSON.stringify(
1892
+ InvokeDeploymentRequestContentMessages42$outboundSchema.parse(
1893
+ invokeDeploymentRequestContentMessages42,
1894
+ ),
1895
+ );
1896
+ }
1897
+
1898
+ /** @internal */
1899
+ export type InvokeDeploymentRequestMessages4Content$Outbound =
1900
+ | string
1901
+ | Array<
1902
+ | (TextContentPartSchema$Outbound & { type: "text" })
1903
+ | RefusalPartSchema$Outbound
1904
+ | ReasoningPartSchema$Outbound
1905
+ | RedactedReasoningPartSchema$Outbound
1906
+ >;
1907
+
1908
+ /** @internal */
1909
+ export const InvokeDeploymentRequestMessages4Content$outboundSchema: z.ZodType<
1910
+ InvokeDeploymentRequestMessages4Content$Outbound,
1911
+ z.ZodTypeDef,
1912
+ InvokeDeploymentRequestMessages4Content
1913
+ > = z.union([
1914
+ z.string(),
1915
+ z.array(
1916
+ z.union([
1917
+ TextContentPartSchema$outboundSchema.and(
1918
+ z.object({ type: z.literal("text") }),
1919
+ ),
1920
+ RefusalPartSchema$outboundSchema,
1921
+ ReasoningPartSchema$outboundSchema,
1922
+ RedactedReasoningPartSchema$outboundSchema,
1923
+ ]),
1924
+ ),
1925
+ ]);
1926
+
1927
+ export function invokeDeploymentRequestMessages4ContentToJSON(
1928
+ invokeDeploymentRequestMessages4Content:
1929
+ InvokeDeploymentRequestMessages4Content,
1930
+ ): string {
1931
+ return JSON.stringify(
1932
+ InvokeDeploymentRequestMessages4Content$outboundSchema.parse(
1933
+ invokeDeploymentRequestMessages4Content,
1934
+ ),
1935
+ );
1936
+ }
1937
+
1938
+ /** @internal */
1939
+ export type MessagesAudio$Outbound = {
1940
+ id: string;
1941
+ };
1942
+
1943
+ /** @internal */
1944
+ export const MessagesAudio$outboundSchema: z.ZodType<
1945
+ MessagesAudio$Outbound,
1946
+ z.ZodTypeDef,
1947
+ MessagesAudio
1948
+ > = z.object({
1949
+ id: z.string(),
1950
+ });
1951
+
1952
+ export function messagesAudioToJSON(messagesAudio: MessagesAudio): string {
1953
+ return JSON.stringify(MessagesAudio$outboundSchema.parse(messagesAudio));
1954
+ }
1955
+
1956
+ /** @internal */
1957
+ export const MessagesType$outboundSchema: z.ZodNativeEnum<typeof MessagesType> =
1958
+ z.nativeEnum(MessagesType);
1959
+
1960
+ /** @internal */
1961
+ export type MessagesFunction$Outbound = {
1962
+ name?: string | undefined;
1963
+ arguments?: string | undefined;
1964
+ };
1965
+
1966
+ /** @internal */
1967
+ export const MessagesFunction$outboundSchema: z.ZodType<
1968
+ MessagesFunction$Outbound,
1969
+ z.ZodTypeDef,
1970
+ MessagesFunction
1971
+ > = z.object({
1972
+ name: z.string().optional(),
1973
+ arguments: z.string().optional(),
1974
+ });
1975
+
1976
+ export function messagesFunctionToJSON(
1977
+ messagesFunction: MessagesFunction,
1978
+ ): string {
1979
+ return JSON.stringify(
1980
+ MessagesFunction$outboundSchema.parse(messagesFunction),
1981
+ );
1982
+ }
1983
+
1984
+ /** @internal */
1985
+ export type MessagesToolCalls$Outbound = {
1986
+ id: string;
1987
+ type: string;
1988
+ function: MessagesFunction$Outbound;
1989
+ thought_signature?: string | undefined;
1990
+ };
1991
+
1992
+ /** @internal */
1993
+ export const MessagesToolCalls$outboundSchema: z.ZodType<
1994
+ MessagesToolCalls$Outbound,
1995
+ z.ZodTypeDef,
1996
+ MessagesToolCalls
1997
+ > = z.object({
1998
+ id: z.string(),
1999
+ type: MessagesType$outboundSchema,
2000
+ function: z.lazy(() => MessagesFunction$outboundSchema),
2001
+ thoughtSignature: z.string().optional(),
2002
+ }).transform((v) => {
2003
+ return remap$(v, {
2004
+ thoughtSignature: "thought_signature",
2005
+ });
2006
+ });
2007
+
2008
+ export function messagesToolCallsToJSON(
2009
+ messagesToolCalls: MessagesToolCalls,
2010
+ ): string {
2011
+ return JSON.stringify(
2012
+ MessagesToolCalls$outboundSchema.parse(messagesToolCalls),
2013
+ );
2014
+ }
2015
+
2016
+ /** @internal */
2017
+ export type MessagesAssistantMessage$Outbound = {
2018
+ reasoning_content?: string | undefined;
2019
+ content?:
2020
+ | string
2021
+ | Array<
2022
+ | (TextContentPartSchema$Outbound & { type: "text" })
2023
+ | RefusalPartSchema$Outbound
2024
+ | ReasoningPartSchema$Outbound
2025
+ | RedactedReasoningPartSchema$Outbound
2026
+ >
2027
+ | null
2028
+ | undefined;
2029
+ refusal?: string | null | undefined;
2030
+ role: "assistant";
2031
+ name?: string | undefined;
2032
+ audio?: MessagesAudio$Outbound | null | undefined;
2033
+ tool_calls?: Array<MessagesToolCalls$Outbound> | undefined;
2034
+ };
2035
+
2036
+ /** @internal */
2037
+ export const MessagesAssistantMessage$outboundSchema: z.ZodType<
2038
+ MessagesAssistantMessage$Outbound,
2039
+ z.ZodTypeDef,
2040
+ MessagesAssistantMessage
2041
+ > = z.object({
2042
+ reasoningContent: z.string().optional(),
2043
+ content: z.nullable(
2044
+ z.union([
2045
+ z.string(),
2046
+ z.array(
2047
+ z.union([
2048
+ TextContentPartSchema$outboundSchema.and(
2049
+ z.object({ type: z.literal("text") }),
2050
+ ),
2051
+ RefusalPartSchema$outboundSchema,
2052
+ ReasoningPartSchema$outboundSchema,
2053
+ RedactedReasoningPartSchema$outboundSchema,
2054
+ ]),
2055
+ ),
2056
+ ]),
2057
+ ).optional(),
2058
+ refusal: z.nullable(z.string()).optional(),
2059
+ role: z.literal("assistant"),
2060
+ name: z.string().optional(),
2061
+ audio: z.nullable(z.lazy(() => MessagesAudio$outboundSchema)).optional(),
2062
+ toolCalls: z.array(z.lazy(() => MessagesToolCalls$outboundSchema)).optional(),
2063
+ }).transform((v) => {
2064
+ return remap$(v, {
2065
+ reasoningContent: "reasoning_content",
2066
+ toolCalls: "tool_calls",
2067
+ });
2068
+ });
2069
+
2070
+ export function messagesAssistantMessageToJSON(
2071
+ messagesAssistantMessage: MessagesAssistantMessage,
2072
+ ): string {
2073
+ return JSON.stringify(
2074
+ MessagesAssistantMessage$outboundSchema.parse(messagesAssistantMessage),
2075
+ );
2076
+ }
2077
+
2078
+ /** @internal */
2079
+ export const InvokeDeploymentRequest2MessagesType$outboundSchema:
2080
+ z.ZodNativeEnum<typeof InvokeDeploymentRequest2MessagesType> = z.nativeEnum(
2081
+ InvokeDeploymentRequest2MessagesType,
2082
+ );
2083
+
2084
+ /** @internal */
2085
+ export const InvokeDeploymentRequest2Ttl$outboundSchema: z.ZodNativeEnum<
2086
+ typeof InvokeDeploymentRequest2Ttl
2087
+ > = z.nativeEnum(InvokeDeploymentRequest2Ttl);
2088
+
2089
+ /** @internal */
2090
+ export type InvokeDeploymentRequest2CacheControl$Outbound = {
2091
+ type: string;
2092
+ ttl: string;
2093
+ };
2094
+
2095
+ /** @internal */
2096
+ export const InvokeDeploymentRequest2CacheControl$outboundSchema: z.ZodType<
2097
+ InvokeDeploymentRequest2CacheControl$Outbound,
2098
+ z.ZodTypeDef,
2099
+ InvokeDeploymentRequest2CacheControl
2100
+ > = z.object({
2101
+ type: InvokeDeploymentRequest2MessagesType$outboundSchema,
2102
+ ttl: InvokeDeploymentRequest2Ttl$outboundSchema.default("5m"),
2103
+ });
2104
+
2105
+ export function invokeDeploymentRequest2CacheControlToJSON(
2106
+ invokeDeploymentRequest2CacheControl: InvokeDeploymentRequest2CacheControl,
2107
+ ): string {
2108
+ return JSON.stringify(
2109
+ InvokeDeploymentRequest2CacheControl$outboundSchema.parse(
2110
+ invokeDeploymentRequest2CacheControl,
2111
+ ),
2112
+ );
2113
+ }
2114
+
2115
+ /** @internal */
2116
+ export type Two4$Outbound = {
2117
+ type: "file";
2118
+ cache_control?: InvokeDeploymentRequest2CacheControl$Outbound | undefined;
2119
+ file: FileContentPartSchema$Outbound;
2120
+ };
2121
+
2122
+ /** @internal */
2123
+ export const Two4$outboundSchema: z.ZodType<Two4$Outbound, z.ZodTypeDef, Two4> =
2124
+ z.object({
2125
+ type: z.literal("file"),
2126
+ cacheControl: z.lazy(() =>
2127
+ InvokeDeploymentRequest2CacheControl$outboundSchema
2128
+ ).optional(),
2129
+ file: FileContentPartSchema$outboundSchema,
2130
+ }).transform((v) => {
2131
+ return remap$(v, {
2132
+ cacheControl: "cache_control",
2133
+ });
2134
+ });
2135
+
2136
+ export function two4ToJSON(two4: Two4): string {
2137
+ return JSON.stringify(Two4$outboundSchema.parse(two4));
2138
+ }
2139
+
2140
+ /** @internal */
2141
+ export type InvokeDeploymentRequestContentMessages2$Outbound =
2142
+ | (TextContentPartSchema$Outbound & { type: "text" })
2143
+ | ImageContentPartSchema$Outbound
2144
+ | AudioContentPartSchema$Outbound
2145
+ | Two4$Outbound;
2146
+
2147
+ /** @internal */
2148
+ export const InvokeDeploymentRequestContentMessages2$outboundSchema: z.ZodType<
2149
+ InvokeDeploymentRequestContentMessages2$Outbound,
2150
+ z.ZodTypeDef,
2151
+ InvokeDeploymentRequestContentMessages2
2152
+ > = z.union([
2153
+ TextContentPartSchema$outboundSchema.and(
2154
+ z.object({ type: z.literal("text") }),
2155
+ ),
2156
+ ImageContentPartSchema$outboundSchema,
2157
+ AudioContentPartSchema$outboundSchema,
2158
+ z.lazy(() => Two4$outboundSchema),
2159
+ ]);
2160
+
2161
+ export function invokeDeploymentRequestContentMessages2ToJSON(
2162
+ invokeDeploymentRequestContentMessages2:
2163
+ InvokeDeploymentRequestContentMessages2,
2164
+ ): string {
2165
+ return JSON.stringify(
2166
+ InvokeDeploymentRequestContentMessages2$outboundSchema.parse(
2167
+ invokeDeploymentRequestContentMessages2,
2168
+ ),
2169
+ );
2170
+ }
2171
+
2172
+ /** @internal */
2173
+ export type InvokeDeploymentRequestMessages3Content$Outbound =
2174
+ | string
2175
+ | Array<
2176
+ | (TextContentPartSchema$Outbound & { type: "text" })
2177
+ | ImageContentPartSchema$Outbound
2178
+ | AudioContentPartSchema$Outbound
2179
+ | Two4$Outbound
2180
+ >;
2181
+
2182
+ /** @internal */
2183
+ export const InvokeDeploymentRequestMessages3Content$outboundSchema: z.ZodType<
2184
+ InvokeDeploymentRequestMessages3Content$Outbound,
2185
+ z.ZodTypeDef,
2186
+ InvokeDeploymentRequestMessages3Content
2187
+ > = z.union([
2188
+ z.string(),
2189
+ z.array(
2190
+ z.union([
2191
+ TextContentPartSchema$outboundSchema.and(
2192
+ z.object({ type: z.literal("text") }),
2193
+ ),
2194
+ ImageContentPartSchema$outboundSchema,
2195
+ AudioContentPartSchema$outboundSchema,
2196
+ z.lazy(() => Two4$outboundSchema),
2197
+ ]),
2198
+ ),
2199
+ ]);
2200
+
2201
+ export function invokeDeploymentRequestMessages3ContentToJSON(
2202
+ invokeDeploymentRequestMessages3Content:
2203
+ InvokeDeploymentRequestMessages3Content,
2204
+ ): string {
2205
+ return JSON.stringify(
2206
+ InvokeDeploymentRequestMessages3Content$outboundSchema.parse(
2207
+ invokeDeploymentRequestMessages3Content,
2208
+ ),
2209
+ );
2210
+ }
2211
+
2212
+ /** @internal */
2213
+ export type MessagesUserMessage$Outbound = {
2214
+ role: "user";
2215
+ name?: string | undefined;
2216
+ content:
2217
+ | string
2218
+ | Array<
2219
+ | (TextContentPartSchema$Outbound & { type: "text" })
2220
+ | ImageContentPartSchema$Outbound
2221
+ | AudioContentPartSchema$Outbound
2222
+ | Two4$Outbound
2223
+ >;
2224
+ };
2225
+
2226
+ /** @internal */
2227
+ export const MessagesUserMessage$outboundSchema: z.ZodType<
2228
+ MessagesUserMessage$Outbound,
2229
+ z.ZodTypeDef,
2230
+ MessagesUserMessage
2231
+ > = z.object({
2232
+ role: z.literal("user"),
2233
+ name: z.string().optional(),
2234
+ content: z.union([
2235
+ z.string(),
2236
+ z.array(
2237
+ z.union([
2238
+ TextContentPartSchema$outboundSchema.and(
2239
+ z.object({ type: z.literal("text") }),
2240
+ ),
2241
+ ImageContentPartSchema$outboundSchema,
2242
+ AudioContentPartSchema$outboundSchema,
2243
+ z.lazy(() => Two4$outboundSchema),
2244
+ ]),
2245
+ ),
2246
+ ]),
2247
+ });
2248
+
2249
+ export function messagesUserMessageToJSON(
2250
+ messagesUserMessage: MessagesUserMessage,
2251
+ ): string {
2252
+ return JSON.stringify(
2253
+ MessagesUserMessage$outboundSchema.parse(messagesUserMessage),
2254
+ );
2255
+ }
2256
+
2257
+ /** @internal */
2258
+ export type InvokeDeploymentRequestMessagesContent$Outbound =
2259
+ | string
2260
+ | Array<TextContentPartSchema$Outbound>;
2261
+
2262
+ /** @internal */
2263
+ export const InvokeDeploymentRequestMessagesContent$outboundSchema: z.ZodType<
2264
+ InvokeDeploymentRequestMessagesContent$Outbound,
2265
+ z.ZodTypeDef,
2266
+ InvokeDeploymentRequestMessagesContent
2267
+ > = z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]);
2268
+
2269
+ export function invokeDeploymentRequestMessagesContentToJSON(
2270
+ invokeDeploymentRequestMessagesContent:
2271
+ InvokeDeploymentRequestMessagesContent,
2272
+ ): string {
2273
+ return JSON.stringify(
2274
+ InvokeDeploymentRequestMessagesContent$outboundSchema.parse(
2275
+ invokeDeploymentRequestMessagesContent,
2276
+ ),
2277
+ );
2278
+ }
2279
+
2280
+ /** @internal */
2281
+ export type MessagesDeveloperMessage$Outbound = {
2282
+ role: "developer";
2283
+ content: string | Array<TextContentPartSchema$Outbound>;
2284
+ name?: string | undefined;
2285
+ };
2286
+
2287
+ /** @internal */
2288
+ export const MessagesDeveloperMessage$outboundSchema: z.ZodType<
2289
+ MessagesDeveloperMessage$Outbound,
2290
+ z.ZodTypeDef,
2291
+ MessagesDeveloperMessage
2292
+ > = z.object({
2293
+ role: z.literal("developer"),
2294
+ content: z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]),
2295
+ name: z.string().optional(),
2296
+ });
2297
+
2298
+ export function messagesDeveloperMessageToJSON(
2299
+ messagesDeveloperMessage: MessagesDeveloperMessage,
2300
+ ): string {
2301
+ return JSON.stringify(
2302
+ MessagesDeveloperMessage$outboundSchema.parse(messagesDeveloperMessage),
2303
+ );
2304
+ }
2305
+
2306
+ /** @internal */
2307
+ export type MessagesContent$Outbound =
2308
+ | string
2309
+ | Array<TextContentPartSchema$Outbound>;
2310
+
2311
+ /** @internal */
2312
+ export const MessagesContent$outboundSchema: z.ZodType<
2313
+ MessagesContent$Outbound,
2314
+ z.ZodTypeDef,
2315
+ MessagesContent
2316
+ > = z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]);
2317
+
2318
+ export function messagesContentToJSON(
2319
+ messagesContent: MessagesContent,
2320
+ ): string {
2321
+ return JSON.stringify(MessagesContent$outboundSchema.parse(messagesContent));
2322
+ }
2323
+
2324
+ /** @internal */
2325
+ export type MessagesSystemMessage$Outbound = {
2326
+ role: "system";
2327
+ content: string | Array<TextContentPartSchema$Outbound>;
2328
+ name?: string | undefined;
2329
+ };
2330
+
2331
+ /** @internal */
2332
+ export const MessagesSystemMessage$outboundSchema: z.ZodType<
2333
+ MessagesSystemMessage$Outbound,
2334
+ z.ZodTypeDef,
2335
+ MessagesSystemMessage
2336
+ > = z.object({
2337
+ role: z.literal("system"),
2338
+ content: z.union([z.string(), z.array(TextContentPartSchema$outboundSchema)]),
2339
+ name: z.string().optional(),
2340
+ });
2341
+
2342
+ export function messagesSystemMessageToJSON(
2343
+ messagesSystemMessage: MessagesSystemMessage,
2344
+ ): string {
2345
+ return JSON.stringify(
2346
+ MessagesSystemMessage$outboundSchema.parse(messagesSystemMessage),
2347
+ );
2348
+ }
2349
+
2350
+ /** @internal */
2351
+ export type Messages$Outbound =
2352
+ | MessagesSystemMessage$Outbound
2353
+ | MessagesDeveloperMessage$Outbound
2354
+ | MessagesUserMessage$Outbound
2355
+ | MessagesAssistantMessage$Outbound
2356
+ | MessagesToolMessage$Outbound;
2357
+
2358
+ /** @internal */
2359
+ export const Messages$outboundSchema: z.ZodType<
2360
+ Messages$Outbound,
2361
+ z.ZodTypeDef,
2362
+ Messages
2363
+ > = z.union([
2364
+ z.lazy(() => MessagesSystemMessage$outboundSchema),
2365
+ z.lazy(() => MessagesDeveloperMessage$outboundSchema),
2366
+ z.lazy(() => MessagesUserMessage$outboundSchema),
2367
+ z.lazy(() => MessagesAssistantMessage$outboundSchema),
2368
+ z.lazy(() => MessagesToolMessage$outboundSchema),
2369
+ ]);
2370
+
2371
+ export function messagesToJSON(messages: Messages): string {
2372
+ return JSON.stringify(Messages$outboundSchema.parse(messages));
2373
+ }
2374
+
2375
+ /** @internal */
2376
+ export type InvokeDeploymentRequestMetadata$Outbound = {
2377
+ file_name?: string | undefined;
2378
+ file_type?: string | undefined;
2379
+ page_number?: number | undefined;
2380
+ };
2381
+
2382
+ /** @internal */
2383
+ export const InvokeDeploymentRequestMetadata$outboundSchema: z.ZodType<
2384
+ InvokeDeploymentRequestMetadata$Outbound,
2385
+ z.ZodTypeDef,
2386
+ InvokeDeploymentRequestMetadata
2387
+ > = z.object({
2388
+ fileName: z.string().optional(),
2389
+ fileType: z.string().optional(),
2390
+ pageNumber: z.number().optional(),
2391
+ }).transform((v) => {
2392
+ return remap$(v, {
2393
+ fileName: "file_name",
2394
+ fileType: "file_type",
2395
+ pageNumber: "page_number",
2396
+ });
2397
+ });
2398
+
2399
+ export function invokeDeploymentRequestMetadataToJSON(
2400
+ invokeDeploymentRequestMetadata: InvokeDeploymentRequestMetadata,
2401
+ ): string {
2402
+ return JSON.stringify(
2403
+ InvokeDeploymentRequestMetadata$outboundSchema.parse(
2404
+ invokeDeploymentRequestMetadata,
2405
+ ),
2406
+ );
2407
+ }
2408
+
2409
+ /** @internal */
2410
+ export type Documents$Outbound = {
2411
+ text: string;
2412
+ metadata?: InvokeDeploymentRequestMetadata$Outbound | undefined;
2413
+ };
2414
+
2415
+ /** @internal */
2416
+ export const Documents$outboundSchema: z.ZodType<
2417
+ Documents$Outbound,
2418
+ z.ZodTypeDef,
2419
+ Documents
2420
+ > = z.object({
2421
+ text: z.string(),
2422
+ metadata: z.lazy(() => InvokeDeploymentRequestMetadata$outboundSchema)
2423
+ .optional(),
2424
+ });
2425
+
2426
+ export function documentsToJSON(documents: Documents): string {
2427
+ return JSON.stringify(Documents$outboundSchema.parse(documents));
2428
+ }
2429
+
2430
+ /** @internal */
2431
+ export type InvokeOptions$Outbound = {
2432
+ include_retrievals: boolean;
2433
+ include_usage: boolean;
2434
+ mock_response?: string | undefined;
2435
+ };
2436
+
2437
+ /** @internal */
2438
+ export const InvokeOptions$outboundSchema: z.ZodType<
2439
+ InvokeOptions$Outbound,
2440
+ z.ZodTypeDef,
2441
+ InvokeOptions
2442
+ > = z.object({
2443
+ includeRetrievals: z.boolean().default(false),
2444
+ includeUsage: z.boolean().default(false),
2445
+ mockResponse: z.string().optional(),
2446
+ }).transform((v) => {
2447
+ return remap$(v, {
2448
+ includeRetrievals: "include_retrievals",
2449
+ includeUsage: "include_usage",
2450
+ mockResponse: "mock_response",
2451
+ });
2452
+ });
2453
+
2454
+ export function invokeOptionsToJSON(invokeOptions: InvokeOptions): string {
2455
+ return JSON.stringify(InvokeOptions$outboundSchema.parse(invokeOptions));
2456
+ }
2457
+
2458
+ /** @internal */
2459
+ export type InvokeDeploymentRequestThread$Outbound = {
2460
+ id: string;
2461
+ tags?: Array<string> | undefined;
2462
+ };
2463
+
2464
+ /** @internal */
2465
+ export const InvokeDeploymentRequestThread$outboundSchema: z.ZodType<
2466
+ InvokeDeploymentRequestThread$Outbound,
2467
+ z.ZodTypeDef,
2468
+ InvokeDeploymentRequestThread
2469
+ > = z.object({
2470
+ id: z.string(),
2471
+ tags: z.array(z.string()).optional(),
2472
+ });
2473
+
2474
+ export function invokeDeploymentRequestThreadToJSON(
2475
+ invokeDeploymentRequestThread: InvokeDeploymentRequestThread,
2476
+ ): string {
2477
+ return JSON.stringify(
2478
+ InvokeDeploymentRequestThread$outboundSchema.parse(
2479
+ invokeDeploymentRequestThread,
2480
+ ),
2481
+ );
2482
+ }
2483
+
2484
+ /** @internal */
2485
+ export type OrNin$Outbound = string | number | boolean;
2486
+
2487
+ /** @internal */
2488
+ export const OrNin$outboundSchema: z.ZodType<
2489
+ OrNin$Outbound,
2490
+ z.ZodTypeDef,
2491
+ OrNin
2492
+ > = z.union([z.string(), z.number(), z.boolean()]);
2493
+
2494
+ export function orNinToJSON(orNin: OrNin): string {
2495
+ return JSON.stringify(OrNin$outboundSchema.parse(orNin));
2496
+ }
2497
+
2498
+ /** @internal */
2499
+ export type InvokeDeploymentRequestOrNin$Outbound = {
2500
+ nin: Array<string | number | boolean>;
2501
+ };
2502
+
2503
+ /** @internal */
2504
+ export const InvokeDeploymentRequestOrNin$outboundSchema: z.ZodType<
2505
+ InvokeDeploymentRequestOrNin$Outbound,
2506
+ z.ZodTypeDef,
2507
+ InvokeDeploymentRequestOrNin
2508
+ > = z.object({
2509
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
2510
+ });
2511
+
2512
+ export function invokeDeploymentRequestOrNinToJSON(
2513
+ invokeDeploymentRequestOrNin: InvokeDeploymentRequestOrNin,
2514
+ ): string {
2515
+ return JSON.stringify(
2516
+ InvokeDeploymentRequestOrNin$outboundSchema.parse(
2517
+ invokeDeploymentRequestOrNin,
2518
+ ),
2519
+ );
2520
+ }
2521
+
2522
+ /** @internal */
2523
+ export type OrIn$Outbound = string | number | boolean;
2524
+
2525
+ /** @internal */
2526
+ export const OrIn$outboundSchema: z.ZodType<OrIn$Outbound, z.ZodTypeDef, OrIn> =
2527
+ z.union([z.string(), z.number(), z.boolean()]);
2528
+
2529
+ export function orInToJSON(orIn: OrIn): string {
2530
+ return JSON.stringify(OrIn$outboundSchema.parse(orIn));
2531
+ }
2532
+
2533
+ /** @internal */
2534
+ export type InvokeDeploymentRequestOrIn$Outbound = {
2535
+ in: Array<string | number | boolean>;
2536
+ };
2537
+
2538
+ /** @internal */
2539
+ export const InvokeDeploymentRequestOrIn$outboundSchema: z.ZodType<
2540
+ InvokeDeploymentRequestOrIn$Outbound,
2541
+ z.ZodTypeDef,
2542
+ InvokeDeploymentRequestOrIn
2543
+ > = z.object({
2544
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
2545
+ });
2546
+
2547
+ export function invokeDeploymentRequestOrInToJSON(
2548
+ invokeDeploymentRequestOrIn: InvokeDeploymentRequestOrIn,
2549
+ ): string {
2550
+ return JSON.stringify(
2551
+ InvokeDeploymentRequestOrIn$outboundSchema.parse(
2552
+ invokeDeploymentRequestOrIn,
2553
+ ),
2554
+ );
2555
+ }
2556
+
2557
+ /** @internal */
2558
+ export type OrLte$Outbound = {
2559
+ lte: number;
2560
+ };
2561
+
2562
+ /** @internal */
2563
+ export const OrLte$outboundSchema: z.ZodType<
2564
+ OrLte$Outbound,
2565
+ z.ZodTypeDef,
2566
+ OrLte
2567
+ > = z.object({
2568
+ lte: z.number(),
2569
+ });
2570
+
2571
+ export function orLteToJSON(orLte: OrLte): string {
2572
+ return JSON.stringify(OrLte$outboundSchema.parse(orLte));
2573
+ }
2574
+
2575
+ /** @internal */
2576
+ export type OrLt$Outbound = {
2577
+ lt: number;
2578
+ };
2579
+
2580
+ /** @internal */
2581
+ export const OrLt$outboundSchema: z.ZodType<OrLt$Outbound, z.ZodTypeDef, OrLt> =
2582
+ z.object({
2583
+ lt: z.number(),
2584
+ });
2585
+
2586
+ export function orLtToJSON(orLt: OrLt): string {
2587
+ return JSON.stringify(OrLt$outboundSchema.parse(orLt));
2588
+ }
2589
+
2590
+ /** @internal */
2591
+ export type OrGte$Outbound = {
2592
+ gte: number;
2593
+ };
2594
+
2595
+ /** @internal */
2596
+ export const OrGte$outboundSchema: z.ZodType<
2597
+ OrGte$Outbound,
2598
+ z.ZodTypeDef,
2599
+ OrGte
2600
+ > = z.object({
2601
+ gte: z.number(),
2602
+ });
2603
+
2604
+ export function orGteToJSON(orGte: OrGte): string {
2605
+ return JSON.stringify(OrGte$outboundSchema.parse(orGte));
2606
+ }
2607
+
2608
+ /** @internal */
2609
+ export type OrGt$Outbound = {
2610
+ gt: number;
2611
+ };
2612
+
2613
+ /** @internal */
2614
+ export const OrGt$outboundSchema: z.ZodType<OrGt$Outbound, z.ZodTypeDef, OrGt> =
2615
+ z.object({
2616
+ gt: z.number(),
2617
+ });
2618
+
2619
+ export function orGtToJSON(orGt: OrGt): string {
2620
+ return JSON.stringify(OrGt$outboundSchema.parse(orGt));
2621
+ }
2622
+
2623
+ /** @internal */
2624
+ export type OrNe$Outbound = string | number | boolean;
2625
+
2626
+ /** @internal */
2627
+ export const OrNe$outboundSchema: z.ZodType<OrNe$Outbound, z.ZodTypeDef, OrNe> =
2628
+ z.union([z.string(), z.number(), z.boolean()]);
2629
+
2630
+ export function orNeToJSON(orNe: OrNe): string {
2631
+ return JSON.stringify(OrNe$outboundSchema.parse(orNe));
2632
+ }
2633
+
2634
+ /** @internal */
2635
+ export type InvokeDeploymentRequestOrNe$Outbound = {
2636
+ ne: string | number | boolean;
2637
+ };
2638
+
2639
+ /** @internal */
2640
+ export const InvokeDeploymentRequestOrNe$outboundSchema: z.ZodType<
2641
+ InvokeDeploymentRequestOrNe$Outbound,
2642
+ z.ZodTypeDef,
2643
+ InvokeDeploymentRequestOrNe
2644
+ > = z.object({
2645
+ ne: z.union([z.string(), z.number(), z.boolean()]),
2646
+ });
2647
+
2648
+ export function invokeDeploymentRequestOrNeToJSON(
2649
+ invokeDeploymentRequestOrNe: InvokeDeploymentRequestOrNe,
2650
+ ): string {
2651
+ return JSON.stringify(
2652
+ InvokeDeploymentRequestOrNe$outboundSchema.parse(
2653
+ invokeDeploymentRequestOrNe,
2654
+ ),
2655
+ );
2656
+ }
2657
+
2658
+ /** @internal */
2659
+ export type OrEq$Outbound = string | number | boolean;
2660
+
2661
+ /** @internal */
2662
+ export const OrEq$outboundSchema: z.ZodType<OrEq$Outbound, z.ZodTypeDef, OrEq> =
2663
+ z.union([z.string(), z.number(), z.boolean()]);
2664
+
2665
+ export function orEqToJSON(orEq: OrEq): string {
2666
+ return JSON.stringify(OrEq$outboundSchema.parse(orEq));
2667
+ }
2668
+
2669
+ /** @internal */
2670
+ export type InvokeDeploymentRequestOrEq$Outbound = {
2671
+ eq: string | number | boolean;
2672
+ };
2673
+
2674
+ /** @internal */
2675
+ export const InvokeDeploymentRequestOrEq$outboundSchema: z.ZodType<
2676
+ InvokeDeploymentRequestOrEq$Outbound,
2677
+ z.ZodTypeDef,
2678
+ InvokeDeploymentRequestOrEq
2679
+ > = z.object({
2680
+ eq: z.union([z.string(), z.number(), z.boolean()]),
2681
+ });
2682
+
2683
+ export function invokeDeploymentRequestOrEqToJSON(
2684
+ invokeDeploymentRequestOrEq: InvokeDeploymentRequestOrEq,
2685
+ ): string {
2686
+ return JSON.stringify(
2687
+ InvokeDeploymentRequestOrEq$outboundSchema.parse(
2688
+ invokeDeploymentRequestOrEq,
2689
+ ),
2690
+ );
2691
+ }
2692
+
2693
+ /** @internal */
2694
+ export type Or$Outbound =
2695
+ | InvokeDeploymentRequestOrEq$Outbound
2696
+ | InvokeDeploymentRequestOrNe$Outbound
2697
+ | OrGt$Outbound
2698
+ | OrGte$Outbound
2699
+ | OrLt$Outbound
2700
+ | OrLte$Outbound
2701
+ | InvokeDeploymentRequestOrIn$Outbound
2702
+ | InvokeDeploymentRequestOrNin$Outbound;
2703
+
2704
+ /** @internal */
2705
+ export const Or$outboundSchema: z.ZodType<Or$Outbound, z.ZodTypeDef, Or> = z
2706
+ .union([
2707
+ z.lazy(() => InvokeDeploymentRequestOrEq$outboundSchema),
2708
+ z.lazy(() => InvokeDeploymentRequestOrNe$outboundSchema),
2709
+ z.lazy(() => OrGt$outboundSchema),
2710
+ z.lazy(() => OrGte$outboundSchema),
2711
+ z.lazy(() => OrLt$outboundSchema),
2712
+ z.lazy(() => OrLte$outboundSchema),
2713
+ z.lazy(() => InvokeDeploymentRequestOrIn$outboundSchema),
2714
+ z.lazy(() => InvokeDeploymentRequestOrNin$outboundSchema),
2715
+ ]);
2716
+
2717
+ export function orToJSON(or: Or): string {
2718
+ return JSON.stringify(Or$outboundSchema.parse(or));
2719
+ }
2720
+
2721
+ /** @internal */
2722
+ export type KnowledgeFilterOr$Outbound = {
2723
+ or: Array<
2724
+ {
2725
+ [k: string]:
2726
+ | InvokeDeploymentRequestOrEq$Outbound
2727
+ | InvokeDeploymentRequestOrNe$Outbound
2728
+ | OrGt$Outbound
2729
+ | OrGte$Outbound
2730
+ | OrLt$Outbound
2731
+ | OrLte$Outbound
2732
+ | InvokeDeploymentRequestOrIn$Outbound
2733
+ | InvokeDeploymentRequestOrNin$Outbound;
2734
+ }
2735
+ >;
2736
+ };
2737
+
2738
+ /** @internal */
2739
+ export const KnowledgeFilterOr$outboundSchema: z.ZodType<
2740
+ KnowledgeFilterOr$Outbound,
2741
+ z.ZodTypeDef,
2742
+ KnowledgeFilterOr
2743
+ > = z.object({
2744
+ or: z.array(
2745
+ z.record(z.union([
2746
+ z.lazy(() => InvokeDeploymentRequestOrEq$outboundSchema),
2747
+ z.lazy(() =>
2748
+ InvokeDeploymentRequestOrNe$outboundSchema
2749
+ ),
2750
+ z.lazy(() => OrGt$outboundSchema),
2751
+ z.lazy(() => OrGte$outboundSchema),
2752
+ z.lazy(() => OrLt$outboundSchema),
2753
+ z.lazy(() => OrLte$outboundSchema),
2754
+ z.lazy(() => InvokeDeploymentRequestOrIn$outboundSchema),
2755
+ z.lazy(() => InvokeDeploymentRequestOrNin$outboundSchema),
2756
+ ])),
2757
+ ),
2758
+ });
2759
+
2760
+ export function knowledgeFilterOrToJSON(
2761
+ knowledgeFilterOr: KnowledgeFilterOr,
2762
+ ): string {
2763
+ return JSON.stringify(
2764
+ KnowledgeFilterOr$outboundSchema.parse(knowledgeFilterOr),
2765
+ );
2766
+ }
2767
+
2768
+ /** @internal */
2769
+ export type AndNin$Outbound = string | number | boolean;
2770
+
2771
+ /** @internal */
2772
+ export const AndNin$outboundSchema: z.ZodType<
2773
+ AndNin$Outbound,
2774
+ z.ZodTypeDef,
2775
+ AndNin
2776
+ > = z.union([z.string(), z.number(), z.boolean()]);
2777
+
2778
+ export function andNinToJSON(andNin: AndNin): string {
2779
+ return JSON.stringify(AndNin$outboundSchema.parse(andNin));
2780
+ }
2781
+
2782
+ /** @internal */
2783
+ export type InvokeDeploymentRequestAndNin$Outbound = {
2784
+ nin: Array<string | number | boolean>;
2785
+ };
2786
+
2787
+ /** @internal */
2788
+ export const InvokeDeploymentRequestAndNin$outboundSchema: z.ZodType<
2789
+ InvokeDeploymentRequestAndNin$Outbound,
2790
+ z.ZodTypeDef,
2791
+ InvokeDeploymentRequestAndNin
2792
+ > = z.object({
2793
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
2794
+ });
2795
+
2796
+ export function invokeDeploymentRequestAndNinToJSON(
2797
+ invokeDeploymentRequestAndNin: InvokeDeploymentRequestAndNin,
2798
+ ): string {
2799
+ return JSON.stringify(
2800
+ InvokeDeploymentRequestAndNin$outboundSchema.parse(
2801
+ invokeDeploymentRequestAndNin,
2802
+ ),
2803
+ );
2804
+ }
2805
+
2806
+ /** @internal */
2807
+ export type AndIn$Outbound = string | number | boolean;
2808
+
2809
+ /** @internal */
2810
+ export const AndIn$outboundSchema: z.ZodType<
2811
+ AndIn$Outbound,
2812
+ z.ZodTypeDef,
2813
+ AndIn
2814
+ > = z.union([z.string(), z.number(), z.boolean()]);
2815
+
2816
+ export function andInToJSON(andIn: AndIn): string {
2817
+ return JSON.stringify(AndIn$outboundSchema.parse(andIn));
2818
+ }
2819
+
2820
+ /** @internal */
2821
+ export type InvokeDeploymentRequestAndIn$Outbound = {
2822
+ in: Array<string | number | boolean>;
2823
+ };
2824
+
2825
+ /** @internal */
2826
+ export const InvokeDeploymentRequestAndIn$outboundSchema: z.ZodType<
2827
+ InvokeDeploymentRequestAndIn$Outbound,
2828
+ z.ZodTypeDef,
2829
+ InvokeDeploymentRequestAndIn
2830
+ > = z.object({
2831
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
2832
+ });
2833
+
2834
+ export function invokeDeploymentRequestAndInToJSON(
2835
+ invokeDeploymentRequestAndIn: InvokeDeploymentRequestAndIn,
2836
+ ): string {
2837
+ return JSON.stringify(
2838
+ InvokeDeploymentRequestAndIn$outboundSchema.parse(
2839
+ invokeDeploymentRequestAndIn,
2840
+ ),
2841
+ );
2842
+ }
2843
+
2844
+ /** @internal */
2845
+ export type AndLte$Outbound = {
2846
+ lte: number;
2847
+ };
2848
+
2849
+ /** @internal */
2850
+ export const AndLte$outboundSchema: z.ZodType<
2851
+ AndLte$Outbound,
2852
+ z.ZodTypeDef,
2853
+ AndLte
2854
+ > = z.object({
2855
+ lte: z.number(),
2856
+ });
2857
+
2858
+ export function andLteToJSON(andLte: AndLte): string {
2859
+ return JSON.stringify(AndLte$outboundSchema.parse(andLte));
2860
+ }
2861
+
2862
+ /** @internal */
2863
+ export type AndLt$Outbound = {
2864
+ lt: number;
2865
+ };
2866
+
2867
+ /** @internal */
2868
+ export const AndLt$outboundSchema: z.ZodType<
2869
+ AndLt$Outbound,
2870
+ z.ZodTypeDef,
2871
+ AndLt
2872
+ > = z.object({
2873
+ lt: z.number(),
2874
+ });
2875
+
2876
+ export function andLtToJSON(andLt: AndLt): string {
2877
+ return JSON.stringify(AndLt$outboundSchema.parse(andLt));
2878
+ }
2879
+
2880
+ /** @internal */
2881
+ export type AndGte$Outbound = {
2882
+ gte: number;
2883
+ };
2884
+
2885
+ /** @internal */
2886
+ export const AndGte$outboundSchema: z.ZodType<
2887
+ AndGte$Outbound,
2888
+ z.ZodTypeDef,
2889
+ AndGte
2890
+ > = z.object({
2891
+ gte: z.number(),
2892
+ });
2893
+
2894
+ export function andGteToJSON(andGte: AndGte): string {
2895
+ return JSON.stringify(AndGte$outboundSchema.parse(andGte));
2896
+ }
2897
+
2898
+ /** @internal */
2899
+ export type AndGt$Outbound = {
2900
+ gt: number;
2901
+ };
2902
+
2903
+ /** @internal */
2904
+ export const AndGt$outboundSchema: z.ZodType<
2905
+ AndGt$Outbound,
2906
+ z.ZodTypeDef,
2907
+ AndGt
2908
+ > = z.object({
2909
+ gt: z.number(),
2910
+ });
2911
+
2912
+ export function andGtToJSON(andGt: AndGt): string {
2913
+ return JSON.stringify(AndGt$outboundSchema.parse(andGt));
2914
+ }
2915
+
2916
+ /** @internal */
2917
+ export type AndNe$Outbound = string | number | boolean;
2918
+
2919
+ /** @internal */
2920
+ export const AndNe$outboundSchema: z.ZodType<
2921
+ AndNe$Outbound,
2922
+ z.ZodTypeDef,
2923
+ AndNe
2924
+ > = z.union([z.string(), z.number(), z.boolean()]);
2925
+
2926
+ export function andNeToJSON(andNe: AndNe): string {
2927
+ return JSON.stringify(AndNe$outboundSchema.parse(andNe));
2928
+ }
2929
+
2930
+ /** @internal */
2931
+ export type InvokeDeploymentRequestAndNe$Outbound = {
2932
+ ne: string | number | boolean;
2933
+ };
2934
+
2935
+ /** @internal */
2936
+ export const InvokeDeploymentRequestAndNe$outboundSchema: z.ZodType<
2937
+ InvokeDeploymentRequestAndNe$Outbound,
2938
+ z.ZodTypeDef,
2939
+ InvokeDeploymentRequestAndNe
2940
+ > = z.object({
2941
+ ne: z.union([z.string(), z.number(), z.boolean()]),
2942
+ });
2943
+
2944
+ export function invokeDeploymentRequestAndNeToJSON(
2945
+ invokeDeploymentRequestAndNe: InvokeDeploymentRequestAndNe,
2946
+ ): string {
2947
+ return JSON.stringify(
2948
+ InvokeDeploymentRequestAndNe$outboundSchema.parse(
2949
+ invokeDeploymentRequestAndNe,
2950
+ ),
2951
+ );
2952
+ }
2953
+
2954
+ /** @internal */
2955
+ export type AndEq$Outbound = string | number | boolean;
2956
+
2957
+ /** @internal */
2958
+ export const AndEq$outboundSchema: z.ZodType<
2959
+ AndEq$Outbound,
2960
+ z.ZodTypeDef,
2961
+ AndEq
2962
+ > = z.union([z.string(), z.number(), z.boolean()]);
2963
+
2964
+ export function andEqToJSON(andEq: AndEq): string {
2965
+ return JSON.stringify(AndEq$outboundSchema.parse(andEq));
2966
+ }
2967
+
2968
+ /** @internal */
2969
+ export type InvokeDeploymentRequestAndEq$Outbound = {
2970
+ eq: string | number | boolean;
2971
+ };
2972
+
2973
+ /** @internal */
2974
+ export const InvokeDeploymentRequestAndEq$outboundSchema: z.ZodType<
2975
+ InvokeDeploymentRequestAndEq$Outbound,
2976
+ z.ZodTypeDef,
2977
+ InvokeDeploymentRequestAndEq
2978
+ > = z.object({
2979
+ eq: z.union([z.string(), z.number(), z.boolean()]),
2980
+ });
2981
+
2982
+ export function invokeDeploymentRequestAndEqToJSON(
2983
+ invokeDeploymentRequestAndEq: InvokeDeploymentRequestAndEq,
2984
+ ): string {
2985
+ return JSON.stringify(
2986
+ InvokeDeploymentRequestAndEq$outboundSchema.parse(
2987
+ invokeDeploymentRequestAndEq,
2988
+ ),
2989
+ );
2990
+ }
2991
+
2992
+ /** @internal */
2993
+ export type And$Outbound =
2994
+ | InvokeDeploymentRequestAndEq$Outbound
2995
+ | InvokeDeploymentRequestAndNe$Outbound
2996
+ | AndGt$Outbound
2997
+ | AndGte$Outbound
2998
+ | AndLt$Outbound
2999
+ | AndLte$Outbound
3000
+ | InvokeDeploymentRequestAndIn$Outbound
3001
+ | InvokeDeploymentRequestAndNin$Outbound;
3002
+
3003
+ /** @internal */
3004
+ export const And$outboundSchema: z.ZodType<And$Outbound, z.ZodTypeDef, And> = z
3005
+ .union([
3006
+ z.lazy(() => InvokeDeploymentRequestAndEq$outboundSchema),
3007
+ z.lazy(() => InvokeDeploymentRequestAndNe$outboundSchema),
3008
+ z.lazy(() => AndGt$outboundSchema),
3009
+ z.lazy(() => AndGte$outboundSchema),
3010
+ z.lazy(() => AndLt$outboundSchema),
3011
+ z.lazy(() => AndLte$outboundSchema),
3012
+ z.lazy(() => InvokeDeploymentRequestAndIn$outboundSchema),
3013
+ z.lazy(() => InvokeDeploymentRequestAndNin$outboundSchema),
3014
+ ]);
3015
+
3016
+ export function andToJSON(and: And): string {
3017
+ return JSON.stringify(And$outboundSchema.parse(and));
3018
+ }
3019
+
3020
+ /** @internal */
3021
+ export type KnowledgeFilterAnd$Outbound = {
3022
+ and: Array<
3023
+ {
3024
+ [k: string]:
3025
+ | InvokeDeploymentRequestAndEq$Outbound
3026
+ | InvokeDeploymentRequestAndNe$Outbound
3027
+ | AndGt$Outbound
3028
+ | AndGte$Outbound
3029
+ | AndLt$Outbound
3030
+ | AndLte$Outbound
3031
+ | InvokeDeploymentRequestAndIn$Outbound
3032
+ | InvokeDeploymentRequestAndNin$Outbound;
3033
+ }
3034
+ >;
3035
+ };
3036
+
3037
+ /** @internal */
3038
+ export const KnowledgeFilterAnd$outboundSchema: z.ZodType<
3039
+ KnowledgeFilterAnd$Outbound,
3040
+ z.ZodTypeDef,
3041
+ KnowledgeFilterAnd
3042
+ > = z.object({
3043
+ and: z.array(
3044
+ z.record(z.union([
3045
+ z.lazy(() => InvokeDeploymentRequestAndEq$outboundSchema),
3046
+ z.lazy(() =>
3047
+ InvokeDeploymentRequestAndNe$outboundSchema
3048
+ ),
3049
+ z.lazy(() => AndGt$outboundSchema),
3050
+ z.lazy(() => AndGte$outboundSchema),
3051
+ z.lazy(() => AndLt$outboundSchema),
3052
+ z.lazy(() => AndLte$outboundSchema),
3053
+ z.lazy(() => InvokeDeploymentRequestAndIn$outboundSchema),
3054
+ z.lazy(() => InvokeDeploymentRequestAndNin$outboundSchema),
3055
+ ])),
3056
+ ),
3057
+ });
3058
+
3059
+ export function knowledgeFilterAndToJSON(
3060
+ knowledgeFilterAnd: KnowledgeFilterAnd,
3061
+ ): string {
3062
+ return JSON.stringify(
3063
+ KnowledgeFilterAnd$outboundSchema.parse(knowledgeFilterAnd),
3064
+ );
3065
+ }
3066
+
3067
+ /** @internal */
3068
+ export type Nin$Outbound = string | number | boolean;
3069
+
3070
+ /** @internal */
3071
+ export const Nin$outboundSchema: z.ZodType<Nin$Outbound, z.ZodTypeDef, Nin> = z
3072
+ .union([z.string(), z.number(), z.boolean()]);
3073
+
3074
+ export function ninToJSON(nin: Nin): string {
3075
+ return JSON.stringify(Nin$outboundSchema.parse(nin));
3076
+ }
3077
+
3078
+ /** @internal */
3079
+ export type InvokeDeploymentRequest1Nin$Outbound = {
3080
+ nin: Array<string | number | boolean>;
3081
+ };
3082
+
3083
+ /** @internal */
3084
+ export const InvokeDeploymentRequest1Nin$outboundSchema: z.ZodType<
3085
+ InvokeDeploymentRequest1Nin$Outbound,
3086
+ z.ZodTypeDef,
3087
+ InvokeDeploymentRequest1Nin
3088
+ > = z.object({
3089
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
3090
+ });
3091
+
3092
+ export function invokeDeploymentRequest1NinToJSON(
3093
+ invokeDeploymentRequest1Nin: InvokeDeploymentRequest1Nin,
3094
+ ): string {
3095
+ return JSON.stringify(
3096
+ InvokeDeploymentRequest1Nin$outboundSchema.parse(
3097
+ invokeDeploymentRequest1Nin,
3098
+ ),
3099
+ );
3100
+ }
3101
+
3102
+ /** @internal */
3103
+ export type In$Outbound = string | number | boolean;
3104
+
3105
+ /** @internal */
3106
+ export const In$outboundSchema: z.ZodType<In$Outbound, z.ZodTypeDef, In> = z
3107
+ .union([z.string(), z.number(), z.boolean()]);
3108
+
3109
+ export function inToJSON(value: In): string {
3110
+ return JSON.stringify(In$outboundSchema.parse(value));
3111
+ }
3112
+
3113
+ /** @internal */
3114
+ export type InvokeDeploymentRequest1In$Outbound = {
3115
+ in: Array<string | number | boolean>;
3116
+ };
3117
+
3118
+ /** @internal */
3119
+ export const InvokeDeploymentRequest1In$outboundSchema: z.ZodType<
3120
+ InvokeDeploymentRequest1In$Outbound,
3121
+ z.ZodTypeDef,
3122
+ InvokeDeploymentRequest1In
3123
+ > = z.object({
3124
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
3125
+ });
3126
+
3127
+ export function invokeDeploymentRequest1InToJSON(
3128
+ invokeDeploymentRequest1In: InvokeDeploymentRequest1In,
3129
+ ): string {
3130
+ return JSON.stringify(
3131
+ InvokeDeploymentRequest1In$outboundSchema.parse(invokeDeploymentRequest1In),
3132
+ );
3133
+ }
3134
+
3135
+ /** @internal */
3136
+ export type Lte$Outbound = {
3137
+ lte: number;
3138
+ };
3139
+
3140
+ /** @internal */
3141
+ export const Lte$outboundSchema: z.ZodType<Lte$Outbound, z.ZodTypeDef, Lte> = z
3142
+ .object({
3143
+ lte: z.number(),
3144
+ });
3145
+
3146
+ export function lteToJSON(lte: Lte): string {
3147
+ return JSON.stringify(Lte$outboundSchema.parse(lte));
3148
+ }
3149
+
3150
+ /** @internal */
3151
+ export type Lt$Outbound = {
3152
+ lt: number;
3153
+ };
3154
+
3155
+ /** @internal */
3156
+ export const Lt$outboundSchema: z.ZodType<Lt$Outbound, z.ZodTypeDef, Lt> = z
3157
+ .object({
3158
+ lt: z.number(),
3159
+ });
3160
+
3161
+ export function ltToJSON(lt: Lt): string {
3162
+ return JSON.stringify(Lt$outboundSchema.parse(lt));
3163
+ }
3164
+
3165
+ /** @internal */
3166
+ export type Gte$Outbound = {
3167
+ gte: number;
3168
+ };
3169
+
3170
+ /** @internal */
3171
+ export const Gte$outboundSchema: z.ZodType<Gte$Outbound, z.ZodTypeDef, Gte> = z
3172
+ .object({
3173
+ gte: z.number(),
3174
+ });
3175
+
3176
+ export function gteToJSON(gte: Gte): string {
3177
+ return JSON.stringify(Gte$outboundSchema.parse(gte));
3178
+ }
3179
+
3180
+ /** @internal */
3181
+ export type Gt$Outbound = {
3182
+ gt: number;
3183
+ };
3184
+
3185
+ /** @internal */
3186
+ export const Gt$outboundSchema: z.ZodType<Gt$Outbound, z.ZodTypeDef, Gt> = z
3187
+ .object({
3188
+ gt: z.number(),
3189
+ });
3190
+
3191
+ export function gtToJSON(gt: Gt): string {
3192
+ return JSON.stringify(Gt$outboundSchema.parse(gt));
3193
+ }
3194
+
3195
+ /** @internal */
3196
+ export type Ne$Outbound = string | number | boolean;
3197
+
3198
+ /** @internal */
3199
+ export const Ne$outboundSchema: z.ZodType<Ne$Outbound, z.ZodTypeDef, Ne> = z
3200
+ .union([z.string(), z.number(), z.boolean()]);
3201
+
3202
+ export function neToJSON(ne: Ne): string {
3203
+ return JSON.stringify(Ne$outboundSchema.parse(ne));
3204
+ }
3205
+
3206
+ /** @internal */
3207
+ export type InvokeDeploymentRequest1Ne$Outbound = {
3208
+ ne: string | number | boolean;
3209
+ };
3210
+
3211
+ /** @internal */
3212
+ export const InvokeDeploymentRequest1Ne$outboundSchema: z.ZodType<
3213
+ InvokeDeploymentRequest1Ne$Outbound,
3214
+ z.ZodTypeDef,
3215
+ InvokeDeploymentRequest1Ne
3216
+ > = z.object({
3217
+ ne: z.union([z.string(), z.number(), z.boolean()]),
3218
+ });
3219
+
3220
+ export function invokeDeploymentRequest1NeToJSON(
3221
+ invokeDeploymentRequest1Ne: InvokeDeploymentRequest1Ne,
3222
+ ): string {
3223
+ return JSON.stringify(
3224
+ InvokeDeploymentRequest1Ne$outboundSchema.parse(invokeDeploymentRequest1Ne),
3225
+ );
3226
+ }
3227
+
3228
+ /** @internal */
3229
+ export type Eq$Outbound = string | number | boolean;
3230
+
3231
+ /** @internal */
3232
+ export const Eq$outboundSchema: z.ZodType<Eq$Outbound, z.ZodTypeDef, Eq> = z
3233
+ .union([z.string(), z.number(), z.boolean()]);
3234
+
3235
+ export function eqToJSON(eq: Eq): string {
3236
+ return JSON.stringify(Eq$outboundSchema.parse(eq));
3237
+ }
3238
+
3239
+ /** @internal */
3240
+ export type InvokeDeploymentRequest1Eq$Outbound = {
3241
+ eq: string | number | boolean;
3242
+ };
3243
+
3244
+ /** @internal */
3245
+ export const InvokeDeploymentRequest1Eq$outboundSchema: z.ZodType<
3246
+ InvokeDeploymentRequest1Eq$Outbound,
3247
+ z.ZodTypeDef,
3248
+ InvokeDeploymentRequest1Eq
3249
+ > = z.object({
3250
+ eq: z.union([z.string(), z.number(), z.boolean()]),
3251
+ });
3252
+
3253
+ export function invokeDeploymentRequest1EqToJSON(
3254
+ invokeDeploymentRequest1Eq: InvokeDeploymentRequest1Eq,
3255
+ ): string {
3256
+ return JSON.stringify(
3257
+ InvokeDeploymentRequest1Eq$outboundSchema.parse(invokeDeploymentRequest1Eq),
3258
+ );
3259
+ }
3260
+
3261
+ /** @internal */
3262
+ export type One$Outbound =
3263
+ | InvokeDeploymentRequest1Eq$Outbound
3264
+ | InvokeDeploymentRequest1Ne$Outbound
3265
+ | Gt$Outbound
3266
+ | Gte$Outbound
3267
+ | Lt$Outbound
3268
+ | Lte$Outbound
3269
+ | InvokeDeploymentRequest1In$Outbound
3270
+ | InvokeDeploymentRequest1Nin$Outbound;
3271
+
3272
+ /** @internal */
3273
+ export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
3274
+ .union([
3275
+ z.lazy(() => InvokeDeploymentRequest1Eq$outboundSchema),
3276
+ z.lazy(() => InvokeDeploymentRequest1Ne$outboundSchema),
3277
+ z.lazy(() => Gt$outboundSchema),
3278
+ z.lazy(() => Gte$outboundSchema),
3279
+ z.lazy(() => Lt$outboundSchema),
3280
+ z.lazy(() => Lte$outboundSchema),
3281
+ z.lazy(() => InvokeDeploymentRequest1In$outboundSchema),
3282
+ z.lazy(() => InvokeDeploymentRequest1Nin$outboundSchema),
3283
+ ]);
3284
+
3285
+ export function oneToJSON(one: One): string {
3286
+ return JSON.stringify(One$outboundSchema.parse(one));
3287
+ }
3288
+
3289
+ /** @internal */
3290
+ export type KnowledgeFilter$Outbound =
3291
+ | KnowledgeFilterAnd$Outbound
3292
+ | KnowledgeFilterOr$Outbound
3293
+ | {
3294
+ [k: string]:
3295
+ | InvokeDeploymentRequest1Eq$Outbound
3296
+ | InvokeDeploymentRequest1Ne$Outbound
3297
+ | Gt$Outbound
3298
+ | Gte$Outbound
3299
+ | Lt$Outbound
3300
+ | Lte$Outbound
3301
+ | InvokeDeploymentRequest1In$Outbound
3302
+ | InvokeDeploymentRequest1Nin$Outbound;
3303
+ };
3304
+
3305
+ /** @internal */
3306
+ export const KnowledgeFilter$outboundSchema: z.ZodType<
3307
+ KnowledgeFilter$Outbound,
3308
+ z.ZodTypeDef,
3309
+ KnowledgeFilter
3310
+ > = z.union([
3311
+ z.lazy(() => KnowledgeFilterAnd$outboundSchema),
3312
+ z.lazy(() => KnowledgeFilterOr$outboundSchema),
3313
+ z.record(z.union([
3314
+ z.lazy(() => InvokeDeploymentRequest1Eq$outboundSchema),
3315
+ z.lazy(() => InvokeDeploymentRequest1Ne$outboundSchema),
3316
+ z.lazy(() => Gt$outboundSchema),
3317
+ z.lazy(() => Gte$outboundSchema),
3318
+ z.lazy(() => Lt$outboundSchema),
3319
+ z.lazy(() => Lte$outboundSchema),
3320
+ z.lazy(() => InvokeDeploymentRequest1In$outboundSchema),
3321
+ z.lazy(() => InvokeDeploymentRequest1Nin$outboundSchema),
3322
+ ])),
3323
+ ]);
3324
+
3325
+ export function knowledgeFilterToJSON(
3326
+ knowledgeFilter: KnowledgeFilter,
3327
+ ): string {
3328
+ return JSON.stringify(KnowledgeFilter$outboundSchema.parse(knowledgeFilter));
3329
+ }
3330
+
3331
+ /** @internal */
3332
+ export type InvokeDeploymentRequest$Outbound = {
3333
+ key: string;
3334
+ stream: boolean;
3335
+ inputs?: { [k: string]: any } | undefined;
3336
+ context?: { [k: string]: any } | undefined;
3337
+ prefix_messages?:
3338
+ | Array<
3339
+ | SystemMessage$Outbound
3340
+ | DeveloperMessage$Outbound
3341
+ | UserMessage$Outbound
3342
+ | AssistantMessage$Outbound
3343
+ | ToolMessage$Outbound
3344
+ >
3345
+ | undefined;
3346
+ messages?:
3347
+ | Array<
3348
+ | MessagesSystemMessage$Outbound
3349
+ | MessagesDeveloperMessage$Outbound
3350
+ | MessagesUserMessage$Outbound
3351
+ | MessagesAssistantMessage$Outbound
3352
+ | MessagesToolMessage$Outbound
3353
+ >
3354
+ | undefined;
3355
+ identity?: PublicIdentity$Outbound | undefined;
3356
+ file_ids?: Array<string> | undefined;
3357
+ metadata?: { [k: string]: any } | undefined;
3358
+ extra_params?: { [k: string]: any } | undefined;
3359
+ documents?: Array<Documents$Outbound> | undefined;
3360
+ invoke_options?: InvokeOptions$Outbound | undefined;
3361
+ thread?: InvokeDeploymentRequestThread$Outbound | undefined;
3362
+ knowledge_filter?:
3363
+ | KnowledgeFilterAnd$Outbound
3364
+ | KnowledgeFilterOr$Outbound
3365
+ | {
3366
+ [k: string]:
3367
+ | InvokeDeploymentRequest1Eq$Outbound
3368
+ | InvokeDeploymentRequest1Ne$Outbound
3369
+ | Gt$Outbound
3370
+ | Gte$Outbound
3371
+ | Lt$Outbound
3372
+ | Lte$Outbound
3373
+ | InvokeDeploymentRequest1In$Outbound
3374
+ | InvokeDeploymentRequest1Nin$Outbound;
3375
+ }
3376
+ | undefined;
3377
+ };
3378
+
3379
+ /** @internal */
3380
+ export const InvokeDeploymentRequest$outboundSchema: z.ZodType<
3381
+ InvokeDeploymentRequest$Outbound,
3382
+ z.ZodTypeDef,
3383
+ InvokeDeploymentRequest
3384
+ > = z.object({
3385
+ key: z.string(),
3386
+ stream: z.boolean().default(false),
3387
+ inputs: z.record(z.any()).optional(),
3388
+ context: z.record(z.any()).optional(),
3389
+ prefixMessages: z.array(
3390
+ z.union([
3391
+ z.lazy(() => SystemMessage$outboundSchema),
3392
+ z.lazy(() => DeveloperMessage$outboundSchema),
3393
+ z.lazy(() => UserMessage$outboundSchema),
3394
+ z.lazy(() => AssistantMessage$outboundSchema),
3395
+ z.lazy(() => ToolMessage$outboundSchema),
3396
+ ]),
3397
+ ).optional(),
3398
+ messages: z.array(
3399
+ z.union([
3400
+ z.lazy(() => MessagesSystemMessage$outboundSchema),
3401
+ z.lazy(() => MessagesDeveloperMessage$outboundSchema),
3402
+ z.lazy(() => MessagesUserMessage$outboundSchema),
3403
+ z.lazy(() => MessagesAssistantMessage$outboundSchema),
3404
+ z.lazy(() => MessagesToolMessage$outboundSchema),
3405
+ ]),
3406
+ ).optional(),
3407
+ identity: PublicIdentity$outboundSchema.optional(),
3408
+ fileIds: z.array(z.string()).optional(),
3409
+ metadata: z.record(z.any()).optional(),
3410
+ extraParams: z.record(z.any()).optional(),
3411
+ documents: z.array(z.lazy(() => Documents$outboundSchema)).optional(),
3412
+ invokeOptions: z.lazy(() => InvokeOptions$outboundSchema).optional(),
3413
+ thread: z.lazy(() => InvokeDeploymentRequestThread$outboundSchema).optional(),
3414
+ knowledgeFilter: z.union([
3415
+ z.lazy(() => KnowledgeFilterAnd$outboundSchema),
3416
+ z.lazy(() => KnowledgeFilterOr$outboundSchema),
3417
+ z.record(z.union([
3418
+ z.lazy(() => InvokeDeploymentRequest1Eq$outboundSchema),
3419
+ z.lazy(() => InvokeDeploymentRequest1Ne$outboundSchema),
3420
+ z.lazy(() => Gt$outboundSchema),
3421
+ z.lazy(() => Gte$outboundSchema),
3422
+ z.lazy(() => Lt$outboundSchema),
3423
+ z.lazy(() => Lte$outboundSchema),
3424
+ z.lazy(() => InvokeDeploymentRequest1In$outboundSchema),
3425
+ z.lazy(() => InvokeDeploymentRequest1Nin$outboundSchema),
3426
+ ])),
3427
+ ]).optional(),
3428
+ }).transform((v) => {
3429
+ return remap$(v, {
3430
+ prefixMessages: "prefix_messages",
3431
+ fileIds: "file_ids",
3432
+ extraParams: "extra_params",
3433
+ invokeOptions: "invoke_options",
3434
+ knowledgeFilter: "knowledge_filter",
3435
+ });
3436
+ });
3437
+
3438
+ export function invokeDeploymentRequestToJSON(
3439
+ invokeDeploymentRequest: InvokeDeploymentRequest,
3440
+ ): string {
3441
+ return JSON.stringify(
3442
+ InvokeDeploymentRequest$outboundSchema.parse(invokeDeploymentRequest),
3443
+ );
3444
+ }