@orq-ai/node 4.10.0-rc.6 → 4.10.0-rc.65

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 (1098) hide show
  1. package/README.md +109 -66
  2. package/funcs/annotationsCreate.d.ts +3 -0
  3. package/funcs/annotationsCreate.d.ts.map +1 -1
  4. package/funcs/annotationsCreate.js +3 -0
  5. package/funcs/annotationsCreate.js.map +1 -1
  6. package/funcs/annotationsDelete.d.ts +3 -0
  7. package/funcs/annotationsDelete.d.ts.map +1 -1
  8. package/funcs/annotationsDelete.js +3 -0
  9. package/funcs/annotationsDelete.js.map +1 -1
  10. package/funcs/apiKeysCreate.d.ts +17 -0
  11. package/funcs/apiKeysCreate.d.ts.map +1 -0
  12. package/funcs/apiKeysCreate.js +115 -0
  13. package/funcs/apiKeysCreate.js.map +1 -0
  14. package/funcs/apiKeysDelete.d.ts +18 -0
  15. package/funcs/apiKeysDelete.d.ts.map +1 -0
  16. package/funcs/apiKeysDelete.js +121 -0
  17. package/funcs/apiKeysDelete.js.map +1 -0
  18. package/funcs/apiKeysGet.d.ts +18 -0
  19. package/funcs/apiKeysGet.d.ts.map +1 -0
  20. package/funcs/apiKeysGet.js +121 -0
  21. package/funcs/apiKeysGet.js.map +1 -0
  22. package/funcs/apiKeysList.d.ts +18 -0
  23. package/funcs/apiKeysList.d.ts.map +1 -0
  24. package/funcs/apiKeysList.js +126 -0
  25. package/funcs/apiKeysList.js.map +1 -0
  26. package/funcs/apiKeysListCapabilities.d.ts +17 -0
  27. package/funcs/apiKeysListCapabilities.d.ts.map +1 -0
  28. package/funcs/apiKeysListCapabilities.js +105 -0
  29. package/funcs/apiKeysListCapabilities.js.map +1 -0
  30. package/funcs/apiKeysUpdate.d.ts +18 -0
  31. package/funcs/apiKeysUpdate.d.ts.map +1 -0
  32. package/funcs/apiKeysUpdate.js +124 -0
  33. package/funcs/apiKeysUpdate.js.map +1 -0
  34. package/funcs/deploymentsInvoke.d.ts +1 -2
  35. package/funcs/deploymentsInvoke.d.ts.map +1 -1
  36. package/funcs/deploymentsInvoke.js +1 -10
  37. package/funcs/deploymentsInvoke.js.map +1 -1
  38. package/funcs/deploymentsStream.js +0 -8
  39. package/funcs/deploymentsStream.js.map +1 -1
  40. package/funcs/filesList.js +1 -0
  41. package/funcs/filesList.js.map +1 -1
  42. package/funcs/identitiesCreate.d.ts +3 -3
  43. package/funcs/identitiesCreate.d.ts.map +1 -1
  44. package/funcs/identitiesCreate.js +5 -7
  45. package/funcs/identitiesCreate.js.map +1 -1
  46. package/funcs/identitiesDelete.d.ts +3 -3
  47. package/funcs/identitiesDelete.d.ts.map +1 -1
  48. package/funcs/identitiesDelete.js +3 -7
  49. package/funcs/identitiesDelete.js.map +1 -1
  50. package/funcs/identitiesList.d.ts +2 -1
  51. package/funcs/identitiesList.d.ts.map +1 -1
  52. package/funcs/identitiesList.js +3 -2
  53. package/funcs/identitiesList.js.map +1 -1
  54. package/funcs/identitiesRetrieve.d.ts +2 -2
  55. package/funcs/identitiesRetrieve.d.ts.map +1 -1
  56. package/funcs/identitiesRetrieve.js +2 -5
  57. package/funcs/identitiesRetrieve.js.map +1 -1
  58. package/funcs/identitiesUpdate.d.ts +2 -2
  59. package/funcs/identitiesUpdate.d.ts.map +1 -1
  60. package/funcs/identitiesUpdate.js +5 -6
  61. package/funcs/identitiesUpdate.js.map +1 -1
  62. package/funcs/knowledgeGetChunksCount.d.ts +3 -0
  63. package/funcs/knowledgeGetChunksCount.d.ts.map +1 -1
  64. package/funcs/knowledgeGetChunksCount.js +3 -0
  65. package/funcs/knowledgeGetChunksCount.js.map +1 -1
  66. package/funcs/modelsAzureFoundryDeployments.d.ts +17 -0
  67. package/funcs/modelsAzureFoundryDeployments.d.ts.map +1 -0
  68. package/funcs/{agentsPostV2AgentsA2a.js → modelsAzureFoundryDeployments.js} +10 -16
  69. package/funcs/modelsAzureFoundryDeployments.js.map +1 -0
  70. package/funcs/modelsCreate.d.ts +17 -0
  71. package/funcs/modelsCreate.d.ts.map +1 -0
  72. package/funcs/modelsCreate.js +115 -0
  73. package/funcs/modelsCreate.js.map +1 -0
  74. package/funcs/modelsCreateAutorouter.d.ts +17 -0
  75. package/funcs/modelsCreateAutorouter.d.ts.map +1 -0
  76. package/funcs/modelsCreateAutorouter.js +115 -0
  77. package/funcs/modelsCreateAutorouter.js.map +1 -0
  78. package/funcs/modelsCreateAwsBedrock.d.ts +17 -0
  79. package/funcs/modelsCreateAwsBedrock.d.ts.map +1 -0
  80. package/funcs/modelsCreateAwsBedrock.js +115 -0
  81. package/funcs/modelsCreateAwsBedrock.js.map +1 -0
  82. package/funcs/modelsCreateOpenaiLike.d.ts +17 -0
  83. package/funcs/modelsCreateOpenaiLike.d.ts.map +1 -0
  84. package/funcs/modelsCreateOpenaiLike.js +115 -0
  85. package/funcs/modelsCreateOpenaiLike.js.map +1 -0
  86. package/funcs/modelsCreateVertex.d.ts +17 -0
  87. package/funcs/modelsCreateVertex.d.ts.map +1 -0
  88. package/funcs/modelsCreateVertex.js +115 -0
  89. package/funcs/modelsCreateVertex.js.map +1 -0
  90. package/funcs/{deploymentsMetricsCreate.d.ts → modelsDelete.d.ts} +4 -6
  91. package/funcs/modelsDelete.d.ts.map +1 -0
  92. package/funcs/modelsDelete.js +121 -0
  93. package/funcs/modelsDelete.js.map +1 -0
  94. package/funcs/{remoteconfigsRetrieve.d.ts → modelsDisable.d.ts} +6 -3
  95. package/funcs/modelsDisable.d.ts.map +1 -0
  96. package/funcs/modelsDisable.js +121 -0
  97. package/funcs/modelsDisable.js.map +1 -0
  98. package/funcs/modelsEnable.d.ts +17 -0
  99. package/funcs/modelsEnable.d.ts.map +1 -0
  100. package/funcs/modelsEnable.js +116 -0
  101. package/funcs/modelsEnable.js.map +1 -0
  102. package/funcs/modelsImportLitellm.d.ts +17 -0
  103. package/funcs/modelsImportLitellm.d.ts.map +1 -0
  104. package/funcs/{remoteconfigsRetrieve.js → modelsImportLitellm.js} +13 -10
  105. package/funcs/modelsImportLitellm.js.map +1 -0
  106. package/funcs/{contactsCreate.d.ts → modelsList.d.ts} +4 -4
  107. package/funcs/modelsList.d.ts.map +1 -0
  108. package/funcs/modelsList.js +105 -0
  109. package/funcs/modelsList.js.map +1 -0
  110. package/funcs/modelsListLitellm.d.ts +18 -0
  111. package/funcs/modelsListLitellm.d.ts.map +1 -0
  112. package/funcs/modelsListLitellm.js +105 -0
  113. package/funcs/modelsListLitellm.js.map +1 -0
  114. package/funcs/modelsUpdate.d.ts +17 -0
  115. package/funcs/modelsUpdate.d.ts.map +1 -0
  116. package/funcs/{deploymentsMetricsCreate.js → modelsUpdate.js} +10 -12
  117. package/funcs/modelsUpdate.js.map +1 -0
  118. package/funcs/modelsUpdateAutorouter.d.ts +17 -0
  119. package/funcs/modelsUpdateAutorouter.d.ts.map +1 -0
  120. package/funcs/modelsUpdateAutorouter.js +121 -0
  121. package/funcs/modelsUpdateAutorouter.js.map +1 -0
  122. package/funcs/modelsUpdateAwsBedrock.d.ts +17 -0
  123. package/funcs/modelsUpdateAwsBedrock.d.ts.map +1 -0
  124. package/funcs/modelsUpdateAwsBedrock.js +121 -0
  125. package/funcs/modelsUpdateAwsBedrock.js.map +1 -0
  126. package/funcs/modelsUpdateOpenaiLike.d.ts +17 -0
  127. package/funcs/modelsUpdateOpenaiLike.d.ts.map +1 -0
  128. package/funcs/modelsUpdateOpenaiLike.js +121 -0
  129. package/funcs/modelsUpdateOpenaiLike.js.map +1 -0
  130. package/funcs/modelsValidate.d.ts +17 -0
  131. package/funcs/{contactsCreate.d.ts.map → modelsValidate.d.ts.map} +1 -1
  132. package/funcs/modelsValidate.js +116 -0
  133. package/funcs/modelsValidate.js.map +1 -0
  134. package/funcs/modelsValidateAwsBedrock.d.ts +17 -0
  135. package/funcs/modelsValidateAwsBedrock.d.ts.map +1 -0
  136. package/funcs/modelsValidateAwsBedrock.js +116 -0
  137. package/funcs/modelsValidateAwsBedrock.js.map +1 -0
  138. package/funcs/piiDetect.d.ts +17 -0
  139. package/funcs/piiDetect.d.ts.map +1 -0
  140. package/funcs/piiDetect.js +115 -0
  141. package/funcs/piiDetect.js.map +1 -0
  142. package/funcs/piiRedact.d.ts +17 -0
  143. package/funcs/piiRedact.d.ts.map +1 -0
  144. package/funcs/{contactsCreate.js → piiRedact.js} +10 -10
  145. package/funcs/piiRedact.js.map +1 -0
  146. package/funcs/{agentsPostV2AgentsA2a.d.ts → piiRestore.d.ts} +5 -6
  147. package/funcs/piiRestore.d.ts.map +1 -0
  148. package/funcs/piiRestore.js +115 -0
  149. package/funcs/piiRestore.js.map +1 -0
  150. package/funcs/projectsCreate.d.ts +1 -1
  151. package/funcs/projectsCreate.js +1 -1
  152. package/funcs/projectsDelete.d.ts +3 -0
  153. package/funcs/projectsDelete.d.ts.map +1 -1
  154. package/funcs/projectsDelete.js +3 -0
  155. package/funcs/projectsDelete.js.map +1 -1
  156. package/funcs/projectsList.d.ts +1 -1
  157. package/funcs/projectsList.js +1 -1
  158. package/funcs/reportingQuery.d.ts +17 -0
  159. package/funcs/reportingQuery.d.ts.map +1 -0
  160. package/funcs/reportingQuery.js +115 -0
  161. package/funcs/reportingQuery.js.map +1 -0
  162. package/funcs/skillsCreate.d.ts +1 -1
  163. package/funcs/skillsCreate.js +1 -1
  164. package/funcs/skillsDelete.d.ts +3 -0
  165. package/funcs/skillsDelete.d.ts.map +1 -1
  166. package/funcs/skillsDelete.js +3 -0
  167. package/funcs/skillsDelete.js.map +1 -1
  168. package/funcs/skillsGet.d.ts +1 -1
  169. package/funcs/skillsGet.js +1 -1
  170. package/funcs/skillsList.d.ts +1 -1
  171. package/funcs/skillsList.js +1 -1
  172. package/funcs/skillsUpdate.d.ts +1 -1
  173. package/funcs/skillsUpdate.js +1 -1
  174. package/jsr.json +1 -1
  175. package/lib/config.d.ts +3 -11
  176. package/lib/config.d.ts.map +1 -1
  177. package/lib/config.js +3 -3
  178. package/lib/config.js.map +1 -1
  179. package/lib/env.d.ts +0 -13
  180. package/lib/env.d.ts.map +1 -1
  181. package/lib/env.js +0 -17
  182. package/lib/env.js.map +1 -1
  183. package/lib/sdks.js +1 -1
  184. package/lib/sdks.js.map +1 -1
  185. package/models/components/agentthoughtstreamingevent.d.ts +12 -12
  186. package/models/components/agentthoughtstreamingevent.d.ts.map +1 -1
  187. package/models/components/agentthoughtstreamingevent.js +17 -17
  188. package/models/components/agentthoughtstreamingevent.js.map +1 -1
  189. package/models/components/allprojects.d.ts +13 -0
  190. package/models/components/allprojects.d.ts.map +1 -0
  191. package/models/components/allprojects.js +54 -0
  192. package/models/components/allprojects.js.map +1 -0
  193. package/models/components/apikey.d.ts +108 -0
  194. package/models/components/apikey.d.ts.map +1 -0
  195. package/models/components/apikey.js +87 -0
  196. package/models/components/apikey.js.map +1 -0
  197. package/models/components/apikeyowner.d.ts +31 -0
  198. package/models/components/apikeyowner.d.ts.map +1 -0
  199. package/models/components/apikeyowner.js +71 -0
  200. package/models/components/apikeyowner.js.map +1 -0
  201. package/models/components/apikeystatus.d.ts +14 -0
  202. package/models/components/apikeystatus.d.ts.map +1 -0
  203. package/models/components/apikeystatus.js +51 -0
  204. package/models/components/apikeystatus.js.map +1 -0
  205. package/models/components/autorouterconfig.d.ts +25 -0
  206. package/models/components/autorouterconfig.d.ts.map +1 -0
  207. package/models/{operations/createidentity.js → components/autorouterconfig.js} +25 -36
  208. package/models/components/autorouterconfig.js.map +1 -0
  209. package/models/components/azurefoundrydeployment.d.ts +13 -0
  210. package/models/components/azurefoundrydeployment.d.ts.map +1 -0
  211. package/models/components/azurefoundrydeployment.js +58 -0
  212. package/models/components/azurefoundrydeployment.js.map +1 -0
  213. package/models/components/azurefoundrydeploymentmasterdata.d.ts +21 -0
  214. package/models/components/azurefoundrydeploymentmasterdata.d.ts.map +1 -0
  215. package/models/components/azurefoundrydeploymentmasterdata.js +70 -0
  216. package/models/components/azurefoundrydeploymentmasterdata.js.map +1 -0
  217. package/models/components/createapikeyrequest.d.ts +53 -0
  218. package/models/components/createapikeyrequest.d.ts.map +1 -0
  219. package/models/components/createapikeyrequest.js +64 -0
  220. package/models/components/createapikeyrequest.js.map +1 -0
  221. package/models/components/createapikeyresponse.d.ts +22 -0
  222. package/models/components/createapikeyresponse.d.ts.map +1 -0
  223. package/models/components/createapikeyresponse.js +57 -0
  224. package/models/components/createapikeyresponse.js.map +1 -0
  225. package/models/components/createfilerequest.d.ts +8 -2
  226. package/models/components/createfilerequest.d.ts.map +1 -1
  227. package/models/components/createfilerequest.js +4 -1
  228. package/models/components/createfilerequest.js.map +1 -1
  229. package/models/components/createidentityrequest.d.ts +28 -0
  230. package/models/components/createidentityrequest.d.ts.map +1 -0
  231. package/models/components/createidentityrequest.js +68 -0
  232. package/models/components/createidentityrequest.js.map +1 -0
  233. package/models/components/createidentityresponse.d.ts +11 -0
  234. package/models/components/createidentityresponse.d.ts.map +1 -0
  235. package/models/components/createidentityresponse.js +51 -0
  236. package/models/components/createidentityresponse.js.map +1 -0
  237. package/models/components/createmodelparameter.d.ts +28 -0
  238. package/models/components/createmodelparameter.d.ts.map +1 -0
  239. package/models/{errors/updateidentity.js → components/createmodelparameter.js} +18 -26
  240. package/models/components/createmodelparameter.js.map +1 -0
  241. package/models/components/createprojectrequest.d.ts +11 -0
  242. package/models/components/createprojectrequest.d.ts.map +1 -1
  243. package/models/components/createprojectrequest.js +1 -0
  244. package/models/components/createprojectrequest.js.map +1 -1
  245. package/models/components/createprojectresponse.d.ts +3 -0
  246. package/models/components/createprojectresponse.d.ts.map +1 -1
  247. package/models/components/createprojectresponse.js.map +1 -1
  248. package/models/components/createskillrequest.d.ts +18 -0
  249. package/models/components/createskillrequest.d.ts.map +1 -1
  250. package/models/components/createskillrequest.js.map +1 -1
  251. package/models/components/createskillresponse.d.ts +3 -0
  252. package/models/components/createskillresponse.d.ts.map +1 -1
  253. package/models/components/createskillresponse.js.map +1 -1
  254. package/models/components/datapoint.d.ts +40 -0
  255. package/models/components/datapoint.d.ts.map +1 -0
  256. package/models/components/datapoint.js +53 -0
  257. package/models/components/datapoint.js.map +1 -0
  258. package/models/components/deleteapikeyresponse.d.ts +8 -0
  259. package/models/components/deleteapikeyresponse.d.ts.map +1 -0
  260. package/models/components/deleteapikeyresponse.js +48 -0
  261. package/models/components/deleteapikeyresponse.js.map +1 -0
  262. package/models/components/deleteidentityresponse.d.ts +8 -0
  263. package/models/components/deleteidentityresponse.d.ts.map +1 -0
  264. package/models/components/deleteidentityresponse.js +48 -0
  265. package/models/components/deleteidentityresponse.js.map +1 -0
  266. package/models/components/detectrequest.d.ts +33 -0
  267. package/models/components/detectrequest.d.ts.map +1 -0
  268. package/models/components/detectrequest.js +57 -0
  269. package/models/components/detectrequest.js.map +1 -0
  270. package/models/components/detectresponse.d.ts +16 -0
  271. package/models/components/detectresponse.d.ts.map +1 -0
  272. package/models/components/detectresponse.js +56 -0
  273. package/models/components/detectresponse.js.map +1 -0
  274. package/models/components/domain.d.ts +46 -0
  275. package/models/components/domain.d.ts.map +1 -0
  276. package/models/components/domain.js +62 -0
  277. package/models/components/domain.js.map +1 -0
  278. package/models/components/evaluatorref.d.ts +6 -0
  279. package/models/components/evaluatorref.d.ts.map +1 -1
  280. package/models/components/evaluatorref.js +2 -0
  281. package/models/components/evaluatorref.js.map +1 -1
  282. package/models/components/file.d.ts +6 -2
  283. package/models/components/file.d.ts.map +1 -1
  284. package/models/components/file.js +4 -3
  285. package/models/components/file.js.map +1 -1
  286. package/models/components/filepurpose.d.ts +14 -0
  287. package/models/components/filepurpose.d.ts.map +1 -0
  288. package/models/components/filepurpose.js +52 -0
  289. package/models/components/filepurpose.js.map +1 -0
  290. package/models/components/filter.d.ts +99 -0
  291. package/models/components/filter.d.ts.map +1 -0
  292. package/models/components/filter.js +120 -0
  293. package/models/components/filter.js.map +1 -0
  294. package/models/components/getapikeyresponse.d.ts +14 -0
  295. package/models/components/getapikeyresponse.d.ts.map +1 -0
  296. package/models/components/getapikeyresponse.js +56 -0
  297. package/models/components/getapikeyresponse.js.map +1 -0
  298. package/models/components/getprojectresponse.d.ts +3 -0
  299. package/models/components/getprojectresponse.d.ts.map +1 -1
  300. package/models/components/getprojectresponse.js.map +1 -1
  301. package/models/components/getskillresponse.d.ts +3 -0
  302. package/models/components/getskillresponse.d.ts.map +1 -1
  303. package/models/components/getskillresponse.js.map +1 -1
  304. package/models/components/guardrailref.d.ts +6 -0
  305. package/models/components/guardrailref.d.ts.map +1 -1
  306. package/models/components/guardrailref.js +2 -0
  307. package/models/components/guardrailref.js.map +1 -1
  308. package/models/components/identity.d.ts +25 -0
  309. package/models/components/identity.d.ts.map +1 -0
  310. package/models/{operations/createcontact.js → components/identity.js} +22 -32
  311. package/models/components/identity.js.map +1 -0
  312. package/models/components/identitymetrics.d.ts +13 -0
  313. package/models/components/identitymetrics.d.ts.map +1 -0
  314. package/models/components/identitymetrics.js +61 -0
  315. package/models/components/identitymetrics.js.map +1 -0
  316. package/models/components/index.d.ts +64 -1
  317. package/models/components/index.d.ts.map +1 -1
  318. package/models/components/index.js +64 -1
  319. package/models/components/index.js.map +1 -1
  320. package/models/components/inputtokensdetails.d.ts +2 -0
  321. package/models/components/inputtokensdetails.d.ts.map +1 -1
  322. package/models/components/inputtokensdetails.js +4 -0
  323. package/models/components/inputtokensdetails.js.map +1 -1
  324. package/models/components/legacytokenfamily.d.ts +12 -0
  325. package/models/components/legacytokenfamily.d.ts.map +1 -0
  326. package/models/components/legacytokenfamily.js +49 -0
  327. package/models/components/legacytokenfamily.js.map +1 -0
  328. package/models/components/listapikeysresponse.d.ts +28 -0
  329. package/models/components/listapikeysresponse.d.ts.map +1 -0
  330. package/models/components/listapikeysresponse.js +58 -0
  331. package/models/components/listapikeysresponse.js.map +1 -0
  332. package/models/components/listcapabilitiesresponse.d.ts +17 -0
  333. package/models/components/listcapabilitiesresponse.d.ts.map +1 -0
  334. package/models/components/listcapabilitiesresponse.js +51 -0
  335. package/models/components/listcapabilitiesresponse.js.map +1 -0
  336. package/models/components/listidentitiesresponse.d.ts +13 -0
  337. package/models/components/listidentitiesresponse.d.ts.map +1 -0
  338. package/models/components/listidentitiesresponse.js +58 -0
  339. package/models/components/listidentitiesresponse.js.map +1 -0
  340. package/models/components/listprojectsresponse.d.ts +12 -0
  341. package/models/components/listprojectsresponse.d.ts.map +1 -1
  342. package/models/components/listprojectsresponse.js.map +1 -1
  343. package/models/components/listskillsresponse.d.ts +12 -0
  344. package/models/components/listskillsresponse.d.ts.map +1 -1
  345. package/models/components/listskillsresponse.js.map +1 -1
  346. package/models/components/litellmmodel.d.ts +18 -0
  347. package/models/components/litellmmodel.d.ts.map +1 -0
  348. package/models/components/litellmmodel.js +60 -0
  349. package/models/components/litellmmodel.js.map +1 -0
  350. package/models/components/litellmmodelinfo.d.ts +44 -0
  351. package/models/components/litellmmodelinfo.d.ts.map +1 -0
  352. package/models/components/litellmmodelinfo.js +83 -0
  353. package/models/components/litellmmodelinfo.js.map +1 -0
  354. package/models/components/litellmparams.d.ts +18 -0
  355. package/models/components/litellmparams.d.ts.map +1 -0
  356. package/models/components/litellmparams.js +59 -0
  357. package/models/components/litellmparams.js.map +1 -0
  358. package/models/components/modelconfigurationresponse.d.ts +27 -0
  359. package/models/components/modelconfigurationresponse.d.ts.map +1 -0
  360. package/models/components/modelconfigurationresponse.js +84 -0
  361. package/models/components/modelconfigurationresponse.js.map +1 -0
  362. package/models/components/modeldocument.d.ts +39 -0
  363. package/models/components/modeldocument.d.ts.map +1 -0
  364. package/models/components/modeldocument.js +99 -0
  365. package/models/components/modeldocument.js.map +1 -0
  366. package/models/components/modelmetadata.d.ts +237 -0
  367. package/models/components/modelmetadata.d.ts.map +1 -0
  368. package/models/components/modelmetadata.js +495 -0
  369. package/models/components/modelmetadata.js.map +1 -0
  370. package/models/components/modelparameterdocument.d.ts +20 -0
  371. package/models/components/modelparameterdocument.d.ts.map +1 -0
  372. package/models/components/modelparameterdocument.js +64 -0
  373. package/models/components/modelparameterdocument.js.map +1 -0
  374. package/models/components/ownertype.d.ts +11 -0
  375. package/models/components/ownertype.d.ts.map +1 -0
  376. package/models/components/ownertype.js +49 -0
  377. package/models/components/ownertype.js.map +1 -0
  378. package/models/components/permissionmode.d.ts +14 -0
  379. package/models/components/permissionmode.d.ts.map +1 -0
  380. package/models/components/permissionmode.js +51 -0
  381. package/models/components/permissionmode.js.map +1 -0
  382. package/models/components/price.d.ts +23 -0
  383. package/models/components/price.d.ts.map +1 -0
  384. package/models/components/price.js +65 -0
  385. package/models/components/price.js.map +1 -0
  386. package/models/components/pricing.d.ts +31 -0
  387. package/models/components/pricing.d.ts.map +1 -0
  388. package/models/components/pricing.js +85 -0
  389. package/models/components/pricing.js.map +1 -0
  390. package/models/components/pricingvariant.d.ts +30 -0
  391. package/models/components/pricingvariant.d.ts.map +1 -0
  392. package/models/components/pricingvariant.js +84 -0
  393. package/models/components/pricingvariant.js.map +1 -0
  394. package/models/components/project.d.ts +46 -1
  395. package/models/components/project.d.ts.map +1 -1
  396. package/models/components/project.js +1 -2
  397. package/models/components/project.js.map +1 -1
  398. package/models/components/projectscope.d.ts +28 -0
  399. package/models/components/projectscope.d.ts.map +1 -0
  400. package/models/components/projectscope.js +62 -0
  401. package/models/components/projectscope.js.map +1 -0
  402. package/models/components/publicmodelentry.d.ts +38 -0
  403. package/models/components/publicmodelentry.d.ts.map +1 -0
  404. package/models/{errors/deleteidentity.js → components/publicmodelentry.js} +23 -27
  405. package/models/components/publicmodelentry.js.map +1 -0
  406. package/models/components/queryreportrequest.d.ts +156 -0
  407. package/models/components/queryreportrequest.d.ts.map +1 -0
  408. package/models/components/queryreportrequest.js +166 -0
  409. package/models/components/queryreportrequest.js.map +1 -0
  410. package/models/components/queryreportresponse.d.ts +59 -0
  411. package/models/components/queryreportresponse.d.ts.map +1 -0
  412. package/models/components/queryreportresponse.js +72 -0
  413. package/models/components/queryreportresponse.js.map +1 -0
  414. package/models/components/reasoningpart.js +1 -1
  415. package/models/components/redactrequest.d.ts +16 -0
  416. package/models/components/redactrequest.d.ts.map +1 -0
  417. package/models/components/redactrequest.js +51 -0
  418. package/models/components/redactrequest.js.map +1 -0
  419. package/models/components/redactresponse.d.ts +16 -0
  420. package/models/components/redactresponse.d.ts.map +1 -0
  421. package/models/components/redactresponse.js +56 -0
  422. package/models/components/redactresponse.js.map +1 -0
  423. package/models/components/responsemeta.d.ts +63 -0
  424. package/models/components/responsemeta.d.ts.map +1 -0
  425. package/models/components/responsemeta.js +79 -0
  426. package/models/components/responsemeta.js.map +1 -0
  427. package/models/components/restorerequest.d.ts +21 -0
  428. package/models/components/restorerequest.d.ts.map +1 -0
  429. package/models/components/restorerequest.js +55 -0
  430. package/models/components/restorerequest.js.map +1 -0
  431. package/models/components/restoreresponse.d.ts +10 -0
  432. package/models/components/restoreresponse.d.ts.map +1 -0
  433. package/models/components/restoreresponse.js +55 -0
  434. package/models/components/restoreresponse.js.map +1 -0
  435. package/models/components/retrieveidentityresponse.d.ts +11 -0
  436. package/models/components/retrieveidentityresponse.d.ts.map +1 -0
  437. package/models/components/retrieveidentityresponse.js +51 -0
  438. package/models/components/retrieveidentityresponse.js.map +1 -0
  439. package/models/components/serviceaccountowner.d.ts +13 -0
  440. package/models/components/serviceaccountowner.d.ts.map +1 -0
  441. package/models/components/serviceaccountowner.js +54 -0
  442. package/models/components/serviceaccountowner.js.map +1 -0
  443. package/models/components/singleproject.d.ts +17 -0
  444. package/models/components/singleproject.d.ts.map +1 -0
  445. package/models/components/singleproject.js +67 -0
  446. package/models/components/singleproject.js.map +1 -0
  447. package/models/components/skill.d.ts +37 -1
  448. package/models/components/skill.d.ts.map +1 -1
  449. package/models/components/skill.js +0 -2
  450. package/models/components/skill.js.map +1 -1
  451. package/models/components/totals.d.ts +18 -0
  452. package/models/components/totals.d.ts.map +1 -0
  453. package/models/components/totals.js +51 -0
  454. package/models/components/totals.js.map +1 -0
  455. package/models/components/updateapikeyrequest.d.ts +61 -0
  456. package/models/components/updateapikeyrequest.d.ts.map +1 -0
  457. package/models/components/updateapikeyrequest.js +68 -0
  458. package/models/components/updateapikeyrequest.js.map +1 -0
  459. package/models/components/updateapikeyresponse.d.ts +14 -0
  460. package/models/components/updateapikeyresponse.d.ts.map +1 -0
  461. package/models/components/updateapikeyresponse.js +56 -0
  462. package/models/components/updateapikeyresponse.js.map +1 -0
  463. package/models/components/updateidentityrequest.d.ts +28 -0
  464. package/models/components/updateidentityrequest.d.ts.map +1 -0
  465. package/models/components/updateidentityrequest.js +67 -0
  466. package/models/components/updateidentityrequest.js.map +1 -0
  467. package/models/components/updateidentityresponse.d.ts +11 -0
  468. package/models/components/updateidentityresponse.d.ts.map +1 -0
  469. package/models/components/updateidentityresponse.js +51 -0
  470. package/models/components/updateidentityresponse.js.map +1 -0
  471. package/models/components/updatemodelparameter.d.ts +32 -0
  472. package/models/components/updatemodelparameter.d.ts.map +1 -0
  473. package/models/components/updatemodelparameter.js +63 -0
  474. package/models/components/updatemodelparameter.js.map +1 -0
  475. package/models/components/updateprojectrequest.d.ts +17 -0
  476. package/models/components/updateprojectrequest.d.ts.map +1 -1
  477. package/models/components/updateprojectrequest.js +1 -0
  478. package/models/components/updateprojectrequest.js.map +1 -1
  479. package/models/components/updateprojectresponse.d.ts +3 -0
  480. package/models/components/updateprojectresponse.d.ts.map +1 -1
  481. package/models/components/updateprojectresponse.js.map +1 -1
  482. package/models/components/updateskillrequest.d.ts +26 -0
  483. package/models/components/updateskillrequest.d.ts.map +1 -1
  484. package/models/components/updateskillrequest.js.map +1 -1
  485. package/models/components/updateskillresponse.d.ts +3 -0
  486. package/models/components/updateskillresponse.d.ts.map +1 -1
  487. package/models/components/updateskillresponse.js.map +1 -1
  488. package/models/components/userowner.d.ts +17 -0
  489. package/models/components/userowner.d.ts.map +1 -0
  490. package/models/components/userowner.js +67 -0
  491. package/models/components/userowner.js.map +1 -0
  492. package/models/components/vertexcapabilities.d.ts +16 -0
  493. package/models/components/vertexcapabilities.d.ts.map +1 -0
  494. package/models/components/vertexcapabilities.js +51 -0
  495. package/models/components/vertexcapabilities.js.map +1 -0
  496. package/models/components/vertexconfiguration.d.ts +23 -0
  497. package/models/components/vertexconfiguration.d.ts.map +1 -0
  498. package/models/components/vertexconfiguration.js +53 -0
  499. package/models/components/vertexconfiguration.js.map +1 -0
  500. package/models/components/vertexmodelconfiguration.d.ts +22 -0
  501. package/models/components/vertexmodelconfiguration.d.ts.map +1 -0
  502. package/models/components/vertexmodelconfiguration.js +55 -0
  503. package/models/components/vertexmodelconfiguration.js.map +1 -0
  504. package/models/components/vertexparameters.d.ts +18 -0
  505. package/models/components/vertexparameters.d.ts.map +1 -0
  506. package/models/components/vertexparameters.js +53 -0
  507. package/models/components/vertexparameters.js.map +1 -0
  508. package/models/components/vertexparamrange.d.ts +14 -0
  509. package/models/components/vertexparamrange.d.ts.map +1 -0
  510. package/models/components/vertexparamrange.js +50 -0
  511. package/models/components/vertexparamrange.js.map +1 -0
  512. package/models/components/vertexparamrangeint.d.ts +14 -0
  513. package/models/components/vertexparamrangeint.d.ts.map +1 -0
  514. package/models/components/vertexparamrangeint.js +50 -0
  515. package/models/components/vertexparamrangeint.js.map +1 -0
  516. package/models/errors/index.d.ts +0 -4
  517. package/models/errors/index.d.ts.map +1 -1
  518. package/models/errors/index.js +0 -4
  519. package/models/errors/index.js.map +1 -1
  520. package/models/operations/apikeydelete.d.ts +15 -0
  521. package/models/operations/apikeydelete.d.ts.map +1 -0
  522. package/models/operations/apikeydelete.js +54 -0
  523. package/models/operations/apikeydelete.js.map +1 -0
  524. package/models/operations/apikeyget.d.ts +15 -0
  525. package/models/operations/apikeyget.d.ts.map +1 -0
  526. package/models/operations/apikeyget.js +54 -0
  527. package/models/operations/apikeyget.js.map +1 -0
  528. package/models/operations/apikeylist.d.ts +72 -0
  529. package/models/operations/apikeylist.d.ts.map +1 -0
  530. package/models/operations/apikeylist.js +66 -0
  531. package/models/operations/apikeylist.js.map +1 -0
  532. package/models/operations/apikeyupdate.d.ts +18 -0
  533. package/models/operations/apikeyupdate.d.ts.map +1 -0
  534. package/models/operations/apikeyupdate.js +57 -0
  535. package/models/operations/apikeyupdate.js.map +1 -0
  536. package/models/operations/createagentrequest.d.ts +4 -44
  537. package/models/operations/createagentrequest.d.ts.map +1 -1
  538. package/models/operations/createagentrequest.js +7 -35
  539. package/models/operations/createagentrequest.js.map +1 -1
  540. package/models/operations/createagentresponserequest.d.ts.map +1 -1
  541. package/models/operations/createagentresponserequest.js +3 -1
  542. package/models/operations/createagentresponserequest.js.map +1 -1
  543. package/models/operations/createannotation.d.ts +4 -4
  544. package/models/operations/createannotation.d.ts.map +1 -1
  545. package/models/operations/createannotation.js +5 -5
  546. package/models/operations/createannotation.js.map +1 -1
  547. package/models/operations/createchatcompletion.d.ts.map +1 -1
  548. package/models/operations/createchatcompletion.js +3 -1
  549. package/models/operations/createchatcompletion.js.map +1 -1
  550. package/models/operations/createcompletion.d.ts.map +1 -1
  551. package/models/operations/createcompletion.js +3 -1
  552. package/models/operations/createcompletion.js.map +1 -1
  553. package/models/operations/createdataset.js +1 -1
  554. package/models/operations/createdatasetitem.js +4 -4
  555. package/models/operations/createdatasource.d.ts +5 -0
  556. package/models/operations/createdatasource.d.ts.map +1 -1
  557. package/models/operations/createdatasource.js +2 -1
  558. package/models/operations/createdatasource.js.map +1 -1
  559. package/models/operations/createeval.d.ts +187 -434
  560. package/models/operations/createeval.d.ts.map +1 -1
  561. package/models/operations/createeval.js +286 -497
  562. package/models/operations/createeval.js.map +1 -1
  563. package/models/operations/createrouterresponse.d.ts +5 -0
  564. package/models/operations/createrouterresponse.d.ts.map +1 -1
  565. package/models/operations/createrouterresponse.js +4 -1
  566. package/models/operations/createrouterresponse.js.map +1 -1
  567. package/models/operations/createtool.d.ts +10 -10
  568. package/models/operations/createtool.d.ts.map +1 -1
  569. package/models/operations/createtool.js +15 -15
  570. package/models/operations/createtool.js.map +1 -1
  571. package/models/operations/deleteidentity.d.ts +0 -3
  572. package/models/operations/deleteidentity.d.ts.map +1 -1
  573. package/models/operations/deleteidentity.js.map +1 -1
  574. package/models/operations/deploymentgetconfig.d.ts +440 -440
  575. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  576. package/models/operations/deploymentgetconfig.js +479 -484
  577. package/models/operations/deploymentgetconfig.js.map +1 -1
  578. package/models/operations/deploymentinvoke.d.ts +1567 -11
  579. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  580. package/models/operations/deploymentinvoke.js +1137 -12
  581. package/models/operations/deploymentinvoke.js.map +1 -1
  582. package/models/operations/deploymentstream.d.ts +56 -60
  583. package/models/operations/deploymentstream.d.ts.map +1 -1
  584. package/models/operations/deploymentstream.js +75 -74
  585. package/models/operations/deploymentstream.js.map +1 -1
  586. package/models/operations/filelist.d.ts +2 -0
  587. package/models/operations/filelist.d.ts.map +1 -1
  588. package/models/operations/filelist.js +2 -0
  589. package/models/operations/filelist.js.map +1 -1
  590. package/models/operations/getalltools.js +6 -6
  591. package/models/operations/getevals.d.ts +2 -0
  592. package/models/operations/getevals.d.ts.map +1 -1
  593. package/models/operations/getevals.js +44 -40
  594. package/models/operations/getevals.js.map +1 -1
  595. package/models/operations/getv2humanevalsets.js +2 -2
  596. package/models/operations/getv2humanevalsetsid.js +2 -2
  597. package/models/operations/index.d.ts +20 -5
  598. package/models/operations/index.d.ts.map +1 -1
  599. package/models/operations/index.js +20 -5
  600. package/models/operations/index.js.map +1 -1
  601. package/models/operations/invokeeval.d.ts +28 -28
  602. package/models/operations/invokeeval.d.ts.map +1 -1
  603. package/models/operations/invokeeval.js +40 -40
  604. package/models/operations/invokeeval.js.map +1 -1
  605. package/models/operations/listagents.d.ts +3 -44
  606. package/models/operations/listagents.d.ts.map +1 -1
  607. package/models/operations/listagents.js +2 -30
  608. package/models/operations/listagents.js.map +1 -1
  609. package/models/operations/listdatasetdatapoints.js +4 -4
  610. package/models/operations/listdatasets.js +1 -1
  611. package/models/operations/listdatasources.js +1 -1
  612. package/models/operations/listidentities.d.ts +5 -121
  613. package/models/operations/listidentities.d.ts.map +1 -1
  614. package/models/operations/listidentities.js +5 -76
  615. package/models/operations/listidentities.js.map +1 -1
  616. package/models/operations/listmodels.d.ts +34 -0
  617. package/models/operations/listmodels.d.ts.map +1 -0
  618. package/models/operations/{remoteconfigsgetconfig.js → listmodels.js} +12 -27
  619. package/models/operations/listmodels.js.map +1 -0
  620. package/models/operations/modelazurefoundrydeployments.d.ts +31 -0
  621. package/models/operations/modelazurefoundrydeployments.d.ts.map +1 -0
  622. package/models/operations/modelazurefoundrydeployments.js +70 -0
  623. package/models/operations/modelazurefoundrydeployments.js.map +1 -0
  624. package/models/operations/modelcreate.d.ts +78 -0
  625. package/models/operations/modelcreate.d.ts.map +1 -0
  626. package/models/operations/modelcreate.js +128 -0
  627. package/models/operations/modelcreate.js.map +1 -0
  628. package/models/operations/modelcreateautorouter.d.ts +56 -0
  629. package/models/operations/modelcreateautorouter.d.ts.map +1 -0
  630. package/models/operations/modelcreateautorouter.js +113 -0
  631. package/models/operations/modelcreateautorouter.js.map +1 -0
  632. package/models/operations/modelcreateawsbedrock.d.ts +90 -0
  633. package/models/operations/modelcreateawsbedrock.d.ts.map +1 -0
  634. package/models/operations/modelcreateawsbedrock.js +146 -0
  635. package/models/operations/modelcreateawsbedrock.js.map +1 -0
  636. package/models/operations/modelcreateopenailike.d.ts +82 -0
  637. package/models/operations/modelcreateopenailike.d.ts.map +1 -0
  638. package/models/operations/modelcreateopenailike.js +138 -0
  639. package/models/operations/modelcreateopenailike.js.map +1 -0
  640. package/models/operations/modelcreatevertex.d.ts +52 -0
  641. package/models/operations/modelcreatevertex.d.ts.map +1 -0
  642. package/models/operations/modelcreatevertex.js +110 -0
  643. package/models/operations/modelcreatevertex.js.map +1 -0
  644. package/models/operations/modeldelete.d.ts +15 -0
  645. package/models/operations/modeldelete.d.ts.map +1 -0
  646. package/models/operations/modeldelete.js +49 -0
  647. package/models/operations/modeldelete.js.map +1 -0
  648. package/models/operations/modeldisable.d.ts +15 -0
  649. package/models/operations/modeldisable.d.ts.map +1 -0
  650. package/models/operations/modeldisable.js +54 -0
  651. package/models/operations/modeldisable.js.map +1 -0
  652. package/models/operations/modelenable.d.ts +12 -0
  653. package/models/operations/modelenable.d.ts.map +1 -0
  654. package/models/operations/modelenable.js +54 -0
  655. package/models/operations/modelenable.js.map +1 -0
  656. package/models/operations/modelupdate.d.ts +77 -0
  657. package/models/operations/modelupdate.d.ts.map +1 -0
  658. package/models/operations/modelupdate.js +133 -0
  659. package/models/operations/modelupdate.js.map +1 -0
  660. package/models/operations/modelupdateautorouter.d.ts +71 -0
  661. package/models/operations/modelupdateautorouter.d.ts.map +1 -0
  662. package/models/operations/modelupdateautorouter.js +126 -0
  663. package/models/operations/modelupdateautorouter.js.map +1 -0
  664. package/models/operations/modelupdateawsbedrock.d.ts +101 -0
  665. package/models/operations/modelupdateawsbedrock.d.ts.map +1 -0
  666. package/models/operations/modelupdateawsbedrock.js +155 -0
  667. package/models/operations/modelupdateawsbedrock.js.map +1 -0
  668. package/models/operations/modelupdateopenailike.d.ts +95 -0
  669. package/models/operations/modelupdateopenailike.d.ts.map +1 -0
  670. package/models/operations/modelupdateopenailike.js +149 -0
  671. package/models/operations/modelupdateopenailike.js.map +1 -0
  672. package/models/operations/modelvalidate.d.ts +24 -0
  673. package/models/operations/modelvalidate.d.ts.map +1 -0
  674. package/models/operations/modelvalidate.js +63 -0
  675. package/models/operations/modelvalidate.js.map +1 -0
  676. package/models/operations/modelvalidateawsbedrock.d.ts +22 -0
  677. package/models/operations/modelvalidateawsbedrock.d.ts.map +1 -0
  678. package/models/operations/modelvalidateawsbedrock.js +63 -0
  679. package/models/operations/modelvalidateawsbedrock.js.map +1 -0
  680. package/models/operations/patchv2humanevalsetsid.js +2 -2
  681. package/models/operations/postv2feedback.d.ts +15 -15
  682. package/models/operations/postv2feedback.d.ts.map +1 -1
  683. package/models/operations/postv2feedback.js +15 -16
  684. package/models/operations/postv2feedback.js.map +1 -1
  685. package/models/operations/postv2feedbackevaluation.js +3 -3
  686. package/models/operations/postv2feedbackremove.d.ts +8 -8
  687. package/models/operations/postv2feedbackremove.d.ts.map +1 -1
  688. package/models/operations/postv2feedbackremove.js +8 -7
  689. package/models/operations/postv2feedbackremove.js.map +1 -1
  690. package/models/operations/postv2humanevalsets.js +2 -2
  691. package/models/operations/projectdelete.d.ts +3 -0
  692. package/models/operations/projectdelete.d.ts.map +1 -1
  693. package/models/operations/projectdelete.js.map +1 -1
  694. package/models/operations/projectget.d.ts +3 -0
  695. package/models/operations/projectget.d.ts.map +1 -1
  696. package/models/operations/projectget.js.map +1 -1
  697. package/models/operations/projectlist.d.ts +15 -0
  698. package/models/operations/projectlist.d.ts.map +1 -1
  699. package/models/operations/projectlist.js.map +1 -1
  700. package/models/operations/projectupdate.d.ts +3 -0
  701. package/models/operations/projectupdate.d.ts.map +1 -1
  702. package/models/operations/projectupdate.js.map +1 -1
  703. package/models/operations/retrieveagentrequest.d.ts +0 -40
  704. package/models/operations/retrieveagentrequest.d.ts.map +1 -1
  705. package/models/operations/retrieveagentrequest.js +1 -31
  706. package/models/operations/retrieveagentrequest.js.map +1 -1
  707. package/models/operations/retrievedatapoint.js +4 -4
  708. package/models/operations/retrievedataset.js +1 -1
  709. package/models/operations/retrievedatasource.js +1 -1
  710. package/models/operations/retrieveidentity.d.ts +2 -78
  711. package/models/operations/retrieveidentity.d.ts.map +1 -1
  712. package/models/operations/retrieveidentity.js +2 -46
  713. package/models/operations/retrieveidentity.js.map +1 -1
  714. package/models/operations/retrievetool.js +6 -6
  715. package/models/operations/runagent.d.ts +10 -10
  716. package/models/operations/runagent.d.ts.map +1 -1
  717. package/models/operations/runagent.js +12 -11
  718. package/models/operations/runagent.js.map +1 -1
  719. package/models/operations/skilldelete.d.ts +3 -0
  720. package/models/operations/skilldelete.d.ts.map +1 -1
  721. package/models/operations/skilldelete.js.map +1 -1
  722. package/models/operations/skilllist.d.ts +12 -0
  723. package/models/operations/skilllist.d.ts.map +1 -1
  724. package/models/operations/skilllist.js.map +1 -1
  725. package/models/operations/skillupdate.d.ts +3 -0
  726. package/models/operations/skillupdate.d.ts.map +1 -1
  727. package/models/operations/skillupdate.js.map +1 -1
  728. package/models/operations/streamagent.d.ts.map +1 -1
  729. package/models/operations/streamagent.js +3 -1
  730. package/models/operations/streamagent.js.map +1 -1
  731. package/models/operations/streamrunagent.d.ts.map +1 -1
  732. package/models/operations/streamrunagent.js +4 -2
  733. package/models/operations/streamrunagent.js.map +1 -1
  734. package/models/operations/updateagent.d.ts +0 -90
  735. package/models/operations/updateagent.d.ts.map +1 -1
  736. package/models/operations/updateagent.js +2 -55
  737. package/models/operations/updateagent.js.map +1 -1
  738. package/models/operations/updatedatapoint.js +4 -4
  739. package/models/operations/updatedataset.js +1 -1
  740. package/models/operations/updatedatasource.js +1 -1
  741. package/models/operations/updateeval.d.ts +20 -18
  742. package/models/operations/updateeval.d.ts.map +1 -1
  743. package/models/operations/updateeval.js +64 -61
  744. package/models/operations/updateeval.js.map +1 -1
  745. package/models/operations/updateidentity.d.ts +3 -96
  746. package/models/operations/updateidentity.d.ts.map +1 -1
  747. package/models/operations/updateidentity.js +4 -46
  748. package/models/operations/updateidentity.js.map +1 -1
  749. package/models/operations/updatetool.js +7 -7
  750. package/package.json +3 -3
  751. package/sdk/agents.d.ts +7 -14
  752. package/sdk/agents.d.ts.map +1 -1
  753. package/sdk/agents.js +9 -19
  754. package/sdk/agents.js.map +1 -1
  755. package/sdk/annotations.d.ts +6 -0
  756. package/sdk/annotations.d.ts.map +1 -1
  757. package/sdk/annotations.js +6 -0
  758. package/sdk/annotations.js.map +1 -1
  759. package/sdk/apikeys.d.ts +48 -0
  760. package/sdk/apikeys.d.ts.map +1 -0
  761. package/sdk/apikeys.js +72 -0
  762. package/sdk/apikeys.js.map +1 -0
  763. package/sdk/deployments.d.ts +1 -5
  764. package/sdk/deployments.d.ts.map +1 -1
  765. package/sdk/deployments.js +0 -4
  766. package/sdk/deployments.js.map +1 -1
  767. package/sdk/feedback.d.ts +1 -1
  768. package/sdk/feedback.d.ts.map +1 -1
  769. package/sdk/feedback.js +3 -3
  770. package/sdk/feedback.js.map +1 -1
  771. package/sdk/identities.d.ts +11 -10
  772. package/sdk/identities.d.ts.map +1 -1
  773. package/sdk/identities.js +9 -9
  774. package/sdk/identities.js.map +1 -1
  775. package/sdk/knowledge.d.ts +3 -0
  776. package/sdk/knowledge.d.ts.map +1 -1
  777. package/sdk/knowledge.js +3 -0
  778. package/sdk/knowledge.js.map +1 -1
  779. package/sdk/models.d.ts +134 -0
  780. package/sdk/models.d.ts.map +1 -0
  781. package/sdk/models.js +192 -0
  782. package/sdk/models.js.map +1 -0
  783. package/sdk/pii.d.ts +26 -0
  784. package/sdk/pii.d.ts.map +1 -0
  785. package/sdk/pii.js +42 -0
  786. package/sdk/pii.js.map +1 -0
  787. package/sdk/projects.d.ts +5 -2
  788. package/sdk/projects.d.ts.map +1 -1
  789. package/sdk/projects.js +5 -2
  790. package/sdk/projects.js.map +1 -1
  791. package/sdk/reporting.d.ts +12 -0
  792. package/sdk/reporting.d.ts.map +1 -0
  793. package/sdk/reporting.js +22 -0
  794. package/sdk/reporting.js.map +1 -0
  795. package/sdk/sdk.d.ts +16 -10
  796. package/sdk/sdk.d.ts.map +1 -1
  797. package/sdk/sdk.js +22 -14
  798. package/sdk/sdk.js.map +1 -1
  799. package/sdk/skills.d.ts +7 -4
  800. package/sdk/skills.d.ts.map +1 -1
  801. package/sdk/skills.js +7 -4
  802. package/sdk/skills.js.map +1 -1
  803. package/src/funcs/annotationsCreate.ts +3 -0
  804. package/src/funcs/annotationsDelete.ts +3 -0
  805. package/src/funcs/apiKeysCreate.ts +162 -0
  806. package/src/funcs/apiKeysDelete.ts +168 -0
  807. package/src/funcs/apiKeysGet.ts +168 -0
  808. package/src/funcs/apiKeysList.ts +175 -0
  809. package/src/funcs/apiKeysListCapabilities.ts +144 -0
  810. package/src/funcs/apiKeysUpdate.ts +171 -0
  811. package/src/funcs/deploymentsInvoke.ts +5 -13
  812. package/src/funcs/deploymentsStream.ts +1 -9
  813. package/src/funcs/filesList.ts +1 -0
  814. package/src/funcs/identitiesCreate.ts +10 -15
  815. package/src/funcs/identitiesDelete.ts +7 -16
  816. package/src/funcs/identitiesList.ts +6 -5
  817. package/src/funcs/identitiesRetrieve.ts +6 -18
  818. package/src/funcs/identitiesUpdate.ts +9 -15
  819. package/src/funcs/knowledgeGetChunksCount.ts +3 -0
  820. package/src/funcs/{agentsPostV2AgentsA2a.ts → modelsAzureFoundryDeployments.ts} +18 -30
  821. package/src/funcs/modelsCreate.ts +162 -0
  822. package/src/funcs/modelsCreateAutorouter.ts +163 -0
  823. package/src/funcs/modelsCreateAwsBedrock.ts +163 -0
  824. package/src/funcs/modelsCreateOpenaiLike.ts +163 -0
  825. package/src/funcs/modelsCreateVertex.ts +163 -0
  826. package/src/funcs/modelsDelete.ts +168 -0
  827. package/src/funcs/modelsDisable.ts +168 -0
  828. package/src/funcs/modelsEnable.ts +163 -0
  829. package/src/funcs/{remoteconfigsRetrieve.ts → modelsImportLitellm.ts} +18 -15
  830. package/src/funcs/modelsList.ts +144 -0
  831. package/src/funcs/modelsListLitellm.ts +144 -0
  832. package/src/funcs/{deploymentsMetricsCreate.ts → modelsUpdate.ts} +14 -17
  833. package/src/funcs/modelsUpdateAutorouter.ts +169 -0
  834. package/src/funcs/modelsUpdateAwsBedrock.ts +169 -0
  835. package/src/funcs/modelsUpdateOpenaiLike.ts +169 -0
  836. package/src/funcs/modelsValidate.ts +163 -0
  837. package/src/funcs/modelsValidateAwsBedrock.ts +164 -0
  838. package/src/funcs/{contactsCreate.ts → piiDetect.ts} +13 -13
  839. package/src/funcs/piiRedact.ts +162 -0
  840. package/src/funcs/piiRestore.ts +162 -0
  841. package/src/funcs/projectsCreate.ts +1 -1
  842. package/src/funcs/projectsDelete.ts +3 -0
  843. package/src/funcs/projectsList.ts +1 -1
  844. package/src/funcs/reportingQuery.ts +162 -0
  845. package/src/funcs/skillsCreate.ts +1 -1
  846. package/src/funcs/skillsDelete.ts +3 -0
  847. package/src/funcs/skillsGet.ts +1 -1
  848. package/src/funcs/skillsList.ts +1 -1
  849. package/src/funcs/skillsUpdate.ts +1 -1
  850. package/src/lib/config.ts +3 -13
  851. package/src/lib/env.ts +0 -32
  852. package/src/lib/sdks.ts +2 -2
  853. package/src/models/components/agentthoughtstreamingevent.ts +43 -55
  854. package/src/models/components/allprojects.ts +39 -0
  855. package/src/models/components/apikey.ts +169 -0
  856. package/src/models/components/apikeyowner.ts +82 -0
  857. package/src/models/components/apikeystatus.ts +21 -0
  858. package/src/models/components/autorouterconfig.ts +78 -0
  859. package/src/models/components/azurefoundrydeployment.ts +44 -0
  860. package/src/models/components/azurefoundrydeploymentmasterdata.ts +60 -0
  861. package/src/models/components/createapikeyrequest.ts +91 -0
  862. package/src/models/components/createapikeyresponse.ts +49 -0
  863. package/src/models/components/createfilerequest.ts +11 -3
  864. package/src/models/components/createidentityrequest.ts +76 -0
  865. package/src/models/components/createidentityresponse.ts +32 -0
  866. package/src/models/components/createmodelparameter.ts +54 -0
  867. package/src/models/components/createprojectrequest.ts +12 -0
  868. package/src/models/components/createprojectresponse.ts +3 -0
  869. package/src/models/components/createskillrequest.ts +18 -0
  870. package/src/models/components/createskillresponse.ts +3 -0
  871. package/src/models/components/datapoint.ts +60 -0
  872. package/src/models/components/deleteapikeyresponse.ts +27 -0
  873. package/src/models/components/deleteidentityresponse.ts +27 -0
  874. package/src/models/components/detectrequest.ts +56 -0
  875. package/src/models/components/detectresponse.ts +41 -0
  876. package/src/models/components/domain.ts +75 -0
  877. package/src/models/components/evaluatorref.ts +4 -0
  878. package/src/models/components/file.ts +9 -5
  879. package/src/models/components/filepurpose.ts +21 -0
  880. package/src/models/components/filter.ts +137 -0
  881. package/src/models/components/getapikeyresponse.ts +40 -0
  882. package/src/models/components/getprojectresponse.ts +3 -0
  883. package/src/models/components/getskillresponse.ts +3 -0
  884. package/src/models/components/guardrailref.ts +4 -0
  885. package/src/models/components/identity.ts +83 -0
  886. package/src/models/components/identitymetrics.ts +45 -0
  887. package/src/models/components/index.ts +64 -1
  888. package/src/models/components/inputtokensdetails.ts +6 -0
  889. package/src/models/components/legacytokenfamily.ts +19 -0
  890. package/src/models/components/listapikeysresponse.ts +56 -0
  891. package/src/models/components/listcapabilitiesresponse.ts +38 -0
  892. package/src/models/components/listidentitiesresponse.ts +41 -0
  893. package/src/models/components/listprojectsresponse.ts +12 -0
  894. package/src/models/components/listskillsresponse.ts +12 -0
  895. package/src/models/components/litellmmodel.ts +50 -0
  896. package/src/models/components/litellmmodelinfo.ts +97 -0
  897. package/src/models/components/litellmparams.ts +43 -0
  898. package/src/models/components/modelconfigurationresponse.ts +82 -0
  899. package/src/models/components/modeldocument.ts +112 -0
  900. package/src/models/components/modelmetadata.ts +720 -0
  901. package/src/models/components/modelparameterdocument.ts +53 -0
  902. package/src/models/components/ownertype.ts +17 -0
  903. package/src/models/components/permissionmode.ts +23 -0
  904. package/src/models/components/price.ts +56 -0
  905. package/src/models/components/pricing.ts +93 -0
  906. package/src/models/components/pricingvariant.ts +90 -0
  907. package/src/models/components/project.ts +47 -3
  908. package/src/models/components/projectscope.ts +70 -0
  909. package/src/models/components/publicmodelentry.ts +70 -0
  910. package/src/models/components/queryreportrequest.ts +237 -0
  911. package/src/models/components/queryreportresponse.ts +99 -0
  912. package/src/models/components/reasoningpart.ts +1 -1
  913. package/src/models/components/redactrequest.ts +33 -0
  914. package/src/models/components/redactresponse.ts +41 -0
  915. package/src/models/components/responsemeta.ts +103 -0
  916. package/src/models/components/restorerequest.ts +38 -0
  917. package/src/models/components/restoreresponse.ts +36 -0
  918. package/src/models/components/retrieveidentityresponse.ts +32 -0
  919. package/src/models/components/serviceaccountowner.ts +43 -0
  920. package/src/models/components/singleproject.ts +56 -0
  921. package/src/models/components/skill.ts +37 -3
  922. package/src/models/components/totals.ts +34 -0
  923. package/src/models/components/updateapikeyrequest.ts +99 -0
  924. package/src/models/components/updateapikeyresponse.ts +40 -0
  925. package/src/models/components/updateidentityrequest.ts +75 -0
  926. package/src/models/components/updateidentityresponse.ts +32 -0
  927. package/src/models/components/updatemodelparameter.ts +61 -0
  928. package/src/models/components/updateprojectrequest.ts +18 -0
  929. package/src/models/components/updateprojectresponse.ts +3 -0
  930. package/src/models/components/updateskillrequest.ts +26 -0
  931. package/src/models/components/updateskillresponse.ts +3 -0
  932. package/src/models/components/userowner.ts +56 -0
  933. package/src/models/components/vertexcapabilities.ts +37 -0
  934. package/src/models/components/vertexconfiguration.ts +45 -0
  935. package/src/models/components/vertexmodelconfiguration.ts +53 -0
  936. package/src/models/components/vertexparameters.ts +47 -0
  937. package/src/models/components/vertexparamrange.ts +34 -0
  938. package/src/models/components/vertexparamrangeint.ts +34 -0
  939. package/src/models/errors/index.ts +0 -4
  940. package/src/models/operations/apikeydelete.ts +39 -0
  941. package/src/models/operations/apikeyget.ts +39 -0
  942. package/src/models/operations/apikeylist.ts +107 -0
  943. package/src/models/operations/apikeyupdate.ts +44 -0
  944. package/src/models/operations/createagentrequest.ts +14 -101
  945. package/src/models/operations/createagentresponserequest.ts +2 -1
  946. package/src/models/operations/createannotation.ts +7 -11
  947. package/src/models/operations/createchatcompletion.ts +2 -1
  948. package/src/models/operations/createcompletion.ts +2 -1
  949. package/src/models/operations/createdataset.ts +1 -1
  950. package/src/models/operations/createdatasetitem.ts +4 -4
  951. package/src/models/operations/createdatasource.ts +7 -1
  952. package/src/models/operations/createeval.ts +716 -1330
  953. package/src/models/operations/createrouterresponse.ts +8 -1
  954. package/src/models/operations/createtool.ts +24 -28
  955. package/src/models/operations/deleteidentity.ts +0 -3
  956. package/src/models/operations/deploymentgetconfig.ts +1606 -1156
  957. package/src/models/operations/deploymentinvoke.ts +3761 -320
  958. package/src/models/operations/deploymentstream.ts +287 -250
  959. package/src/models/operations/filelist.ts +4 -0
  960. package/src/models/operations/getalltools.ts +6 -6
  961. package/src/models/operations/getevals.ts +46 -40
  962. package/src/models/operations/getv2humanevalsets.ts +2 -2
  963. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  964. package/src/models/operations/index.ts +20 -5
  965. package/src/models/operations/invokeeval.ts +83 -80
  966. package/src/models/operations/listagents.ts +3 -87
  967. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  968. package/src/models/operations/listdatasets.ts +1 -1
  969. package/src/models/operations/listdatasources.ts +1 -1
  970. package/src/models/operations/listidentities.ts +9 -230
  971. package/src/models/operations/listmodels.ts +60 -0
  972. package/src/models/operations/modelazurefoundrydeployments.ts +90 -0
  973. package/src/models/operations/modelcreate.ts +184 -0
  974. package/src/models/operations/modelcreateautorouter.ts +151 -0
  975. package/src/models/operations/modelcreateawsbedrock.ts +218 -0
  976. package/src/models/operations/modelcreateopenailike.ts +202 -0
  977. package/src/models/operations/modelcreatevertex.ts +144 -0
  978. package/src/models/operations/modeldelete.ts +34 -0
  979. package/src/models/operations/modeldisable.ts +39 -0
  980. package/src/models/operations/modelenable.ts +36 -0
  981. package/src/models/operations/modelupdate.ts +198 -0
  982. package/src/models/operations/modelupdateautorouter.ts +189 -0
  983. package/src/models/operations/modelupdateawsbedrock.ts +248 -0
  984. package/src/models/operations/modelupdateopenailike.ts +236 -0
  985. package/src/models/operations/modelvalidate.ts +57 -0
  986. package/src/models/operations/modelvalidateawsbedrock.ts +57 -0
  987. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  988. package/src/models/operations/postv2feedback.ts +34 -27
  989. package/src/models/operations/postv2feedbackevaluation.ts +3 -3
  990. package/src/models/operations/postv2feedbackremove.ts +14 -17
  991. package/src/models/operations/postv2humanevalsets.ts +2 -2
  992. package/src/models/operations/projectdelete.ts +3 -0
  993. package/src/models/operations/projectget.ts +3 -0
  994. package/src/models/operations/projectlist.ts +15 -0
  995. package/src/models/operations/projectupdate.ts +3 -0
  996. package/src/models/operations/retrieveagentrequest.ts +0 -91
  997. package/src/models/operations/retrievedatapoint.ts +4 -4
  998. package/src/models/operations/retrievedataset.ts +1 -1
  999. package/src/models/operations/retrievedatasource.ts +1 -1
  1000. package/src/models/operations/retrieveidentity.ts +3 -138
  1001. package/src/models/operations/retrievetool.ts +6 -6
  1002. package/src/models/operations/runagent.ts +20 -29
  1003. package/src/models/operations/skilldelete.ts +3 -0
  1004. package/src/models/operations/skilllist.ts +12 -0
  1005. package/src/models/operations/skillupdate.ts +3 -0
  1006. package/src/models/operations/streamagent.ts +2 -1
  1007. package/src/models/operations/streamrunagent.ts +3 -2
  1008. package/src/models/operations/updateagent.ts +0 -171
  1009. package/src/models/operations/updatedatapoint.ts +4 -4
  1010. package/src/models/operations/updatedataset.ts +1 -1
  1011. package/src/models/operations/updatedatasource.ts +1 -1
  1012. package/src/models/operations/updateeval.ts +85 -80
  1013. package/src/models/operations/updateidentity.ts +5 -154
  1014. package/src/models/operations/updatetool.ts +7 -7
  1015. package/src/sdk/agents.ts +17 -35
  1016. package/src/sdk/annotations.ts +6 -0
  1017. package/src/sdk/apikeys.ts +116 -0
  1018. package/src/sdk/deployments.ts +1 -8
  1019. package/src/sdk/feedback.ts +8 -8
  1020. package/src/sdk/identities.ts +18 -17
  1021. package/src/sdk/knowledge.ts +3 -0
  1022. package/src/sdk/models.ts +330 -0
  1023. package/src/sdk/pii.ts +63 -0
  1024. package/src/sdk/projects.ts +5 -2
  1025. package/src/sdk/reporting.ts +27 -0
  1026. package/src/sdk/sdk.ts +34 -22
  1027. package/src/sdk/skills.ts +7 -4
  1028. package/src/types/async.ts +8 -7
  1029. package/types/async.d.ts.map +1 -1
  1030. package/types/async.js +8 -7
  1031. package/types/async.js.map +1 -1
  1032. package/funcs/agentsPostV2AgentsA2a.d.ts.map +0 -1
  1033. package/funcs/agentsPostV2AgentsA2a.js.map +0 -1
  1034. package/funcs/contactsCreate.js.map +0 -1
  1035. package/funcs/deploymentsMetricsCreate.d.ts.map +0 -1
  1036. package/funcs/deploymentsMetricsCreate.js.map +0 -1
  1037. package/funcs/remoteconfigsRetrieve.d.ts.map +0 -1
  1038. package/funcs/remoteconfigsRetrieve.js.map +0 -1
  1039. package/models/components/invokedeploymentrequest.d.ts +0 -1573
  1040. package/models/components/invokedeploymentrequest.d.ts.map +0 -1
  1041. package/models/components/invokedeploymentrequest.js +0 -1136
  1042. package/models/components/invokedeploymentrequest.js.map +0 -1
  1043. package/models/errors/deleteidentity.d.ts +0 -30
  1044. package/models/errors/deleteidentity.d.ts.map +0 -1
  1045. package/models/errors/deleteidentity.js.map +0 -1
  1046. package/models/errors/postv2agentsa2a.d.ts +0 -43
  1047. package/models/errors/postv2agentsa2a.d.ts.map +0 -1
  1048. package/models/errors/postv2agentsa2a.js +0 -94
  1049. package/models/errors/postv2agentsa2a.js.map +0 -1
  1050. package/models/errors/retrieveidentity.d.ts +0 -57
  1051. package/models/errors/retrieveidentity.d.ts.map +0 -1
  1052. package/models/errors/retrieveidentity.js +0 -100
  1053. package/models/errors/retrieveidentity.js.map +0 -1
  1054. package/models/errors/updateidentity.d.ts +0 -26
  1055. package/models/errors/updateidentity.d.ts.map +0 -1
  1056. package/models/errors/updateidentity.js.map +0 -1
  1057. package/models/operations/createcontact.d.ts +0 -95
  1058. package/models/operations/createcontact.d.ts.map +0 -1
  1059. package/models/operations/createcontact.js.map +0 -1
  1060. package/models/operations/createidentity.d.ts +0 -99
  1061. package/models/operations/createidentity.d.ts.map +0 -1
  1062. package/models/operations/createidentity.js.map +0 -1
  1063. package/models/operations/deploymentcreatemetric.d.ts +0 -1032
  1064. package/models/operations/deploymentcreatemetric.d.ts.map +0 -1
  1065. package/models/operations/deploymentcreatemetric.js +0 -749
  1066. package/models/operations/deploymentcreatemetric.js.map +0 -1
  1067. package/models/operations/postv2agentsa2a.d.ts +0 -118
  1068. package/models/operations/postv2agentsa2a.d.ts.map +0 -1
  1069. package/models/operations/postv2agentsa2a.js +0 -145
  1070. package/models/operations/postv2agentsa2a.js.map +0 -1
  1071. package/models/operations/remoteconfigsgetconfig.d.ts +0 -67
  1072. package/models/operations/remoteconfigsgetconfig.d.ts.map +0 -1
  1073. package/models/operations/remoteconfigsgetconfig.js.map +0 -1
  1074. package/sdk/contacts.d.ts +0 -12
  1075. package/sdk/contacts.d.ts.map +0 -1
  1076. package/sdk/contacts.js +0 -22
  1077. package/sdk/contacts.js.map +0 -1
  1078. package/sdk/metrics.d.ts +0 -14
  1079. package/sdk/metrics.d.ts.map +0 -1
  1080. package/sdk/metrics.js +0 -24
  1081. package/sdk/metrics.js.map +0 -1
  1082. package/sdk/remoteconfigs.d.ts +0 -9
  1083. package/sdk/remoteconfigs.d.ts.map +0 -1
  1084. package/sdk/remoteconfigs.js +0 -19
  1085. package/sdk/remoteconfigs.js.map +0 -1
  1086. package/src/models/components/invokedeploymentrequest.ts +0 -3450
  1087. package/src/models/errors/deleteidentity.ts +0 -62
  1088. package/src/models/errors/postv2agentsa2a.ts +0 -96
  1089. package/src/models/errors/retrieveidentity.ts +0 -118
  1090. package/src/models/errors/updateidentity.ts +0 -54
  1091. package/src/models/operations/createcontact.ts +0 -156
  1092. package/src/models/operations/createidentity.ts +0 -162
  1093. package/src/models/operations/deploymentcreatemetric.ts +0 -2370
  1094. package/src/models/operations/postv2agentsa2a.ts +0 -252
  1095. package/src/models/operations/remoteconfigsgetconfig.ts +0 -108
  1096. package/src/sdk/contacts.ts +0 -27
  1097. package/src/sdk/metrics.ts +0 -29
  1098. package/src/sdk/remoteconfigs.ts +0 -24
@@ -7,339 +7,3787 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import * as components from "../components/index.js";
10
11
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
12
 
12
- export type DeploymentInvokeGlobals = {
13
- environment?: string | undefined;
14
- contactId?: string | undefined;
13
+ export type DeploymentInvokeContentDeployments2 =
14
+ components.TextContentPartSchema;
15
+
16
+ /**
17
+ * The contents of the tool message.
18
+ */
19
+ export type DeploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContent =
20
+ | string
21
+ | Array<components.TextContentPartSchema>;
22
+
23
+ /**
24
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
25
+ */
26
+ export const DeploymentInvokePrefixMessagesType = {
27
+ Ephemeral: "ephemeral",
28
+ } as const;
29
+ /**
30
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
31
+ */
32
+ export type DeploymentInvokePrefixMessagesType = ClosedEnum<
33
+ typeof DeploymentInvokePrefixMessagesType
34
+ >;
35
+
36
+ /**
37
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
38
+ *
39
+ * @remarks
40
+ *
41
+ * - `5m`: 5 minutes
42
+ * - `1h`: 1 hour
43
+ *
44
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
45
+ */
46
+ export const PrefixMessagesTtl = {
47
+ Fivem: "5m",
48
+ Oneh: "1h",
49
+ } as const;
50
+ /**
51
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
52
+ *
53
+ * @remarks
54
+ *
55
+ * - `5m`: 5 minutes
56
+ * - `1h`: 1 hour
57
+ *
58
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
59
+ */
60
+ export type PrefixMessagesTtl = ClosedEnum<typeof PrefixMessagesTtl>;
61
+
62
+ export type PrefixMessagesCacheControl = {
63
+ /**
64
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
65
+ */
66
+ type: DeploymentInvokePrefixMessagesType;
67
+ /**
68
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
69
+ *
70
+ * @remarks
71
+ *
72
+ * - `5m`: 5 minutes
73
+ * - `1h`: 1 hour
74
+ *
75
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
76
+ */
77
+ ttl?: PrefixMessagesTtl | undefined;
78
+ };
79
+
80
+ export type ToolMessage = {
81
+ /**
82
+ * The role of the messages author, in this case tool.
83
+ */
84
+ role: "tool";
85
+ /**
86
+ * The contents of the tool message.
87
+ */
88
+ content: string | Array<components.TextContentPartSchema>;
89
+ /**
90
+ * Tool call that this message is responding to.
91
+ */
92
+ toolCallId: string | null;
93
+ cacheControl?: PrefixMessagesCacheControl | undefined;
15
94
  };
16
95
 
96
+ export type DeploymentInvokeContent2 =
97
+ | (components.TextContentPartSchema & { type: "text" })
98
+ | components.RefusalPartSchema
99
+ | components.ReasoningPartSchema
100
+ | components.RedactedReasoningPartSchema;
101
+
17
102
  /**
18
- * Indicates the type of model used to generate the response
103
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
19
104
  */
20
- export const DeploymentInvokeObject = {
21
- Chat: "chat",
22
- Completion: "completion",
23
- Image: "image",
105
+ export type DeploymentInvokePrefixMessagesDeploymentsRequestContent =
106
+ | string
107
+ | Array<
108
+ | (components.TextContentPartSchema & { type: "text" })
109
+ | components.RefusalPartSchema
110
+ | components.ReasoningPartSchema
111
+ | components.RedactedReasoningPartSchema
112
+ >;
113
+
114
+ /**
115
+ * Data about a previous audio response from the model.
116
+ */
117
+ export type Audio = {
118
+ /**
119
+ * Unique identifier for a previous audio response from the model.
120
+ */
121
+ id: string;
122
+ };
123
+
124
+ /**
125
+ * The type of the tool. Currently, only `function` is supported.
126
+ */
127
+ export const PrefixMessagesType = {
128
+ Function: "function",
24
129
  } as const;
25
130
  /**
26
- * Indicates the type of model used to generate the response
131
+ * The type of the tool. Currently, only `function` is supported.
27
132
  */
28
- export type DeploymentInvokeObject = ClosedEnum<typeof DeploymentInvokeObject>;
133
+ export type PrefixMessagesType = ClosedEnum<typeof PrefixMessagesType>;
134
+
135
+ export type PrefixMessagesFunction = {
136
+ /**
137
+ * The name of the function to call.
138
+ */
139
+ name?: string | undefined;
140
+ /**
141
+ * 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.
142
+ */
143
+ arguments?: string | undefined;
144
+ };
145
+
146
+ export type PrefixMessagesToolCalls = {
147
+ /**
148
+ * The ID of the tool call.
149
+ */
150
+ id: string;
151
+ /**
152
+ * The type of the tool. Currently, only `function` is supported.
153
+ */
154
+ type: PrefixMessagesType;
155
+ function: PrefixMessagesFunction;
156
+ /**
157
+ * Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call.
158
+ */
159
+ thoughtSignature?: string | undefined;
160
+ };
161
+
162
+ export type AssistantMessage = {
163
+ /**
164
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
165
+ */
166
+ content?:
167
+ | string
168
+ | Array<
169
+ | (components.TextContentPartSchema & { type: "text" })
170
+ | components.RefusalPartSchema
171
+ | components.ReasoningPartSchema
172
+ | components.RedactedReasoningPartSchema
173
+ >
174
+ | null
175
+ | undefined;
176
+ /**
177
+ * The refusal message by the assistant.
178
+ */
179
+ refusal?: string | null | undefined;
180
+ /**
181
+ * The role of the messages author, in this case `assistant`.
182
+ */
183
+ role: "assistant";
184
+ /**
185
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
186
+ */
187
+ name?: string | undefined;
188
+ /**
189
+ * Data about a previous audio response from the model.
190
+ */
191
+ audio?: Audio | null | undefined;
192
+ /**
193
+ * The tool calls generated by the model, such as function calls.
194
+ */
195
+ toolCalls?: Array<PrefixMessagesToolCalls> | undefined;
196
+ };
29
197
 
30
198
  /**
31
- * The provider used to generate the response
199
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
32
200
  */
33
- export const Provider = {
34
- Openai: "openai",
35
- Groq: "groq",
36
- Cohere: "cohere",
37
- Azure: "azure",
38
- Aws: "aws",
39
- Google: "google",
40
- GoogleAi: "google-ai",
41
- Huggingface: "huggingface",
42
- Togetherai: "togetherai",
43
- Perplexity: "perplexity",
44
- Anthropic: "anthropic",
45
- Leonardoai: "leonardoai",
46
- Fal: "fal",
47
- Nvidia: "nvidia",
48
- Jina: "jina",
49
- Elevenlabs: "elevenlabs",
50
- Litellm: "litellm",
51
- Cerebras: "cerebras",
52
- Openailike: "openailike",
53
- Bytedance: "bytedance",
54
- Mistral: "mistral",
55
- Deepseek: "deepseek",
56
- Contextualai: "contextualai",
57
- Moonshotai: "moonshotai",
58
- Zai: "zai",
59
- Minimax: "minimax",
60
- Xai: "xai",
61
- Alibaba: "alibaba",
62
- Tensorix: "tensorix",
63
- Scaleway: "scaleway",
64
- Hcompany: "hcompany",
65
- Inceptron: "inceptron",
66
- Slack: "slack",
67
- Orq: "orq",
201
+ export const DeploymentInvoke2DeploymentsType = {
202
+ Ephemeral: "ephemeral",
68
203
  } as const;
69
204
  /**
70
- * The provider used to generate the response
205
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
71
206
  */
72
- export type Provider = ClosedEnum<typeof Provider>;
207
+ export type DeploymentInvoke2DeploymentsType = ClosedEnum<
208
+ typeof DeploymentInvoke2DeploymentsType
209
+ >;
73
210
 
74
- export type Telemetry = {
211
+ /**
212
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
213
+ *
214
+ * @remarks
215
+ *
216
+ * - `5m`: 5 minutes
217
+ * - `1h`: 1 hour
218
+ *
219
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
220
+ */
221
+ export const Ttl = {
222
+ Fivem: "5m",
223
+ Oneh: "1h",
224
+ } as const;
225
+ /**
226
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
227
+ *
228
+ * @remarks
229
+ *
230
+ * - `5m`: 5 minutes
231
+ * - `1h`: 1 hour
232
+ *
233
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
234
+ */
235
+ export type Ttl = ClosedEnum<typeof Ttl>;
236
+
237
+ export type CacheControl = {
75
238
  /**
76
- * The trace id for the request that generated this response
239
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
77
240
  */
78
- traceId: string;
241
+ type: DeploymentInvoke2DeploymentsType;
79
242
  /**
80
- * The span id for the request that generated this response
243
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
244
+ *
245
+ * @remarks
246
+ *
247
+ * - `5m`: 5 minutes
248
+ * - `1h`: 1 hour
249
+ *
250
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
81
251
  */
82
- spanId: string;
252
+ ttl?: Ttl | undefined;
253
+ };
254
+
255
+ export type Four = {
256
+ /**
257
+ * The type of the content part. Always `file`.
258
+ */
259
+ type: "file";
260
+ cacheControl?: CacheControl | undefined;
261
+ /**
262
+ * File data for the content part. Must contain either file_data or uri, but not both.
263
+ */
264
+ file: components.FileContentPartSchema;
83
265
  };
84
266
 
267
+ export type Content2 =
268
+ | (components.TextContentPartSchema & { type: "text" })
269
+ | components.ImageContentPartSchema
270
+ | components.AudioContentPartSchema
271
+ | Four;
272
+
85
273
  /**
86
- * Metadata of the retrieved chunk from the knowledge base
274
+ * The contents of the user message.
87
275
  */
88
- export type DeploymentInvokeMetadata = {
276
+ export type DeploymentInvokePrefixMessagesDeploymentsContent =
277
+ | string
278
+ | Array<
279
+ | (components.TextContentPartSchema & { type: "text" })
280
+ | components.ImageContentPartSchema
281
+ | components.AudioContentPartSchema
282
+ | Four
283
+ >;
284
+
285
+ export type UserMessage = {
89
286
  /**
90
- * Name of the file
287
+ * The role of the messages author, in this case `user`.
91
288
  */
92
- fileName: string;
289
+ role: "user";
93
290
  /**
94
- * Page number of the chunk
291
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
95
292
  */
96
- pageNumber: number | null;
293
+ name?: string | undefined;
97
294
  /**
98
- * Type of the file
295
+ * The contents of the user message.
99
296
  */
100
- fileType: string;
297
+ content:
298
+ | string
299
+ | Array<
300
+ | (components.TextContentPartSchema & { type: "text" })
301
+ | components.ImageContentPartSchema
302
+ | components.AudioContentPartSchema
303
+ | Four
304
+ >;
305
+ };
306
+
307
+ /**
308
+ * The contents of the developer message.
309
+ */
310
+ export type DeploymentInvokePrefixMessagesContent =
311
+ | string
312
+ | Array<components.TextContentPartSchema>;
313
+
314
+ export type DeveloperMessage = {
101
315
  /**
102
- * Rerank scores are normalized to be in the range [0, 1]. Scores close to 1 indicate a high relevance to the query, and scores closer to 0 indicate low relevance. It is not accurate to assume a score of 0.9 means the document is 2x more relevant than a document with a score of 0.45
316
+ * The role of the messages author, in this case `developer`.
103
317
  */
104
- rerankScore?: number | undefined;
318
+ role: "developer";
105
319
  /**
106
- * Search scores are normalized to be in the range [0, 1]. Search score is calculated based on `[Cosine Similarity](https://en.wikipedia.org/wiki/Cosine_similarity)` algorithm. Scores close to 1 indicate the document is closer to the query, and scores closer to 0 indicate the document is farther from the query.
320
+ * The contents of the developer message.
107
321
  */
108
- searchScore: number;
322
+ content: string | Array<components.TextContentPartSchema>;
323
+ /**
324
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
325
+ */
326
+ name?: string | undefined;
109
327
  };
110
328
 
111
- export type Retrievals = {
329
+ /**
330
+ * The contents of the system message.
331
+ */
332
+ export type PrefixMessagesContent =
333
+ | string
334
+ | Array<components.TextContentPartSchema>;
335
+
336
+ /**
337
+ * Developer-provided instructions that the model should follow, regardless of messages sent by the user.
338
+ */
339
+ export type SystemMessage = {
112
340
  /**
113
- * Content of the retrieved chunk from the knowledge base
341
+ * The role of the messages author, in this case `system`.
114
342
  */
115
- document: string;
343
+ role: "system";
116
344
  /**
117
- * Metadata of the retrieved chunk from the knowledge base
345
+ * The contents of the system message.
118
346
  */
119
- metadata: DeploymentInvokeMetadata;
347
+ content: string | Array<components.TextContentPartSchema>;
348
+ /**
349
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
350
+ */
351
+ name?: string | undefined;
352
+ };
353
+
354
+ export type PrefixMessages =
355
+ | SystemMessage
356
+ | DeveloperMessage
357
+ | UserMessage
358
+ | AssistantMessage
359
+ | ToolMessage;
360
+
361
+ export type DeploymentInvokeContentDeploymentsRequestRequestBodyMessages2 =
362
+ components.TextContentPartSchema;
363
+
364
+ /**
365
+ * The contents of the tool message.
366
+ */
367
+ export type DeploymentInvokeMessagesDeploymentsRequestRequestBodyContent =
368
+ | string
369
+ | Array<components.TextContentPartSchema>;
370
+
371
+ /**
372
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
373
+ */
374
+ export const DeploymentInvokeMessagesType = {
375
+ Ephemeral: "ephemeral",
376
+ } as const;
377
+ /**
378
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
379
+ */
380
+ export type DeploymentInvokeMessagesType = ClosedEnum<
381
+ typeof DeploymentInvokeMessagesType
382
+ >;
383
+
384
+ /**
385
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
386
+ *
387
+ * @remarks
388
+ *
389
+ * - `5m`: 5 minutes
390
+ * - `1h`: 1 hour
391
+ *
392
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
393
+ */
394
+ export const MessagesTtl = {
395
+ Fivem: "5m",
396
+ Oneh: "1h",
397
+ } as const;
398
+ /**
399
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
400
+ *
401
+ * @remarks
402
+ *
403
+ * - `5m`: 5 minutes
404
+ * - `1h`: 1 hour
405
+ *
406
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
407
+ */
408
+ export type MessagesTtl = ClosedEnum<typeof MessagesTtl>;
409
+
410
+ export type MessagesCacheControl = {
411
+ /**
412
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
413
+ */
414
+ type: DeploymentInvokeMessagesType;
415
+ /**
416
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
417
+ *
418
+ * @remarks
419
+ *
420
+ * - `5m`: 5 minutes
421
+ * - `1h`: 1 hour
422
+ *
423
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
424
+ */
425
+ ttl?: MessagesTtl | undefined;
426
+ };
427
+
428
+ export type MessagesToolMessage = {
429
+ /**
430
+ * The role of the messages author, in this case tool.
431
+ */
432
+ role: "tool";
433
+ /**
434
+ * The contents of the tool message.
435
+ */
436
+ content: string | Array<components.TextContentPartSchema>;
437
+ /**
438
+ * Tool call that this message is responding to.
439
+ */
440
+ toolCallId: string | null;
441
+ cacheControl?: MessagesCacheControl | undefined;
442
+ };
443
+
444
+ export type DeploymentInvokeContentDeploymentsRequestRequestBody2 =
445
+ | (components.TextContentPartSchema & { type: "text" })
446
+ | components.RefusalPartSchema
447
+ | components.ReasoningPartSchema
448
+ | components.RedactedReasoningPartSchema;
449
+
450
+ /**
451
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
452
+ */
453
+ export type DeploymentInvokeMessagesDeploymentsRequestContent =
454
+ | string
455
+ | Array<
456
+ | (components.TextContentPartSchema & { type: "text" })
457
+ | components.RefusalPartSchema
458
+ | components.ReasoningPartSchema
459
+ | components.RedactedReasoningPartSchema
460
+ >;
461
+
462
+ /**
463
+ * Data about a previous audio response from the model.
464
+ */
465
+ export type MessagesAudio = {
466
+ /**
467
+ * Unique identifier for a previous audio response from the model.
468
+ */
469
+ id: string;
470
+ };
471
+
472
+ /**
473
+ * The type of the tool. Currently, only `function` is supported.
474
+ */
475
+ export const MessagesType = {
476
+ Function: "function",
477
+ } as const;
478
+ /**
479
+ * The type of the tool. Currently, only `function` is supported.
480
+ */
481
+ export type MessagesType = ClosedEnum<typeof MessagesType>;
482
+
483
+ export type MessagesFunction = {
484
+ /**
485
+ * The name of the function to call.
486
+ */
487
+ name?: string | undefined;
488
+ /**
489
+ * 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.
490
+ */
491
+ arguments?: string | undefined;
492
+ };
493
+
494
+ export type MessagesToolCalls = {
495
+ /**
496
+ * The ID of the tool call.
497
+ */
498
+ id: string;
499
+ /**
500
+ * The type of the tool. Currently, only `function` is supported.
501
+ */
502
+ type: MessagesType;
503
+ function: MessagesFunction;
504
+ /**
505
+ * Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call.
506
+ */
507
+ thoughtSignature?: string | undefined;
508
+ };
509
+
510
+ export type MessagesAssistantMessage = {
511
+ /**
512
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
513
+ */
514
+ content?:
515
+ | string
516
+ | Array<
517
+ | (components.TextContentPartSchema & { type: "text" })
518
+ | components.RefusalPartSchema
519
+ | components.ReasoningPartSchema
520
+ | components.RedactedReasoningPartSchema
521
+ >
522
+ | null
523
+ | undefined;
524
+ /**
525
+ * The refusal message by the assistant.
526
+ */
527
+ refusal?: string | null | undefined;
528
+ /**
529
+ * The role of the messages author, in this case `assistant`.
530
+ */
531
+ role: "assistant";
532
+ /**
533
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
534
+ */
535
+ name?: string | undefined;
536
+ /**
537
+ * Data about a previous audio response from the model.
538
+ */
539
+ audio?: MessagesAudio | null | undefined;
540
+ /**
541
+ * The tool calls generated by the model, such as function calls.
542
+ */
543
+ toolCalls?: Array<MessagesToolCalls> | undefined;
120
544
  };
121
545
 
122
- export type PromptTokensDetails = {
123
- cachedTokens?: number | null | undefined;
124
- };
546
+ /**
547
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
548
+ */
549
+ export const DeploymentInvoke2DeploymentsRequestRequestBodyType = {
550
+ Ephemeral: "ephemeral",
551
+ } as const;
552
+ /**
553
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
554
+ */
555
+ export type DeploymentInvoke2DeploymentsRequestRequestBodyType = ClosedEnum<
556
+ typeof DeploymentInvoke2DeploymentsRequestRequestBodyType
557
+ >;
558
+
559
+ /**
560
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
561
+ *
562
+ * @remarks
563
+ *
564
+ * - `5m`: 5 minutes
565
+ * - `1h`: 1 hour
566
+ *
567
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
568
+ */
569
+ export const TwoTtl = {
570
+ Fivem: "5m",
571
+ Oneh: "1h",
572
+ } as const;
573
+ /**
574
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
575
+ *
576
+ * @remarks
577
+ *
578
+ * - `5m`: 5 minutes
579
+ * - `1h`: 1 hour
580
+ *
581
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
582
+ */
583
+ export type TwoTtl = ClosedEnum<typeof TwoTtl>;
584
+
585
+ export type TwoCacheControl = {
586
+ /**
587
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
588
+ */
589
+ type: DeploymentInvoke2DeploymentsRequestRequestBodyType;
590
+ /**
591
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
592
+ *
593
+ * @remarks
594
+ *
595
+ * - `5m`: 5 minutes
596
+ * - `1h`: 1 hour
597
+ *
598
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
599
+ */
600
+ ttl?: TwoTtl | undefined;
601
+ };
602
+
603
+ export type Two4 = {
604
+ /**
605
+ * The type of the content part. Always `file`.
606
+ */
607
+ type: "file";
608
+ cacheControl?: TwoCacheControl | undefined;
609
+ /**
610
+ * File data for the content part. Must contain either file_data or uri, but not both.
611
+ */
612
+ file: components.FileContentPartSchema;
613
+ };
614
+
615
+ export type DeploymentInvokeContentDeploymentsRequest2 =
616
+ | (components.TextContentPartSchema & { type: "text" })
617
+ | components.ImageContentPartSchema
618
+ | components.AudioContentPartSchema
619
+ | Two4;
620
+
621
+ /**
622
+ * The contents of the user message.
623
+ */
624
+ export type DeploymentInvokeMessagesDeploymentsContent =
625
+ | string
626
+ | Array<
627
+ | (components.TextContentPartSchema & { type: "text" })
628
+ | components.ImageContentPartSchema
629
+ | components.AudioContentPartSchema
630
+ | Two4
631
+ >;
632
+
633
+ export type MessagesUserMessage = {
634
+ /**
635
+ * The role of the messages author, in this case `user`.
636
+ */
637
+ role: "user";
638
+ /**
639
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
640
+ */
641
+ name?: string | undefined;
642
+ /**
643
+ * The contents of the user message.
644
+ */
645
+ content:
646
+ | string
647
+ | Array<
648
+ | (components.TextContentPartSchema & { type: "text" })
649
+ | components.ImageContentPartSchema
650
+ | components.AudioContentPartSchema
651
+ | Two4
652
+ >;
653
+ };
654
+
655
+ /**
656
+ * The contents of the developer message.
657
+ */
658
+ export type DeploymentInvokeMessagesContent =
659
+ | string
660
+ | Array<components.TextContentPartSchema>;
661
+
662
+ export type MessagesDeveloperMessage = {
663
+ /**
664
+ * The role of the messages author, in this case `developer`.
665
+ */
666
+ role: "developer";
667
+ /**
668
+ * The contents of the developer message.
669
+ */
670
+ content: string | Array<components.TextContentPartSchema>;
671
+ /**
672
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
673
+ */
674
+ name?: string | undefined;
675
+ };
676
+
677
+ /**
678
+ * The contents of the system message.
679
+ */
680
+ export type MessagesContent = string | Array<components.TextContentPartSchema>;
681
+
682
+ /**
683
+ * Developer-provided instructions that the model should follow, regardless of messages sent by the user.
684
+ */
685
+ export type MessagesSystemMessage = {
686
+ /**
687
+ * The role of the messages author, in this case `system`.
688
+ */
689
+ role: "system";
690
+ /**
691
+ * The contents of the system message.
692
+ */
693
+ content: string | Array<components.TextContentPartSchema>;
694
+ /**
695
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
696
+ */
697
+ name?: string | undefined;
698
+ };
699
+
700
+ export type DeploymentInvokeMessages =
701
+ | MessagesSystemMessage
702
+ | MessagesDeveloperMessage
703
+ | MessagesUserMessage
704
+ | MessagesAssistantMessage
705
+ | MessagesToolMessage;
706
+
707
+ /**
708
+ * Metadata about the document
709
+ */
710
+ export type Metadata = {
711
+ /**
712
+ * Name of the file the text is from.
713
+ */
714
+ fileName?: string | undefined;
715
+ /**
716
+ * Content type of the file the text is from.
717
+ */
718
+ fileType?: string | undefined;
719
+ /**
720
+ * The page number the text is from.
721
+ */
722
+ pageNumber?: number | undefined;
723
+ };
724
+
725
+ export type Documents = {
726
+ /**
727
+ * The text content of the document
728
+ */
729
+ text: string;
730
+ /**
731
+ * Metadata about the document
732
+ */
733
+ metadata?: Metadata | undefined;
734
+ };
735
+
736
+ export type InvokeOptions = {
737
+ /**
738
+ * Whether to include the retrieved knowledge chunks in the response.
739
+ */
740
+ includeRetrievals?: boolean | undefined;
741
+ /**
742
+ * Whether to include the usage metrics in the response.
743
+ */
744
+ includeUsage?: boolean | undefined;
745
+ /**
746
+ * 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.
747
+ */
748
+ mockResponse?: string | undefined;
749
+ };
750
+
751
+ export type Thread = {
752
+ /**
753
+ * Unique thread identifier to group related invocations.
754
+ */
755
+ id: string;
756
+ /**
757
+ * Optional tags to differentiate or categorize threads
758
+ */
759
+ tags?: Array<string> | undefined;
760
+ };
761
+
762
+ /**
763
+ * Exists
764
+ */
765
+ export type OrExists = {
766
+ exists: boolean;
767
+ };
768
+
769
+ export type DeploymentInvokeOrNin = string | number | boolean;
770
+
771
+ /**
772
+ * Not in
773
+ */
774
+ export type OrNin = {
775
+ nin: Array<string | number | boolean>;
776
+ };
777
+
778
+ export type DeploymentInvokeOrIn = string | number | boolean;
779
+
780
+ /**
781
+ * In
782
+ */
783
+ export type OrIn = {
784
+ in: Array<string | number | boolean>;
785
+ };
786
+
787
+ /**
788
+ * Less than or equal to
789
+ */
790
+ export type OrLte = {
791
+ lte: number;
792
+ };
793
+
794
+ /**
795
+ * Less than
796
+ */
797
+ export type OrLt = {
798
+ lt: number;
799
+ };
800
+
801
+ /**
802
+ * Greater than or equal to
803
+ */
804
+ export type OrGte = {
805
+ gte: number;
806
+ };
807
+
808
+ /**
809
+ * Greater than
810
+ */
811
+ export type OrGt = {
812
+ gt: number;
813
+ };
814
+
815
+ export type DeploymentInvokeOrNe = string | number | boolean;
816
+
817
+ /**
818
+ * Not equal to
819
+ */
820
+ export type OrNe = {
821
+ ne: string | number | boolean;
822
+ };
823
+
824
+ export type DeploymentInvokeOrEq = string | number | boolean;
825
+
826
+ /**
827
+ * Equal to
828
+ */
829
+ export type OrEq = {
830
+ eq: string | number | boolean;
831
+ };
832
+
833
+ export type KnowledgeFilterOr =
834
+ | OrEq
835
+ | OrNe
836
+ | OrGt
837
+ | OrGte
838
+ | OrLt
839
+ | OrLte
840
+ | OrIn
841
+ | OrNin
842
+ | OrExists;
843
+
844
+ /**
845
+ * Or
846
+ */
847
+ export type Or = {
848
+ or: Array<
849
+ {
850
+ [k: string]:
851
+ | OrEq
852
+ | OrNe
853
+ | OrGt
854
+ | OrGte
855
+ | OrLt
856
+ | OrLte
857
+ | OrIn
858
+ | OrNin
859
+ | OrExists;
860
+ }
861
+ >;
862
+ };
863
+
864
+ /**
865
+ * Exists
866
+ */
867
+ export type AndExists = {
868
+ exists: boolean;
869
+ };
870
+
871
+ export type DeploymentInvokeAndNin = string | number | boolean;
872
+
873
+ /**
874
+ * Not in
875
+ */
876
+ export type AndNin = {
877
+ nin: Array<string | number | boolean>;
878
+ };
879
+
880
+ export type DeploymentInvokeAndIn = string | number | boolean;
881
+
882
+ /**
883
+ * In
884
+ */
885
+ export type AndIn = {
886
+ in: Array<string | number | boolean>;
887
+ };
888
+
889
+ /**
890
+ * Less than or equal to
891
+ */
892
+ export type AndLte = {
893
+ lte: number;
894
+ };
895
+
896
+ /**
897
+ * Less than
898
+ */
899
+ export type AndLt = {
900
+ lt: number;
901
+ };
902
+
903
+ /**
904
+ * Greater than or equal to
905
+ */
906
+ export type AndGte = {
907
+ gte: number;
908
+ };
909
+
910
+ /**
911
+ * Greater than
912
+ */
913
+ export type AndGt = {
914
+ gt: number;
915
+ };
916
+
917
+ export type DeploymentInvokeAndNe = string | number | boolean;
918
+
919
+ /**
920
+ * Not equal to
921
+ */
922
+ export type AndNe = {
923
+ ne: string | number | boolean;
924
+ };
925
+
926
+ export type DeploymentInvokeAndEq = string | number | boolean;
927
+
928
+ /**
929
+ * Equal to
930
+ */
931
+ export type AndEq = {
932
+ eq: string | number | boolean;
933
+ };
934
+
935
+ export type KnowledgeFilterAnd =
936
+ | AndEq
937
+ | AndNe
938
+ | AndGt
939
+ | AndGte
940
+ | AndLt
941
+ | AndLte
942
+ | AndIn
943
+ | AndNin
944
+ | AndExists;
945
+
946
+ /**
947
+ * And
948
+ */
949
+ export type And = {
950
+ and: Array<
951
+ {
952
+ [k: string]:
953
+ | AndEq
954
+ | AndNe
955
+ | AndGt
956
+ | AndGte
957
+ | AndLt
958
+ | AndLte
959
+ | AndIn
960
+ | AndNin
961
+ | AndExists;
962
+ }
963
+ >;
964
+ };
965
+
966
+ /**
967
+ * Exists
968
+ */
969
+ export type Exists = {
970
+ exists: boolean;
971
+ };
972
+
973
+ export type OneNin = string | number | boolean;
974
+
975
+ /**
976
+ * Not in
977
+ */
978
+ export type Nin = {
979
+ nin: Array<string | number | boolean>;
980
+ };
981
+
982
+ export type OneIn = string | number | boolean;
983
+
984
+ /**
985
+ * In
986
+ */
987
+ export type In = {
988
+ in: Array<string | number | boolean>;
989
+ };
990
+
991
+ /**
992
+ * Less than or equal to
993
+ */
994
+ export type Lte = {
995
+ lte: number;
996
+ };
997
+
998
+ /**
999
+ * Less than
1000
+ */
1001
+ export type Lt = {
1002
+ lt: number;
1003
+ };
1004
+
1005
+ /**
1006
+ * Greater than or equal to
1007
+ */
1008
+ export type Gte = {
1009
+ gte: number;
1010
+ };
1011
+
1012
+ /**
1013
+ * Greater than
1014
+ */
1015
+ export type Gt = {
1016
+ gt: number;
1017
+ };
1018
+
1019
+ export type OneNe = string | number | boolean;
1020
+
1021
+ /**
1022
+ * Not equal to
1023
+ */
1024
+ export type Ne = {
1025
+ ne: string | number | boolean;
1026
+ };
1027
+
1028
+ export type OneEq = string | number | boolean;
1029
+
1030
+ /**
1031
+ * Equal to
1032
+ */
1033
+ export type Eq = {
1034
+ eq: string | number | boolean;
1035
+ };
1036
+
1037
+ export type KnowledgeFilter1 =
1038
+ | Eq
1039
+ | Ne
1040
+ | Gt
1041
+ | Gte
1042
+ | Lt
1043
+ | Lte
1044
+ | In
1045
+ | Nin
1046
+ | Exists;
1047
+
1048
+ /**
1049
+ * A filter to apply to the knowledge base chunk metadata when using knowledge bases in the deployment.
1050
+ */
1051
+ export type KnowledgeFilter = And | Or | {
1052
+ [k: string]: Eq | Ne | Gt | Gte | Lt | Lte | In | Nin | Exists;
1053
+ };
1054
+
1055
+ export type DeploymentInvokeRequestBody = {
1056
+ /**
1057
+ * The deployment key to invoke
1058
+ */
1059
+ key: string;
1060
+ /**
1061
+ * 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.
1062
+ */
1063
+ stream?: boolean | undefined;
1064
+ /**
1065
+ * 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.
1066
+ */
1067
+ inputs?: { [k: string]: any } | undefined;
1068
+ /**
1069
+ * Key-value pairs that match your data model and fields declared in your deployment routing configuration
1070
+ */
1071
+ context?: { [k: string]: any } | undefined;
1072
+ /**
1073
+ * A list of messages to include after the `System` message, but before the `User` and `Assistant` pairs configured in your deployment.
1074
+ */
1075
+ prefixMessages?:
1076
+ | Array<
1077
+ | SystemMessage
1078
+ | DeveloperMessage
1079
+ | UserMessage
1080
+ | AssistantMessage
1081
+ | ToolMessage
1082
+ >
1083
+ | undefined;
1084
+ /**
1085
+ * A list of messages to send to the deployment.
1086
+ */
1087
+ messages?:
1088
+ | Array<
1089
+ | MessagesSystemMessage
1090
+ | MessagesDeveloperMessage
1091
+ | MessagesUserMessage
1092
+ | MessagesAssistantMessage
1093
+ | MessagesToolMessage
1094
+ >
1095
+ | undefined;
1096
+ /**
1097
+ * Information about the identity making the request. If the identity does not exist, it will be created automatically.
1098
+ */
1099
+ identity?: components.PublicIdentity | undefined;
1100
+ /**
1101
+ * A list of file IDs that are associated with the deployment request.
1102
+ */
1103
+ fileIds?: Array<string> | undefined;
1104
+ /**
1105
+ * Key-value pairs that you want to attach to the log generated by this request.
1106
+ */
1107
+ metadata?: { [k: string]: any } | undefined;
1108
+ /**
1109
+ * 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.
1110
+ */
1111
+ extraParams?: { [k: string]: any } | undefined;
1112
+ /**
1113
+ * 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.
1114
+ */
1115
+ documents?: Array<Documents> | undefined;
1116
+ invokeOptions?: InvokeOptions | undefined;
1117
+ thread?: Thread | undefined;
1118
+ /**
1119
+ * A filter to apply to the knowledge base chunk metadata when using knowledge bases in the deployment.
1120
+ */
1121
+ knowledgeFilter?: And | Or | {
1122
+ [k: string]: Eq | Ne | Gt | Gte | Lt | Lte | In | Nin | Exists;
1123
+ } | undefined;
1124
+ };
1125
+
1126
+ /**
1127
+ * Indicates the type of model used to generate the response
1128
+ */
1129
+ export const DeploymentInvokeObject = {
1130
+ Chat: "chat",
1131
+ Completion: "completion",
1132
+ Image: "image",
1133
+ } as const;
1134
+ /**
1135
+ * Indicates the type of model used to generate the response
1136
+ */
1137
+ export type DeploymentInvokeObject = ClosedEnum<typeof DeploymentInvokeObject>;
1138
+
1139
+ /**
1140
+ * The provider used to generate the response
1141
+ */
1142
+ export const Provider = {
1143
+ Openai: "openai",
1144
+ Groq: "groq",
1145
+ Cohere: "cohere",
1146
+ Azure: "azure",
1147
+ Aws: "aws",
1148
+ Google: "google",
1149
+ GoogleAi: "google-ai",
1150
+ Huggingface: "huggingface",
1151
+ Togetherai: "togetherai",
1152
+ Perplexity: "perplexity",
1153
+ Anthropic: "anthropic",
1154
+ Leonardoai: "leonardoai",
1155
+ Fal: "fal",
1156
+ Nvidia: "nvidia",
1157
+ Jina: "jina",
1158
+ Elevenlabs: "elevenlabs",
1159
+ Litellm: "litellm",
1160
+ Cerebras: "cerebras",
1161
+ Openailike: "openailike",
1162
+ Bytedance: "bytedance",
1163
+ Mistral: "mistral",
1164
+ Deepseek: "deepseek",
1165
+ Contextualai: "contextualai",
1166
+ Moonshotai: "moonshotai",
1167
+ Zai: "zai",
1168
+ Minimax: "minimax",
1169
+ Xai: "xai",
1170
+ Alibaba: "alibaba",
1171
+ Tensorix: "tensorix",
1172
+ Scaleway: "scaleway",
1173
+ Hcompany: "hcompany",
1174
+ Inceptron: "inceptron",
1175
+ Slack: "slack",
1176
+ Orq: "orq",
1177
+ } as const;
1178
+ /**
1179
+ * The provider used to generate the response
1180
+ */
1181
+ export type Provider = ClosedEnum<typeof Provider>;
1182
+
1183
+ export type Telemetry = {
1184
+ /**
1185
+ * The trace id for the request that generated this response
1186
+ */
1187
+ traceId: string;
1188
+ /**
1189
+ * The span id for the request that generated this response
1190
+ */
1191
+ spanId: string;
1192
+ };
1193
+
1194
+ /**
1195
+ * Metadata of the retrieved chunk from the knowledge base
1196
+ */
1197
+ export type DeploymentInvokeMetadata = {
1198
+ /**
1199
+ * Name of the file
1200
+ */
1201
+ fileName: string;
1202
+ /**
1203
+ * Page number of the chunk
1204
+ */
1205
+ pageNumber: number | null;
1206
+ /**
1207
+ * Type of the file
1208
+ */
1209
+ fileType: string;
1210
+ /**
1211
+ * Rerank scores are normalized to be in the range [0, 1]. Scores close to 1 indicate a high relevance to the query, and scores closer to 0 indicate low relevance. It is not accurate to assume a score of 0.9 means the document is 2x more relevant than a document with a score of 0.45
1212
+ */
1213
+ rerankScore?: number | undefined;
1214
+ /**
1215
+ * Search scores are normalized to be in the range [0, 1]. Search score is calculated based on `[Cosine Similarity](https://en.wikipedia.org/wiki/Cosine_similarity)` algorithm. Scores close to 1 indicate the document is closer to the query, and scores closer to 0 indicate the document is farther from the query.
1216
+ */
1217
+ searchScore: number;
1218
+ };
1219
+
1220
+ export type Retrievals = {
1221
+ /**
1222
+ * Content of the retrieved chunk from the knowledge base
1223
+ */
1224
+ document: string;
1225
+ /**
1226
+ * Metadata of the retrieved chunk from the knowledge base
1227
+ */
1228
+ metadata: DeploymentInvokeMetadata;
1229
+ };
1230
+
1231
+ export type PromptTokensDetails = {
1232
+ cachedTokens?: number | null | undefined;
1233
+ };
1234
+
1235
+ export type CompletionTokensDetails = {
1236
+ reasoningTokens?: number | null | undefined;
1237
+ };
1238
+
1239
+ /**
1240
+ * Usage metrics for the response
1241
+ */
1242
+ export type Usage = {
1243
+ totalTokens?: number | undefined;
1244
+ promptTokens?: number | undefined;
1245
+ completionTokens?: number | undefined;
1246
+ promptTokensDetails?: PromptTokensDetails | undefined;
1247
+ completionTokensDetails?: CompletionTokensDetails | null | undefined;
1248
+ };
1249
+
1250
+ /**
1251
+ * The role of the prompt message
1252
+ */
1253
+ export const DeploymentInvokeMessageDeploymentsRole = {
1254
+ System: "system",
1255
+ Developer: "developer",
1256
+ Assistant: "assistant",
1257
+ User: "user",
1258
+ Exception: "exception",
1259
+ Tool: "tool",
1260
+ Prompt: "prompt",
1261
+ Correction: "correction",
1262
+ ExpectedOutput: "expected_output",
1263
+ } as const;
1264
+ /**
1265
+ * The role of the prompt message
1266
+ */
1267
+ export type DeploymentInvokeMessageDeploymentsRole = ClosedEnum<
1268
+ typeof DeploymentInvokeMessageDeploymentsRole
1269
+ >;
1270
+
1271
+ export type Message3 = {
1272
+ type: "image";
1273
+ /**
1274
+ * The role of the prompt message
1275
+ */
1276
+ role: DeploymentInvokeMessageDeploymentsRole;
1277
+ url: string;
1278
+ };
1279
+
1280
+ /**
1281
+ * The role of the prompt message
1282
+ */
1283
+ export const DeploymentInvokeMessageRole = {
1284
+ System: "system",
1285
+ Developer: "developer",
1286
+ Assistant: "assistant",
1287
+ User: "user",
1288
+ Exception: "exception",
1289
+ Tool: "tool",
1290
+ Prompt: "prompt",
1291
+ Correction: "correction",
1292
+ ExpectedOutput: "expected_output",
1293
+ } as const;
1294
+ /**
1295
+ * The role of the prompt message
1296
+ */
1297
+ export type DeploymentInvokeMessageRole = ClosedEnum<
1298
+ typeof DeploymentInvokeMessageRole
1299
+ >;
1300
+
1301
+ export type Message2 = {
1302
+ type: "content";
1303
+ /**
1304
+ * The role of the prompt message
1305
+ */
1306
+ role: DeploymentInvokeMessageRole;
1307
+ content: string | null;
1308
+ /**
1309
+ * Internal thought process of the model
1310
+ */
1311
+ reasoning?: string | undefined;
1312
+ /**
1313
+ * The signature holds a cryptographic token which verifies that the thinking block was generated by the model, and is verified when thinking is part of a multiturn conversation. This value should not be modified and should always be sent to the API when the reasoning is redacted. Currently only supported by `Anthropic`.
1314
+ */
1315
+ reasoningSignature?: string | undefined;
1316
+ /**
1317
+ * Occasionally the model's internal reasoning will be flagged by the safety systems of the provider. When this occurs, the provider will encrypt the reasoning. These redacted reasoning is decrypted when passed back to the API, allowing the model to continue its response without losing context.
1318
+ */
1319
+ redactedReasoning?: string | undefined;
1320
+ };
1321
+
1322
+ /**
1323
+ * The role of the prompt message
1324
+ */
1325
+ export const MessageRole = {
1326
+ System: "system",
1327
+ Developer: "developer",
1328
+ Assistant: "assistant",
1329
+ User: "user",
1330
+ Exception: "exception",
1331
+ Tool: "tool",
1332
+ Prompt: "prompt",
1333
+ Correction: "correction",
1334
+ ExpectedOutput: "expected_output",
1335
+ } as const;
1336
+ /**
1337
+ * The role of the prompt message
1338
+ */
1339
+ export type MessageRole = ClosedEnum<typeof MessageRole>;
1340
+
1341
+ export const DeploymentInvokeMessageDeploymentsResponseType = {
1342
+ Function: "function",
1343
+ } as const;
1344
+ export type DeploymentInvokeMessageDeploymentsResponseType = ClosedEnum<
1345
+ typeof DeploymentInvokeMessageDeploymentsResponseType
1346
+ >;
1347
+
1348
+ export type MessageFunction = {
1349
+ name: string;
1350
+ /**
1351
+ * JSON string arguments for the functions
1352
+ */
1353
+ arguments: string;
1354
+ };
1355
+
1356
+ export type MessageToolCalls = {
1357
+ id?: string | undefined;
1358
+ index?: number | undefined;
1359
+ type: DeploymentInvokeMessageDeploymentsResponseType;
1360
+ function: MessageFunction;
1361
+ };
1362
+
1363
+ export type Message1 = {
1364
+ type: "tool_calls";
1365
+ /**
1366
+ * The role of the prompt message
1367
+ */
1368
+ role: MessageRole;
1369
+ content?: string | null | undefined;
1370
+ toolCalls: Array<MessageToolCalls>;
1371
+ /**
1372
+ * Internal thought process of the model
1373
+ */
1374
+ reasoning?: string | undefined;
1375
+ /**
1376
+ * The signature holds a cryptographic token which verifies that the thinking block was generated by the model, and is verified when thinking is part of a multiturn conversation. This value should not be modified and should always be sent to the API when the reasoning is redacted. Currently only supported by `Anthropic`.
1377
+ */
1378
+ reasoningSignature?: string | undefined;
1379
+ /**
1380
+ * Occasionally the model's internal reasoning will be flagged by the safety systems of the provider. When this occurs, the provider will encrypt the reasoning. These redacted reasoning is decrypted when passed back to the API, allowing the model to continue its response without losing context.
1381
+ */
1382
+ redactedReasoning?: string | undefined;
1383
+ };
1384
+
1385
+ export type Message = Message1 | Message2 | Message3;
1386
+
1387
+ export type Choices = {
1388
+ index: number;
1389
+ message: Message1 | Message2 | Message3;
1390
+ finishReason?: string | null | undefined;
1391
+ };
1392
+
1393
+ /**
1394
+ * Successful operation
1395
+ */
1396
+ export type DeploymentInvokeResponseBody = {
1397
+ /**
1398
+ * A unique identifier for the response. Can be used to add metrics to the transaction.
1399
+ */
1400
+ id: string;
1401
+ /**
1402
+ * A timestamp indicating when the object was created. Usually in a standardized format like ISO 8601
1403
+ */
1404
+ created: Date;
1405
+ /**
1406
+ * Indicates the type of model used to generate the response
1407
+ */
1408
+ object: DeploymentInvokeObject;
1409
+ /**
1410
+ * The model used to generate the response
1411
+ */
1412
+ model: string;
1413
+ /**
1414
+ * The provider used to generate the response
1415
+ */
1416
+ provider: Provider;
1417
+ /**
1418
+ * Indicates if the response is the final response
1419
+ */
1420
+ isFinal: boolean;
1421
+ /**
1422
+ * Indicates integration id used to generate the response
1423
+ */
1424
+ integrationId?: string | undefined;
1425
+ telemetry: Telemetry;
1426
+ /**
1427
+ * A timestamp indicating when the object was finalized. Usually in a standardized format like ISO 8601
1428
+ */
1429
+ finalized?: Date | undefined;
1430
+ /**
1431
+ * Provider backed system fingerprint.
1432
+ */
1433
+ systemFingerprint?: string | null | undefined;
1434
+ /**
1435
+ * List of documents retrieved from the knowledge base. This property is only available when the `include_retrievals` flag is set to `true` in the invoke settings. When stream is set to true, the `retrievals` property will be returned in the last streamed chunk where the property `is_final` is set to `true`.
1436
+ */
1437
+ retrievals?: Array<Retrievals> | undefined;
1438
+ /**
1439
+ * Response returned by the model provider. This functionality is only supported when streaming is not used. If streaming is used, the `provider_response` property will be set to `null`.
1440
+ */
1441
+ providerResponse?: any | undefined;
1442
+ /**
1443
+ * Usage metrics for the response
1444
+ */
1445
+ usage?: Usage | null | undefined;
1446
+ /**
1447
+ * A list of choices generated by the model
1448
+ */
1449
+ choices: Array<Choices>;
1450
+ };
1451
+
1452
+ /** @internal */
1453
+ export type DeploymentInvokeContentDeployments2$Outbound =
1454
+ components.TextContentPartSchema$Outbound;
1455
+
1456
+ /** @internal */
1457
+ export const DeploymentInvokeContentDeployments2$outboundSchema: z.ZodType<
1458
+ DeploymentInvokeContentDeployments2$Outbound,
1459
+ z.ZodTypeDef,
1460
+ DeploymentInvokeContentDeployments2
1461
+ > = components.TextContentPartSchema$outboundSchema;
1462
+
1463
+ export function deploymentInvokeContentDeployments2ToJSON(
1464
+ deploymentInvokeContentDeployments2: DeploymentInvokeContentDeployments2,
1465
+ ): string {
1466
+ return JSON.stringify(
1467
+ DeploymentInvokeContentDeployments2$outboundSchema.parse(
1468
+ deploymentInvokeContentDeployments2,
1469
+ ),
1470
+ );
1471
+ }
1472
+
1473
+ /** @internal */
1474
+ export type DeploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContent$Outbound =
1475
+ | string
1476
+ | Array<components.TextContentPartSchema$Outbound>;
1477
+
1478
+ /** @internal */
1479
+ export const DeploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContent$outboundSchema:
1480
+ z.ZodType<
1481
+ DeploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContent$Outbound,
1482
+ z.ZodTypeDef,
1483
+ DeploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContent
1484
+ > = z.union([
1485
+ z.string(),
1486
+ z.array(components.TextContentPartSchema$outboundSchema),
1487
+ ]);
1488
+
1489
+ export function deploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContentToJSON(
1490
+ deploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContent:
1491
+ DeploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContent,
1492
+ ): string {
1493
+ return JSON.stringify(
1494
+ DeploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContent$outboundSchema
1495
+ .parse(
1496
+ deploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContent,
1497
+ ),
1498
+ );
1499
+ }
1500
+
1501
+ /** @internal */
1502
+ export const DeploymentInvokePrefixMessagesType$outboundSchema: z.ZodNativeEnum<
1503
+ typeof DeploymentInvokePrefixMessagesType
1504
+ > = z.nativeEnum(DeploymentInvokePrefixMessagesType);
1505
+
1506
+ /** @internal */
1507
+ export const PrefixMessagesTtl$outboundSchema: z.ZodNativeEnum<
1508
+ typeof PrefixMessagesTtl
1509
+ > = z.nativeEnum(PrefixMessagesTtl);
1510
+
1511
+ /** @internal */
1512
+ export type PrefixMessagesCacheControl$Outbound = {
1513
+ type: string;
1514
+ ttl: string;
1515
+ };
1516
+
1517
+ /** @internal */
1518
+ export const PrefixMessagesCacheControl$outboundSchema: z.ZodType<
1519
+ PrefixMessagesCacheControl$Outbound,
1520
+ z.ZodTypeDef,
1521
+ PrefixMessagesCacheControl
1522
+ > = z.object({
1523
+ type: DeploymentInvokePrefixMessagesType$outboundSchema,
1524
+ ttl: PrefixMessagesTtl$outboundSchema.default("5m"),
1525
+ });
1526
+
1527
+ export function prefixMessagesCacheControlToJSON(
1528
+ prefixMessagesCacheControl: PrefixMessagesCacheControl,
1529
+ ): string {
1530
+ return JSON.stringify(
1531
+ PrefixMessagesCacheControl$outboundSchema.parse(prefixMessagesCacheControl),
1532
+ );
1533
+ }
1534
+
1535
+ /** @internal */
1536
+ export type ToolMessage$Outbound = {
1537
+ role: "tool";
1538
+ content: string | Array<components.TextContentPartSchema$Outbound>;
1539
+ tool_call_id: string | null;
1540
+ cache_control?: PrefixMessagesCacheControl$Outbound | undefined;
1541
+ };
1542
+
1543
+ /** @internal */
1544
+ export const ToolMessage$outboundSchema: z.ZodType<
1545
+ ToolMessage$Outbound,
1546
+ z.ZodTypeDef,
1547
+ ToolMessage
1548
+ > = z.object({
1549
+ role: z.literal("tool"),
1550
+ content: z.union([
1551
+ z.string(),
1552
+ z.array(components.TextContentPartSchema$outboundSchema),
1553
+ ]),
1554
+ toolCallId: z.nullable(z.string()),
1555
+ cacheControl: z.lazy(() => PrefixMessagesCacheControl$outboundSchema)
1556
+ .optional(),
1557
+ }).transform((v) => {
1558
+ return remap$(v, {
1559
+ toolCallId: "tool_call_id",
1560
+ cacheControl: "cache_control",
1561
+ });
1562
+ });
1563
+
1564
+ export function toolMessageToJSON(toolMessage: ToolMessage): string {
1565
+ return JSON.stringify(ToolMessage$outboundSchema.parse(toolMessage));
1566
+ }
1567
+
1568
+ /** @internal */
1569
+ export type DeploymentInvokeContent2$Outbound =
1570
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
1571
+ | components.RefusalPartSchema$Outbound
1572
+ | components.ReasoningPartSchema$Outbound
1573
+ | components.RedactedReasoningPartSchema$Outbound;
1574
+
1575
+ /** @internal */
1576
+ export const DeploymentInvokeContent2$outboundSchema: z.ZodType<
1577
+ DeploymentInvokeContent2$Outbound,
1578
+ z.ZodTypeDef,
1579
+ DeploymentInvokeContent2
1580
+ > = z.union([
1581
+ components.TextContentPartSchema$outboundSchema.and(
1582
+ z.object({ type: z.literal("text") }),
1583
+ ),
1584
+ components.RefusalPartSchema$outboundSchema,
1585
+ components.ReasoningPartSchema$outboundSchema,
1586
+ components.RedactedReasoningPartSchema$outboundSchema,
1587
+ ]);
1588
+
1589
+ export function deploymentInvokeContent2ToJSON(
1590
+ deploymentInvokeContent2: DeploymentInvokeContent2,
1591
+ ): string {
1592
+ return JSON.stringify(
1593
+ DeploymentInvokeContent2$outboundSchema.parse(deploymentInvokeContent2),
1594
+ );
1595
+ }
1596
+
1597
+ /** @internal */
1598
+ export type DeploymentInvokePrefixMessagesDeploymentsRequestContent$Outbound =
1599
+ | string
1600
+ | Array<
1601
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
1602
+ | components.RefusalPartSchema$Outbound
1603
+ | components.ReasoningPartSchema$Outbound
1604
+ | components.RedactedReasoningPartSchema$Outbound
1605
+ >;
1606
+
1607
+ /** @internal */
1608
+ export const DeploymentInvokePrefixMessagesDeploymentsRequestContent$outboundSchema:
1609
+ z.ZodType<
1610
+ DeploymentInvokePrefixMessagesDeploymentsRequestContent$Outbound,
1611
+ z.ZodTypeDef,
1612
+ DeploymentInvokePrefixMessagesDeploymentsRequestContent
1613
+ > = z.union([
1614
+ z.string(),
1615
+ z.array(
1616
+ z.union([
1617
+ components.TextContentPartSchema$outboundSchema.and(
1618
+ z.object({ type: z.literal("text") }),
1619
+ ),
1620
+ components.RefusalPartSchema$outboundSchema,
1621
+ components.ReasoningPartSchema$outboundSchema,
1622
+ components.RedactedReasoningPartSchema$outboundSchema,
1623
+ ]),
1624
+ ),
1625
+ ]);
1626
+
1627
+ export function deploymentInvokePrefixMessagesDeploymentsRequestContentToJSON(
1628
+ deploymentInvokePrefixMessagesDeploymentsRequestContent:
1629
+ DeploymentInvokePrefixMessagesDeploymentsRequestContent,
1630
+ ): string {
1631
+ return JSON.stringify(
1632
+ DeploymentInvokePrefixMessagesDeploymentsRequestContent$outboundSchema
1633
+ .parse(deploymentInvokePrefixMessagesDeploymentsRequestContent),
1634
+ );
1635
+ }
1636
+
1637
+ /** @internal */
1638
+ export type Audio$Outbound = {
1639
+ id: string;
1640
+ };
1641
+
1642
+ /** @internal */
1643
+ export const Audio$outboundSchema: z.ZodType<
1644
+ Audio$Outbound,
1645
+ z.ZodTypeDef,
1646
+ Audio
1647
+ > = z.object({
1648
+ id: z.string(),
1649
+ });
1650
+
1651
+ export function audioToJSON(audio: Audio): string {
1652
+ return JSON.stringify(Audio$outboundSchema.parse(audio));
1653
+ }
1654
+
1655
+ /** @internal */
1656
+ export const PrefixMessagesType$outboundSchema: z.ZodNativeEnum<
1657
+ typeof PrefixMessagesType
1658
+ > = z.nativeEnum(PrefixMessagesType);
1659
+
1660
+ /** @internal */
1661
+ export type PrefixMessagesFunction$Outbound = {
1662
+ name?: string | undefined;
1663
+ arguments?: string | undefined;
1664
+ };
1665
+
1666
+ /** @internal */
1667
+ export const PrefixMessagesFunction$outboundSchema: z.ZodType<
1668
+ PrefixMessagesFunction$Outbound,
1669
+ z.ZodTypeDef,
1670
+ PrefixMessagesFunction
1671
+ > = z.object({
1672
+ name: z.string().optional(),
1673
+ arguments: z.string().optional(),
1674
+ });
1675
+
1676
+ export function prefixMessagesFunctionToJSON(
1677
+ prefixMessagesFunction: PrefixMessagesFunction,
1678
+ ): string {
1679
+ return JSON.stringify(
1680
+ PrefixMessagesFunction$outboundSchema.parse(prefixMessagesFunction),
1681
+ );
1682
+ }
1683
+
1684
+ /** @internal */
1685
+ export type PrefixMessagesToolCalls$Outbound = {
1686
+ id: string;
1687
+ type: string;
1688
+ function: PrefixMessagesFunction$Outbound;
1689
+ thought_signature?: string | undefined;
1690
+ };
1691
+
1692
+ /** @internal */
1693
+ export const PrefixMessagesToolCalls$outboundSchema: z.ZodType<
1694
+ PrefixMessagesToolCalls$Outbound,
1695
+ z.ZodTypeDef,
1696
+ PrefixMessagesToolCalls
1697
+ > = z.object({
1698
+ id: z.string(),
1699
+ type: PrefixMessagesType$outboundSchema,
1700
+ function: z.lazy(() => PrefixMessagesFunction$outboundSchema),
1701
+ thoughtSignature: z.string().optional(),
1702
+ }).transform((v) => {
1703
+ return remap$(v, {
1704
+ thoughtSignature: "thought_signature",
1705
+ });
1706
+ });
1707
+
1708
+ export function prefixMessagesToolCallsToJSON(
1709
+ prefixMessagesToolCalls: PrefixMessagesToolCalls,
1710
+ ): string {
1711
+ return JSON.stringify(
1712
+ PrefixMessagesToolCalls$outboundSchema.parse(prefixMessagesToolCalls),
1713
+ );
1714
+ }
1715
+
1716
+ /** @internal */
1717
+ export type AssistantMessage$Outbound = {
1718
+ content?:
1719
+ | string
1720
+ | Array<
1721
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
1722
+ | components.RefusalPartSchema$Outbound
1723
+ | components.ReasoningPartSchema$Outbound
1724
+ | components.RedactedReasoningPartSchema$Outbound
1725
+ >
1726
+ | null
1727
+ | undefined;
1728
+ refusal?: string | null | undefined;
1729
+ role: "assistant";
1730
+ name?: string | undefined;
1731
+ audio?: Audio$Outbound | null | undefined;
1732
+ tool_calls?: Array<PrefixMessagesToolCalls$Outbound> | undefined;
1733
+ };
1734
+
1735
+ /** @internal */
1736
+ export const AssistantMessage$outboundSchema: z.ZodType<
1737
+ AssistantMessage$Outbound,
1738
+ z.ZodTypeDef,
1739
+ AssistantMessage
1740
+ > = z.object({
1741
+ content: z.nullable(
1742
+ z.union([
1743
+ z.string(),
1744
+ z.array(
1745
+ z.union([
1746
+ components.TextContentPartSchema$outboundSchema.and(
1747
+ z.object({ type: z.literal("text") }),
1748
+ ),
1749
+ components.RefusalPartSchema$outboundSchema,
1750
+ components.ReasoningPartSchema$outboundSchema,
1751
+ components.RedactedReasoningPartSchema$outboundSchema,
1752
+ ]),
1753
+ ),
1754
+ ]),
1755
+ ).optional(),
1756
+ refusal: z.nullable(z.string()).optional(),
1757
+ role: z.literal("assistant"),
1758
+ name: z.string().optional(),
1759
+ audio: z.nullable(z.lazy(() => Audio$outboundSchema)).optional(),
1760
+ toolCalls: z.array(z.lazy(() => PrefixMessagesToolCalls$outboundSchema))
1761
+ .optional(),
1762
+ }).transform((v) => {
1763
+ return remap$(v, {
1764
+ toolCalls: "tool_calls",
1765
+ });
1766
+ });
1767
+
1768
+ export function assistantMessageToJSON(
1769
+ assistantMessage: AssistantMessage,
1770
+ ): string {
1771
+ return JSON.stringify(
1772
+ AssistantMessage$outboundSchema.parse(assistantMessage),
1773
+ );
1774
+ }
1775
+
1776
+ /** @internal */
1777
+ export const DeploymentInvoke2DeploymentsType$outboundSchema: z.ZodNativeEnum<
1778
+ typeof DeploymentInvoke2DeploymentsType
1779
+ > = z.nativeEnum(DeploymentInvoke2DeploymentsType);
1780
+
1781
+ /** @internal */
1782
+ export const Ttl$outboundSchema: z.ZodNativeEnum<typeof Ttl> = z.nativeEnum(
1783
+ Ttl,
1784
+ );
1785
+
1786
+ /** @internal */
1787
+ export type CacheControl$Outbound = {
1788
+ type: string;
1789
+ ttl: string;
1790
+ };
1791
+
1792
+ /** @internal */
1793
+ export const CacheControl$outboundSchema: z.ZodType<
1794
+ CacheControl$Outbound,
1795
+ z.ZodTypeDef,
1796
+ CacheControl
1797
+ > = z.object({
1798
+ type: DeploymentInvoke2DeploymentsType$outboundSchema,
1799
+ ttl: Ttl$outboundSchema.default("5m"),
1800
+ });
1801
+
1802
+ export function cacheControlToJSON(cacheControl: CacheControl): string {
1803
+ return JSON.stringify(CacheControl$outboundSchema.parse(cacheControl));
1804
+ }
1805
+
1806
+ /** @internal */
1807
+ export type Four$Outbound = {
1808
+ type: "file";
1809
+ cache_control?: CacheControl$Outbound | undefined;
1810
+ file: components.FileContentPartSchema$Outbound;
1811
+ };
1812
+
1813
+ /** @internal */
1814
+ export const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four> =
1815
+ z.object({
1816
+ type: z.literal("file"),
1817
+ cacheControl: z.lazy(() => CacheControl$outboundSchema).optional(),
1818
+ file: components.FileContentPartSchema$outboundSchema,
1819
+ }).transform((v) => {
1820
+ return remap$(v, {
1821
+ cacheControl: "cache_control",
1822
+ });
1823
+ });
1824
+
1825
+ export function fourToJSON(four: Four): string {
1826
+ return JSON.stringify(Four$outboundSchema.parse(four));
1827
+ }
1828
+
1829
+ /** @internal */
1830
+ export type Content2$Outbound =
1831
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
1832
+ | components.ImageContentPartSchema$Outbound
1833
+ | components.AudioContentPartSchema$Outbound
1834
+ | Four$Outbound;
1835
+
1836
+ /** @internal */
1837
+ export const Content2$outboundSchema: z.ZodType<
1838
+ Content2$Outbound,
1839
+ z.ZodTypeDef,
1840
+ Content2
1841
+ > = z.union([
1842
+ components.TextContentPartSchema$outboundSchema.and(
1843
+ z.object({ type: z.literal("text") }),
1844
+ ),
1845
+ components.ImageContentPartSchema$outboundSchema,
1846
+ components.AudioContentPartSchema$outboundSchema,
1847
+ z.lazy(() => Four$outboundSchema),
1848
+ ]);
1849
+
1850
+ export function content2ToJSON(content2: Content2): string {
1851
+ return JSON.stringify(Content2$outboundSchema.parse(content2));
1852
+ }
1853
+
1854
+ /** @internal */
1855
+ export type DeploymentInvokePrefixMessagesDeploymentsContent$Outbound =
1856
+ | string
1857
+ | Array<
1858
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
1859
+ | components.ImageContentPartSchema$Outbound
1860
+ | components.AudioContentPartSchema$Outbound
1861
+ | Four$Outbound
1862
+ >;
1863
+
1864
+ /** @internal */
1865
+ export const DeploymentInvokePrefixMessagesDeploymentsContent$outboundSchema:
1866
+ z.ZodType<
1867
+ DeploymentInvokePrefixMessagesDeploymentsContent$Outbound,
1868
+ z.ZodTypeDef,
1869
+ DeploymentInvokePrefixMessagesDeploymentsContent
1870
+ > = z.union([
1871
+ z.string(),
1872
+ z.array(
1873
+ z.union([
1874
+ components.TextContentPartSchema$outboundSchema.and(
1875
+ z.object({ type: z.literal("text") }),
1876
+ ),
1877
+ components.ImageContentPartSchema$outboundSchema,
1878
+ components.AudioContentPartSchema$outboundSchema,
1879
+ z.lazy(() => Four$outboundSchema),
1880
+ ]),
1881
+ ),
1882
+ ]);
1883
+
1884
+ export function deploymentInvokePrefixMessagesDeploymentsContentToJSON(
1885
+ deploymentInvokePrefixMessagesDeploymentsContent:
1886
+ DeploymentInvokePrefixMessagesDeploymentsContent,
1887
+ ): string {
1888
+ return JSON.stringify(
1889
+ DeploymentInvokePrefixMessagesDeploymentsContent$outboundSchema.parse(
1890
+ deploymentInvokePrefixMessagesDeploymentsContent,
1891
+ ),
1892
+ );
1893
+ }
1894
+
1895
+ /** @internal */
1896
+ export type UserMessage$Outbound = {
1897
+ role: "user";
1898
+ name?: string | undefined;
1899
+ content:
1900
+ | string
1901
+ | Array<
1902
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
1903
+ | components.ImageContentPartSchema$Outbound
1904
+ | components.AudioContentPartSchema$Outbound
1905
+ | Four$Outbound
1906
+ >;
1907
+ };
1908
+
1909
+ /** @internal */
1910
+ export const UserMessage$outboundSchema: z.ZodType<
1911
+ UserMessage$Outbound,
1912
+ z.ZodTypeDef,
1913
+ UserMessage
1914
+ > = z.object({
1915
+ role: z.literal("user"),
1916
+ name: z.string().optional(),
1917
+ content: z.union([
1918
+ z.string(),
1919
+ z.array(
1920
+ z.union([
1921
+ components.TextContentPartSchema$outboundSchema.and(
1922
+ z.object({ type: z.literal("text") }),
1923
+ ),
1924
+ components.ImageContentPartSchema$outboundSchema,
1925
+ components.AudioContentPartSchema$outboundSchema,
1926
+ z.lazy(() => Four$outboundSchema),
1927
+ ]),
1928
+ ),
1929
+ ]),
1930
+ });
1931
+
1932
+ export function userMessageToJSON(userMessage: UserMessage): string {
1933
+ return JSON.stringify(UserMessage$outboundSchema.parse(userMessage));
1934
+ }
1935
+
1936
+ /** @internal */
1937
+ export type DeploymentInvokePrefixMessagesContent$Outbound =
1938
+ | string
1939
+ | Array<components.TextContentPartSchema$Outbound>;
1940
+
1941
+ /** @internal */
1942
+ export const DeploymentInvokePrefixMessagesContent$outboundSchema: z.ZodType<
1943
+ DeploymentInvokePrefixMessagesContent$Outbound,
1944
+ z.ZodTypeDef,
1945
+ DeploymentInvokePrefixMessagesContent
1946
+ > = z.union([
1947
+ z.string(),
1948
+ z.array(components.TextContentPartSchema$outboundSchema),
1949
+ ]);
1950
+
1951
+ export function deploymentInvokePrefixMessagesContentToJSON(
1952
+ deploymentInvokePrefixMessagesContent: DeploymentInvokePrefixMessagesContent,
1953
+ ): string {
1954
+ return JSON.stringify(
1955
+ DeploymentInvokePrefixMessagesContent$outboundSchema.parse(
1956
+ deploymentInvokePrefixMessagesContent,
1957
+ ),
1958
+ );
1959
+ }
1960
+
1961
+ /** @internal */
1962
+ export type DeveloperMessage$Outbound = {
1963
+ role: "developer";
1964
+ content: string | Array<components.TextContentPartSchema$Outbound>;
1965
+ name?: string | undefined;
1966
+ };
1967
+
1968
+ /** @internal */
1969
+ export const DeveloperMessage$outboundSchema: z.ZodType<
1970
+ DeveloperMessage$Outbound,
1971
+ z.ZodTypeDef,
1972
+ DeveloperMessage
1973
+ > = z.object({
1974
+ role: z.literal("developer"),
1975
+ content: z.union([
1976
+ z.string(),
1977
+ z.array(components.TextContentPartSchema$outboundSchema),
1978
+ ]),
1979
+ name: z.string().optional(),
1980
+ });
1981
+
1982
+ export function developerMessageToJSON(
1983
+ developerMessage: DeveloperMessage,
1984
+ ): string {
1985
+ return JSON.stringify(
1986
+ DeveloperMessage$outboundSchema.parse(developerMessage),
1987
+ );
1988
+ }
1989
+
1990
+ /** @internal */
1991
+ export type PrefixMessagesContent$Outbound =
1992
+ | string
1993
+ | Array<components.TextContentPartSchema$Outbound>;
1994
+
1995
+ /** @internal */
1996
+ export const PrefixMessagesContent$outboundSchema: z.ZodType<
1997
+ PrefixMessagesContent$Outbound,
1998
+ z.ZodTypeDef,
1999
+ PrefixMessagesContent
2000
+ > = z.union([
2001
+ z.string(),
2002
+ z.array(components.TextContentPartSchema$outboundSchema),
2003
+ ]);
2004
+
2005
+ export function prefixMessagesContentToJSON(
2006
+ prefixMessagesContent: PrefixMessagesContent,
2007
+ ): string {
2008
+ return JSON.stringify(
2009
+ PrefixMessagesContent$outboundSchema.parse(prefixMessagesContent),
2010
+ );
2011
+ }
2012
+
2013
+ /** @internal */
2014
+ export type SystemMessage$Outbound = {
2015
+ role: "system";
2016
+ content: string | Array<components.TextContentPartSchema$Outbound>;
2017
+ name?: string | undefined;
2018
+ };
2019
+
2020
+ /** @internal */
2021
+ export const SystemMessage$outboundSchema: z.ZodType<
2022
+ SystemMessage$Outbound,
2023
+ z.ZodTypeDef,
2024
+ SystemMessage
2025
+ > = z.object({
2026
+ role: z.literal("system"),
2027
+ content: z.union([
2028
+ z.string(),
2029
+ z.array(components.TextContentPartSchema$outboundSchema),
2030
+ ]),
2031
+ name: z.string().optional(),
2032
+ });
2033
+
2034
+ export function systemMessageToJSON(systemMessage: SystemMessage): string {
2035
+ return JSON.stringify(SystemMessage$outboundSchema.parse(systemMessage));
2036
+ }
2037
+
2038
+ /** @internal */
2039
+ export type PrefixMessages$Outbound =
2040
+ | SystemMessage$Outbound
2041
+ | DeveloperMessage$Outbound
2042
+ | UserMessage$Outbound
2043
+ | AssistantMessage$Outbound
2044
+ | ToolMessage$Outbound;
2045
+
2046
+ /** @internal */
2047
+ export const PrefixMessages$outboundSchema: z.ZodType<
2048
+ PrefixMessages$Outbound,
2049
+ z.ZodTypeDef,
2050
+ PrefixMessages
2051
+ > = z.union([
2052
+ z.lazy(() => SystemMessage$outboundSchema),
2053
+ z.lazy(() => DeveloperMessage$outboundSchema),
2054
+ z.lazy(() => UserMessage$outboundSchema),
2055
+ z.lazy(() => AssistantMessage$outboundSchema),
2056
+ z.lazy(() => ToolMessage$outboundSchema),
2057
+ ]);
2058
+
2059
+ export function prefixMessagesToJSON(prefixMessages: PrefixMessages): string {
2060
+ return JSON.stringify(PrefixMessages$outboundSchema.parse(prefixMessages));
2061
+ }
2062
+
2063
+ /** @internal */
2064
+ export type DeploymentInvokeContentDeploymentsRequestRequestBodyMessages2$Outbound =
2065
+ components.TextContentPartSchema$Outbound;
2066
+
2067
+ /** @internal */
2068
+ export const DeploymentInvokeContentDeploymentsRequestRequestBodyMessages2$outboundSchema:
2069
+ z.ZodType<
2070
+ DeploymentInvokeContentDeploymentsRequestRequestBodyMessages2$Outbound,
2071
+ z.ZodTypeDef,
2072
+ DeploymentInvokeContentDeploymentsRequestRequestBodyMessages2
2073
+ > = components.TextContentPartSchema$outboundSchema;
2074
+
2075
+ export function deploymentInvokeContentDeploymentsRequestRequestBodyMessages2ToJSON(
2076
+ deploymentInvokeContentDeploymentsRequestRequestBodyMessages2:
2077
+ DeploymentInvokeContentDeploymentsRequestRequestBodyMessages2,
2078
+ ): string {
2079
+ return JSON.stringify(
2080
+ DeploymentInvokeContentDeploymentsRequestRequestBodyMessages2$outboundSchema
2081
+ .parse(deploymentInvokeContentDeploymentsRequestRequestBodyMessages2),
2082
+ );
2083
+ }
2084
+
2085
+ /** @internal */
2086
+ export type DeploymentInvokeMessagesDeploymentsRequestRequestBodyContent$Outbound =
2087
+ | string
2088
+ | Array<components.TextContentPartSchema$Outbound>;
2089
+
2090
+ /** @internal */
2091
+ export const DeploymentInvokeMessagesDeploymentsRequestRequestBodyContent$outboundSchema:
2092
+ z.ZodType<
2093
+ DeploymentInvokeMessagesDeploymentsRequestRequestBodyContent$Outbound,
2094
+ z.ZodTypeDef,
2095
+ DeploymentInvokeMessagesDeploymentsRequestRequestBodyContent
2096
+ > = z.union([
2097
+ z.string(),
2098
+ z.array(components.TextContentPartSchema$outboundSchema),
2099
+ ]);
2100
+
2101
+ export function deploymentInvokeMessagesDeploymentsRequestRequestBodyContentToJSON(
2102
+ deploymentInvokeMessagesDeploymentsRequestRequestBodyContent:
2103
+ DeploymentInvokeMessagesDeploymentsRequestRequestBodyContent,
2104
+ ): string {
2105
+ return JSON.stringify(
2106
+ DeploymentInvokeMessagesDeploymentsRequestRequestBodyContent$outboundSchema
2107
+ .parse(deploymentInvokeMessagesDeploymentsRequestRequestBodyContent),
2108
+ );
2109
+ }
2110
+
2111
+ /** @internal */
2112
+ export const DeploymentInvokeMessagesType$outboundSchema: z.ZodNativeEnum<
2113
+ typeof DeploymentInvokeMessagesType
2114
+ > = z.nativeEnum(DeploymentInvokeMessagesType);
2115
+
2116
+ /** @internal */
2117
+ export const MessagesTtl$outboundSchema: z.ZodNativeEnum<typeof MessagesTtl> = z
2118
+ .nativeEnum(MessagesTtl);
2119
+
2120
+ /** @internal */
2121
+ export type MessagesCacheControl$Outbound = {
2122
+ type: string;
2123
+ ttl: string;
2124
+ };
2125
+
2126
+ /** @internal */
2127
+ export const MessagesCacheControl$outboundSchema: z.ZodType<
2128
+ MessagesCacheControl$Outbound,
2129
+ z.ZodTypeDef,
2130
+ MessagesCacheControl
2131
+ > = z.object({
2132
+ type: DeploymentInvokeMessagesType$outboundSchema,
2133
+ ttl: MessagesTtl$outboundSchema.default("5m"),
2134
+ });
2135
+
2136
+ export function messagesCacheControlToJSON(
2137
+ messagesCacheControl: MessagesCacheControl,
2138
+ ): string {
2139
+ return JSON.stringify(
2140
+ MessagesCacheControl$outboundSchema.parse(messagesCacheControl),
2141
+ );
2142
+ }
2143
+
2144
+ /** @internal */
2145
+ export type MessagesToolMessage$Outbound = {
2146
+ role: "tool";
2147
+ content: string | Array<components.TextContentPartSchema$Outbound>;
2148
+ tool_call_id: string | null;
2149
+ cache_control?: MessagesCacheControl$Outbound | undefined;
2150
+ };
2151
+
2152
+ /** @internal */
2153
+ export const MessagesToolMessage$outboundSchema: z.ZodType<
2154
+ MessagesToolMessage$Outbound,
2155
+ z.ZodTypeDef,
2156
+ MessagesToolMessage
2157
+ > = z.object({
2158
+ role: z.literal("tool"),
2159
+ content: z.union([
2160
+ z.string(),
2161
+ z.array(components.TextContentPartSchema$outboundSchema),
2162
+ ]),
2163
+ toolCallId: z.nullable(z.string()),
2164
+ cacheControl: z.lazy(() => MessagesCacheControl$outboundSchema).optional(),
2165
+ }).transform((v) => {
2166
+ return remap$(v, {
2167
+ toolCallId: "tool_call_id",
2168
+ cacheControl: "cache_control",
2169
+ });
2170
+ });
2171
+
2172
+ export function messagesToolMessageToJSON(
2173
+ messagesToolMessage: MessagesToolMessage,
2174
+ ): string {
2175
+ return JSON.stringify(
2176
+ MessagesToolMessage$outboundSchema.parse(messagesToolMessage),
2177
+ );
2178
+ }
2179
+
2180
+ /** @internal */
2181
+ export type DeploymentInvokeContentDeploymentsRequestRequestBody2$Outbound =
2182
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2183
+ | components.RefusalPartSchema$Outbound
2184
+ | components.ReasoningPartSchema$Outbound
2185
+ | components.RedactedReasoningPartSchema$Outbound;
2186
+
2187
+ /** @internal */
2188
+ export const DeploymentInvokeContentDeploymentsRequestRequestBody2$outboundSchema:
2189
+ z.ZodType<
2190
+ DeploymentInvokeContentDeploymentsRequestRequestBody2$Outbound,
2191
+ z.ZodTypeDef,
2192
+ DeploymentInvokeContentDeploymentsRequestRequestBody2
2193
+ > = z.union([
2194
+ components.TextContentPartSchema$outboundSchema.and(
2195
+ z.object({ type: z.literal("text") }),
2196
+ ),
2197
+ components.RefusalPartSchema$outboundSchema,
2198
+ components.ReasoningPartSchema$outboundSchema,
2199
+ components.RedactedReasoningPartSchema$outboundSchema,
2200
+ ]);
2201
+
2202
+ export function deploymentInvokeContentDeploymentsRequestRequestBody2ToJSON(
2203
+ deploymentInvokeContentDeploymentsRequestRequestBody2:
2204
+ DeploymentInvokeContentDeploymentsRequestRequestBody2,
2205
+ ): string {
2206
+ return JSON.stringify(
2207
+ DeploymentInvokeContentDeploymentsRequestRequestBody2$outboundSchema.parse(
2208
+ deploymentInvokeContentDeploymentsRequestRequestBody2,
2209
+ ),
2210
+ );
2211
+ }
2212
+
2213
+ /** @internal */
2214
+ export type DeploymentInvokeMessagesDeploymentsRequestContent$Outbound =
2215
+ | string
2216
+ | Array<
2217
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2218
+ | components.RefusalPartSchema$Outbound
2219
+ | components.ReasoningPartSchema$Outbound
2220
+ | components.RedactedReasoningPartSchema$Outbound
2221
+ >;
2222
+
2223
+ /** @internal */
2224
+ export const DeploymentInvokeMessagesDeploymentsRequestContent$outboundSchema:
2225
+ z.ZodType<
2226
+ DeploymentInvokeMessagesDeploymentsRequestContent$Outbound,
2227
+ z.ZodTypeDef,
2228
+ DeploymentInvokeMessagesDeploymentsRequestContent
2229
+ > = z.union([
2230
+ z.string(),
2231
+ z.array(
2232
+ z.union([
2233
+ components.TextContentPartSchema$outboundSchema.and(
2234
+ z.object({ type: z.literal("text") }),
2235
+ ),
2236
+ components.RefusalPartSchema$outboundSchema,
2237
+ components.ReasoningPartSchema$outboundSchema,
2238
+ components.RedactedReasoningPartSchema$outboundSchema,
2239
+ ]),
2240
+ ),
2241
+ ]);
2242
+
2243
+ export function deploymentInvokeMessagesDeploymentsRequestContentToJSON(
2244
+ deploymentInvokeMessagesDeploymentsRequestContent:
2245
+ DeploymentInvokeMessagesDeploymentsRequestContent,
2246
+ ): string {
2247
+ return JSON.stringify(
2248
+ DeploymentInvokeMessagesDeploymentsRequestContent$outboundSchema.parse(
2249
+ deploymentInvokeMessagesDeploymentsRequestContent,
2250
+ ),
2251
+ );
2252
+ }
2253
+
2254
+ /** @internal */
2255
+ export type MessagesAudio$Outbound = {
2256
+ id: string;
2257
+ };
2258
+
2259
+ /** @internal */
2260
+ export const MessagesAudio$outboundSchema: z.ZodType<
2261
+ MessagesAudio$Outbound,
2262
+ z.ZodTypeDef,
2263
+ MessagesAudio
2264
+ > = z.object({
2265
+ id: z.string(),
2266
+ });
2267
+
2268
+ export function messagesAudioToJSON(messagesAudio: MessagesAudio): string {
2269
+ return JSON.stringify(MessagesAudio$outboundSchema.parse(messagesAudio));
2270
+ }
2271
+
2272
+ /** @internal */
2273
+ export const MessagesType$outboundSchema: z.ZodNativeEnum<typeof MessagesType> =
2274
+ z.nativeEnum(MessagesType);
2275
+
2276
+ /** @internal */
2277
+ export type MessagesFunction$Outbound = {
2278
+ name?: string | undefined;
2279
+ arguments?: string | undefined;
2280
+ };
2281
+
2282
+ /** @internal */
2283
+ export const MessagesFunction$outboundSchema: z.ZodType<
2284
+ MessagesFunction$Outbound,
2285
+ z.ZodTypeDef,
2286
+ MessagesFunction
2287
+ > = z.object({
2288
+ name: z.string().optional(),
2289
+ arguments: z.string().optional(),
2290
+ });
2291
+
2292
+ export function messagesFunctionToJSON(
2293
+ messagesFunction: MessagesFunction,
2294
+ ): string {
2295
+ return JSON.stringify(
2296
+ MessagesFunction$outboundSchema.parse(messagesFunction),
2297
+ );
2298
+ }
2299
+
2300
+ /** @internal */
2301
+ export type MessagesToolCalls$Outbound = {
2302
+ id: string;
2303
+ type: string;
2304
+ function: MessagesFunction$Outbound;
2305
+ thought_signature?: string | undefined;
2306
+ };
2307
+
2308
+ /** @internal */
2309
+ export const MessagesToolCalls$outboundSchema: z.ZodType<
2310
+ MessagesToolCalls$Outbound,
2311
+ z.ZodTypeDef,
2312
+ MessagesToolCalls
2313
+ > = z.object({
2314
+ id: z.string(),
2315
+ type: MessagesType$outboundSchema,
2316
+ function: z.lazy(() => MessagesFunction$outboundSchema),
2317
+ thoughtSignature: z.string().optional(),
2318
+ }).transform((v) => {
2319
+ return remap$(v, {
2320
+ thoughtSignature: "thought_signature",
2321
+ });
2322
+ });
2323
+
2324
+ export function messagesToolCallsToJSON(
2325
+ messagesToolCalls: MessagesToolCalls,
2326
+ ): string {
2327
+ return JSON.stringify(
2328
+ MessagesToolCalls$outboundSchema.parse(messagesToolCalls),
2329
+ );
2330
+ }
2331
+
2332
+ /** @internal */
2333
+ export type MessagesAssistantMessage$Outbound = {
2334
+ content?:
2335
+ | string
2336
+ | Array<
2337
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2338
+ | components.RefusalPartSchema$Outbound
2339
+ | components.ReasoningPartSchema$Outbound
2340
+ | components.RedactedReasoningPartSchema$Outbound
2341
+ >
2342
+ | null
2343
+ | undefined;
2344
+ refusal?: string | null | undefined;
2345
+ role: "assistant";
2346
+ name?: string | undefined;
2347
+ audio?: MessagesAudio$Outbound | null | undefined;
2348
+ tool_calls?: Array<MessagesToolCalls$Outbound> | undefined;
2349
+ };
2350
+
2351
+ /** @internal */
2352
+ export const MessagesAssistantMessage$outboundSchema: z.ZodType<
2353
+ MessagesAssistantMessage$Outbound,
2354
+ z.ZodTypeDef,
2355
+ MessagesAssistantMessage
2356
+ > = z.object({
2357
+ content: z.nullable(
2358
+ z.union([
2359
+ z.string(),
2360
+ z.array(
2361
+ z.union([
2362
+ components.TextContentPartSchema$outboundSchema.and(
2363
+ z.object({ type: z.literal("text") }),
2364
+ ),
2365
+ components.RefusalPartSchema$outboundSchema,
2366
+ components.ReasoningPartSchema$outboundSchema,
2367
+ components.RedactedReasoningPartSchema$outboundSchema,
2368
+ ]),
2369
+ ),
2370
+ ]),
2371
+ ).optional(),
2372
+ refusal: z.nullable(z.string()).optional(),
2373
+ role: z.literal("assistant"),
2374
+ name: z.string().optional(),
2375
+ audio: z.nullable(z.lazy(() => MessagesAudio$outboundSchema)).optional(),
2376
+ toolCalls: z.array(z.lazy(() => MessagesToolCalls$outboundSchema)).optional(),
2377
+ }).transform((v) => {
2378
+ return remap$(v, {
2379
+ toolCalls: "tool_calls",
2380
+ });
2381
+ });
2382
+
2383
+ export function messagesAssistantMessageToJSON(
2384
+ messagesAssistantMessage: MessagesAssistantMessage,
2385
+ ): string {
2386
+ return JSON.stringify(
2387
+ MessagesAssistantMessage$outboundSchema.parse(messagesAssistantMessage),
2388
+ );
2389
+ }
2390
+
2391
+ /** @internal */
2392
+ export const DeploymentInvoke2DeploymentsRequestRequestBodyType$outboundSchema:
2393
+ z.ZodNativeEnum<typeof DeploymentInvoke2DeploymentsRequestRequestBodyType> = z
2394
+ .nativeEnum(DeploymentInvoke2DeploymentsRequestRequestBodyType);
2395
+
2396
+ /** @internal */
2397
+ export const TwoTtl$outboundSchema: z.ZodNativeEnum<typeof TwoTtl> = z
2398
+ .nativeEnum(TwoTtl);
2399
+
2400
+ /** @internal */
2401
+ export type TwoCacheControl$Outbound = {
2402
+ type: string;
2403
+ ttl: string;
2404
+ };
2405
+
2406
+ /** @internal */
2407
+ export const TwoCacheControl$outboundSchema: z.ZodType<
2408
+ TwoCacheControl$Outbound,
2409
+ z.ZodTypeDef,
2410
+ TwoCacheControl
2411
+ > = z.object({
2412
+ type: DeploymentInvoke2DeploymentsRequestRequestBodyType$outboundSchema,
2413
+ ttl: TwoTtl$outboundSchema.default("5m"),
2414
+ });
2415
+
2416
+ export function twoCacheControlToJSON(
2417
+ twoCacheControl: TwoCacheControl,
2418
+ ): string {
2419
+ return JSON.stringify(TwoCacheControl$outboundSchema.parse(twoCacheControl));
2420
+ }
2421
+
2422
+ /** @internal */
2423
+ export type Two4$Outbound = {
2424
+ type: "file";
2425
+ cache_control?: TwoCacheControl$Outbound | undefined;
2426
+ file: components.FileContentPartSchema$Outbound;
2427
+ };
2428
+
2429
+ /** @internal */
2430
+ export const Two4$outboundSchema: z.ZodType<Two4$Outbound, z.ZodTypeDef, Two4> =
2431
+ z.object({
2432
+ type: z.literal("file"),
2433
+ cacheControl: z.lazy(() => TwoCacheControl$outboundSchema).optional(),
2434
+ file: components.FileContentPartSchema$outboundSchema,
2435
+ }).transform((v) => {
2436
+ return remap$(v, {
2437
+ cacheControl: "cache_control",
2438
+ });
2439
+ });
2440
+
2441
+ export function two4ToJSON(two4: Two4): string {
2442
+ return JSON.stringify(Two4$outboundSchema.parse(two4));
2443
+ }
2444
+
2445
+ /** @internal */
2446
+ export type DeploymentInvokeContentDeploymentsRequest2$Outbound =
2447
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2448
+ | components.ImageContentPartSchema$Outbound
2449
+ | components.AudioContentPartSchema$Outbound
2450
+ | Two4$Outbound;
2451
+
2452
+ /** @internal */
2453
+ export const DeploymentInvokeContentDeploymentsRequest2$outboundSchema:
2454
+ z.ZodType<
2455
+ DeploymentInvokeContentDeploymentsRequest2$Outbound,
2456
+ z.ZodTypeDef,
2457
+ DeploymentInvokeContentDeploymentsRequest2
2458
+ > = z.union([
2459
+ components.TextContentPartSchema$outboundSchema.and(
2460
+ z.object({ type: z.literal("text") }),
2461
+ ),
2462
+ components.ImageContentPartSchema$outboundSchema,
2463
+ components.AudioContentPartSchema$outboundSchema,
2464
+ z.lazy(() => Two4$outboundSchema),
2465
+ ]);
2466
+
2467
+ export function deploymentInvokeContentDeploymentsRequest2ToJSON(
2468
+ deploymentInvokeContentDeploymentsRequest2:
2469
+ DeploymentInvokeContentDeploymentsRequest2,
2470
+ ): string {
2471
+ return JSON.stringify(
2472
+ DeploymentInvokeContentDeploymentsRequest2$outboundSchema.parse(
2473
+ deploymentInvokeContentDeploymentsRequest2,
2474
+ ),
2475
+ );
2476
+ }
2477
+
2478
+ /** @internal */
2479
+ export type DeploymentInvokeMessagesDeploymentsContent$Outbound =
2480
+ | string
2481
+ | Array<
2482
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2483
+ | components.ImageContentPartSchema$Outbound
2484
+ | components.AudioContentPartSchema$Outbound
2485
+ | Two4$Outbound
2486
+ >;
2487
+
2488
+ /** @internal */
2489
+ export const DeploymentInvokeMessagesDeploymentsContent$outboundSchema:
2490
+ z.ZodType<
2491
+ DeploymentInvokeMessagesDeploymentsContent$Outbound,
2492
+ z.ZodTypeDef,
2493
+ DeploymentInvokeMessagesDeploymentsContent
2494
+ > = z.union([
2495
+ z.string(),
2496
+ z.array(
2497
+ z.union([
2498
+ components.TextContentPartSchema$outboundSchema.and(
2499
+ z.object({ type: z.literal("text") }),
2500
+ ),
2501
+ components.ImageContentPartSchema$outboundSchema,
2502
+ components.AudioContentPartSchema$outboundSchema,
2503
+ z.lazy(() => Two4$outboundSchema),
2504
+ ]),
2505
+ ),
2506
+ ]);
2507
+
2508
+ export function deploymentInvokeMessagesDeploymentsContentToJSON(
2509
+ deploymentInvokeMessagesDeploymentsContent:
2510
+ DeploymentInvokeMessagesDeploymentsContent,
2511
+ ): string {
2512
+ return JSON.stringify(
2513
+ DeploymentInvokeMessagesDeploymentsContent$outboundSchema.parse(
2514
+ deploymentInvokeMessagesDeploymentsContent,
2515
+ ),
2516
+ );
2517
+ }
2518
+
2519
+ /** @internal */
2520
+ export type MessagesUserMessage$Outbound = {
2521
+ role: "user";
2522
+ name?: string | undefined;
2523
+ content:
2524
+ | string
2525
+ | Array<
2526
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2527
+ | components.ImageContentPartSchema$Outbound
2528
+ | components.AudioContentPartSchema$Outbound
2529
+ | Two4$Outbound
2530
+ >;
2531
+ };
2532
+
2533
+ /** @internal */
2534
+ export const MessagesUserMessage$outboundSchema: z.ZodType<
2535
+ MessagesUserMessage$Outbound,
2536
+ z.ZodTypeDef,
2537
+ MessagesUserMessage
2538
+ > = z.object({
2539
+ role: z.literal("user"),
2540
+ name: z.string().optional(),
2541
+ content: z.union([
2542
+ z.string(),
2543
+ z.array(
2544
+ z.union([
2545
+ components.TextContentPartSchema$outboundSchema.and(
2546
+ z.object({ type: z.literal("text") }),
2547
+ ),
2548
+ components.ImageContentPartSchema$outboundSchema,
2549
+ components.AudioContentPartSchema$outboundSchema,
2550
+ z.lazy(() => Two4$outboundSchema),
2551
+ ]),
2552
+ ),
2553
+ ]),
2554
+ });
2555
+
2556
+ export function messagesUserMessageToJSON(
2557
+ messagesUserMessage: MessagesUserMessage,
2558
+ ): string {
2559
+ return JSON.stringify(
2560
+ MessagesUserMessage$outboundSchema.parse(messagesUserMessage),
2561
+ );
2562
+ }
2563
+
2564
+ /** @internal */
2565
+ export type DeploymentInvokeMessagesContent$Outbound =
2566
+ | string
2567
+ | Array<components.TextContentPartSchema$Outbound>;
2568
+
2569
+ /** @internal */
2570
+ export const DeploymentInvokeMessagesContent$outboundSchema: z.ZodType<
2571
+ DeploymentInvokeMessagesContent$Outbound,
2572
+ z.ZodTypeDef,
2573
+ DeploymentInvokeMessagesContent
2574
+ > = z.union([
2575
+ z.string(),
2576
+ z.array(components.TextContentPartSchema$outboundSchema),
2577
+ ]);
2578
+
2579
+ export function deploymentInvokeMessagesContentToJSON(
2580
+ deploymentInvokeMessagesContent: DeploymentInvokeMessagesContent,
2581
+ ): string {
2582
+ return JSON.stringify(
2583
+ DeploymentInvokeMessagesContent$outboundSchema.parse(
2584
+ deploymentInvokeMessagesContent,
2585
+ ),
2586
+ );
2587
+ }
2588
+
2589
+ /** @internal */
2590
+ export type MessagesDeveloperMessage$Outbound = {
2591
+ role: "developer";
2592
+ content: string | Array<components.TextContentPartSchema$Outbound>;
2593
+ name?: string | undefined;
2594
+ };
2595
+
2596
+ /** @internal */
2597
+ export const MessagesDeveloperMessage$outboundSchema: z.ZodType<
2598
+ MessagesDeveloperMessage$Outbound,
2599
+ z.ZodTypeDef,
2600
+ MessagesDeveloperMessage
2601
+ > = z.object({
2602
+ role: z.literal("developer"),
2603
+ content: z.union([
2604
+ z.string(),
2605
+ z.array(components.TextContentPartSchema$outboundSchema),
2606
+ ]),
2607
+ name: z.string().optional(),
2608
+ });
2609
+
2610
+ export function messagesDeveloperMessageToJSON(
2611
+ messagesDeveloperMessage: MessagesDeveloperMessage,
2612
+ ): string {
2613
+ return JSON.stringify(
2614
+ MessagesDeveloperMessage$outboundSchema.parse(messagesDeveloperMessage),
2615
+ );
2616
+ }
2617
+
2618
+ /** @internal */
2619
+ export type MessagesContent$Outbound =
2620
+ | string
2621
+ | Array<components.TextContentPartSchema$Outbound>;
2622
+
2623
+ /** @internal */
2624
+ export const MessagesContent$outboundSchema: z.ZodType<
2625
+ MessagesContent$Outbound,
2626
+ z.ZodTypeDef,
2627
+ MessagesContent
2628
+ > = z.union([
2629
+ z.string(),
2630
+ z.array(components.TextContentPartSchema$outboundSchema),
2631
+ ]);
2632
+
2633
+ export function messagesContentToJSON(
2634
+ messagesContent: MessagesContent,
2635
+ ): string {
2636
+ return JSON.stringify(MessagesContent$outboundSchema.parse(messagesContent));
2637
+ }
2638
+
2639
+ /** @internal */
2640
+ export type MessagesSystemMessage$Outbound = {
2641
+ role: "system";
2642
+ content: string | Array<components.TextContentPartSchema$Outbound>;
2643
+ name?: string | undefined;
2644
+ };
2645
+
2646
+ /** @internal */
2647
+ export const MessagesSystemMessage$outboundSchema: z.ZodType<
2648
+ MessagesSystemMessage$Outbound,
2649
+ z.ZodTypeDef,
2650
+ MessagesSystemMessage
2651
+ > = z.object({
2652
+ role: z.literal("system"),
2653
+ content: z.union([
2654
+ z.string(),
2655
+ z.array(components.TextContentPartSchema$outboundSchema),
2656
+ ]),
2657
+ name: z.string().optional(),
2658
+ });
2659
+
2660
+ export function messagesSystemMessageToJSON(
2661
+ messagesSystemMessage: MessagesSystemMessage,
2662
+ ): string {
2663
+ return JSON.stringify(
2664
+ MessagesSystemMessage$outboundSchema.parse(messagesSystemMessage),
2665
+ );
2666
+ }
2667
+
2668
+ /** @internal */
2669
+ export type DeploymentInvokeMessages$Outbound =
2670
+ | MessagesSystemMessage$Outbound
2671
+ | MessagesDeveloperMessage$Outbound
2672
+ | MessagesUserMessage$Outbound
2673
+ | MessagesAssistantMessage$Outbound
2674
+ | MessagesToolMessage$Outbound;
2675
+
2676
+ /** @internal */
2677
+ export const DeploymentInvokeMessages$outboundSchema: z.ZodType<
2678
+ DeploymentInvokeMessages$Outbound,
2679
+ z.ZodTypeDef,
2680
+ DeploymentInvokeMessages
2681
+ > = z.union([
2682
+ z.lazy(() => MessagesSystemMessage$outboundSchema),
2683
+ z.lazy(() => MessagesDeveloperMessage$outboundSchema),
2684
+ z.lazy(() => MessagesUserMessage$outboundSchema),
2685
+ z.lazy(() => MessagesAssistantMessage$outboundSchema),
2686
+ z.lazy(() => MessagesToolMessage$outboundSchema),
2687
+ ]);
2688
+
2689
+ export function deploymentInvokeMessagesToJSON(
2690
+ deploymentInvokeMessages: DeploymentInvokeMessages,
2691
+ ): string {
2692
+ return JSON.stringify(
2693
+ DeploymentInvokeMessages$outboundSchema.parse(deploymentInvokeMessages),
2694
+ );
2695
+ }
2696
+
2697
+ /** @internal */
2698
+ export type Metadata$Outbound = {
2699
+ file_name?: string | undefined;
2700
+ file_type?: string | undefined;
2701
+ page_number?: number | undefined;
2702
+ };
2703
+
2704
+ /** @internal */
2705
+ export const Metadata$outboundSchema: z.ZodType<
2706
+ Metadata$Outbound,
2707
+ z.ZodTypeDef,
2708
+ Metadata
2709
+ > = z.object({
2710
+ fileName: z.string().optional(),
2711
+ fileType: z.string().optional(),
2712
+ pageNumber: z.number().optional(),
2713
+ }).transform((v) => {
2714
+ return remap$(v, {
2715
+ fileName: "file_name",
2716
+ fileType: "file_type",
2717
+ pageNumber: "page_number",
2718
+ });
2719
+ });
2720
+
2721
+ export function metadataToJSON(metadata: Metadata): string {
2722
+ return JSON.stringify(Metadata$outboundSchema.parse(metadata));
2723
+ }
2724
+
2725
+ /** @internal */
2726
+ export type Documents$Outbound = {
2727
+ text: string;
2728
+ metadata?: Metadata$Outbound | undefined;
2729
+ };
2730
+
2731
+ /** @internal */
2732
+ export const Documents$outboundSchema: z.ZodType<
2733
+ Documents$Outbound,
2734
+ z.ZodTypeDef,
2735
+ Documents
2736
+ > = z.object({
2737
+ text: z.string(),
2738
+ metadata: z.lazy(() => Metadata$outboundSchema).optional(),
2739
+ });
2740
+
2741
+ export function documentsToJSON(documents: Documents): string {
2742
+ return JSON.stringify(Documents$outboundSchema.parse(documents));
2743
+ }
2744
+
2745
+ /** @internal */
2746
+ export type InvokeOptions$Outbound = {
2747
+ include_retrievals: boolean;
2748
+ include_usage: boolean;
2749
+ mock_response?: string | undefined;
2750
+ };
2751
+
2752
+ /** @internal */
2753
+ export const InvokeOptions$outboundSchema: z.ZodType<
2754
+ InvokeOptions$Outbound,
2755
+ z.ZodTypeDef,
2756
+ InvokeOptions
2757
+ > = z.object({
2758
+ includeRetrievals: z.boolean().default(false),
2759
+ includeUsage: z.boolean().default(false),
2760
+ mockResponse: z.string().optional(),
2761
+ }).transform((v) => {
2762
+ return remap$(v, {
2763
+ includeRetrievals: "include_retrievals",
2764
+ includeUsage: "include_usage",
2765
+ mockResponse: "mock_response",
2766
+ });
2767
+ });
2768
+
2769
+ export function invokeOptionsToJSON(invokeOptions: InvokeOptions): string {
2770
+ return JSON.stringify(InvokeOptions$outboundSchema.parse(invokeOptions));
2771
+ }
2772
+
2773
+ /** @internal */
2774
+ export type Thread$Outbound = {
2775
+ id: string;
2776
+ tags?: Array<string> | undefined;
2777
+ };
2778
+
2779
+ /** @internal */
2780
+ export const Thread$outboundSchema: z.ZodType<
2781
+ Thread$Outbound,
2782
+ z.ZodTypeDef,
2783
+ Thread
2784
+ > = z.object({
2785
+ id: z.string(),
2786
+ tags: z.array(z.string()).optional(),
2787
+ });
2788
+
2789
+ export function threadToJSON(thread: Thread): string {
2790
+ return JSON.stringify(Thread$outboundSchema.parse(thread));
2791
+ }
2792
+
2793
+ /** @internal */
2794
+ export type OrExists$Outbound = {
2795
+ exists: boolean;
2796
+ };
2797
+
2798
+ /** @internal */
2799
+ export const OrExists$outboundSchema: z.ZodType<
2800
+ OrExists$Outbound,
2801
+ z.ZodTypeDef,
2802
+ OrExists
2803
+ > = z.object({
2804
+ exists: z.boolean(),
2805
+ });
2806
+
2807
+ export function orExistsToJSON(orExists: OrExists): string {
2808
+ return JSON.stringify(OrExists$outboundSchema.parse(orExists));
2809
+ }
2810
+
2811
+ /** @internal */
2812
+ export type DeploymentInvokeOrNin$Outbound = string | number | boolean;
2813
+
2814
+ /** @internal */
2815
+ export const DeploymentInvokeOrNin$outboundSchema: z.ZodType<
2816
+ DeploymentInvokeOrNin$Outbound,
2817
+ z.ZodTypeDef,
2818
+ DeploymentInvokeOrNin
2819
+ > = z.union([z.string(), z.number(), z.boolean()]);
2820
+
2821
+ export function deploymentInvokeOrNinToJSON(
2822
+ deploymentInvokeOrNin: DeploymentInvokeOrNin,
2823
+ ): string {
2824
+ return JSON.stringify(
2825
+ DeploymentInvokeOrNin$outboundSchema.parse(deploymentInvokeOrNin),
2826
+ );
2827
+ }
2828
+
2829
+ /** @internal */
2830
+ export type OrNin$Outbound = {
2831
+ nin: Array<string | number | boolean>;
2832
+ };
2833
+
2834
+ /** @internal */
2835
+ export const OrNin$outboundSchema: z.ZodType<
2836
+ OrNin$Outbound,
2837
+ z.ZodTypeDef,
2838
+ OrNin
2839
+ > = z.object({
2840
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
2841
+ });
2842
+
2843
+ export function orNinToJSON(orNin: OrNin): string {
2844
+ return JSON.stringify(OrNin$outboundSchema.parse(orNin));
2845
+ }
2846
+
2847
+ /** @internal */
2848
+ export type DeploymentInvokeOrIn$Outbound = string | number | boolean;
2849
+
2850
+ /** @internal */
2851
+ export const DeploymentInvokeOrIn$outboundSchema: z.ZodType<
2852
+ DeploymentInvokeOrIn$Outbound,
2853
+ z.ZodTypeDef,
2854
+ DeploymentInvokeOrIn
2855
+ > = z.union([z.string(), z.number(), z.boolean()]);
2856
+
2857
+ export function deploymentInvokeOrInToJSON(
2858
+ deploymentInvokeOrIn: DeploymentInvokeOrIn,
2859
+ ): string {
2860
+ return JSON.stringify(
2861
+ DeploymentInvokeOrIn$outboundSchema.parse(deploymentInvokeOrIn),
2862
+ );
2863
+ }
2864
+
2865
+ /** @internal */
2866
+ export type OrIn$Outbound = {
2867
+ in: Array<string | number | boolean>;
2868
+ };
2869
+
2870
+ /** @internal */
2871
+ export const OrIn$outboundSchema: z.ZodType<OrIn$Outbound, z.ZodTypeDef, OrIn> =
2872
+ z.object({
2873
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
2874
+ });
2875
+
2876
+ export function orInToJSON(orIn: OrIn): string {
2877
+ return JSON.stringify(OrIn$outboundSchema.parse(orIn));
2878
+ }
2879
+
2880
+ /** @internal */
2881
+ export type OrLte$Outbound = {
2882
+ lte: number;
2883
+ };
2884
+
2885
+ /** @internal */
2886
+ export const OrLte$outboundSchema: z.ZodType<
2887
+ OrLte$Outbound,
2888
+ z.ZodTypeDef,
2889
+ OrLte
2890
+ > = z.object({
2891
+ lte: z.number(),
2892
+ });
2893
+
2894
+ export function orLteToJSON(orLte: OrLte): string {
2895
+ return JSON.stringify(OrLte$outboundSchema.parse(orLte));
2896
+ }
2897
+
2898
+ /** @internal */
2899
+ export type OrLt$Outbound = {
2900
+ lt: number;
2901
+ };
2902
+
2903
+ /** @internal */
2904
+ export const OrLt$outboundSchema: z.ZodType<OrLt$Outbound, z.ZodTypeDef, OrLt> =
2905
+ z.object({
2906
+ lt: z.number(),
2907
+ });
2908
+
2909
+ export function orLtToJSON(orLt: OrLt): string {
2910
+ return JSON.stringify(OrLt$outboundSchema.parse(orLt));
2911
+ }
2912
+
2913
+ /** @internal */
2914
+ export type OrGte$Outbound = {
2915
+ gte: number;
2916
+ };
2917
+
2918
+ /** @internal */
2919
+ export const OrGte$outboundSchema: z.ZodType<
2920
+ OrGte$Outbound,
2921
+ z.ZodTypeDef,
2922
+ OrGte
2923
+ > = z.object({
2924
+ gte: z.number(),
2925
+ });
2926
+
2927
+ export function orGteToJSON(orGte: OrGte): string {
2928
+ return JSON.stringify(OrGte$outboundSchema.parse(orGte));
2929
+ }
2930
+
2931
+ /** @internal */
2932
+ export type OrGt$Outbound = {
2933
+ gt: number;
2934
+ };
2935
+
2936
+ /** @internal */
2937
+ export const OrGt$outboundSchema: z.ZodType<OrGt$Outbound, z.ZodTypeDef, OrGt> =
2938
+ z.object({
2939
+ gt: z.number(),
2940
+ });
2941
+
2942
+ export function orGtToJSON(orGt: OrGt): string {
2943
+ return JSON.stringify(OrGt$outboundSchema.parse(orGt));
2944
+ }
2945
+
2946
+ /** @internal */
2947
+ export type DeploymentInvokeOrNe$Outbound = string | number | boolean;
2948
+
2949
+ /** @internal */
2950
+ export const DeploymentInvokeOrNe$outboundSchema: z.ZodType<
2951
+ DeploymentInvokeOrNe$Outbound,
2952
+ z.ZodTypeDef,
2953
+ DeploymentInvokeOrNe
2954
+ > = z.union([z.string(), z.number(), z.boolean()]);
2955
+
2956
+ export function deploymentInvokeOrNeToJSON(
2957
+ deploymentInvokeOrNe: DeploymentInvokeOrNe,
2958
+ ): string {
2959
+ return JSON.stringify(
2960
+ DeploymentInvokeOrNe$outboundSchema.parse(deploymentInvokeOrNe),
2961
+ );
2962
+ }
2963
+
2964
+ /** @internal */
2965
+ export type OrNe$Outbound = {
2966
+ ne: string | number | boolean;
2967
+ };
2968
+
2969
+ /** @internal */
2970
+ export const OrNe$outboundSchema: z.ZodType<OrNe$Outbound, z.ZodTypeDef, OrNe> =
2971
+ z.object({
2972
+ ne: z.union([z.string(), z.number(), z.boolean()]),
2973
+ });
2974
+
2975
+ export function orNeToJSON(orNe: OrNe): string {
2976
+ return JSON.stringify(OrNe$outboundSchema.parse(orNe));
2977
+ }
2978
+
2979
+ /** @internal */
2980
+ export type DeploymentInvokeOrEq$Outbound = string | number | boolean;
2981
+
2982
+ /** @internal */
2983
+ export const DeploymentInvokeOrEq$outboundSchema: z.ZodType<
2984
+ DeploymentInvokeOrEq$Outbound,
2985
+ z.ZodTypeDef,
2986
+ DeploymentInvokeOrEq
2987
+ > = z.union([z.string(), z.number(), z.boolean()]);
2988
+
2989
+ export function deploymentInvokeOrEqToJSON(
2990
+ deploymentInvokeOrEq: DeploymentInvokeOrEq,
2991
+ ): string {
2992
+ return JSON.stringify(
2993
+ DeploymentInvokeOrEq$outboundSchema.parse(deploymentInvokeOrEq),
2994
+ );
2995
+ }
2996
+
2997
+ /** @internal */
2998
+ export type OrEq$Outbound = {
2999
+ eq: string | number | boolean;
3000
+ };
3001
+
3002
+ /** @internal */
3003
+ export const OrEq$outboundSchema: z.ZodType<OrEq$Outbound, z.ZodTypeDef, OrEq> =
3004
+ z.object({
3005
+ eq: z.union([z.string(), z.number(), z.boolean()]),
3006
+ });
3007
+
3008
+ export function orEqToJSON(orEq: OrEq): string {
3009
+ return JSON.stringify(OrEq$outboundSchema.parse(orEq));
3010
+ }
3011
+
3012
+ /** @internal */
3013
+ export type KnowledgeFilterOr$Outbound =
3014
+ | OrEq$Outbound
3015
+ | OrNe$Outbound
3016
+ | OrGt$Outbound
3017
+ | OrGte$Outbound
3018
+ | OrLt$Outbound
3019
+ | OrLte$Outbound
3020
+ | OrIn$Outbound
3021
+ | OrNin$Outbound
3022
+ | OrExists$Outbound;
3023
+
3024
+ /** @internal */
3025
+ export const KnowledgeFilterOr$outboundSchema: z.ZodType<
3026
+ KnowledgeFilterOr$Outbound,
3027
+ z.ZodTypeDef,
3028
+ KnowledgeFilterOr
3029
+ > = z.union([
3030
+ z.lazy(() => OrEq$outboundSchema),
3031
+ z.lazy(() => OrNe$outboundSchema),
3032
+ z.lazy(() => OrGt$outboundSchema),
3033
+ z.lazy(() => OrGte$outboundSchema),
3034
+ z.lazy(() => OrLt$outboundSchema),
3035
+ z.lazy(() => OrLte$outboundSchema),
3036
+ z.lazy(() => OrIn$outboundSchema),
3037
+ z.lazy(() => OrNin$outboundSchema),
3038
+ z.lazy(() => OrExists$outboundSchema),
3039
+ ]);
3040
+
3041
+ export function knowledgeFilterOrToJSON(
3042
+ knowledgeFilterOr: KnowledgeFilterOr,
3043
+ ): string {
3044
+ return JSON.stringify(
3045
+ KnowledgeFilterOr$outboundSchema.parse(knowledgeFilterOr),
3046
+ );
3047
+ }
3048
+
3049
+ /** @internal */
3050
+ export type Or$Outbound = {
3051
+ or: Array<
3052
+ {
3053
+ [k: string]:
3054
+ | OrEq$Outbound
3055
+ | OrNe$Outbound
3056
+ | OrGt$Outbound
3057
+ | OrGte$Outbound
3058
+ | OrLt$Outbound
3059
+ | OrLte$Outbound
3060
+ | OrIn$Outbound
3061
+ | OrNin$Outbound
3062
+ | OrExists$Outbound;
3063
+ }
3064
+ >;
3065
+ };
3066
+
3067
+ /** @internal */
3068
+ export const Or$outboundSchema: z.ZodType<Or$Outbound, z.ZodTypeDef, Or> = z
3069
+ .object({
3070
+ or: z.array(
3071
+ z.record(z.union([
3072
+ z.lazy(() => OrEq$outboundSchema),
3073
+ z.lazy(() =>
3074
+ OrNe$outboundSchema
3075
+ ),
3076
+ z.lazy(() => OrGt$outboundSchema),
3077
+ z.lazy(() => OrGte$outboundSchema),
3078
+ z.lazy(() => OrLt$outboundSchema),
3079
+ z.lazy(() => OrLte$outboundSchema),
3080
+ z.lazy(() => OrIn$outboundSchema),
3081
+ z.lazy(() => OrNin$outboundSchema),
3082
+ z.lazy(() => OrExists$outboundSchema),
3083
+ ])),
3084
+ ),
3085
+ });
3086
+
3087
+ export function orToJSON(or: Or): string {
3088
+ return JSON.stringify(Or$outboundSchema.parse(or));
3089
+ }
3090
+
3091
+ /** @internal */
3092
+ export type AndExists$Outbound = {
3093
+ exists: boolean;
3094
+ };
3095
+
3096
+ /** @internal */
3097
+ export const AndExists$outboundSchema: z.ZodType<
3098
+ AndExists$Outbound,
3099
+ z.ZodTypeDef,
3100
+ AndExists
3101
+ > = z.object({
3102
+ exists: z.boolean(),
3103
+ });
3104
+
3105
+ export function andExistsToJSON(andExists: AndExists): string {
3106
+ return JSON.stringify(AndExists$outboundSchema.parse(andExists));
3107
+ }
3108
+
3109
+ /** @internal */
3110
+ export type DeploymentInvokeAndNin$Outbound = string | number | boolean;
3111
+
3112
+ /** @internal */
3113
+ export const DeploymentInvokeAndNin$outboundSchema: z.ZodType<
3114
+ DeploymentInvokeAndNin$Outbound,
3115
+ z.ZodTypeDef,
3116
+ DeploymentInvokeAndNin
3117
+ > = z.union([z.string(), z.number(), z.boolean()]);
3118
+
3119
+ export function deploymentInvokeAndNinToJSON(
3120
+ deploymentInvokeAndNin: DeploymentInvokeAndNin,
3121
+ ): string {
3122
+ return JSON.stringify(
3123
+ DeploymentInvokeAndNin$outboundSchema.parse(deploymentInvokeAndNin),
3124
+ );
3125
+ }
3126
+
3127
+ /** @internal */
3128
+ export type AndNin$Outbound = {
3129
+ nin: Array<string | number | boolean>;
3130
+ };
3131
+
3132
+ /** @internal */
3133
+ export const AndNin$outboundSchema: z.ZodType<
3134
+ AndNin$Outbound,
3135
+ z.ZodTypeDef,
3136
+ AndNin
3137
+ > = z.object({
3138
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
3139
+ });
3140
+
3141
+ export function andNinToJSON(andNin: AndNin): string {
3142
+ return JSON.stringify(AndNin$outboundSchema.parse(andNin));
3143
+ }
3144
+
3145
+ /** @internal */
3146
+ export type DeploymentInvokeAndIn$Outbound = string | number | boolean;
3147
+
3148
+ /** @internal */
3149
+ export const DeploymentInvokeAndIn$outboundSchema: z.ZodType<
3150
+ DeploymentInvokeAndIn$Outbound,
3151
+ z.ZodTypeDef,
3152
+ DeploymentInvokeAndIn
3153
+ > = z.union([z.string(), z.number(), z.boolean()]);
3154
+
3155
+ export function deploymentInvokeAndInToJSON(
3156
+ deploymentInvokeAndIn: DeploymentInvokeAndIn,
3157
+ ): string {
3158
+ return JSON.stringify(
3159
+ DeploymentInvokeAndIn$outboundSchema.parse(deploymentInvokeAndIn),
3160
+ );
3161
+ }
3162
+
3163
+ /** @internal */
3164
+ export type AndIn$Outbound = {
3165
+ in: Array<string | number | boolean>;
3166
+ };
3167
+
3168
+ /** @internal */
3169
+ export const AndIn$outboundSchema: z.ZodType<
3170
+ AndIn$Outbound,
3171
+ z.ZodTypeDef,
3172
+ AndIn
3173
+ > = z.object({
3174
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
3175
+ });
3176
+
3177
+ export function andInToJSON(andIn: AndIn): string {
3178
+ return JSON.stringify(AndIn$outboundSchema.parse(andIn));
3179
+ }
3180
+
3181
+ /** @internal */
3182
+ export type AndLte$Outbound = {
3183
+ lte: number;
3184
+ };
3185
+
3186
+ /** @internal */
3187
+ export const AndLte$outboundSchema: z.ZodType<
3188
+ AndLte$Outbound,
3189
+ z.ZodTypeDef,
3190
+ AndLte
3191
+ > = z.object({
3192
+ lte: z.number(),
3193
+ });
3194
+
3195
+ export function andLteToJSON(andLte: AndLte): string {
3196
+ return JSON.stringify(AndLte$outboundSchema.parse(andLte));
3197
+ }
3198
+
3199
+ /** @internal */
3200
+ export type AndLt$Outbound = {
3201
+ lt: number;
3202
+ };
3203
+
3204
+ /** @internal */
3205
+ export const AndLt$outboundSchema: z.ZodType<
3206
+ AndLt$Outbound,
3207
+ z.ZodTypeDef,
3208
+ AndLt
3209
+ > = z.object({
3210
+ lt: z.number(),
3211
+ });
3212
+
3213
+ export function andLtToJSON(andLt: AndLt): string {
3214
+ return JSON.stringify(AndLt$outboundSchema.parse(andLt));
3215
+ }
3216
+
3217
+ /** @internal */
3218
+ export type AndGte$Outbound = {
3219
+ gte: number;
3220
+ };
3221
+
3222
+ /** @internal */
3223
+ export const AndGte$outboundSchema: z.ZodType<
3224
+ AndGte$Outbound,
3225
+ z.ZodTypeDef,
3226
+ AndGte
3227
+ > = z.object({
3228
+ gte: z.number(),
3229
+ });
3230
+
3231
+ export function andGteToJSON(andGte: AndGte): string {
3232
+ return JSON.stringify(AndGte$outboundSchema.parse(andGte));
3233
+ }
3234
+
3235
+ /** @internal */
3236
+ export type AndGt$Outbound = {
3237
+ gt: number;
3238
+ };
3239
+
3240
+ /** @internal */
3241
+ export const AndGt$outboundSchema: z.ZodType<
3242
+ AndGt$Outbound,
3243
+ z.ZodTypeDef,
3244
+ AndGt
3245
+ > = z.object({
3246
+ gt: z.number(),
3247
+ });
3248
+
3249
+ export function andGtToJSON(andGt: AndGt): string {
3250
+ return JSON.stringify(AndGt$outboundSchema.parse(andGt));
3251
+ }
3252
+
3253
+ /** @internal */
3254
+ export type DeploymentInvokeAndNe$Outbound = string | number | boolean;
3255
+
3256
+ /** @internal */
3257
+ export const DeploymentInvokeAndNe$outboundSchema: z.ZodType<
3258
+ DeploymentInvokeAndNe$Outbound,
3259
+ z.ZodTypeDef,
3260
+ DeploymentInvokeAndNe
3261
+ > = z.union([z.string(), z.number(), z.boolean()]);
3262
+
3263
+ export function deploymentInvokeAndNeToJSON(
3264
+ deploymentInvokeAndNe: DeploymentInvokeAndNe,
3265
+ ): string {
3266
+ return JSON.stringify(
3267
+ DeploymentInvokeAndNe$outboundSchema.parse(deploymentInvokeAndNe),
3268
+ );
3269
+ }
3270
+
3271
+ /** @internal */
3272
+ export type AndNe$Outbound = {
3273
+ ne: string | number | boolean;
3274
+ };
3275
+
3276
+ /** @internal */
3277
+ export const AndNe$outboundSchema: z.ZodType<
3278
+ AndNe$Outbound,
3279
+ z.ZodTypeDef,
3280
+ AndNe
3281
+ > = z.object({
3282
+ ne: z.union([z.string(), z.number(), z.boolean()]),
3283
+ });
3284
+
3285
+ export function andNeToJSON(andNe: AndNe): string {
3286
+ return JSON.stringify(AndNe$outboundSchema.parse(andNe));
3287
+ }
3288
+
3289
+ /** @internal */
3290
+ export type DeploymentInvokeAndEq$Outbound = string | number | boolean;
3291
+
3292
+ /** @internal */
3293
+ export const DeploymentInvokeAndEq$outboundSchema: z.ZodType<
3294
+ DeploymentInvokeAndEq$Outbound,
3295
+ z.ZodTypeDef,
3296
+ DeploymentInvokeAndEq
3297
+ > = z.union([z.string(), z.number(), z.boolean()]);
3298
+
3299
+ export function deploymentInvokeAndEqToJSON(
3300
+ deploymentInvokeAndEq: DeploymentInvokeAndEq,
3301
+ ): string {
3302
+ return JSON.stringify(
3303
+ DeploymentInvokeAndEq$outboundSchema.parse(deploymentInvokeAndEq),
3304
+ );
3305
+ }
3306
+
3307
+ /** @internal */
3308
+ export type AndEq$Outbound = {
3309
+ eq: string | number | boolean;
3310
+ };
3311
+
3312
+ /** @internal */
3313
+ export const AndEq$outboundSchema: z.ZodType<
3314
+ AndEq$Outbound,
3315
+ z.ZodTypeDef,
3316
+ AndEq
3317
+ > = z.object({
3318
+ eq: z.union([z.string(), z.number(), z.boolean()]),
3319
+ });
3320
+
3321
+ export function andEqToJSON(andEq: AndEq): string {
3322
+ return JSON.stringify(AndEq$outboundSchema.parse(andEq));
3323
+ }
3324
+
3325
+ /** @internal */
3326
+ export type KnowledgeFilterAnd$Outbound =
3327
+ | AndEq$Outbound
3328
+ | AndNe$Outbound
3329
+ | AndGt$Outbound
3330
+ | AndGte$Outbound
3331
+ | AndLt$Outbound
3332
+ | AndLte$Outbound
3333
+ | AndIn$Outbound
3334
+ | AndNin$Outbound
3335
+ | AndExists$Outbound;
3336
+
3337
+ /** @internal */
3338
+ export const KnowledgeFilterAnd$outboundSchema: z.ZodType<
3339
+ KnowledgeFilterAnd$Outbound,
3340
+ z.ZodTypeDef,
3341
+ KnowledgeFilterAnd
3342
+ > = z.union([
3343
+ z.lazy(() => AndEq$outboundSchema),
3344
+ z.lazy(() => AndNe$outboundSchema),
3345
+ z.lazy(() => AndGt$outboundSchema),
3346
+ z.lazy(() => AndGte$outboundSchema),
3347
+ z.lazy(() => AndLt$outboundSchema),
3348
+ z.lazy(() => AndLte$outboundSchema),
3349
+ z.lazy(() => AndIn$outboundSchema),
3350
+ z.lazy(() => AndNin$outboundSchema),
3351
+ z.lazy(() => AndExists$outboundSchema),
3352
+ ]);
3353
+
3354
+ export function knowledgeFilterAndToJSON(
3355
+ knowledgeFilterAnd: KnowledgeFilterAnd,
3356
+ ): string {
3357
+ return JSON.stringify(
3358
+ KnowledgeFilterAnd$outboundSchema.parse(knowledgeFilterAnd),
3359
+ );
3360
+ }
3361
+
3362
+ /** @internal */
3363
+ export type And$Outbound = {
3364
+ and: Array<
3365
+ {
3366
+ [k: string]:
3367
+ | AndEq$Outbound
3368
+ | AndNe$Outbound
3369
+ | AndGt$Outbound
3370
+ | AndGte$Outbound
3371
+ | AndLt$Outbound
3372
+ | AndLte$Outbound
3373
+ | AndIn$Outbound
3374
+ | AndNin$Outbound
3375
+ | AndExists$Outbound;
3376
+ }
3377
+ >;
3378
+ };
3379
+
3380
+ /** @internal */
3381
+ export const And$outboundSchema: z.ZodType<And$Outbound, z.ZodTypeDef, And> = z
3382
+ .object({
3383
+ and: z.array(
3384
+ z.record(z.union([
3385
+ z.lazy(() => AndEq$outboundSchema),
3386
+ z.lazy(() =>
3387
+ AndNe$outboundSchema
3388
+ ),
3389
+ z.lazy(() => AndGt$outboundSchema),
3390
+ z.lazy(() => AndGte$outboundSchema),
3391
+ z.lazy(() => AndLt$outboundSchema),
3392
+ z.lazy(() => AndLte$outboundSchema),
3393
+ z.lazy(() => AndIn$outboundSchema),
3394
+ z.lazy(() => AndNin$outboundSchema),
3395
+ z.lazy(() => AndExists$outboundSchema),
3396
+ ])),
3397
+ ),
3398
+ });
3399
+
3400
+ export function andToJSON(and: And): string {
3401
+ return JSON.stringify(And$outboundSchema.parse(and));
3402
+ }
3403
+
3404
+ /** @internal */
3405
+ export type Exists$Outbound = {
3406
+ exists: boolean;
3407
+ };
3408
+
3409
+ /** @internal */
3410
+ export const Exists$outboundSchema: z.ZodType<
3411
+ Exists$Outbound,
3412
+ z.ZodTypeDef,
3413
+ Exists
3414
+ > = z.object({
3415
+ exists: z.boolean(),
3416
+ });
3417
+
3418
+ export function existsToJSON(exists: Exists): string {
3419
+ return JSON.stringify(Exists$outboundSchema.parse(exists));
3420
+ }
3421
+
3422
+ /** @internal */
3423
+ export type OneNin$Outbound = string | number | boolean;
3424
+
3425
+ /** @internal */
3426
+ export const OneNin$outboundSchema: z.ZodType<
3427
+ OneNin$Outbound,
3428
+ z.ZodTypeDef,
3429
+ OneNin
3430
+ > = z.union([z.string(), z.number(), z.boolean()]);
3431
+
3432
+ export function oneNinToJSON(oneNin: OneNin): string {
3433
+ return JSON.stringify(OneNin$outboundSchema.parse(oneNin));
3434
+ }
3435
+
3436
+ /** @internal */
3437
+ export type Nin$Outbound = {
3438
+ nin: Array<string | number | boolean>;
3439
+ };
3440
+
3441
+ /** @internal */
3442
+ export const Nin$outboundSchema: z.ZodType<Nin$Outbound, z.ZodTypeDef, Nin> = z
3443
+ .object({
3444
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
3445
+ });
3446
+
3447
+ export function ninToJSON(nin: Nin): string {
3448
+ return JSON.stringify(Nin$outboundSchema.parse(nin));
3449
+ }
3450
+
3451
+ /** @internal */
3452
+ export type OneIn$Outbound = string | number | boolean;
3453
+
3454
+ /** @internal */
3455
+ export const OneIn$outboundSchema: z.ZodType<
3456
+ OneIn$Outbound,
3457
+ z.ZodTypeDef,
3458
+ OneIn
3459
+ > = z.union([z.string(), z.number(), z.boolean()]);
3460
+
3461
+ export function oneInToJSON(oneIn: OneIn): string {
3462
+ return JSON.stringify(OneIn$outboundSchema.parse(oneIn));
3463
+ }
3464
+
3465
+ /** @internal */
3466
+ export type In$Outbound = {
3467
+ in: Array<string | number | boolean>;
3468
+ };
3469
+
3470
+ /** @internal */
3471
+ export const In$outboundSchema: z.ZodType<In$Outbound, z.ZodTypeDef, In> = z
3472
+ .object({
3473
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
3474
+ });
3475
+
3476
+ export function inToJSON(value: In): string {
3477
+ return JSON.stringify(In$outboundSchema.parse(value));
3478
+ }
3479
+
3480
+ /** @internal */
3481
+ export type Lte$Outbound = {
3482
+ lte: number;
3483
+ };
3484
+
3485
+ /** @internal */
3486
+ export const Lte$outboundSchema: z.ZodType<Lte$Outbound, z.ZodTypeDef, Lte> = z
3487
+ .object({
3488
+ lte: z.number(),
3489
+ });
3490
+
3491
+ export function lteToJSON(lte: Lte): string {
3492
+ return JSON.stringify(Lte$outboundSchema.parse(lte));
3493
+ }
3494
+
3495
+ /** @internal */
3496
+ export type Lt$Outbound = {
3497
+ lt: number;
3498
+ };
3499
+
3500
+ /** @internal */
3501
+ export const Lt$outboundSchema: z.ZodType<Lt$Outbound, z.ZodTypeDef, Lt> = z
3502
+ .object({
3503
+ lt: z.number(),
3504
+ });
3505
+
3506
+ export function ltToJSON(lt: Lt): string {
3507
+ return JSON.stringify(Lt$outboundSchema.parse(lt));
3508
+ }
3509
+
3510
+ /** @internal */
3511
+ export type Gte$Outbound = {
3512
+ gte: number;
3513
+ };
3514
+
3515
+ /** @internal */
3516
+ export const Gte$outboundSchema: z.ZodType<Gte$Outbound, z.ZodTypeDef, Gte> = z
3517
+ .object({
3518
+ gte: z.number(),
3519
+ });
3520
+
3521
+ export function gteToJSON(gte: Gte): string {
3522
+ return JSON.stringify(Gte$outboundSchema.parse(gte));
3523
+ }
3524
+
3525
+ /** @internal */
3526
+ export type Gt$Outbound = {
3527
+ gt: number;
3528
+ };
3529
+
3530
+ /** @internal */
3531
+ export const Gt$outboundSchema: z.ZodType<Gt$Outbound, z.ZodTypeDef, Gt> = z
3532
+ .object({
3533
+ gt: z.number(),
3534
+ });
3535
+
3536
+ export function gtToJSON(gt: Gt): string {
3537
+ return JSON.stringify(Gt$outboundSchema.parse(gt));
3538
+ }
3539
+
3540
+ /** @internal */
3541
+ export type OneNe$Outbound = string | number | boolean;
3542
+
3543
+ /** @internal */
3544
+ export const OneNe$outboundSchema: z.ZodType<
3545
+ OneNe$Outbound,
3546
+ z.ZodTypeDef,
3547
+ OneNe
3548
+ > = z.union([z.string(), z.number(), z.boolean()]);
3549
+
3550
+ export function oneNeToJSON(oneNe: OneNe): string {
3551
+ return JSON.stringify(OneNe$outboundSchema.parse(oneNe));
3552
+ }
125
3553
 
126
- export type CompletionTokensDetails = {
127
- reasoningTokens?: number | null | undefined;
3554
+ /** @internal */
3555
+ export type Ne$Outbound = {
3556
+ ne: string | number | boolean;
128
3557
  };
129
3558
 
130
- /**
131
- * Usage metrics for the response
132
- */
133
- export type DeploymentInvokeUsage = {
134
- totalTokens?: number | undefined;
135
- promptTokens?: number | undefined;
136
- completionTokens?: number | undefined;
137
- promptTokensDetails?: PromptTokensDetails | undefined;
138
- completionTokensDetails?: CompletionTokensDetails | null | undefined;
139
- };
3559
+ /** @internal */
3560
+ export const Ne$outboundSchema: z.ZodType<Ne$Outbound, z.ZodTypeDef, Ne> = z
3561
+ .object({
3562
+ ne: z.union([z.string(), z.number(), z.boolean()]),
3563
+ });
140
3564
 
141
- /**
142
- * The role of the prompt message
143
- */
144
- export const DeploymentInvokeMessageDeploymentsRole = {
145
- System: "system",
146
- Developer: "developer",
147
- Assistant: "assistant",
148
- User: "user",
149
- Exception: "exception",
150
- Tool: "tool",
151
- Prompt: "prompt",
152
- Correction: "correction",
153
- ExpectedOutput: "expected_output",
154
- } as const;
155
- /**
156
- * The role of the prompt message
157
- */
158
- export type DeploymentInvokeMessageDeploymentsRole = ClosedEnum<
159
- typeof DeploymentInvokeMessageDeploymentsRole
160
- >;
3565
+ export function neToJSON(ne: Ne): string {
3566
+ return JSON.stringify(Ne$outboundSchema.parse(ne));
3567
+ }
161
3568
 
162
- export type Message3 = {
163
- type: "image";
164
- /**
165
- * The role of the prompt message
166
- */
167
- role: DeploymentInvokeMessageDeploymentsRole;
168
- url: string;
169
- };
3569
+ /** @internal */
3570
+ export type OneEq$Outbound = string | number | boolean;
170
3571
 
171
- /**
172
- * The role of the prompt message
173
- */
174
- export const DeploymentInvokeMessageRole = {
175
- System: "system",
176
- Developer: "developer",
177
- Assistant: "assistant",
178
- User: "user",
179
- Exception: "exception",
180
- Tool: "tool",
181
- Prompt: "prompt",
182
- Correction: "correction",
183
- ExpectedOutput: "expected_output",
184
- } as const;
185
- /**
186
- * The role of the prompt message
187
- */
188
- export type DeploymentInvokeMessageRole = ClosedEnum<
189
- typeof DeploymentInvokeMessageRole
190
- >;
3572
+ /** @internal */
3573
+ export const OneEq$outboundSchema: z.ZodType<
3574
+ OneEq$Outbound,
3575
+ z.ZodTypeDef,
3576
+ OneEq
3577
+ > = z.union([z.string(), z.number(), z.boolean()]);
191
3578
 
192
- export type Message2 = {
193
- type: "content";
194
- /**
195
- * The role of the prompt message
196
- */
197
- role: DeploymentInvokeMessageRole;
198
- content: string | null;
199
- /**
200
- * Internal thought process of the model
201
- */
202
- reasoning?: string | undefined;
203
- /**
204
- * The signature holds a cryptographic token which verifies that the thinking block was generated by the model, and is verified when thinking is part of a multiturn conversation. This value should not be modified and should always be sent to the API when the reasoning is redacted. Currently only supported by `Anthropic`.
205
- */
206
- reasoningSignature?: string | undefined;
207
- /**
208
- * Occasionally the model's internal reasoning will be flagged by the safety systems of the provider. When this occurs, the provider will encrypt the reasoning. These redacted reasoning is decrypted when passed back to the API, allowing the model to continue its response without losing context.
209
- */
210
- redactedReasoning?: string | undefined;
3579
+ export function oneEqToJSON(oneEq: OneEq): string {
3580
+ return JSON.stringify(OneEq$outboundSchema.parse(oneEq));
3581
+ }
3582
+
3583
+ /** @internal */
3584
+ export type Eq$Outbound = {
3585
+ eq: string | number | boolean;
211
3586
  };
212
3587
 
213
- /**
214
- * The role of the prompt message
215
- */
216
- export const MessageRole = {
217
- System: "system",
218
- Developer: "developer",
219
- Assistant: "assistant",
220
- User: "user",
221
- Exception: "exception",
222
- Tool: "tool",
223
- Prompt: "prompt",
224
- Correction: "correction",
225
- ExpectedOutput: "expected_output",
226
- } as const;
227
- /**
228
- * The role of the prompt message
229
- */
230
- export type MessageRole = ClosedEnum<typeof MessageRole>;
3588
+ /** @internal */
3589
+ export const Eq$outboundSchema: z.ZodType<Eq$Outbound, z.ZodTypeDef, Eq> = z
3590
+ .object({
3591
+ eq: z.union([z.string(), z.number(), z.boolean()]),
3592
+ });
231
3593
 
232
- export const DeploymentInvokeMessageDeploymentsResponseType = {
233
- Function: "function",
234
- } as const;
235
- export type DeploymentInvokeMessageDeploymentsResponseType = ClosedEnum<
236
- typeof DeploymentInvokeMessageDeploymentsResponseType
237
- >;
3594
+ export function eqToJSON(eq: Eq): string {
3595
+ return JSON.stringify(Eq$outboundSchema.parse(eq));
3596
+ }
238
3597
 
239
- export type MessageFunction = {
240
- name: string;
241
- /**
242
- * JSON string arguments for the functions
243
- */
244
- arguments: string;
245
- };
3598
+ /** @internal */
3599
+ export type KnowledgeFilter1$Outbound =
3600
+ | Eq$Outbound
3601
+ | Ne$Outbound
3602
+ | Gt$Outbound
3603
+ | Gte$Outbound
3604
+ | Lt$Outbound
3605
+ | Lte$Outbound
3606
+ | In$Outbound
3607
+ | Nin$Outbound
3608
+ | Exists$Outbound;
246
3609
 
247
- export type MessageToolCalls = {
248
- id?: string | undefined;
249
- index?: number | undefined;
250
- type: DeploymentInvokeMessageDeploymentsResponseType;
251
- function: MessageFunction;
252
- };
3610
+ /** @internal */
3611
+ export const KnowledgeFilter1$outboundSchema: z.ZodType<
3612
+ KnowledgeFilter1$Outbound,
3613
+ z.ZodTypeDef,
3614
+ KnowledgeFilter1
3615
+ > = z.union([
3616
+ z.lazy(() => Eq$outboundSchema),
3617
+ z.lazy(() => Ne$outboundSchema),
3618
+ z.lazy(() => Gt$outboundSchema),
3619
+ z.lazy(() => Gte$outboundSchema),
3620
+ z.lazy(() => Lt$outboundSchema),
3621
+ z.lazy(() => Lte$outboundSchema),
3622
+ z.lazy(() => In$outboundSchema),
3623
+ z.lazy(() => Nin$outboundSchema),
3624
+ z.lazy(() => Exists$outboundSchema),
3625
+ ]);
253
3626
 
254
- export type Message1 = {
255
- type: "tool_calls";
256
- /**
257
- * The role of the prompt message
258
- */
259
- role: MessageRole;
260
- content?: string | null | undefined;
261
- toolCalls: Array<MessageToolCalls>;
262
- /**
263
- * Internal thought process of the model
264
- */
265
- reasoning?: string | undefined;
266
- /**
267
- * The signature holds a cryptographic token which verifies that the thinking block was generated by the model, and is verified when thinking is part of a multiturn conversation. This value should not be modified and should always be sent to the API when the reasoning is redacted. Currently only supported by `Anthropic`.
268
- */
269
- reasoningSignature?: string | undefined;
270
- /**
271
- * Occasionally the model's internal reasoning will be flagged by the safety systems of the provider. When this occurs, the provider will encrypt the reasoning. These redacted reasoning is decrypted when passed back to the API, allowing the model to continue its response without losing context.
272
- */
273
- redactedReasoning?: string | undefined;
3627
+ export function knowledgeFilter1ToJSON(
3628
+ knowledgeFilter1: KnowledgeFilter1,
3629
+ ): string {
3630
+ return JSON.stringify(
3631
+ KnowledgeFilter1$outboundSchema.parse(knowledgeFilter1),
3632
+ );
3633
+ }
3634
+
3635
+ /** @internal */
3636
+ export type KnowledgeFilter$Outbound = And$Outbound | Or$Outbound | {
3637
+ [k: string]:
3638
+ | Eq$Outbound
3639
+ | Ne$Outbound
3640
+ | Gt$Outbound
3641
+ | Gte$Outbound
3642
+ | Lt$Outbound
3643
+ | Lte$Outbound
3644
+ | In$Outbound
3645
+ | Nin$Outbound
3646
+ | Exists$Outbound;
274
3647
  };
275
3648
 
276
- export type Message = Message1 | Message2 | Message3;
3649
+ /** @internal */
3650
+ export const KnowledgeFilter$outboundSchema: z.ZodType<
3651
+ KnowledgeFilter$Outbound,
3652
+ z.ZodTypeDef,
3653
+ KnowledgeFilter
3654
+ > = z.union([
3655
+ z.lazy(() => And$outboundSchema),
3656
+ z.lazy(() => Or$outboundSchema),
3657
+ z.record(z.union([
3658
+ z.lazy(() => Eq$outboundSchema),
3659
+ z.lazy(() => Ne$outboundSchema),
3660
+ z.lazy(() => Gt$outboundSchema),
3661
+ z.lazy(() => Gte$outboundSchema),
3662
+ z.lazy(() => Lt$outboundSchema),
3663
+ z.lazy(() => Lte$outboundSchema),
3664
+ z.lazy(() => In$outboundSchema),
3665
+ z.lazy(() => Nin$outboundSchema),
3666
+ z.lazy(() => Exists$outboundSchema),
3667
+ ])),
3668
+ ]);
277
3669
 
278
- export type DeploymentInvokeChoices = {
279
- index: number;
280
- message: Message1 | Message2 | Message3;
281
- finishReason?: string | null | undefined;
282
- };
3670
+ export function knowledgeFilterToJSON(
3671
+ knowledgeFilter: KnowledgeFilter,
3672
+ ): string {
3673
+ return JSON.stringify(KnowledgeFilter$outboundSchema.parse(knowledgeFilter));
3674
+ }
283
3675
 
284
- /**
285
- * Successful operation
286
- */
287
- export type DeploymentInvokeResponseBody = {
288
- /**
289
- * A unique identifier for the response. Can be used to add metrics to the transaction.
290
- */
291
- id: string;
292
- /**
293
- * A timestamp indicating when the object was created. Usually in a standardized format like ISO 8601
294
- */
295
- created: Date;
296
- /**
297
- * Indicates the type of model used to generate the response
298
- */
299
- object: DeploymentInvokeObject;
300
- /**
301
- * The model used to generate the response
302
- */
303
- model: string;
304
- /**
305
- * The provider used to generate the response
306
- */
307
- provider: Provider;
308
- /**
309
- * Indicates if the response is the final response
310
- */
311
- isFinal: boolean;
312
- /**
313
- * Indicates integration id used to generate the response
314
- */
315
- integrationId?: string | undefined;
316
- telemetry: Telemetry;
317
- /**
318
- * A timestamp indicating when the object was finalized. Usually in a standardized format like ISO 8601
319
- */
320
- finalized?: Date | undefined;
321
- /**
322
- * Provider backed system fingerprint.
323
- */
324
- systemFingerprint?: string | null | undefined;
325
- /**
326
- * List of documents retrieved from the knowledge base. This property is only available when the `include_retrievals` flag is set to `true` in the invoke settings. When stream is set to true, the `retrievals` property will be returned in the last streamed chunk where the property `is_final` is set to `true`.
327
- */
328
- retrievals?: Array<Retrievals> | undefined;
329
- /**
330
- * Response returned by the model provider. This functionality is only supported when streaming is not used. If streaming is used, the `provider_response` property will be set to `null`.
331
- */
332
- providerResponse?: any | undefined;
333
- /**
334
- * Usage metrics for the response
335
- */
336
- usage?: DeploymentInvokeUsage | null | undefined;
337
- /**
338
- * A list of choices generated by the model
339
- */
340
- choices: Array<DeploymentInvokeChoices>;
3676
+ /** @internal */
3677
+ export type DeploymentInvokeRequestBody$Outbound = {
3678
+ key: string;
3679
+ stream: boolean;
3680
+ inputs?: { [k: string]: any } | undefined;
3681
+ context?: { [k: string]: any } | undefined;
3682
+ prefix_messages?:
3683
+ | Array<
3684
+ | SystemMessage$Outbound
3685
+ | DeveloperMessage$Outbound
3686
+ | UserMessage$Outbound
3687
+ | AssistantMessage$Outbound
3688
+ | ToolMessage$Outbound
3689
+ >
3690
+ | undefined;
3691
+ messages?:
3692
+ | Array<
3693
+ | MessagesSystemMessage$Outbound
3694
+ | MessagesDeveloperMessage$Outbound
3695
+ | MessagesUserMessage$Outbound
3696
+ | MessagesAssistantMessage$Outbound
3697
+ | MessagesToolMessage$Outbound
3698
+ >
3699
+ | undefined;
3700
+ identity?: components.PublicIdentity$Outbound | undefined;
3701
+ file_ids?: Array<string> | undefined;
3702
+ metadata?: { [k: string]: any } | undefined;
3703
+ extra_params?: { [k: string]: any } | undefined;
3704
+ documents?: Array<Documents$Outbound> | undefined;
3705
+ invoke_options?: InvokeOptions$Outbound | undefined;
3706
+ thread?: Thread$Outbound | undefined;
3707
+ knowledge_filter?: And$Outbound | Or$Outbound | {
3708
+ [k: string]:
3709
+ | Eq$Outbound
3710
+ | Ne$Outbound
3711
+ | Gt$Outbound
3712
+ | Gte$Outbound
3713
+ | Lt$Outbound
3714
+ | Lte$Outbound
3715
+ | In$Outbound
3716
+ | Nin$Outbound
3717
+ | Exists$Outbound;
3718
+ } | undefined;
341
3719
  };
342
3720
 
3721
+ /** @internal */
3722
+ export const DeploymentInvokeRequestBody$outboundSchema: z.ZodType<
3723
+ DeploymentInvokeRequestBody$Outbound,
3724
+ z.ZodTypeDef,
3725
+ DeploymentInvokeRequestBody
3726
+ > = z.object({
3727
+ key: z.string(),
3728
+ stream: z.boolean().default(false),
3729
+ inputs: z.record(z.any()).optional(),
3730
+ context: z.record(z.any()).optional(),
3731
+ prefixMessages: z.array(
3732
+ z.union([
3733
+ z.lazy(() => SystemMessage$outboundSchema),
3734
+ z.lazy(() => DeveloperMessage$outboundSchema),
3735
+ z.lazy(() => UserMessage$outboundSchema),
3736
+ z.lazy(() => AssistantMessage$outboundSchema),
3737
+ z.lazy(() => ToolMessage$outboundSchema),
3738
+ ]),
3739
+ ).optional(),
3740
+ messages: z.array(
3741
+ z.union([
3742
+ z.lazy(() => MessagesSystemMessage$outboundSchema),
3743
+ z.lazy(() => MessagesDeveloperMessage$outboundSchema),
3744
+ z.lazy(() => MessagesUserMessage$outboundSchema),
3745
+ z.lazy(() => MessagesAssistantMessage$outboundSchema),
3746
+ z.lazy(() => MessagesToolMessage$outboundSchema),
3747
+ ]),
3748
+ ).optional(),
3749
+ identity: components.PublicIdentity$outboundSchema.optional(),
3750
+ fileIds: z.array(z.string()).optional(),
3751
+ metadata: z.record(z.any()).optional(),
3752
+ extraParams: z.record(z.any()).optional(),
3753
+ documents: z.array(z.lazy(() => Documents$outboundSchema)).optional(),
3754
+ invokeOptions: z.lazy(() => InvokeOptions$outboundSchema).optional(),
3755
+ thread: z.lazy(() => Thread$outboundSchema).optional(),
3756
+ knowledgeFilter: z.union([
3757
+ z.lazy(() => And$outboundSchema),
3758
+ z.lazy(() => Or$outboundSchema),
3759
+ z.record(z.union([
3760
+ z.lazy(() => Eq$outboundSchema),
3761
+ z.lazy(() => Ne$outboundSchema),
3762
+ z.lazy(() => Gt$outboundSchema),
3763
+ z.lazy(() => Gte$outboundSchema),
3764
+ z.lazy(() => Lt$outboundSchema),
3765
+ z.lazy(() => Lte$outboundSchema),
3766
+ z.lazy(() => In$outboundSchema),
3767
+ z.lazy(() => Nin$outboundSchema),
3768
+ z.lazy(() => Exists$outboundSchema),
3769
+ ])),
3770
+ ]).optional(),
3771
+ }).transform((v) => {
3772
+ return remap$(v, {
3773
+ prefixMessages: "prefix_messages",
3774
+ fileIds: "file_ids",
3775
+ extraParams: "extra_params",
3776
+ invokeOptions: "invoke_options",
3777
+ knowledgeFilter: "knowledge_filter",
3778
+ });
3779
+ });
3780
+
3781
+ export function deploymentInvokeRequestBodyToJSON(
3782
+ deploymentInvokeRequestBody: DeploymentInvokeRequestBody,
3783
+ ): string {
3784
+ return JSON.stringify(
3785
+ DeploymentInvokeRequestBody$outboundSchema.parse(
3786
+ deploymentInvokeRequestBody,
3787
+ ),
3788
+ );
3789
+ }
3790
+
343
3791
  /** @internal */
344
3792
  export const DeploymentInvokeObject$inboundSchema: z.ZodNativeEnum<
345
3793
  typeof DeploymentInvokeObject
@@ -472,36 +3920,33 @@ export function completionTokensDetailsFromJSON(
472
3920
  }
473
3921
 
474
3922
  /** @internal */
475
- export const DeploymentInvokeUsage$inboundSchema: z.ZodType<
476
- DeploymentInvokeUsage,
477
- z.ZodTypeDef,
478
- unknown
479
- > = z.object({
480
- total_tokens: z.number().optional(),
481
- prompt_tokens: z.number().optional(),
482
- completion_tokens: z.number().optional(),
483
- prompt_tokens_details: z.lazy(() => PromptTokensDetails$inboundSchema)
484
- .optional(),
485
- completion_tokens_details: z.nullable(
486
- z.lazy(() => CompletionTokensDetails$inboundSchema),
487
- ).optional(),
488
- }).transform((v) => {
489
- return remap$(v, {
490
- "total_tokens": "totalTokens",
491
- "prompt_tokens": "promptTokens",
492
- "completion_tokens": "completionTokens",
493
- "prompt_tokens_details": "promptTokensDetails",
494
- "completion_tokens_details": "completionTokensDetails",
3923
+ export const Usage$inboundSchema: z.ZodType<Usage, z.ZodTypeDef, unknown> = z
3924
+ .object({
3925
+ total_tokens: z.number().optional(),
3926
+ prompt_tokens: z.number().optional(),
3927
+ completion_tokens: z.number().optional(),
3928
+ prompt_tokens_details: z.lazy(() => PromptTokensDetails$inboundSchema)
3929
+ .optional(),
3930
+ completion_tokens_details: z.nullable(
3931
+ z.lazy(() => CompletionTokensDetails$inboundSchema),
3932
+ ).optional(),
3933
+ }).transform((v) => {
3934
+ return remap$(v, {
3935
+ "total_tokens": "totalTokens",
3936
+ "prompt_tokens": "promptTokens",
3937
+ "completion_tokens": "completionTokens",
3938
+ "prompt_tokens_details": "promptTokensDetails",
3939
+ "completion_tokens_details": "completionTokensDetails",
3940
+ });
495
3941
  });
496
- });
497
3942
 
498
- export function deploymentInvokeUsageFromJSON(
3943
+ export function usageFromJSON(
499
3944
  jsonString: string,
500
- ): SafeParseResult<DeploymentInvokeUsage, SDKValidationError> {
3945
+ ): SafeParseResult<Usage, SDKValidationError> {
501
3946
  return safeParse(
502
3947
  jsonString,
503
- (x) => DeploymentInvokeUsage$inboundSchema.parse(JSON.parse(x)),
504
- `Failed to parse 'DeploymentInvokeUsage' from JSON`,
3948
+ (x) => Usage$inboundSchema.parse(JSON.parse(x)),
3949
+ `Failed to parse 'Usage' from JSON`,
505
3950
  );
506
3951
  }
507
3952
 
@@ -667,31 +4112,28 @@ export function messageFromJSON(
667
4112
  }
668
4113
 
669
4114
  /** @internal */
670
- export const DeploymentInvokeChoices$inboundSchema: z.ZodType<
671
- DeploymentInvokeChoices,
672
- z.ZodTypeDef,
673
- unknown
674
- > = z.object({
675
- index: z.number(),
676
- message: z.union([
677
- z.lazy(() => Message1$inboundSchema),
678
- z.lazy(() => Message2$inboundSchema),
679
- z.lazy(() => Message3$inboundSchema),
680
- ]),
681
- finish_reason: z.nullable(z.string()).optional(),
682
- }).transform((v) => {
683
- return remap$(v, {
684
- "finish_reason": "finishReason",
4115
+ export const Choices$inboundSchema: z.ZodType<Choices, z.ZodTypeDef, unknown> =
4116
+ z.object({
4117
+ index: z.number(),
4118
+ message: z.union([
4119
+ z.lazy(() => Message1$inboundSchema),
4120
+ z.lazy(() => Message2$inboundSchema),
4121
+ z.lazy(() => Message3$inboundSchema),
4122
+ ]),
4123
+ finish_reason: z.nullable(z.string()).optional(),
4124
+ }).transform((v) => {
4125
+ return remap$(v, {
4126
+ "finish_reason": "finishReason",
4127
+ });
685
4128
  });
686
- });
687
4129
 
688
- export function deploymentInvokeChoicesFromJSON(
4130
+ export function choicesFromJSON(
689
4131
  jsonString: string,
690
- ): SafeParseResult<DeploymentInvokeChoices, SDKValidationError> {
4132
+ ): SafeParseResult<Choices, SDKValidationError> {
691
4133
  return safeParse(
692
4134
  jsonString,
693
- (x) => DeploymentInvokeChoices$inboundSchema.parse(JSON.parse(x)),
694
- `Failed to parse 'DeploymentInvokeChoices' from JSON`,
4135
+ (x) => Choices$inboundSchema.parse(JSON.parse(x)),
4136
+ `Failed to parse 'Choices' from JSON`,
695
4137
  );
696
4138
  }
697
4139
 
@@ -714,9 +4156,8 @@ export const DeploymentInvokeResponseBody$inboundSchema: z.ZodType<
714
4156
  system_fingerprint: z.nullable(z.string()).optional(),
715
4157
  retrievals: z.array(z.lazy(() => Retrievals$inboundSchema)).optional(),
716
4158
  provider_response: z.any().optional(),
717
- usage: z.nullable(z.lazy(() => DeploymentInvokeUsage$inboundSchema))
718
- .optional(),
719
- choices: z.array(z.lazy(() => DeploymentInvokeChoices$inboundSchema)),
4159
+ usage: z.nullable(z.lazy(() => Usage$inboundSchema)).optional(),
4160
+ choices: z.array(z.lazy(() => Choices$inboundSchema)),
720
4161
  }).transform((v) => {
721
4162
  return remap$(v, {
722
4163
  "is_final": "isFinal",