@orq-ai/node 4.10.8 → 4.11.0-rc.2

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 (756) hide show
  1. package/README.md +40 -36
  2. package/funcs/guardrailRulesList.js +4 -0
  3. package/funcs/guardrailRulesList.js.map +1 -1
  4. package/funcs/guardrailRulesListUsedGuardrails.d.ts +17 -0
  5. package/funcs/guardrailRulesListUsedGuardrails.d.ts.map +1 -0
  6. package/funcs/guardrailRulesListUsedGuardrails.js +105 -0
  7. package/funcs/guardrailRulesListUsedGuardrails.js.map +1 -0
  8. package/funcs/routingRulesList.js +3 -0
  9. package/funcs/routingRulesList.js.map +1 -1
  10. package/funcs/routingRulesListUsedModels.d.ts +17 -0
  11. package/funcs/routingRulesListUsedModels.d.ts.map +1 -0
  12. package/funcs/routingRulesListUsedModels.js +105 -0
  13. package/funcs/routingRulesListUsedModels.js.map +1 -0
  14. package/jsr.json +1 -1
  15. package/lib/config.d.ts +2 -2
  16. package/lib/config.js +2 -2
  17. package/lib/config.js.map +1 -1
  18. package/models/components/reasoningpart.js +1 -1
  19. package/models/operations/createdataset.js +1 -1
  20. package/models/operations/createdatasetitem.js +4 -4
  21. package/models/operations/createdatasource.js +1 -1
  22. package/models/operations/createeval.js +16 -16
  23. package/models/operations/createtool.js +6 -6
  24. package/models/operations/getalltools.js +6 -6
  25. package/models/operations/getevals.js +16 -16
  26. package/models/operations/getv2humanevalsets.js +2 -2
  27. package/models/operations/getv2humanevalsetsid.js +2 -2
  28. package/models/operations/guardrailrulelist.d.ts +35 -0
  29. package/models/operations/guardrailrulelist.d.ts.map +1 -1
  30. package/models/operations/guardrailrulelist.js +18 -1
  31. package/models/operations/guardrailrulelist.js.map +1 -1
  32. package/models/operations/guardrailrulelistusedguardrails.d.ts +14 -0
  33. package/models/operations/guardrailrulelistusedguardrails.d.ts.map +1 -0
  34. package/models/operations/guardrailrulelistusedguardrails.js +56 -0
  35. package/models/operations/guardrailrulelistusedguardrails.js.map +1 -0
  36. package/models/operations/index.d.ts +2 -0
  37. package/models/operations/index.d.ts.map +1 -1
  38. package/models/operations/index.js +2 -0
  39. package/models/operations/index.js.map +1 -1
  40. package/models/operations/listdatasetdatapoints.js +4 -4
  41. package/models/operations/listdatasets.js +1 -1
  42. package/models/operations/listdatasources.js +1 -1
  43. package/models/operations/patchv2humanevalsetsid.js +2 -2
  44. package/models/operations/postv2feedbackevaluation.js +3 -3
  45. package/models/operations/postv2humanevalsets.js +2 -2
  46. package/models/operations/retrievedatapoint.js +4 -4
  47. package/models/operations/retrievedataset.js +1 -1
  48. package/models/operations/retrievedatasource.js +1 -1
  49. package/models/operations/retrievetool.js +6 -6
  50. package/models/operations/routingrulelist.d.ts +15 -0
  51. package/models/operations/routingrulelist.d.ts.map +1 -1
  52. package/models/operations/routingrulelist.js +3 -0
  53. package/models/operations/routingrulelist.js.map +1 -1
  54. package/models/operations/routingrulelistusedmodels.d.ts +14 -0
  55. package/models/operations/routingrulelistusedmodels.d.ts.map +1 -0
  56. package/models/operations/routingrulelistusedmodels.js +51 -0
  57. package/models/operations/routingrulelistusedmodels.js.map +1 -0
  58. package/models/operations/runagent.js +1 -1
  59. package/models/operations/streamrunagent.js +1 -1
  60. package/models/operations/updatedatapoint.js +4 -4
  61. package/models/operations/updatedataset.js +1 -1
  62. package/models/operations/updatedatasource.js +1 -1
  63. package/models/operations/updateeval.js +16 -16
  64. package/models/operations/updatetool.js +7 -7
  65. package/package.json +11 -10
  66. package/sdk/feedback.d.ts +2 -2
  67. package/sdk/feedback.js +2 -2
  68. package/sdk/guardrailrules.d.ts +7 -0
  69. package/sdk/guardrailrules.d.ts.map +1 -1
  70. package/sdk/guardrailrules.js +10 -0
  71. package/sdk/guardrailrules.js.map +1 -1
  72. package/sdk/routingrules.d.ts +7 -0
  73. package/sdk/routingrules.d.ts.map +1 -1
  74. package/sdk/routingrules.js +10 -0
  75. package/sdk/routingrules.js.map +1 -1
  76. package/src/funcs/guardrailRulesList.ts +4 -0
  77. package/{packages/orq-rc/src/funcs/modelsListLitellm.ts → src/funcs/guardrailRulesListUsedGuardrails.ts} +15 -12
  78. package/src/funcs/routingRulesList.ts +3 -0
  79. package/{packages/orq-rc/src/funcs/modelsList.ts → src/funcs/routingRulesListUsedModels.ts} +9 -9
  80. package/src/lib/config.ts +2 -2
  81. package/src/models/components/reasoningpart.ts +1 -1
  82. package/src/models/operations/createdataset.ts +1 -1
  83. package/src/models/operations/createdatasetitem.ts +4 -4
  84. package/src/models/operations/createdatasource.ts +1 -1
  85. package/src/models/operations/createeval.ts +16 -16
  86. package/src/models/operations/createtool.ts +6 -6
  87. package/src/models/operations/getalltools.ts +6 -6
  88. package/src/models/operations/getevals.ts +16 -16
  89. package/src/models/operations/getv2humanevalsets.ts +2 -2
  90. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  91. package/src/models/operations/guardrailrulelist.ts +44 -0
  92. package/src/models/operations/guardrailrulelistusedguardrails.ts +48 -0
  93. package/src/models/operations/index.ts +2 -0
  94. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  95. package/src/models/operations/listdatasets.ts +1 -1
  96. package/src/models/operations/listdatasources.ts +1 -1
  97. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  98. package/src/models/operations/postv2feedbackevaluation.ts +3 -3
  99. package/src/models/operations/postv2humanevalsets.ts +2 -2
  100. package/src/models/operations/retrievedatapoint.ts +4 -4
  101. package/src/models/operations/retrievedataset.ts +1 -1
  102. package/src/models/operations/retrievedatasource.ts +1 -1
  103. package/src/models/operations/retrievetool.ts +6 -6
  104. package/src/models/operations/routingrulelist.ts +18 -0
  105. package/src/models/operations/routingrulelistusedmodels.ts +37 -0
  106. package/src/models/operations/runagent.ts +1 -1
  107. package/src/models/operations/streamrunagent.ts +1 -1
  108. package/src/models/operations/updatedatapoint.ts +4 -4
  109. package/src/models/operations/updatedataset.ts +1 -1
  110. package/src/models/operations/updatedatasource.ts +1 -1
  111. package/src/models/operations/updateeval.ts +16 -16
  112. package/src/models/operations/updatetool.ts +7 -7
  113. package/src/sdk/feedback.ts +2 -2
  114. package/src/sdk/guardrailrules.ts +16 -0
  115. package/src/sdk/routingrules.ts +16 -0
  116. package/packages/orq-rc/examples/postV2FeedbackEvaluationRemove.example.ts +0 -24
  117. package/packages/orq-rc/src/core.ts +0 -13
  118. package/packages/orq-rc/src/funcs/agentsCreate.ts +0 -163
  119. package/packages/orq-rc/src/funcs/agentsDelete.ts +0 -181
  120. package/packages/orq-rc/src/funcs/agentsInvoke.ts +0 -178
  121. package/packages/orq-rc/src/funcs/agentsList.ts +0 -186
  122. package/packages/orq-rc/src/funcs/agentsPostV2AgentsKeyCardRefresh.ts +0 -188
  123. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +0 -184
  124. package/packages/orq-rc/src/funcs/agentsResponsesGet.ts +0 -183
  125. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +0 -181
  126. package/packages/orq-rc/src/funcs/agentsRun.ts +0 -164
  127. package/packages/orq-rc/src/funcs/agentsStream.ts +0 -205
  128. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +0 -191
  129. package/packages/orq-rc/src/funcs/agentsUpdate.ts +0 -185
  130. package/packages/orq-rc/src/funcs/annotationsCreate.ts +0 -175
  131. package/packages/orq-rc/src/funcs/annotationsDelete.ts +0 -175
  132. package/packages/orq-rc/src/funcs/apiKeysCreate.ts +0 -162
  133. package/packages/orq-rc/src/funcs/apiKeysDelete.ts +0 -168
  134. package/packages/orq-rc/src/funcs/apiKeysGet.ts +0 -168
  135. package/packages/orq-rc/src/funcs/apiKeysList.ts +0 -175
  136. package/packages/orq-rc/src/funcs/apiKeysListCapabilities.ts +0 -144
  137. package/packages/orq-rc/src/funcs/apiKeysUpdate.ts +0 -171
  138. package/packages/orq-rc/src/funcs/chunkingParse.ts +0 -162
  139. package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -168
  140. package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -167
  141. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -172
  142. package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -168
  143. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -183
  144. package/packages/orq-rc/src/funcs/datasetsList.ts +0 -169
  145. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -175
  146. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -176
  147. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -182
  148. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -177
  149. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -180
  150. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -170
  151. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -170
  152. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -178
  153. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -180
  154. package/packages/orq-rc/src/funcs/evalsAll.ts +0 -177
  155. package/packages/orq-rc/src/funcs/evalsCreate.ts +0 -171
  156. package/packages/orq-rc/src/funcs/evalsDelete.ts +0 -174
  157. package/packages/orq-rc/src/funcs/evalsGetV2EvaluatorsIdVersions.ts +0 -184
  158. package/packages/orq-rc/src/funcs/evalsInvoke.ts +0 -182
  159. package/packages/orq-rc/src/funcs/evalsUpdate.ts +0 -174
  160. package/packages/orq-rc/src/funcs/feedbackPostV2Feedback.ts +0 -174
  161. package/packages/orq-rc/src/funcs/feedbackPostV2FeedbackRemove.ts +0 -169
  162. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -162
  163. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -168
  164. package/packages/orq-rc/src/funcs/filesGet.ts +0 -168
  165. package/packages/orq-rc/src/funcs/filesGetContent.ts +0 -168
  166. package/packages/orq-rc/src/funcs/filesList.ts +0 -171
  167. package/packages/orq-rc/src/funcs/filesUpdate.ts +0 -169
  168. package/packages/orq-rc/src/funcs/guardrailRulesCreate.ts +0 -163
  169. package/packages/orq-rc/src/funcs/guardrailRulesDelete.ts +0 -172
  170. package/packages/orq-rc/src/funcs/guardrailRulesList.ts +0 -172
  171. package/packages/orq-rc/src/funcs/guardrailRulesRetrieve.ts +0 -170
  172. package/packages/orq-rc/src/funcs/guardrailRulesUpdate.ts +0 -172
  173. package/packages/orq-rc/src/funcs/humanReviewSetsDeleteV2HumanEvalSetsId.ts +0 -166
  174. package/packages/orq-rc/src/funcs/humanReviewSetsGetV2HumanEvalSets.ts +0 -170
  175. package/packages/orq-rc/src/funcs/humanReviewSetsGetV2HumanEvalSetsId.ts +0 -165
  176. package/packages/orq-rc/src/funcs/humanReviewSetsPatchV2HumanEvalSetsId.ts +0 -166
  177. package/packages/orq-rc/src/funcs/humanReviewSetsPostV2HumanEvalSets.ts +0 -164
  178. package/packages/orq-rc/src/funcs/identitiesCreate.ts +0 -162
  179. package/packages/orq-rc/src/funcs/identitiesDelete.ts +0 -168
  180. package/packages/orq-rc/src/funcs/identitiesList.ts +0 -174
  181. package/packages/orq-rc/src/funcs/identitiesRetrieve.ts +0 -173
  182. package/packages/orq-rc/src/funcs/identitiesUpdate.ts +0 -171
  183. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +0 -160
  184. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -172
  185. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -167
  186. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -168
  187. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -175
  188. package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +0 -171
  189. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -174
  190. package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +0 -174
  191. package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -171
  192. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -179
  193. package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +0 -172
  194. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -175
  195. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -167
  196. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -174
  197. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -170
  198. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +0 -168
  199. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -165
  200. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -175
  201. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -171
  202. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +0 -164
  203. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +0 -177
  204. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +0 -171
  205. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +0 -169
  206. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +0 -186
  207. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +0 -181
  208. package/packages/orq-rc/src/funcs/memoryStoresList.ts +0 -180
  209. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +0 -185
  210. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +0 -178
  211. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +0 -178
  212. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +0 -180
  213. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +0 -175
  214. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +0 -169
  215. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +0 -181
  216. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +0 -176
  217. package/packages/orq-rc/src/funcs/modelsAzureFoundryDeployments.ts +0 -168
  218. package/packages/orq-rc/src/funcs/modelsCreate.ts +0 -162
  219. package/packages/orq-rc/src/funcs/modelsCreateAutorouter.ts +0 -163
  220. package/packages/orq-rc/src/funcs/modelsCreateAwsBedrock.ts +0 -163
  221. package/packages/orq-rc/src/funcs/modelsCreateOpenaiLike.ts +0 -163
  222. package/packages/orq-rc/src/funcs/modelsCreateVertex.ts +0 -163
  223. package/packages/orq-rc/src/funcs/modelsDelete.ts +0 -168
  224. package/packages/orq-rc/src/funcs/modelsDisable.ts +0 -168
  225. package/packages/orq-rc/src/funcs/modelsEnable.ts +0 -163
  226. package/packages/orq-rc/src/funcs/modelsImportLitellm.ts +0 -166
  227. package/packages/orq-rc/src/funcs/modelsUpdate.ts +0 -168
  228. package/packages/orq-rc/src/funcs/modelsUpdateAutorouter.ts +0 -169
  229. package/packages/orq-rc/src/funcs/modelsUpdateAwsBedrock.ts +0 -169
  230. package/packages/orq-rc/src/funcs/modelsUpdateOpenaiLike.ts +0 -169
  231. package/packages/orq-rc/src/funcs/modelsValidate.ts +0 -163
  232. package/packages/orq-rc/src/funcs/modelsValidateAwsBedrock.ts +0 -164
  233. package/packages/orq-rc/src/funcs/piiDetect.ts +0 -162
  234. package/packages/orq-rc/src/funcs/piiRedact.ts +0 -162
  235. package/packages/orq-rc/src/funcs/piiRestore.ts +0 -162
  236. package/packages/orq-rc/src/funcs/policiesCreate.ts +0 -162
  237. package/packages/orq-rc/src/funcs/policiesDelete.ts +0 -168
  238. package/packages/orq-rc/src/funcs/policiesList.ts +0 -170
  239. package/packages/orq-rc/src/funcs/policiesRetrieve.ts +0 -167
  240. package/packages/orq-rc/src/funcs/policiesUpdate.ts +0 -168
  241. package/packages/orq-rc/src/funcs/postV2FeedbackEvaluation.ts +0 -161
  242. package/packages/orq-rc/src/funcs/postV2FeedbackEvaluationRemove.ts +0 -161
  243. package/packages/orq-rc/src/funcs/projectsCreate.ts +0 -162
  244. package/packages/orq-rc/src/funcs/projectsDelete.ts +0 -168
  245. package/packages/orq-rc/src/funcs/projectsGet.ts +0 -168
  246. package/packages/orq-rc/src/funcs/projectsList.ts +0 -170
  247. package/packages/orq-rc/src/funcs/projectsUpdate.ts +0 -171
  248. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -162
  249. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -174
  250. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -182
  251. package/packages/orq-rc/src/funcs/promptsList.ts +0 -169
  252. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -174
  253. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -167
  254. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -174
  255. package/packages/orq-rc/src/funcs/reportingQuery.ts +0 -162
  256. package/packages/orq-rc/src/funcs/responsesCreate.ts +0 -170
  257. package/packages/orq-rc/src/funcs/responsesGet.ts +0 -167
  258. package/packages/orq-rc/src/funcs/routerAudioSpeechCreate.ts +0 -163
  259. package/packages/orq-rc/src/funcs/routerAudioTranscriptionsCreate.ts +0 -272
  260. package/packages/orq-rc/src/funcs/routerAudioTranslationsCreate.ts +0 -262
  261. package/packages/orq-rc/src/funcs/routerChatCompletionsCreate.ts +0 -170
  262. package/packages/orq-rc/src/funcs/routerCompletionsCreate.ts +0 -170
  263. package/packages/orq-rc/src/funcs/routerEmbeddingsCreate.ts +0 -163
  264. package/packages/orq-rc/src/funcs/routerImagesEditsCreate.ts +0 -224
  265. package/packages/orq-rc/src/funcs/routerImagesGenerationsCreate.ts +0 -162
  266. package/packages/orq-rc/src/funcs/routerImagesVariationsCreate.ts +0 -220
  267. package/packages/orq-rc/src/funcs/routerModerationsCreate.ts +0 -169
  268. package/packages/orq-rc/src/funcs/routerOcr.ts +0 -160
  269. package/packages/orq-rc/src/funcs/routerRerankCreate.ts +0 -162
  270. package/packages/orq-rc/src/funcs/routingRulesCreate.ts +0 -163
  271. package/packages/orq-rc/src/funcs/routingRulesDelete.ts +0 -168
  272. package/packages/orq-rc/src/funcs/routingRulesList.ts +0 -170
  273. package/packages/orq-rc/src/funcs/routingRulesRetrieve.ts +0 -167
  274. package/packages/orq-rc/src/funcs/routingRulesUpdate.ts +0 -168
  275. package/packages/orq-rc/src/funcs/schedulesCreate.ts +0 -185
  276. package/packages/orq-rc/src/funcs/schedulesDelete.ts +0 -184
  277. package/packages/orq-rc/src/funcs/schedulesList.ts +0 -167
  278. package/packages/orq-rc/src/funcs/schedulesRetrieve.ts +0 -183
  279. package/packages/orq-rc/src/funcs/schedulesTrigger.ts +0 -190
  280. package/packages/orq-rc/src/funcs/schedulesUpdate.ts +0 -191
  281. package/packages/orq-rc/src/funcs/skillsCreate.ts +0 -162
  282. package/packages/orq-rc/src/funcs/skillsDelete.ts +0 -168
  283. package/packages/orq-rc/src/funcs/skillsGet.ts +0 -168
  284. package/packages/orq-rc/src/funcs/skillsList.ts +0 -170
  285. package/packages/orq-rc/src/funcs/skillsUpdate.ts +0 -171
  286. package/packages/orq-rc/src/funcs/toolsCreate.ts +0 -165
  287. package/packages/orq-rc/src/funcs/toolsDelete.ts +0 -168
  288. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersions.ts +0 -184
  289. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +0 -191
  290. package/packages/orq-rc/src/funcs/toolsList.ts +0 -178
  291. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +0 -167
  292. package/packages/orq-rc/src/funcs/toolsUpdate.ts +0 -177
  293. package/packages/orq-rc/src/hooks/global.ts +0 -44
  294. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  295. package/packages/orq-rc/src/hooks/index.ts +0 -6
  296. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  297. package/packages/orq-rc/src/hooks/types.ts +0 -112
  298. package/packages/orq-rc/src/index.ts +0 -9
  299. package/packages/orq-rc/src/lib/base64.ts +0 -37
  300. package/packages/orq-rc/src/lib/config.ts +0 -64
  301. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  302. package/packages/orq-rc/src/lib/encodings.ts +0 -525
  303. package/packages/orq-rc/src/lib/env.ts +0 -57
  304. package/packages/orq-rc/src/lib/event-streams.ts +0 -165
  305. package/packages/orq-rc/src/lib/files.ts +0 -104
  306. package/packages/orq-rc/src/lib/http.ts +0 -323
  307. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  308. package/packages/orq-rc/src/lib/logger.ts +0 -9
  309. package/packages/orq-rc/src/lib/matchers.ts +0 -346
  310. package/packages/orq-rc/src/lib/primitives.ts +0 -150
  311. package/packages/orq-rc/src/lib/retries.ts +0 -218
  312. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  313. package/packages/orq-rc/src/lib/sdks.ts +0 -406
  314. package/packages/orq-rc/src/lib/security.ts +0 -275
  315. package/packages/orq-rc/src/lib/url.ts +0 -35
  316. package/packages/orq-rc/src/models/components/actionreviewedstreamingevent.ts +0 -99
  317. package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +0 -185
  318. package/packages/orq-rc/src/models/components/agenterroredstreamingevent.ts +0 -73
  319. package/packages/orq-rc/src/models/components/agentexecutionstartedstreamingevent.ts +0 -91
  320. package/packages/orq-rc/src/models/components/agenthandedoffstreamingevent.ts +0 -71
  321. package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +0 -507
  322. package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +0 -165
  323. package/packages/orq-rc/src/models/components/agentresponsemessage.ts +0 -103
  324. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +0 -520
  325. package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +0 -795
  326. package/packages/orq-rc/src/models/components/allprojects.ts +0 -39
  327. package/packages/orq-rc/src/models/components/apikey.ts +0 -169
  328. package/packages/orq-rc/src/models/components/apikeyowner.ts +0 -82
  329. package/packages/orq-rc/src/models/components/apikeystatus.ts +0 -21
  330. package/packages/orq-rc/src/models/components/audiocontentpartschema.ts +0 -136
  331. package/packages/orq-rc/src/models/components/autorouterconfig.ts +0 -78
  332. package/packages/orq-rc/src/models/components/azurefoundrydeployment.ts +0 -44
  333. package/packages/orq-rc/src/models/components/azurefoundrydeploymentmasterdata.ts +0 -60
  334. package/packages/orq-rc/src/models/components/budgetlimit.ts +0 -83
  335. package/packages/orq-rc/src/models/components/conversationparam.ts +0 -51
  336. package/packages/orq-rc/src/models/components/createagentresponse.ts +0 -305
  337. package/packages/orq-rc/src/models/components/createapikeyrequest.ts +0 -91
  338. package/packages/orq-rc/src/models/components/createapikeyresponse.ts +0 -49
  339. package/packages/orq-rc/src/models/components/createfilerequest.ts +0 -62
  340. package/packages/orq-rc/src/models/components/createfileresponse.ts +0 -35
  341. package/packages/orq-rc/src/models/components/createidentityrequest.ts +0 -100
  342. package/packages/orq-rc/src/models/components/createidentityresponse.ts +0 -35
  343. package/packages/orq-rc/src/models/components/createmodelparameter.ts +0 -54
  344. package/packages/orq-rc/src/models/components/createprojectrequest.ts +0 -46
  345. package/packages/orq-rc/src/models/components/createprojectresponse.ts +0 -35
  346. package/packages/orq-rc/src/models/components/createskillrequest.ts +0 -70
  347. package/packages/orq-rc/src/models/components/createskillresponse.ts +0 -35
  348. package/packages/orq-rc/src/models/components/datapart.ts +0 -38
  349. package/packages/orq-rc/src/models/components/datapoint.ts +0 -60
  350. package/packages/orq-rc/src/models/components/deleteapikeyresponse.ts +0 -27
  351. package/packages/orq-rc/src/models/components/deletefileresponse.ts +0 -27
  352. package/packages/orq-rc/src/models/components/deleteidentityresponse.ts +0 -27
  353. package/packages/orq-rc/src/models/components/deleteprojectresponse.ts +0 -27
  354. package/packages/orq-rc/src/models/components/deleteskillresponse.ts +0 -27
  355. package/packages/orq-rc/src/models/components/detectrequest.ts +0 -56
  356. package/packages/orq-rc/src/models/components/detectresponse.ts +0 -41
  357. package/packages/orq-rc/src/models/components/domain.ts +0 -75
  358. package/packages/orq-rc/src/models/components/embeddingcacheconfig.ts +0 -59
  359. package/packages/orq-rc/src/models/components/embeddingcontactparams.ts +0 -48
  360. package/packages/orq-rc/src/models/components/embeddingloadbalancerconfig.ts +0 -66
  361. package/packages/orq-rc/src/models/components/embeddingloadbalancermodelconfig.ts +0 -42
  362. package/packages/orq-rc/src/models/components/embeddingorqparams.ts +0 -101
  363. package/packages/orq-rc/src/models/components/embeddingretryconfig.ts +0 -45
  364. package/packages/orq-rc/src/models/components/embeddingtimeoutconfig.ts +0 -39
  365. package/packages/orq-rc/src/models/components/errorpart.ts +0 -58
  366. package/packages/orq-rc/src/models/components/errorstreamingevent.ts +0 -66
  367. package/packages/orq-rc/src/models/components/evaluatorref.ts +0 -93
  368. package/packages/orq-rc/src/models/components/executionnamedstreamingevent.ts +0 -71
  369. package/packages/orq-rc/src/models/components/executionreviewedstreamingevent.ts +0 -61
  370. package/packages/orq-rc/src/models/components/executionreviewrequiredstreamingevent.ts +0 -67
  371. package/packages/orq-rc/src/models/components/expression.ts +0 -33
  372. package/packages/orq-rc/src/models/components/expressioninput.ts +0 -29
  373. package/packages/orq-rc/src/models/components/extendedmessage.ts +0 -146
  374. package/packages/orq-rc/src/models/components/fallbackconfig.ts +0 -27
  375. package/packages/orq-rc/src/models/components/file.ts +0 -64
  376. package/packages/orq-rc/src/models/components/filecontentpartschema.ts +0 -87
  377. package/packages/orq-rc/src/models/components/filepart.ts +0 -223
  378. package/packages/orq-rc/src/models/components/filepurpose.ts +0 -21
  379. package/packages/orq-rc/src/models/components/filter.ts +0 -137
  380. package/packages/orq-rc/src/models/components/getagentresponse.ts +0 -348
  381. package/packages/orq-rc/src/models/components/getapikeyresponse.ts +0 -40
  382. package/packages/orq-rc/src/models/components/getfilecontentresponse.ts +0 -39
  383. package/packages/orq-rc/src/models/components/getfileresponse.ts +0 -35
  384. package/packages/orq-rc/src/models/components/getprojectresponse.ts +0 -35
  385. package/packages/orq-rc/src/models/components/getskillresponse.ts +0 -35
  386. package/packages/orq-rc/src/models/components/guardrailref.ts +0 -91
  387. package/packages/orq-rc/src/models/components/guardrailrule.ts +0 -66
  388. package/packages/orq-rc/src/models/components/identity.ts +0 -128
  389. package/packages/orq-rc/src/models/components/identitymetrics.ts +0 -57
  390. package/packages/orq-rc/src/models/components/identitysortfield.ts +0 -18
  391. package/packages/orq-rc/src/models/components/imagecontentpartschema.ts +0 -268
  392. package/packages/orq-rc/src/models/components/incompletedetails.ts +0 -31
  393. package/packages/orq-rc/src/models/components/index.ts +0 -190
  394. package/packages/orq-rc/src/models/components/inputtokensdetails.ts +0 -45
  395. package/packages/orq-rc/src/models/components/legacytokenfamily.ts +0 -19
  396. package/packages/orq-rc/src/models/components/limits.ts +0 -70
  397. package/packages/orq-rc/src/models/components/listapikeysresponse.ts +0 -56
  398. package/packages/orq-rc/src/models/components/listcapabilitiesresponse.ts +0 -38
  399. package/packages/orq-rc/src/models/components/listfilesresponse.ts +0 -50
  400. package/packages/orq-rc/src/models/components/listidentitiesresponse.ts +0 -53
  401. package/packages/orq-rc/src/models/components/listprojectsresponse.ts +0 -53
  402. package/packages/orq-rc/src/models/components/listskillsresponse.ts +0 -53
  403. package/packages/orq-rc/src/models/components/litellmmodel.ts +0 -50
  404. package/packages/orq-rc/src/models/components/litellmmodelinfo.ts +0 -97
  405. package/packages/orq-rc/src/models/components/litellmparams.ts +0 -43
  406. package/packages/orq-rc/src/models/components/memoryparam.ts +0 -56
  407. package/packages/orq-rc/src/models/components/modelconfigurationresponse.ts +0 -82
  408. package/packages/orq-rc/src/models/components/modeldocument.ts +0 -112
  409. package/packages/orq-rc/src/models/components/modelmetadata.ts +0 -720
  410. package/packages/orq-rc/src/models/components/modelparameterdocument.ts +0 -53
  411. package/packages/orq-rc/src/models/components/modelref.ts +0 -70
  412. package/packages/orq-rc/src/models/components/modelsconfig.ts +0 -73
  413. package/packages/orq-rc/src/models/components/outputtokensdetails.ts +0 -36
  414. package/packages/orq-rc/src/models/components/ownertype.ts +0 -17
  415. package/packages/orq-rc/src/models/components/partdelta.ts +0 -39
  416. package/packages/orq-rc/src/models/components/partdeltaevent.ts +0 -73
  417. package/packages/orq-rc/src/models/components/partdoneevent.ts +0 -70
  418. package/packages/orq-rc/src/models/components/permissionmode.ts +0 -23
  419. package/packages/orq-rc/src/models/components/policy.ts +0 -80
  420. package/packages/orq-rc/src/models/components/policyretryconfig.ts +0 -64
  421. package/packages/orq-rc/src/models/components/price.ts +0 -56
  422. package/packages/orq-rc/src/models/components/pricing.ts +0 -93
  423. package/packages/orq-rc/src/models/components/pricingvariant.ts +0 -90
  424. package/packages/orq-rc/src/models/components/project.ts +0 -108
  425. package/packages/orq-rc/src/models/components/projectscope.ts +0 -70
  426. package/packages/orq-rc/src/models/components/publiccontact.ts +0 -71
  427. package/packages/orq-rc/src/models/components/publicembeddingdata.ts +0 -60
  428. package/packages/orq-rc/src/models/components/publicembeddingusage.ts +0 -45
  429. package/packages/orq-rc/src/models/components/publicidentity.ts +0 -69
  430. package/packages/orq-rc/src/models/components/publicmodelentry.ts +0 -71
  431. package/packages/orq-rc/src/models/components/publicschedule.ts +0 -118
  432. package/packages/orq-rc/src/models/components/publicscheduleerrordetail.ts +0 -39
  433. package/packages/orq-rc/src/models/components/publicschedulepayload.ts +0 -84
  434. package/packages/orq-rc/src/models/components/publicusage.ts +0 -77
  435. package/packages/orq-rc/src/models/components/queryreportrequest.ts +0 -237
  436. package/packages/orq-rc/src/models/components/queryreportresponse.ts +0 -99
  437. package/packages/orq-rc/src/models/components/reasoning.ts +0 -33
  438. package/packages/orq-rc/src/models/components/reasoningparam.ts +0 -30
  439. package/packages/orq-rc/src/models/components/reasoningpart.ts +0 -62
  440. package/packages/orq-rc/src/models/components/reasoningpartschema.ts +0 -71
  441. package/packages/orq-rc/src/models/components/redactedreasoningpartschema.ts +0 -66
  442. package/packages/orq-rc/src/models/components/redactrequest.ts +0 -33
  443. package/packages/orq-rc/src/models/components/redactresponse.ts +0 -41
  444. package/packages/orq-rc/src/models/components/refusalpartschema.ts +0 -64
  445. package/packages/orq-rc/src/models/components/requestlimit.ts +0 -69
  446. package/packages/orq-rc/src/models/components/responsedoneevent.ts +0 -324
  447. package/packages/orq-rc/src/models/components/responseerror.ts +0 -33
  448. package/packages/orq-rc/src/models/components/responseexecutionlimits.ts +0 -52
  449. package/packages/orq-rc/src/models/components/responsefailedevent.ts +0 -72
  450. package/packages/orq-rc/src/models/components/responseidentity.ts +0 -48
  451. package/packages/orq-rc/src/models/components/responsemeta.ts +0 -103
  452. package/packages/orq-rc/src/models/components/responseretryconfig.ts +0 -45
  453. package/packages/orq-rc/src/models/components/responsestartedevent.ts +0 -97
  454. package/packages/orq-rc/src/models/components/responsestreamingevent.ts +0 -85
  455. package/packages/orq-rc/src/models/components/responsethread.ts +0 -30
  456. package/packages/orq-rc/src/models/components/restorerequest.ts +0 -38
  457. package/packages/orq-rc/src/models/components/restoreresponse.ts +0 -36
  458. package/packages/orq-rc/src/models/components/retrieveidentityresponse.ts +0 -35
  459. package/packages/orq-rc/src/models/components/reviewoutcome.ts +0 -23
  460. package/packages/orq-rc/src/models/components/routingrule.ts +0 -67
  461. package/packages/orq-rc/src/models/components/security.ts +0 -32
  462. package/packages/orq-rc/src/models/components/serviceaccountowner.ts +0 -43
  463. package/packages/orq-rc/src/models/components/singleproject.ts +0 -59
  464. package/packages/orq-rc/src/models/components/skill.ts +0 -109
  465. package/packages/orq-rc/src/models/components/streamoptions.ts +0 -32
  466. package/packages/orq-rc/src/models/components/telemetry.ts +0 -48
  467. package/packages/orq-rc/src/models/components/textcontentpartschema.ts +0 -207
  468. package/packages/orq-rc/src/models/components/textpart.ts +0 -54
  469. package/packages/orq-rc/src/models/components/thinkingconfigadaptiveschema.ts +0 -59
  470. package/packages/orq-rc/src/models/components/thinkingconfigdisabledschema.ts +0 -59
  471. package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +0 -107
  472. package/packages/orq-rc/src/models/components/timeoutstreamingevent.ts +0 -64
  473. package/packages/orq-rc/src/models/components/tokenlimit.ts +0 -69
  474. package/packages/orq-rc/src/models/components/toolcallpart.ts +0 -51
  475. package/packages/orq-rc/src/models/components/tooldoneevent.ts +0 -77
  476. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +0 -235
  477. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +0 -219
  478. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +0 -205
  479. package/packages/orq-rc/src/models/components/toolfailedevent.ts +0 -77
  480. package/packages/orq-rc/src/models/components/toolresultpart.ts +0 -71
  481. package/packages/orq-rc/src/models/components/toolreviewdoneevent.ts +0 -78
  482. package/packages/orq-rc/src/models/components/toolreviewrequestedevent.ts +0 -87
  483. package/packages/orq-rc/src/models/components/toolstartedevent.ts +0 -82
  484. package/packages/orq-rc/src/models/components/totals.ts +0 -34
  485. package/packages/orq-rc/src/models/components/updateapikeyrequest.ts +0 -92
  486. package/packages/orq-rc/src/models/components/updateapikeyresponse.ts +0 -40
  487. package/packages/orq-rc/src/models/components/updatefilerequest.ts +0 -39
  488. package/packages/orq-rc/src/models/components/updatefileresponse.ts +0 -35
  489. package/packages/orq-rc/src/models/components/updateidentityrequest.ts +0 -90
  490. package/packages/orq-rc/src/models/components/updateidentityresponse.ts +0 -35
  491. package/packages/orq-rc/src/models/components/updatemodelparameter.ts +0 -61
  492. package/packages/orq-rc/src/models/components/updateprojectrequest.ts +0 -49
  493. package/packages/orq-rc/src/models/components/updateprojectresponse.ts +0 -35
  494. package/packages/orq-rc/src/models/components/updateskillrequest.ts +0 -75
  495. package/packages/orq-rc/src/models/components/updateskillresponse.ts +0 -35
  496. package/packages/orq-rc/src/models/components/userowner.ts +0 -59
  497. package/packages/orq-rc/src/models/components/vertexcapabilities.ts +0 -37
  498. package/packages/orq-rc/src/models/components/vertexconfiguration.ts +0 -45
  499. package/packages/orq-rc/src/models/components/vertexmodelconfiguration.ts +0 -53
  500. package/packages/orq-rc/src/models/components/vertexparameters.ts +0 -47
  501. package/packages/orq-rc/src/models/components/vertexparamrange.ts +0 -34
  502. package/packages/orq-rc/src/models/components/vertexparamrangeint.ts +0 -34
  503. package/packages/orq-rc/src/models/errors/apierror.ts +0 -40
  504. package/packages/orq-rc/src/models/errors/createagentschedule.ts +0 -105
  505. package/packages/orq-rc/src/models/errors/createeval.ts +0 -51
  506. package/packages/orq-rc/src/models/errors/createmoderation.ts +0 -84
  507. package/packages/orq-rc/src/models/errors/createtranscription.ts +0 -87
  508. package/packages/orq-rc/src/models/errors/createtranslation.ts +0 -87
  509. package/packages/orq-rc/src/models/errors/deleteagent.ts +0 -51
  510. package/packages/orq-rc/src/models/errors/deleteagentschedule.ts +0 -56
  511. package/packages/orq-rc/src/models/errors/deleteeval.ts +0 -51
  512. package/packages/orq-rc/src/models/errors/deleteprompt.ts +0 -51
  513. package/packages/orq-rc/src/models/errors/getevals.ts +0 -51
  514. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -51
  515. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +0 -51
  516. package/packages/orq-rc/src/models/errors/getv2toolstoolidversions.ts +0 -51
  517. package/packages/orq-rc/src/models/errors/getv2toolstoolidversionsversionid.ts +0 -52
  518. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -59
  519. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  520. package/packages/orq-rc/src/models/errors/index.ts +0 -38
  521. package/packages/orq-rc/src/models/errors/invokeeval.ts +0 -141
  522. package/packages/orq-rc/src/models/errors/orqerror.ts +0 -35
  523. package/packages/orq-rc/src/models/errors/postv2agentskeycardrefresh.ts +0 -97
  524. package/packages/orq-rc/src/models/errors/postv2feedback.ts +0 -96
  525. package/packages/orq-rc/src/models/errors/postv2feedbackremove.ts +0 -51
  526. package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +0 -50
  527. package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +0 -51
  528. package/packages/orq-rc/src/models/errors/retrieveagentschedule.ts +0 -56
  529. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -109
  530. package/packages/orq-rc/src/models/errors/streamagent.ts +0 -51
  531. package/packages/orq-rc/src/models/errors/streamrunagent.ts +0 -51
  532. package/packages/orq-rc/src/models/errors/triggeragentschedule.ts +0 -105
  533. package/packages/orq-rc/src/models/errors/updateagent.ts +0 -51
  534. package/packages/orq-rc/src/models/errors/updateagentschedule.ts +0 -105
  535. package/packages/orq-rc/src/models/errors/updateeval.ts +0 -51
  536. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -51
  537. package/packages/orq-rc/src/models/errors/updatetool.ts +0 -62
  538. package/packages/orq-rc/src/models/operations/apikeydelete.ts +0 -39
  539. package/packages/orq-rc/src/models/operations/apikeyget.ts +0 -39
  540. package/packages/orq-rc/src/models/operations/apikeylist.ts +0 -107
  541. package/packages/orq-rc/src/models/operations/apikeyupdate.ts +0 -44
  542. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -39
  543. package/packages/orq-rc/src/models/operations/createagentrequest.ts +0 -6380
  544. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +0 -671
  545. package/packages/orq-rc/src/models/operations/createagentschedule.ts +0 -227
  546. package/packages/orq-rc/src/models/operations/createannotation.ts +0 -162
  547. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +0 -6399
  548. package/packages/orq-rc/src/models/operations/createchunk.ts +0 -222
  549. package/packages/orq-rc/src/models/operations/createcompletion.ts +0 -3474
  550. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -162
  551. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -2554
  552. package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -443
  553. package/packages/orq-rc/src/models/operations/createembedding.ts +0 -219
  554. package/packages/orq-rc/src/models/operations/createeval.ts +0 -4456
  555. package/packages/orq-rc/src/models/operations/createimage.ts +0 -1034
  556. package/packages/orq-rc/src/models/operations/createimageedit.ts +0 -1045
  557. package/packages/orq-rc/src/models/operations/createimagevariation.ts +0 -1067
  558. package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -958
  559. package/packages/orq-rc/src/models/operations/creatememory.ts +0 -142
  560. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +0 -152
  561. package/packages/orq-rc/src/models/operations/creatememorystore.ts +0 -199
  562. package/packages/orq-rc/src/models/operations/createmoderation.ts +0 -664
  563. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -5409
  564. package/packages/orq-rc/src/models/operations/creatererank.ts +0 -890
  565. package/packages/orq-rc/src/models/operations/createrouterresponse.ts +0 -1506
  566. package/packages/orq-rc/src/models/operations/createspeech.ts +0 -700
  567. package/packages/orq-rc/src/models/operations/createtool.ts +0 -2490
  568. package/packages/orq-rc/src/models/operations/createtranscription.ts +0 -955
  569. package/packages/orq-rc/src/models/operations/createtranslation.ts +0 -930
  570. package/packages/orq-rc/src/models/operations/deleteagent.ts +0 -39
  571. package/packages/orq-rc/src/models/operations/deleteagentschedule.ts +0 -46
  572. package/packages/orq-rc/src/models/operations/deleteannotation.ts +0 -82
  573. package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -53
  574. package/packages/orq-rc/src/models/operations/deletechunks.ts +0 -125
  575. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -46
  576. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -39
  577. package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -46
  578. package/packages/orq-rc/src/models/operations/deleteeval.ts +0 -31
  579. package/packages/orq-rc/src/models/operations/deleteidentity.ts +0 -34
  580. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -39
  581. package/packages/orq-rc/src/models/operations/deletememory.ts +0 -46
  582. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +0 -55
  583. package/packages/orq-rc/src/models/operations/deletememorystore.ts +0 -39
  584. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -34
  585. package/packages/orq-rc/src/models/operations/deletetool.ts +0 -36
  586. package/packages/orq-rc/src/models/operations/deletev2humanevalsetsid.ts +0 -36
  587. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -4968
  588. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -4179
  589. package/packages/orq-rc/src/models/operations/deployments.ts +0 -1277
  590. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -4699
  591. package/packages/orq-rc/src/models/operations/filecontent.ts +0 -39
  592. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -39
  593. package/packages/orq-rc/src/models/operations/fileget.ts +0 -35
  594. package/packages/orq-rc/src/models/operations/filelist.ts +0 -60
  595. package/packages/orq-rc/src/models/operations/fileupdate.ts +0 -44
  596. package/packages/orq-rc/src/models/operations/getagentresponse.ts +0 -46
  597. package/packages/orq-rc/src/models/operations/getallmemories.ts +0 -173
  598. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +0 -188
  599. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +0 -200
  600. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -3177
  601. package/packages/orq-rc/src/models/operations/getalltools.ts +0 -1389
  602. package/packages/orq-rc/src/models/operations/getchunkscount.ts +0 -142
  603. package/packages/orq-rc/src/models/operations/getevals.ts +0 -3346
  604. package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -171
  605. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -652
  606. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -3102
  607. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -3147
  608. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +0 -162
  609. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +0 -234
  610. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +0 -235
  611. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +0 -163
  612. package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +0 -110
  613. package/packages/orq-rc/src/models/operations/guardrailrulecreate.ts +0 -124
  614. package/packages/orq-rc/src/models/operations/guardrailruledelete.ts +0 -39
  615. package/packages/orq-rc/src/models/operations/guardrailruleget.ts +0 -102
  616. package/packages/orq-rc/src/models/operations/guardrailrulelist.ts +0 -94
  617. package/packages/orq-rc/src/models/operations/guardrailruleupdate.ts +0 -153
  618. package/packages/orq-rc/src/models/operations/index.ts +0 -169
  619. package/packages/orq-rc/src/models/operations/invokeagent.ts +0 -801
  620. package/packages/orq-rc/src/models/operations/invokeeval.ts +0 -1260
  621. package/packages/orq-rc/src/models/operations/listagents.ts +0 -2699
  622. package/packages/orq-rc/src/models/operations/listagentschedules.ts +0 -69
  623. package/packages/orq-rc/src/models/operations/listchunks.ts +0 -289
  624. package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +0 -282
  625. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -1498
  626. package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -205
  627. package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -241
  628. package/packages/orq-rc/src/models/operations/listidentities.ts +0 -83
  629. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -642
  630. package/packages/orq-rc/src/models/operations/listmodels.ts +0 -60
  631. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -3222
  632. package/packages/orq-rc/src/models/operations/modelazurefoundrydeployments.ts +0 -90
  633. package/packages/orq-rc/src/models/operations/modelcreate.ts +0 -184
  634. package/packages/orq-rc/src/models/operations/modelcreateautorouter.ts +0 -151
  635. package/packages/orq-rc/src/models/operations/modelcreateawsbedrock.ts +0 -218
  636. package/packages/orq-rc/src/models/operations/modelcreateopenailike.ts +0 -202
  637. package/packages/orq-rc/src/models/operations/modelcreatevertex.ts +0 -144
  638. package/packages/orq-rc/src/models/operations/modeldelete.ts +0 -34
  639. package/packages/orq-rc/src/models/operations/modeldisable.ts +0 -39
  640. package/packages/orq-rc/src/models/operations/modelenable.ts +0 -36
  641. package/packages/orq-rc/src/models/operations/modelupdate.ts +0 -198
  642. package/packages/orq-rc/src/models/operations/modelupdateautorouter.ts +0 -189
  643. package/packages/orq-rc/src/models/operations/modelupdateawsbedrock.ts +0 -248
  644. package/packages/orq-rc/src/models/operations/modelupdateopenailike.ts +0 -236
  645. package/packages/orq-rc/src/models/operations/modelvalidate.ts +0 -57
  646. package/packages/orq-rc/src/models/operations/modelvalidateawsbedrock.ts +0 -57
  647. package/packages/orq-rc/src/models/operations/parse.ts +0 -784
  648. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +0 -415
  649. package/packages/orq-rc/src/models/operations/policycreate.ts +0 -138
  650. package/packages/orq-rc/src/models/operations/policydelete.ts +0 -39
  651. package/packages/orq-rc/src/models/operations/policyget.ts +0 -110
  652. package/packages/orq-rc/src/models/operations/policylist.ts +0 -94
  653. package/packages/orq-rc/src/models/operations/policyupdate.ts +0 -174
  654. package/packages/orq-rc/src/models/operations/postv2agentskeycardrefresh.ts +0 -100
  655. package/packages/orq-rc/src/models/operations/postv2feedback.ts +0 -214
  656. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +0 -321
  657. package/packages/orq-rc/src/models/operations/postv2feedbackevaluationremove.ts +0 -43
  658. package/packages/orq-rc/src/models/operations/postv2feedbackremove.ts +0 -135
  659. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +0 -365
  660. package/packages/orq-rc/src/models/operations/postv2routerocr.ts +0 -478
  661. package/packages/orq-rc/src/models/operations/projectdelete.ts +0 -39
  662. package/packages/orq-rc/src/models/operations/projectget.ts +0 -39
  663. package/packages/orq-rc/src/models/operations/projectlist.ts +0 -58
  664. package/packages/orq-rc/src/models/operations/projectupdate.ts +0 -44
  665. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +0 -2754
  666. package/packages/orq-rc/src/models/operations/retrieveagentschedule.ts +0 -162
  667. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -1402
  668. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -150
  669. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -152
  670. package/packages/orq-rc/src/models/operations/retrieveidentity.ts +0 -45
  671. package/packages/orq-rc/src/models/operations/retrievememory.ts +0 -112
  672. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +0 -118
  673. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +0 -144
  674. package/packages/orq-rc/src/models/operations/retrieveresponse.ts +0 -225
  675. package/packages/orq-rc/src/models/operations/retrievetool.ts +0 -1370
  676. package/packages/orq-rc/src/models/operations/routingrulecreate.ts +0 -124
  677. package/packages/orq-rc/src/models/operations/routingruledelete.ts +0 -39
  678. package/packages/orq-rc/src/models/operations/routingruleget.ts +0 -102
  679. package/packages/orq-rc/src/models/operations/routingrulelist.ts +0 -94
  680. package/packages/orq-rc/src/models/operations/routingruleupdate.ts +0 -154
  681. package/packages/orq-rc/src/models/operations/runagent.ts +0 -4954
  682. package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -1762
  683. package/packages/orq-rc/src/models/operations/skilldelete.ts +0 -39
  684. package/packages/orq-rc/src/models/operations/skillget.ts +0 -40
  685. package/packages/orq-rc/src/models/operations/skilllist.ts +0 -61
  686. package/packages/orq-rc/src/models/operations/skillupdate.ts +0 -44
  687. package/packages/orq-rc/src/models/operations/streamagent.ts +0 -693
  688. package/packages/orq-rc/src/models/operations/streamrunagent.ts +0 -5126
  689. package/packages/orq-rc/src/models/operations/triggeragentschedule.ts +0 -86
  690. package/packages/orq-rc/src/models/operations/updateagent.ts +0 -6704
  691. package/packages/orq-rc/src/models/operations/updateagentschedule.ts +0 -241
  692. package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -236
  693. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -2555
  694. package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -206
  695. package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -186
  696. package/packages/orq-rc/src/models/operations/updateeval.ts +0 -3819
  697. package/packages/orq-rc/src/models/operations/updateidentity.ts +0 -43
  698. package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -1231
  699. package/packages/orq-rc/src/models/operations/updatememory.ts +0 -142
  700. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +0 -159
  701. package/packages/orq-rc/src/models/operations/updatememorystore.ts +0 -188
  702. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -5491
  703. package/packages/orq-rc/src/models/operations/updatetool.ts +0 -2801
  704. package/packages/orq-rc/src/sdk/agents.ts +0 -216
  705. package/packages/orq-rc/src/sdk/annotations.ts +0 -45
  706. package/packages/orq-rc/src/sdk/apikeys.ts +0 -116
  707. package/packages/orq-rc/src/sdk/audio.ts +0 -25
  708. package/packages/orq-rc/src/sdk/chat.ts +0 -13
  709. package/packages/orq-rc/src/sdk/chunking.ts +0 -27
  710. package/packages/orq-rc/src/sdk/completions.ts +0 -32
  711. package/packages/orq-rc/src/sdk/datasets.ts +0 -204
  712. package/packages/orq-rc/src/sdk/deployments.ts +0 -82
  713. package/packages/orq-rc/src/sdk/edits.ts +0 -27
  714. package/packages/orq-rc/src/sdk/embeddings.ts +0 -27
  715. package/packages/orq-rc/src/sdk/evals.ts +0 -102
  716. package/packages/orq-rc/src/sdk/feedback.ts +0 -33
  717. package/packages/orq-rc/src/sdk/files.ts +0 -118
  718. package/packages/orq-rc/src/sdk/generations.ts +0 -27
  719. package/packages/orq-rc/src/sdk/guardrailrules.ts +0 -99
  720. package/packages/orq-rc/src/sdk/humanreviewsets.ts +0 -84
  721. package/packages/orq-rc/src/sdk/identities.ts +0 -100
  722. package/packages/orq-rc/src/sdk/images.ts +0 -25
  723. package/packages/orq-rc/src/sdk/index.ts +0 -5
  724. package/packages/orq-rc/src/sdk/knowledge.ts +0 -312
  725. package/packages/orq-rc/src/sdk/memorystores.ts +0 -286
  726. package/packages/orq-rc/src/sdk/models.ts +0 -330
  727. package/packages/orq-rc/src/sdk/moderations.ts +0 -24
  728. package/packages/orq-rc/src/sdk/orqcompletions.ts +0 -32
  729. package/packages/orq-rc/src/sdk/orqresponses.ts +0 -53
  730. package/packages/orq-rc/src/sdk/pii.ts +0 -63
  731. package/packages/orq-rc/src/sdk/policies.ts +0 -99
  732. package/packages/orq-rc/src/sdk/projects.ts +0 -100
  733. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  734. package/packages/orq-rc/src/sdk/reporting.ts +0 -27
  735. package/packages/orq-rc/src/sdk/rerank.ts +0 -27
  736. package/packages/orq-rc/src/sdk/responses.ts +0 -47
  737. package/packages/orq-rc/src/sdk/router.ts +0 -66
  738. package/packages/orq-rc/src/sdk/routingrules.ts +0 -99
  739. package/packages/orq-rc/src/sdk/schedules.ts +0 -117
  740. package/packages/orq-rc/src/sdk/sdk.ts +0 -189
  741. package/packages/orq-rc/src/sdk/skills.ts +0 -100
  742. package/packages/orq-rc/src/sdk/speech.ts +0 -27
  743. package/packages/orq-rc/src/sdk/tools.ts +0 -135
  744. package/packages/orq-rc/src/sdk/transcriptions.ts +0 -24
  745. package/packages/orq-rc/src/sdk/translations.ts +0 -24
  746. package/packages/orq-rc/src/sdk/variations.ts +0 -27
  747. package/packages/orq-rc/src/types/async.ts +0 -69
  748. package/packages/orq-rc/src/types/blobs.ts +0 -32
  749. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  750. package/packages/orq-rc/src/types/enums.ts +0 -45
  751. package/packages/orq-rc/src/types/fp.ts +0 -50
  752. package/packages/orq-rc/src/types/index.ts +0 -11
  753. package/packages/orq-rc/src/types/operations.ts +0 -105
  754. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  755. package/packages/orq-rc/src/types/streams.ts +0 -21
  756. package/packages/orq-rc/src/types/unrecognized.ts +0 -35
@@ -1,4179 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { ClosedEnum } from "../../types/enums.js";
9
- import { Result as SafeParseResult } from "../../types/fp.js";
10
- import * as components from "../components/index.js";
11
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
-
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;
94
- };
95
-
96
- export type DeploymentInvokeContent2 =
97
- | (components.TextContentPartSchema & { type: "text" })
98
- | components.RefusalPartSchema
99
- | components.ReasoningPartSchema
100
- | components.RedactedReasoningPartSchema;
101
-
102
- /**
103
- * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
104
- */
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",
129
- } as const;
130
- /**
131
- * The type of the tool. Currently, only `function` is supported.
132
- */
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
- };
197
-
198
- /**
199
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
200
- */
201
- export const DeploymentInvoke2DeploymentsType = {
202
- Ephemeral: "ephemeral",
203
- } as const;
204
- /**
205
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
206
- */
207
- export type DeploymentInvoke2DeploymentsType = ClosedEnum<
208
- typeof DeploymentInvoke2DeploymentsType
209
- >;
210
-
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 = {
238
- /**
239
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
240
- */
241
- type: DeploymentInvoke2DeploymentsType;
242
- /**
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.
251
- */
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;
265
- };
266
-
267
- export type Content2 =
268
- | (components.TextContentPartSchema & { type: "text" })
269
- | components.ImageContentPartSchema
270
- | components.AudioContentPartSchema
271
- | Four;
272
-
273
- /**
274
- * The contents of the user message.
275
- */
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 = {
286
- /**
287
- * The role of the messages author, in this case `user`.
288
- */
289
- role: "user";
290
- /**
291
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
292
- */
293
- name?: string | undefined;
294
- /**
295
- * The contents of the user message.
296
- */
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 = {
315
- /**
316
- * The role of the messages author, in this case `developer`.
317
- */
318
- role: "developer";
319
- /**
320
- * The contents of the developer message.
321
- */
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;
327
- };
328
-
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 = {
340
- /**
341
- * The role of the messages author, in this case `system`.
342
- */
343
- role: "system";
344
- /**
345
- * The contents of the system message.
346
- */
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;
544
- };
545
-
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
- Wafer: "wafer",
1176
- Slack: "slack",
1177
- Orq: "orq",
1178
- } as const;
1179
- /**
1180
- * The provider used to generate the response
1181
- */
1182
- export type Provider = ClosedEnum<typeof Provider>;
1183
-
1184
- export type Telemetry = {
1185
- /**
1186
- * The trace id for the request that generated this response
1187
- */
1188
- traceId: string;
1189
- /**
1190
- * The span id for the request that generated this response
1191
- */
1192
- spanId: string;
1193
- };
1194
-
1195
- /**
1196
- * Metadata of the retrieved chunk from the knowledge base
1197
- */
1198
- export type DeploymentInvokeMetadata = {
1199
- /**
1200
- * Name of the file
1201
- */
1202
- fileName: string;
1203
- /**
1204
- * Page number of the chunk
1205
- */
1206
- pageNumber: number | null;
1207
- /**
1208
- * Type of the file
1209
- */
1210
- fileType: string;
1211
- /**
1212
- * 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
1213
- */
1214
- rerankScore?: number | undefined;
1215
- /**
1216
- * 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.
1217
- */
1218
- searchScore: number;
1219
- };
1220
-
1221
- export type Retrievals = {
1222
- /**
1223
- * Content of the retrieved chunk from the knowledge base
1224
- */
1225
- document: string;
1226
- /**
1227
- * Metadata of the retrieved chunk from the knowledge base
1228
- */
1229
- metadata: DeploymentInvokeMetadata;
1230
- };
1231
-
1232
- export type PromptTokensDetails = {
1233
- cachedTokens?: number | null | undefined;
1234
- };
1235
-
1236
- export type CompletionTokensDetails = {
1237
- reasoningTokens?: number | null | undefined;
1238
- };
1239
-
1240
- /**
1241
- * Usage metrics for the response
1242
- */
1243
- export type Usage = {
1244
- totalTokens?: number | undefined;
1245
- promptTokens?: number | undefined;
1246
- completionTokens?: number | undefined;
1247
- promptTokensDetails?: PromptTokensDetails | undefined;
1248
- completionTokensDetails?: CompletionTokensDetails | null | undefined;
1249
- };
1250
-
1251
- /**
1252
- * The role of the prompt message
1253
- */
1254
- export const DeploymentInvokeMessageDeploymentsRole = {
1255
- System: "system",
1256
- Developer: "developer",
1257
- Assistant: "assistant",
1258
- User: "user",
1259
- Exception: "exception",
1260
- Tool: "tool",
1261
- Prompt: "prompt",
1262
- Correction: "correction",
1263
- ExpectedOutput: "expected_output",
1264
- } as const;
1265
- /**
1266
- * The role of the prompt message
1267
- */
1268
- export type DeploymentInvokeMessageDeploymentsRole = ClosedEnum<
1269
- typeof DeploymentInvokeMessageDeploymentsRole
1270
- >;
1271
-
1272
- export type Message3 = {
1273
- type: "image";
1274
- /**
1275
- * The role of the prompt message
1276
- */
1277
- role: DeploymentInvokeMessageDeploymentsRole;
1278
- url: string;
1279
- };
1280
-
1281
- /**
1282
- * The role of the prompt message
1283
- */
1284
- export const DeploymentInvokeMessageRole = {
1285
- System: "system",
1286
- Developer: "developer",
1287
- Assistant: "assistant",
1288
- User: "user",
1289
- Exception: "exception",
1290
- Tool: "tool",
1291
- Prompt: "prompt",
1292
- Correction: "correction",
1293
- ExpectedOutput: "expected_output",
1294
- } as const;
1295
- /**
1296
- * The role of the prompt message
1297
- */
1298
- export type DeploymentInvokeMessageRole = ClosedEnum<
1299
- typeof DeploymentInvokeMessageRole
1300
- >;
1301
-
1302
- export type Message2 = {
1303
- type: "content";
1304
- /**
1305
- * The role of the prompt message
1306
- */
1307
- role: DeploymentInvokeMessageRole;
1308
- content: string | null;
1309
- /**
1310
- * Internal thought process of the model
1311
- */
1312
- reasoning?: string | undefined;
1313
- /**
1314
- * 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`.
1315
- */
1316
- reasoningSignature?: string | undefined;
1317
- /**
1318
- * 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.
1319
- */
1320
- redactedReasoning?: string | undefined;
1321
- };
1322
-
1323
- /**
1324
- * The role of the prompt message
1325
- */
1326
- export const MessageRole = {
1327
- System: "system",
1328
- Developer: "developer",
1329
- Assistant: "assistant",
1330
- User: "user",
1331
- Exception: "exception",
1332
- Tool: "tool",
1333
- Prompt: "prompt",
1334
- Correction: "correction",
1335
- ExpectedOutput: "expected_output",
1336
- } as const;
1337
- /**
1338
- * The role of the prompt message
1339
- */
1340
- export type MessageRole = ClosedEnum<typeof MessageRole>;
1341
-
1342
- export const DeploymentInvokeMessageDeploymentsResponseType = {
1343
- Function: "function",
1344
- } as const;
1345
- export type DeploymentInvokeMessageDeploymentsResponseType = ClosedEnum<
1346
- typeof DeploymentInvokeMessageDeploymentsResponseType
1347
- >;
1348
-
1349
- export type MessageFunction = {
1350
- name: string;
1351
- /**
1352
- * JSON string arguments for the functions
1353
- */
1354
- arguments: string;
1355
- };
1356
-
1357
- export type MessageToolCalls = {
1358
- id?: string | undefined;
1359
- index?: number | undefined;
1360
- type: DeploymentInvokeMessageDeploymentsResponseType;
1361
- function: MessageFunction;
1362
- };
1363
-
1364
- export type Message1 = {
1365
- type: "tool_calls";
1366
- /**
1367
- * The role of the prompt message
1368
- */
1369
- role: MessageRole;
1370
- content?: string | null | undefined;
1371
- toolCalls: Array<MessageToolCalls>;
1372
- /**
1373
- * Internal thought process of the model
1374
- */
1375
- reasoning?: string | undefined;
1376
- /**
1377
- * 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`.
1378
- */
1379
- reasoningSignature?: string | undefined;
1380
- /**
1381
- * 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.
1382
- */
1383
- redactedReasoning?: string | undefined;
1384
- };
1385
-
1386
- export type Message = Message1 | Message2 | Message3;
1387
-
1388
- export type Choices = {
1389
- index: number;
1390
- message: Message1 | Message2 | Message3;
1391
- finishReason?: string | null | undefined;
1392
- };
1393
-
1394
- /**
1395
- * Successful operation
1396
- */
1397
- export type DeploymentInvokeResponseBody = {
1398
- /**
1399
- * A unique identifier for the response. Can be used to add metrics to the transaction.
1400
- */
1401
- id: string;
1402
- /**
1403
- * A timestamp indicating when the object was created. Usually in a standardized format like ISO 8601
1404
- */
1405
- created: Date;
1406
- /**
1407
- * Indicates the type of model used to generate the response
1408
- */
1409
- object: DeploymentInvokeObject;
1410
- /**
1411
- * The model used to generate the response
1412
- */
1413
- model: string;
1414
- /**
1415
- * The provider used to generate the response
1416
- */
1417
- provider: Provider;
1418
- /**
1419
- * Indicates if the response is the final response
1420
- */
1421
- isFinal: boolean;
1422
- /**
1423
- * Indicates integration id used to generate the response
1424
- */
1425
- integrationId?: string | undefined;
1426
- telemetry: Telemetry;
1427
- /**
1428
- * A timestamp indicating when the object was finalized. Usually in a standardized format like ISO 8601
1429
- */
1430
- finalized?: Date | undefined;
1431
- /**
1432
- * Provider backed system fingerprint.
1433
- */
1434
- systemFingerprint?: string | null | undefined;
1435
- /**
1436
- * 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`.
1437
- */
1438
- retrievals?: Array<Retrievals> | undefined;
1439
- /**
1440
- * 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`.
1441
- */
1442
- providerResponse?: any | undefined;
1443
- /**
1444
- * Usage metrics for the response
1445
- */
1446
- usage?: Usage | null | undefined;
1447
- /**
1448
- * A list of choices generated by the model
1449
- */
1450
- choices: Array<Choices>;
1451
- };
1452
-
1453
- /** @internal */
1454
- export type DeploymentInvokeContentDeployments2$Outbound =
1455
- components.TextContentPartSchema$Outbound;
1456
-
1457
- /** @internal */
1458
- export const DeploymentInvokeContentDeployments2$outboundSchema: z.ZodType<
1459
- DeploymentInvokeContentDeployments2$Outbound,
1460
- z.ZodTypeDef,
1461
- DeploymentInvokeContentDeployments2
1462
- > = components.TextContentPartSchema$outboundSchema;
1463
-
1464
- export function deploymentInvokeContentDeployments2ToJSON(
1465
- deploymentInvokeContentDeployments2: DeploymentInvokeContentDeployments2,
1466
- ): string {
1467
- return JSON.stringify(
1468
- DeploymentInvokeContentDeployments2$outboundSchema.parse(
1469
- deploymentInvokeContentDeployments2,
1470
- ),
1471
- );
1472
- }
1473
-
1474
- /** @internal */
1475
- export type DeploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContent$Outbound =
1476
- | string
1477
- | Array<components.TextContentPartSchema$Outbound>;
1478
-
1479
- /** @internal */
1480
- export const DeploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContent$outboundSchema:
1481
- z.ZodType<
1482
- DeploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContent$Outbound,
1483
- z.ZodTypeDef,
1484
- DeploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContent
1485
- > = z.union([
1486
- z.string(),
1487
- z.array(components.TextContentPartSchema$outboundSchema),
1488
- ]);
1489
-
1490
- export function deploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContentToJSON(
1491
- deploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContent:
1492
- DeploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContent,
1493
- ): string {
1494
- return JSON.stringify(
1495
- DeploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContent$outboundSchema
1496
- .parse(
1497
- deploymentInvokePrefixMessagesDeploymentsRequestRequestBodyContent,
1498
- ),
1499
- );
1500
- }
1501
-
1502
- /** @internal */
1503
- export const DeploymentInvokePrefixMessagesType$outboundSchema: z.ZodNativeEnum<
1504
- typeof DeploymentInvokePrefixMessagesType
1505
- > = z.nativeEnum(DeploymentInvokePrefixMessagesType);
1506
-
1507
- /** @internal */
1508
- export const PrefixMessagesTtl$outboundSchema: z.ZodNativeEnum<
1509
- typeof PrefixMessagesTtl
1510
- > = z.nativeEnum(PrefixMessagesTtl);
1511
-
1512
- /** @internal */
1513
- export type PrefixMessagesCacheControl$Outbound = {
1514
- type: string;
1515
- ttl: string;
1516
- };
1517
-
1518
- /** @internal */
1519
- export const PrefixMessagesCacheControl$outboundSchema: z.ZodType<
1520
- PrefixMessagesCacheControl$Outbound,
1521
- z.ZodTypeDef,
1522
- PrefixMessagesCacheControl
1523
- > = z.object({
1524
- type: DeploymentInvokePrefixMessagesType$outboundSchema,
1525
- ttl: PrefixMessagesTtl$outboundSchema.default("5m"),
1526
- });
1527
-
1528
- export function prefixMessagesCacheControlToJSON(
1529
- prefixMessagesCacheControl: PrefixMessagesCacheControl,
1530
- ): string {
1531
- return JSON.stringify(
1532
- PrefixMessagesCacheControl$outboundSchema.parse(prefixMessagesCacheControl),
1533
- );
1534
- }
1535
-
1536
- /** @internal */
1537
- export type ToolMessage$Outbound = {
1538
- role: "tool";
1539
- content: string | Array<components.TextContentPartSchema$Outbound>;
1540
- tool_call_id: string | null;
1541
- cache_control?: PrefixMessagesCacheControl$Outbound | undefined;
1542
- };
1543
-
1544
- /** @internal */
1545
- export const ToolMessage$outboundSchema: z.ZodType<
1546
- ToolMessage$Outbound,
1547
- z.ZodTypeDef,
1548
- ToolMessage
1549
- > = z.object({
1550
- role: z.literal("tool"),
1551
- content: z.union([
1552
- z.string(),
1553
- z.array(components.TextContentPartSchema$outboundSchema),
1554
- ]),
1555
- toolCallId: z.nullable(z.string()),
1556
- cacheControl: z.lazy(() => PrefixMessagesCacheControl$outboundSchema)
1557
- .optional(),
1558
- }).transform((v) => {
1559
- return remap$(v, {
1560
- toolCallId: "tool_call_id",
1561
- cacheControl: "cache_control",
1562
- });
1563
- });
1564
-
1565
- export function toolMessageToJSON(toolMessage: ToolMessage): string {
1566
- return JSON.stringify(ToolMessage$outboundSchema.parse(toolMessage));
1567
- }
1568
-
1569
- /** @internal */
1570
- export type DeploymentInvokeContent2$Outbound =
1571
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1572
- | components.RefusalPartSchema$Outbound
1573
- | components.ReasoningPartSchema$Outbound
1574
- | components.RedactedReasoningPartSchema$Outbound;
1575
-
1576
- /** @internal */
1577
- export const DeploymentInvokeContent2$outboundSchema: z.ZodType<
1578
- DeploymentInvokeContent2$Outbound,
1579
- z.ZodTypeDef,
1580
- DeploymentInvokeContent2
1581
- > = z.union([
1582
- components.TextContentPartSchema$outboundSchema.and(
1583
- z.object({ type: z.literal("text") }),
1584
- ),
1585
- components.RefusalPartSchema$outboundSchema,
1586
- components.ReasoningPartSchema$outboundSchema,
1587
- components.RedactedReasoningPartSchema$outboundSchema,
1588
- ]);
1589
-
1590
- export function deploymentInvokeContent2ToJSON(
1591
- deploymentInvokeContent2: DeploymentInvokeContent2,
1592
- ): string {
1593
- return JSON.stringify(
1594
- DeploymentInvokeContent2$outboundSchema.parse(deploymentInvokeContent2),
1595
- );
1596
- }
1597
-
1598
- /** @internal */
1599
- export type DeploymentInvokePrefixMessagesDeploymentsRequestContent$Outbound =
1600
- | string
1601
- | Array<
1602
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1603
- | components.RefusalPartSchema$Outbound
1604
- | components.ReasoningPartSchema$Outbound
1605
- | components.RedactedReasoningPartSchema$Outbound
1606
- >;
1607
-
1608
- /** @internal */
1609
- export const DeploymentInvokePrefixMessagesDeploymentsRequestContent$outboundSchema:
1610
- z.ZodType<
1611
- DeploymentInvokePrefixMessagesDeploymentsRequestContent$Outbound,
1612
- z.ZodTypeDef,
1613
- DeploymentInvokePrefixMessagesDeploymentsRequestContent
1614
- > = z.union([
1615
- z.string(),
1616
- z.array(
1617
- z.union([
1618
- components.TextContentPartSchema$outboundSchema.and(
1619
- z.object({ type: z.literal("text") }),
1620
- ),
1621
- components.RefusalPartSchema$outboundSchema,
1622
- components.ReasoningPartSchema$outboundSchema,
1623
- components.RedactedReasoningPartSchema$outboundSchema,
1624
- ]),
1625
- ),
1626
- ]);
1627
-
1628
- export function deploymentInvokePrefixMessagesDeploymentsRequestContentToJSON(
1629
- deploymentInvokePrefixMessagesDeploymentsRequestContent:
1630
- DeploymentInvokePrefixMessagesDeploymentsRequestContent,
1631
- ): string {
1632
- return JSON.stringify(
1633
- DeploymentInvokePrefixMessagesDeploymentsRequestContent$outboundSchema
1634
- .parse(deploymentInvokePrefixMessagesDeploymentsRequestContent),
1635
- );
1636
- }
1637
-
1638
- /** @internal */
1639
- export type Audio$Outbound = {
1640
- id: string;
1641
- };
1642
-
1643
- /** @internal */
1644
- export const Audio$outboundSchema: z.ZodType<
1645
- Audio$Outbound,
1646
- z.ZodTypeDef,
1647
- Audio
1648
- > = z.object({
1649
- id: z.string(),
1650
- });
1651
-
1652
- export function audioToJSON(audio: Audio): string {
1653
- return JSON.stringify(Audio$outboundSchema.parse(audio));
1654
- }
1655
-
1656
- /** @internal */
1657
- export const PrefixMessagesType$outboundSchema: z.ZodNativeEnum<
1658
- typeof PrefixMessagesType
1659
- > = z.nativeEnum(PrefixMessagesType);
1660
-
1661
- /** @internal */
1662
- export type PrefixMessagesFunction$Outbound = {
1663
- name?: string | undefined;
1664
- arguments?: string | undefined;
1665
- };
1666
-
1667
- /** @internal */
1668
- export const PrefixMessagesFunction$outboundSchema: z.ZodType<
1669
- PrefixMessagesFunction$Outbound,
1670
- z.ZodTypeDef,
1671
- PrefixMessagesFunction
1672
- > = z.object({
1673
- name: z.string().optional(),
1674
- arguments: z.string().optional(),
1675
- });
1676
-
1677
- export function prefixMessagesFunctionToJSON(
1678
- prefixMessagesFunction: PrefixMessagesFunction,
1679
- ): string {
1680
- return JSON.stringify(
1681
- PrefixMessagesFunction$outboundSchema.parse(prefixMessagesFunction),
1682
- );
1683
- }
1684
-
1685
- /** @internal */
1686
- export type PrefixMessagesToolCalls$Outbound = {
1687
- id: string;
1688
- type: string;
1689
- function: PrefixMessagesFunction$Outbound;
1690
- thought_signature?: string | undefined;
1691
- };
1692
-
1693
- /** @internal */
1694
- export const PrefixMessagesToolCalls$outboundSchema: z.ZodType<
1695
- PrefixMessagesToolCalls$Outbound,
1696
- z.ZodTypeDef,
1697
- PrefixMessagesToolCalls
1698
- > = z.object({
1699
- id: z.string(),
1700
- type: PrefixMessagesType$outboundSchema,
1701
- function: z.lazy(() => PrefixMessagesFunction$outboundSchema),
1702
- thoughtSignature: z.string().optional(),
1703
- }).transform((v) => {
1704
- return remap$(v, {
1705
- thoughtSignature: "thought_signature",
1706
- });
1707
- });
1708
-
1709
- export function prefixMessagesToolCallsToJSON(
1710
- prefixMessagesToolCalls: PrefixMessagesToolCalls,
1711
- ): string {
1712
- return JSON.stringify(
1713
- PrefixMessagesToolCalls$outboundSchema.parse(prefixMessagesToolCalls),
1714
- );
1715
- }
1716
-
1717
- /** @internal */
1718
- export type AssistantMessage$Outbound = {
1719
- content?:
1720
- | string
1721
- | Array<
1722
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1723
- | components.RefusalPartSchema$Outbound
1724
- | components.ReasoningPartSchema$Outbound
1725
- | components.RedactedReasoningPartSchema$Outbound
1726
- >
1727
- | null
1728
- | undefined;
1729
- refusal?: string | null | undefined;
1730
- role: "assistant";
1731
- name?: string | undefined;
1732
- audio?: Audio$Outbound | null | undefined;
1733
- tool_calls?: Array<PrefixMessagesToolCalls$Outbound> | undefined;
1734
- };
1735
-
1736
- /** @internal */
1737
- export const AssistantMessage$outboundSchema: z.ZodType<
1738
- AssistantMessage$Outbound,
1739
- z.ZodTypeDef,
1740
- AssistantMessage
1741
- > = z.object({
1742
- content: z.nullable(
1743
- z.union([
1744
- z.string(),
1745
- z.array(
1746
- z.union([
1747
- components.TextContentPartSchema$outboundSchema.and(
1748
- z.object({ type: z.literal("text") }),
1749
- ),
1750
- components.RefusalPartSchema$outboundSchema,
1751
- components.ReasoningPartSchema$outboundSchema,
1752
- components.RedactedReasoningPartSchema$outboundSchema,
1753
- ]),
1754
- ),
1755
- ]),
1756
- ).optional(),
1757
- refusal: z.nullable(z.string()).optional(),
1758
- role: z.literal("assistant"),
1759
- name: z.string().optional(),
1760
- audio: z.nullable(z.lazy(() => Audio$outboundSchema)).optional(),
1761
- toolCalls: z.array(z.lazy(() => PrefixMessagesToolCalls$outboundSchema))
1762
- .optional(),
1763
- }).transform((v) => {
1764
- return remap$(v, {
1765
- toolCalls: "tool_calls",
1766
- });
1767
- });
1768
-
1769
- export function assistantMessageToJSON(
1770
- assistantMessage: AssistantMessage,
1771
- ): string {
1772
- return JSON.stringify(
1773
- AssistantMessage$outboundSchema.parse(assistantMessage),
1774
- );
1775
- }
1776
-
1777
- /** @internal */
1778
- export const DeploymentInvoke2DeploymentsType$outboundSchema: z.ZodNativeEnum<
1779
- typeof DeploymentInvoke2DeploymentsType
1780
- > = z.nativeEnum(DeploymentInvoke2DeploymentsType);
1781
-
1782
- /** @internal */
1783
- export const Ttl$outboundSchema: z.ZodNativeEnum<typeof Ttl> = z.nativeEnum(
1784
- Ttl,
1785
- );
1786
-
1787
- /** @internal */
1788
- export type CacheControl$Outbound = {
1789
- type: string;
1790
- ttl: string;
1791
- };
1792
-
1793
- /** @internal */
1794
- export const CacheControl$outboundSchema: z.ZodType<
1795
- CacheControl$Outbound,
1796
- z.ZodTypeDef,
1797
- CacheControl
1798
- > = z.object({
1799
- type: DeploymentInvoke2DeploymentsType$outboundSchema,
1800
- ttl: Ttl$outboundSchema.default("5m"),
1801
- });
1802
-
1803
- export function cacheControlToJSON(cacheControl: CacheControl): string {
1804
- return JSON.stringify(CacheControl$outboundSchema.parse(cacheControl));
1805
- }
1806
-
1807
- /** @internal */
1808
- export type Four$Outbound = {
1809
- type: "file";
1810
- cache_control?: CacheControl$Outbound | undefined;
1811
- file: components.FileContentPartSchema$Outbound;
1812
- };
1813
-
1814
- /** @internal */
1815
- export const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four> =
1816
- z.object({
1817
- type: z.literal("file"),
1818
- cacheControl: z.lazy(() => CacheControl$outboundSchema).optional(),
1819
- file: components.FileContentPartSchema$outboundSchema,
1820
- }).transform((v) => {
1821
- return remap$(v, {
1822
- cacheControl: "cache_control",
1823
- });
1824
- });
1825
-
1826
- export function fourToJSON(four: Four): string {
1827
- return JSON.stringify(Four$outboundSchema.parse(four));
1828
- }
1829
-
1830
- /** @internal */
1831
- export type Content2$Outbound =
1832
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1833
- | components.ImageContentPartSchema$Outbound
1834
- | components.AudioContentPartSchema$Outbound
1835
- | Four$Outbound;
1836
-
1837
- /** @internal */
1838
- export const Content2$outboundSchema: z.ZodType<
1839
- Content2$Outbound,
1840
- z.ZodTypeDef,
1841
- Content2
1842
- > = z.union([
1843
- components.TextContentPartSchema$outboundSchema.and(
1844
- z.object({ type: z.literal("text") }),
1845
- ),
1846
- components.ImageContentPartSchema$outboundSchema,
1847
- components.AudioContentPartSchema$outboundSchema,
1848
- z.lazy(() => Four$outboundSchema),
1849
- ]);
1850
-
1851
- export function content2ToJSON(content2: Content2): string {
1852
- return JSON.stringify(Content2$outboundSchema.parse(content2));
1853
- }
1854
-
1855
- /** @internal */
1856
- export type DeploymentInvokePrefixMessagesDeploymentsContent$Outbound =
1857
- | string
1858
- | Array<
1859
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1860
- | components.ImageContentPartSchema$Outbound
1861
- | components.AudioContentPartSchema$Outbound
1862
- | Four$Outbound
1863
- >;
1864
-
1865
- /** @internal */
1866
- export const DeploymentInvokePrefixMessagesDeploymentsContent$outboundSchema:
1867
- z.ZodType<
1868
- DeploymentInvokePrefixMessagesDeploymentsContent$Outbound,
1869
- z.ZodTypeDef,
1870
- DeploymentInvokePrefixMessagesDeploymentsContent
1871
- > = z.union([
1872
- z.string(),
1873
- z.array(
1874
- z.union([
1875
- components.TextContentPartSchema$outboundSchema.and(
1876
- z.object({ type: z.literal("text") }),
1877
- ),
1878
- components.ImageContentPartSchema$outboundSchema,
1879
- components.AudioContentPartSchema$outboundSchema,
1880
- z.lazy(() => Four$outboundSchema),
1881
- ]),
1882
- ),
1883
- ]);
1884
-
1885
- export function deploymentInvokePrefixMessagesDeploymentsContentToJSON(
1886
- deploymentInvokePrefixMessagesDeploymentsContent:
1887
- DeploymentInvokePrefixMessagesDeploymentsContent,
1888
- ): string {
1889
- return JSON.stringify(
1890
- DeploymentInvokePrefixMessagesDeploymentsContent$outboundSchema.parse(
1891
- deploymentInvokePrefixMessagesDeploymentsContent,
1892
- ),
1893
- );
1894
- }
1895
-
1896
- /** @internal */
1897
- export type UserMessage$Outbound = {
1898
- role: "user";
1899
- name?: string | undefined;
1900
- content:
1901
- | string
1902
- | Array<
1903
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1904
- | components.ImageContentPartSchema$Outbound
1905
- | components.AudioContentPartSchema$Outbound
1906
- | Four$Outbound
1907
- >;
1908
- };
1909
-
1910
- /** @internal */
1911
- export const UserMessage$outboundSchema: z.ZodType<
1912
- UserMessage$Outbound,
1913
- z.ZodTypeDef,
1914
- UserMessage
1915
- > = z.object({
1916
- role: z.literal("user"),
1917
- name: z.string().optional(),
1918
- content: z.union([
1919
- z.string(),
1920
- z.array(
1921
- z.union([
1922
- components.TextContentPartSchema$outboundSchema.and(
1923
- z.object({ type: z.literal("text") }),
1924
- ),
1925
- components.ImageContentPartSchema$outboundSchema,
1926
- components.AudioContentPartSchema$outboundSchema,
1927
- z.lazy(() => Four$outboundSchema),
1928
- ]),
1929
- ),
1930
- ]),
1931
- });
1932
-
1933
- export function userMessageToJSON(userMessage: UserMessage): string {
1934
- return JSON.stringify(UserMessage$outboundSchema.parse(userMessage));
1935
- }
1936
-
1937
- /** @internal */
1938
- export type DeploymentInvokePrefixMessagesContent$Outbound =
1939
- | string
1940
- | Array<components.TextContentPartSchema$Outbound>;
1941
-
1942
- /** @internal */
1943
- export const DeploymentInvokePrefixMessagesContent$outboundSchema: z.ZodType<
1944
- DeploymentInvokePrefixMessagesContent$Outbound,
1945
- z.ZodTypeDef,
1946
- DeploymentInvokePrefixMessagesContent
1947
- > = z.union([
1948
- z.string(),
1949
- z.array(components.TextContentPartSchema$outboundSchema),
1950
- ]);
1951
-
1952
- export function deploymentInvokePrefixMessagesContentToJSON(
1953
- deploymentInvokePrefixMessagesContent: DeploymentInvokePrefixMessagesContent,
1954
- ): string {
1955
- return JSON.stringify(
1956
- DeploymentInvokePrefixMessagesContent$outboundSchema.parse(
1957
- deploymentInvokePrefixMessagesContent,
1958
- ),
1959
- );
1960
- }
1961
-
1962
- /** @internal */
1963
- export type DeveloperMessage$Outbound = {
1964
- role: "developer";
1965
- content: string | Array<components.TextContentPartSchema$Outbound>;
1966
- name?: string | undefined;
1967
- };
1968
-
1969
- /** @internal */
1970
- export const DeveloperMessage$outboundSchema: z.ZodType<
1971
- DeveloperMessage$Outbound,
1972
- z.ZodTypeDef,
1973
- DeveloperMessage
1974
- > = z.object({
1975
- role: z.literal("developer"),
1976
- content: z.union([
1977
- z.string(),
1978
- z.array(components.TextContentPartSchema$outboundSchema),
1979
- ]),
1980
- name: z.string().optional(),
1981
- });
1982
-
1983
- export function developerMessageToJSON(
1984
- developerMessage: DeveloperMessage,
1985
- ): string {
1986
- return JSON.stringify(
1987
- DeveloperMessage$outboundSchema.parse(developerMessage),
1988
- );
1989
- }
1990
-
1991
- /** @internal */
1992
- export type PrefixMessagesContent$Outbound =
1993
- | string
1994
- | Array<components.TextContentPartSchema$Outbound>;
1995
-
1996
- /** @internal */
1997
- export const PrefixMessagesContent$outboundSchema: z.ZodType<
1998
- PrefixMessagesContent$Outbound,
1999
- z.ZodTypeDef,
2000
- PrefixMessagesContent
2001
- > = z.union([
2002
- z.string(),
2003
- z.array(components.TextContentPartSchema$outboundSchema),
2004
- ]);
2005
-
2006
- export function prefixMessagesContentToJSON(
2007
- prefixMessagesContent: PrefixMessagesContent,
2008
- ): string {
2009
- return JSON.stringify(
2010
- PrefixMessagesContent$outboundSchema.parse(prefixMessagesContent),
2011
- );
2012
- }
2013
-
2014
- /** @internal */
2015
- export type SystemMessage$Outbound = {
2016
- role: "system";
2017
- content: string | Array<components.TextContentPartSchema$Outbound>;
2018
- name?: string | undefined;
2019
- };
2020
-
2021
- /** @internal */
2022
- export const SystemMessage$outboundSchema: z.ZodType<
2023
- SystemMessage$Outbound,
2024
- z.ZodTypeDef,
2025
- SystemMessage
2026
- > = z.object({
2027
- role: z.literal("system"),
2028
- content: z.union([
2029
- z.string(),
2030
- z.array(components.TextContentPartSchema$outboundSchema),
2031
- ]),
2032
- name: z.string().optional(),
2033
- });
2034
-
2035
- export function systemMessageToJSON(systemMessage: SystemMessage): string {
2036
- return JSON.stringify(SystemMessage$outboundSchema.parse(systemMessage));
2037
- }
2038
-
2039
- /** @internal */
2040
- export type PrefixMessages$Outbound =
2041
- | SystemMessage$Outbound
2042
- | DeveloperMessage$Outbound
2043
- | UserMessage$Outbound
2044
- | AssistantMessage$Outbound
2045
- | ToolMessage$Outbound;
2046
-
2047
- /** @internal */
2048
- export const PrefixMessages$outboundSchema: z.ZodType<
2049
- PrefixMessages$Outbound,
2050
- z.ZodTypeDef,
2051
- PrefixMessages
2052
- > = z.union([
2053
- z.lazy(() => SystemMessage$outboundSchema),
2054
- z.lazy(() => DeveloperMessage$outboundSchema),
2055
- z.lazy(() => UserMessage$outboundSchema),
2056
- z.lazy(() => AssistantMessage$outboundSchema),
2057
- z.lazy(() => ToolMessage$outboundSchema),
2058
- ]);
2059
-
2060
- export function prefixMessagesToJSON(prefixMessages: PrefixMessages): string {
2061
- return JSON.stringify(PrefixMessages$outboundSchema.parse(prefixMessages));
2062
- }
2063
-
2064
- /** @internal */
2065
- export type DeploymentInvokeContentDeploymentsRequestRequestBodyMessages2$Outbound =
2066
- components.TextContentPartSchema$Outbound;
2067
-
2068
- /** @internal */
2069
- export const DeploymentInvokeContentDeploymentsRequestRequestBodyMessages2$outboundSchema:
2070
- z.ZodType<
2071
- DeploymentInvokeContentDeploymentsRequestRequestBodyMessages2$Outbound,
2072
- z.ZodTypeDef,
2073
- DeploymentInvokeContentDeploymentsRequestRequestBodyMessages2
2074
- > = components.TextContentPartSchema$outboundSchema;
2075
-
2076
- export function deploymentInvokeContentDeploymentsRequestRequestBodyMessages2ToJSON(
2077
- deploymentInvokeContentDeploymentsRequestRequestBodyMessages2:
2078
- DeploymentInvokeContentDeploymentsRequestRequestBodyMessages2,
2079
- ): string {
2080
- return JSON.stringify(
2081
- DeploymentInvokeContentDeploymentsRequestRequestBodyMessages2$outboundSchema
2082
- .parse(deploymentInvokeContentDeploymentsRequestRequestBodyMessages2),
2083
- );
2084
- }
2085
-
2086
- /** @internal */
2087
- export type DeploymentInvokeMessagesDeploymentsRequestRequestBodyContent$Outbound =
2088
- | string
2089
- | Array<components.TextContentPartSchema$Outbound>;
2090
-
2091
- /** @internal */
2092
- export const DeploymentInvokeMessagesDeploymentsRequestRequestBodyContent$outboundSchema:
2093
- z.ZodType<
2094
- DeploymentInvokeMessagesDeploymentsRequestRequestBodyContent$Outbound,
2095
- z.ZodTypeDef,
2096
- DeploymentInvokeMessagesDeploymentsRequestRequestBodyContent
2097
- > = z.union([
2098
- z.string(),
2099
- z.array(components.TextContentPartSchema$outboundSchema),
2100
- ]);
2101
-
2102
- export function deploymentInvokeMessagesDeploymentsRequestRequestBodyContentToJSON(
2103
- deploymentInvokeMessagesDeploymentsRequestRequestBodyContent:
2104
- DeploymentInvokeMessagesDeploymentsRequestRequestBodyContent,
2105
- ): string {
2106
- return JSON.stringify(
2107
- DeploymentInvokeMessagesDeploymentsRequestRequestBodyContent$outboundSchema
2108
- .parse(deploymentInvokeMessagesDeploymentsRequestRequestBodyContent),
2109
- );
2110
- }
2111
-
2112
- /** @internal */
2113
- export const DeploymentInvokeMessagesType$outboundSchema: z.ZodNativeEnum<
2114
- typeof DeploymentInvokeMessagesType
2115
- > = z.nativeEnum(DeploymentInvokeMessagesType);
2116
-
2117
- /** @internal */
2118
- export const MessagesTtl$outboundSchema: z.ZodNativeEnum<typeof MessagesTtl> = z
2119
- .nativeEnum(MessagesTtl);
2120
-
2121
- /** @internal */
2122
- export type MessagesCacheControl$Outbound = {
2123
- type: string;
2124
- ttl: string;
2125
- };
2126
-
2127
- /** @internal */
2128
- export const MessagesCacheControl$outboundSchema: z.ZodType<
2129
- MessagesCacheControl$Outbound,
2130
- z.ZodTypeDef,
2131
- MessagesCacheControl
2132
- > = z.object({
2133
- type: DeploymentInvokeMessagesType$outboundSchema,
2134
- ttl: MessagesTtl$outboundSchema.default("5m"),
2135
- });
2136
-
2137
- export function messagesCacheControlToJSON(
2138
- messagesCacheControl: MessagesCacheControl,
2139
- ): string {
2140
- return JSON.stringify(
2141
- MessagesCacheControl$outboundSchema.parse(messagesCacheControl),
2142
- );
2143
- }
2144
-
2145
- /** @internal */
2146
- export type MessagesToolMessage$Outbound = {
2147
- role: "tool";
2148
- content: string | Array<components.TextContentPartSchema$Outbound>;
2149
- tool_call_id: string | null;
2150
- cache_control?: MessagesCacheControl$Outbound | undefined;
2151
- };
2152
-
2153
- /** @internal */
2154
- export const MessagesToolMessage$outboundSchema: z.ZodType<
2155
- MessagesToolMessage$Outbound,
2156
- z.ZodTypeDef,
2157
- MessagesToolMessage
2158
- > = z.object({
2159
- role: z.literal("tool"),
2160
- content: z.union([
2161
- z.string(),
2162
- z.array(components.TextContentPartSchema$outboundSchema),
2163
- ]),
2164
- toolCallId: z.nullable(z.string()),
2165
- cacheControl: z.lazy(() => MessagesCacheControl$outboundSchema).optional(),
2166
- }).transform((v) => {
2167
- return remap$(v, {
2168
- toolCallId: "tool_call_id",
2169
- cacheControl: "cache_control",
2170
- });
2171
- });
2172
-
2173
- export function messagesToolMessageToJSON(
2174
- messagesToolMessage: MessagesToolMessage,
2175
- ): string {
2176
- return JSON.stringify(
2177
- MessagesToolMessage$outboundSchema.parse(messagesToolMessage),
2178
- );
2179
- }
2180
-
2181
- /** @internal */
2182
- export type DeploymentInvokeContentDeploymentsRequestRequestBody2$Outbound =
2183
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2184
- | components.RefusalPartSchema$Outbound
2185
- | components.ReasoningPartSchema$Outbound
2186
- | components.RedactedReasoningPartSchema$Outbound;
2187
-
2188
- /** @internal */
2189
- export const DeploymentInvokeContentDeploymentsRequestRequestBody2$outboundSchema:
2190
- z.ZodType<
2191
- DeploymentInvokeContentDeploymentsRequestRequestBody2$Outbound,
2192
- z.ZodTypeDef,
2193
- DeploymentInvokeContentDeploymentsRequestRequestBody2
2194
- > = z.union([
2195
- components.TextContentPartSchema$outboundSchema.and(
2196
- z.object({ type: z.literal("text") }),
2197
- ),
2198
- components.RefusalPartSchema$outboundSchema,
2199
- components.ReasoningPartSchema$outboundSchema,
2200
- components.RedactedReasoningPartSchema$outboundSchema,
2201
- ]);
2202
-
2203
- export function deploymentInvokeContentDeploymentsRequestRequestBody2ToJSON(
2204
- deploymentInvokeContentDeploymentsRequestRequestBody2:
2205
- DeploymentInvokeContentDeploymentsRequestRequestBody2,
2206
- ): string {
2207
- return JSON.stringify(
2208
- DeploymentInvokeContentDeploymentsRequestRequestBody2$outboundSchema.parse(
2209
- deploymentInvokeContentDeploymentsRequestRequestBody2,
2210
- ),
2211
- );
2212
- }
2213
-
2214
- /** @internal */
2215
- export type DeploymentInvokeMessagesDeploymentsRequestContent$Outbound =
2216
- | string
2217
- | Array<
2218
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2219
- | components.RefusalPartSchema$Outbound
2220
- | components.ReasoningPartSchema$Outbound
2221
- | components.RedactedReasoningPartSchema$Outbound
2222
- >;
2223
-
2224
- /** @internal */
2225
- export const DeploymentInvokeMessagesDeploymentsRequestContent$outboundSchema:
2226
- z.ZodType<
2227
- DeploymentInvokeMessagesDeploymentsRequestContent$Outbound,
2228
- z.ZodTypeDef,
2229
- DeploymentInvokeMessagesDeploymentsRequestContent
2230
- > = z.union([
2231
- z.string(),
2232
- z.array(
2233
- z.union([
2234
- components.TextContentPartSchema$outboundSchema.and(
2235
- z.object({ type: z.literal("text") }),
2236
- ),
2237
- components.RefusalPartSchema$outboundSchema,
2238
- components.ReasoningPartSchema$outboundSchema,
2239
- components.RedactedReasoningPartSchema$outboundSchema,
2240
- ]),
2241
- ),
2242
- ]);
2243
-
2244
- export function deploymentInvokeMessagesDeploymentsRequestContentToJSON(
2245
- deploymentInvokeMessagesDeploymentsRequestContent:
2246
- DeploymentInvokeMessagesDeploymentsRequestContent,
2247
- ): string {
2248
- return JSON.stringify(
2249
- DeploymentInvokeMessagesDeploymentsRequestContent$outboundSchema.parse(
2250
- deploymentInvokeMessagesDeploymentsRequestContent,
2251
- ),
2252
- );
2253
- }
2254
-
2255
- /** @internal */
2256
- export type MessagesAudio$Outbound = {
2257
- id: string;
2258
- };
2259
-
2260
- /** @internal */
2261
- export const MessagesAudio$outboundSchema: z.ZodType<
2262
- MessagesAudio$Outbound,
2263
- z.ZodTypeDef,
2264
- MessagesAudio
2265
- > = z.object({
2266
- id: z.string(),
2267
- });
2268
-
2269
- export function messagesAudioToJSON(messagesAudio: MessagesAudio): string {
2270
- return JSON.stringify(MessagesAudio$outboundSchema.parse(messagesAudio));
2271
- }
2272
-
2273
- /** @internal */
2274
- export const MessagesType$outboundSchema: z.ZodNativeEnum<typeof MessagesType> =
2275
- z.nativeEnum(MessagesType);
2276
-
2277
- /** @internal */
2278
- export type MessagesFunction$Outbound = {
2279
- name?: string | undefined;
2280
- arguments?: string | undefined;
2281
- };
2282
-
2283
- /** @internal */
2284
- export const MessagesFunction$outboundSchema: z.ZodType<
2285
- MessagesFunction$Outbound,
2286
- z.ZodTypeDef,
2287
- MessagesFunction
2288
- > = z.object({
2289
- name: z.string().optional(),
2290
- arguments: z.string().optional(),
2291
- });
2292
-
2293
- export function messagesFunctionToJSON(
2294
- messagesFunction: MessagesFunction,
2295
- ): string {
2296
- return JSON.stringify(
2297
- MessagesFunction$outboundSchema.parse(messagesFunction),
2298
- );
2299
- }
2300
-
2301
- /** @internal */
2302
- export type MessagesToolCalls$Outbound = {
2303
- id: string;
2304
- type: string;
2305
- function: MessagesFunction$Outbound;
2306
- thought_signature?: string | undefined;
2307
- };
2308
-
2309
- /** @internal */
2310
- export const MessagesToolCalls$outboundSchema: z.ZodType<
2311
- MessagesToolCalls$Outbound,
2312
- z.ZodTypeDef,
2313
- MessagesToolCalls
2314
- > = z.object({
2315
- id: z.string(),
2316
- type: MessagesType$outboundSchema,
2317
- function: z.lazy(() => MessagesFunction$outboundSchema),
2318
- thoughtSignature: z.string().optional(),
2319
- }).transform((v) => {
2320
- return remap$(v, {
2321
- thoughtSignature: "thought_signature",
2322
- });
2323
- });
2324
-
2325
- export function messagesToolCallsToJSON(
2326
- messagesToolCalls: MessagesToolCalls,
2327
- ): string {
2328
- return JSON.stringify(
2329
- MessagesToolCalls$outboundSchema.parse(messagesToolCalls),
2330
- );
2331
- }
2332
-
2333
- /** @internal */
2334
- export type MessagesAssistantMessage$Outbound = {
2335
- content?:
2336
- | string
2337
- | Array<
2338
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2339
- | components.RefusalPartSchema$Outbound
2340
- | components.ReasoningPartSchema$Outbound
2341
- | components.RedactedReasoningPartSchema$Outbound
2342
- >
2343
- | null
2344
- | undefined;
2345
- refusal?: string | null | undefined;
2346
- role: "assistant";
2347
- name?: string | undefined;
2348
- audio?: MessagesAudio$Outbound | null | undefined;
2349
- tool_calls?: Array<MessagesToolCalls$Outbound> | undefined;
2350
- };
2351
-
2352
- /** @internal */
2353
- export const MessagesAssistantMessage$outboundSchema: z.ZodType<
2354
- MessagesAssistantMessage$Outbound,
2355
- z.ZodTypeDef,
2356
- MessagesAssistantMessage
2357
- > = z.object({
2358
- content: z.nullable(
2359
- z.union([
2360
- z.string(),
2361
- z.array(
2362
- z.union([
2363
- components.TextContentPartSchema$outboundSchema.and(
2364
- z.object({ type: z.literal("text") }),
2365
- ),
2366
- components.RefusalPartSchema$outboundSchema,
2367
- components.ReasoningPartSchema$outboundSchema,
2368
- components.RedactedReasoningPartSchema$outboundSchema,
2369
- ]),
2370
- ),
2371
- ]),
2372
- ).optional(),
2373
- refusal: z.nullable(z.string()).optional(),
2374
- role: z.literal("assistant"),
2375
- name: z.string().optional(),
2376
- audio: z.nullable(z.lazy(() => MessagesAudio$outboundSchema)).optional(),
2377
- toolCalls: z.array(z.lazy(() => MessagesToolCalls$outboundSchema)).optional(),
2378
- }).transform((v) => {
2379
- return remap$(v, {
2380
- toolCalls: "tool_calls",
2381
- });
2382
- });
2383
-
2384
- export function messagesAssistantMessageToJSON(
2385
- messagesAssistantMessage: MessagesAssistantMessage,
2386
- ): string {
2387
- return JSON.stringify(
2388
- MessagesAssistantMessage$outboundSchema.parse(messagesAssistantMessage),
2389
- );
2390
- }
2391
-
2392
- /** @internal */
2393
- export const DeploymentInvoke2DeploymentsRequestRequestBodyType$outboundSchema:
2394
- z.ZodNativeEnum<typeof DeploymentInvoke2DeploymentsRequestRequestBodyType> = z
2395
- .nativeEnum(DeploymentInvoke2DeploymentsRequestRequestBodyType);
2396
-
2397
- /** @internal */
2398
- export const TwoTtl$outboundSchema: z.ZodNativeEnum<typeof TwoTtl> = z
2399
- .nativeEnum(TwoTtl);
2400
-
2401
- /** @internal */
2402
- export type TwoCacheControl$Outbound = {
2403
- type: string;
2404
- ttl: string;
2405
- };
2406
-
2407
- /** @internal */
2408
- export const TwoCacheControl$outboundSchema: z.ZodType<
2409
- TwoCacheControl$Outbound,
2410
- z.ZodTypeDef,
2411
- TwoCacheControl
2412
- > = z.object({
2413
- type: DeploymentInvoke2DeploymentsRequestRequestBodyType$outboundSchema,
2414
- ttl: TwoTtl$outboundSchema.default("5m"),
2415
- });
2416
-
2417
- export function twoCacheControlToJSON(
2418
- twoCacheControl: TwoCacheControl,
2419
- ): string {
2420
- return JSON.stringify(TwoCacheControl$outboundSchema.parse(twoCacheControl));
2421
- }
2422
-
2423
- /** @internal */
2424
- export type Two4$Outbound = {
2425
- type: "file";
2426
- cache_control?: TwoCacheControl$Outbound | undefined;
2427
- file: components.FileContentPartSchema$Outbound;
2428
- };
2429
-
2430
- /** @internal */
2431
- export const Two4$outboundSchema: z.ZodType<Two4$Outbound, z.ZodTypeDef, Two4> =
2432
- z.object({
2433
- type: z.literal("file"),
2434
- cacheControl: z.lazy(() => TwoCacheControl$outboundSchema).optional(),
2435
- file: components.FileContentPartSchema$outboundSchema,
2436
- }).transform((v) => {
2437
- return remap$(v, {
2438
- cacheControl: "cache_control",
2439
- });
2440
- });
2441
-
2442
- export function two4ToJSON(two4: Two4): string {
2443
- return JSON.stringify(Two4$outboundSchema.parse(two4));
2444
- }
2445
-
2446
- /** @internal */
2447
- export type DeploymentInvokeContentDeploymentsRequest2$Outbound =
2448
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2449
- | components.ImageContentPartSchema$Outbound
2450
- | components.AudioContentPartSchema$Outbound
2451
- | Two4$Outbound;
2452
-
2453
- /** @internal */
2454
- export const DeploymentInvokeContentDeploymentsRequest2$outboundSchema:
2455
- z.ZodType<
2456
- DeploymentInvokeContentDeploymentsRequest2$Outbound,
2457
- z.ZodTypeDef,
2458
- DeploymentInvokeContentDeploymentsRequest2
2459
- > = z.union([
2460
- components.TextContentPartSchema$outboundSchema.and(
2461
- z.object({ type: z.literal("text") }),
2462
- ),
2463
- components.ImageContentPartSchema$outboundSchema,
2464
- components.AudioContentPartSchema$outboundSchema,
2465
- z.lazy(() => Two4$outboundSchema),
2466
- ]);
2467
-
2468
- export function deploymentInvokeContentDeploymentsRequest2ToJSON(
2469
- deploymentInvokeContentDeploymentsRequest2:
2470
- DeploymentInvokeContentDeploymentsRequest2,
2471
- ): string {
2472
- return JSON.stringify(
2473
- DeploymentInvokeContentDeploymentsRequest2$outboundSchema.parse(
2474
- deploymentInvokeContentDeploymentsRequest2,
2475
- ),
2476
- );
2477
- }
2478
-
2479
- /** @internal */
2480
- export type DeploymentInvokeMessagesDeploymentsContent$Outbound =
2481
- | string
2482
- | Array<
2483
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2484
- | components.ImageContentPartSchema$Outbound
2485
- | components.AudioContentPartSchema$Outbound
2486
- | Two4$Outbound
2487
- >;
2488
-
2489
- /** @internal */
2490
- export const DeploymentInvokeMessagesDeploymentsContent$outboundSchema:
2491
- z.ZodType<
2492
- DeploymentInvokeMessagesDeploymentsContent$Outbound,
2493
- z.ZodTypeDef,
2494
- DeploymentInvokeMessagesDeploymentsContent
2495
- > = z.union([
2496
- z.string(),
2497
- z.array(
2498
- z.union([
2499
- components.TextContentPartSchema$outboundSchema.and(
2500
- z.object({ type: z.literal("text") }),
2501
- ),
2502
- components.ImageContentPartSchema$outboundSchema,
2503
- components.AudioContentPartSchema$outboundSchema,
2504
- z.lazy(() => Two4$outboundSchema),
2505
- ]),
2506
- ),
2507
- ]);
2508
-
2509
- export function deploymentInvokeMessagesDeploymentsContentToJSON(
2510
- deploymentInvokeMessagesDeploymentsContent:
2511
- DeploymentInvokeMessagesDeploymentsContent,
2512
- ): string {
2513
- return JSON.stringify(
2514
- DeploymentInvokeMessagesDeploymentsContent$outboundSchema.parse(
2515
- deploymentInvokeMessagesDeploymentsContent,
2516
- ),
2517
- );
2518
- }
2519
-
2520
- /** @internal */
2521
- export type MessagesUserMessage$Outbound = {
2522
- role: "user";
2523
- name?: string | undefined;
2524
- content:
2525
- | string
2526
- | Array<
2527
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2528
- | components.ImageContentPartSchema$Outbound
2529
- | components.AudioContentPartSchema$Outbound
2530
- | Two4$Outbound
2531
- >;
2532
- };
2533
-
2534
- /** @internal */
2535
- export const MessagesUserMessage$outboundSchema: z.ZodType<
2536
- MessagesUserMessage$Outbound,
2537
- z.ZodTypeDef,
2538
- MessagesUserMessage
2539
- > = z.object({
2540
- role: z.literal("user"),
2541
- name: z.string().optional(),
2542
- content: z.union([
2543
- z.string(),
2544
- z.array(
2545
- z.union([
2546
- components.TextContentPartSchema$outboundSchema.and(
2547
- z.object({ type: z.literal("text") }),
2548
- ),
2549
- components.ImageContentPartSchema$outboundSchema,
2550
- components.AudioContentPartSchema$outboundSchema,
2551
- z.lazy(() => Two4$outboundSchema),
2552
- ]),
2553
- ),
2554
- ]),
2555
- });
2556
-
2557
- export function messagesUserMessageToJSON(
2558
- messagesUserMessage: MessagesUserMessage,
2559
- ): string {
2560
- return JSON.stringify(
2561
- MessagesUserMessage$outboundSchema.parse(messagesUserMessage),
2562
- );
2563
- }
2564
-
2565
- /** @internal */
2566
- export type DeploymentInvokeMessagesContent$Outbound =
2567
- | string
2568
- | Array<components.TextContentPartSchema$Outbound>;
2569
-
2570
- /** @internal */
2571
- export const DeploymentInvokeMessagesContent$outboundSchema: z.ZodType<
2572
- DeploymentInvokeMessagesContent$Outbound,
2573
- z.ZodTypeDef,
2574
- DeploymentInvokeMessagesContent
2575
- > = z.union([
2576
- z.string(),
2577
- z.array(components.TextContentPartSchema$outboundSchema),
2578
- ]);
2579
-
2580
- export function deploymentInvokeMessagesContentToJSON(
2581
- deploymentInvokeMessagesContent: DeploymentInvokeMessagesContent,
2582
- ): string {
2583
- return JSON.stringify(
2584
- DeploymentInvokeMessagesContent$outboundSchema.parse(
2585
- deploymentInvokeMessagesContent,
2586
- ),
2587
- );
2588
- }
2589
-
2590
- /** @internal */
2591
- export type MessagesDeveloperMessage$Outbound = {
2592
- role: "developer";
2593
- content: string | Array<components.TextContentPartSchema$Outbound>;
2594
- name?: string | undefined;
2595
- };
2596
-
2597
- /** @internal */
2598
- export const MessagesDeveloperMessage$outboundSchema: z.ZodType<
2599
- MessagesDeveloperMessage$Outbound,
2600
- z.ZodTypeDef,
2601
- MessagesDeveloperMessage
2602
- > = z.object({
2603
- role: z.literal("developer"),
2604
- content: z.union([
2605
- z.string(),
2606
- z.array(components.TextContentPartSchema$outboundSchema),
2607
- ]),
2608
- name: z.string().optional(),
2609
- });
2610
-
2611
- export function messagesDeveloperMessageToJSON(
2612
- messagesDeveloperMessage: MessagesDeveloperMessage,
2613
- ): string {
2614
- return JSON.stringify(
2615
- MessagesDeveloperMessage$outboundSchema.parse(messagesDeveloperMessage),
2616
- );
2617
- }
2618
-
2619
- /** @internal */
2620
- export type MessagesContent$Outbound =
2621
- | string
2622
- | Array<components.TextContentPartSchema$Outbound>;
2623
-
2624
- /** @internal */
2625
- export const MessagesContent$outboundSchema: z.ZodType<
2626
- MessagesContent$Outbound,
2627
- z.ZodTypeDef,
2628
- MessagesContent
2629
- > = z.union([
2630
- z.string(),
2631
- z.array(components.TextContentPartSchema$outboundSchema),
2632
- ]);
2633
-
2634
- export function messagesContentToJSON(
2635
- messagesContent: MessagesContent,
2636
- ): string {
2637
- return JSON.stringify(MessagesContent$outboundSchema.parse(messagesContent));
2638
- }
2639
-
2640
- /** @internal */
2641
- export type MessagesSystemMessage$Outbound = {
2642
- role: "system";
2643
- content: string | Array<components.TextContentPartSchema$Outbound>;
2644
- name?: string | undefined;
2645
- };
2646
-
2647
- /** @internal */
2648
- export const MessagesSystemMessage$outboundSchema: z.ZodType<
2649
- MessagesSystemMessage$Outbound,
2650
- z.ZodTypeDef,
2651
- MessagesSystemMessage
2652
- > = z.object({
2653
- role: z.literal("system"),
2654
- content: z.union([
2655
- z.string(),
2656
- z.array(components.TextContentPartSchema$outboundSchema),
2657
- ]),
2658
- name: z.string().optional(),
2659
- });
2660
-
2661
- export function messagesSystemMessageToJSON(
2662
- messagesSystemMessage: MessagesSystemMessage,
2663
- ): string {
2664
- return JSON.stringify(
2665
- MessagesSystemMessage$outboundSchema.parse(messagesSystemMessage),
2666
- );
2667
- }
2668
-
2669
- /** @internal */
2670
- export type DeploymentInvokeMessages$Outbound =
2671
- | MessagesSystemMessage$Outbound
2672
- | MessagesDeveloperMessage$Outbound
2673
- | MessagesUserMessage$Outbound
2674
- | MessagesAssistantMessage$Outbound
2675
- | MessagesToolMessage$Outbound;
2676
-
2677
- /** @internal */
2678
- export const DeploymentInvokeMessages$outboundSchema: z.ZodType<
2679
- DeploymentInvokeMessages$Outbound,
2680
- z.ZodTypeDef,
2681
- DeploymentInvokeMessages
2682
- > = z.union([
2683
- z.lazy(() => MessagesSystemMessage$outboundSchema),
2684
- z.lazy(() => MessagesDeveloperMessage$outboundSchema),
2685
- z.lazy(() => MessagesUserMessage$outboundSchema),
2686
- z.lazy(() => MessagesAssistantMessage$outboundSchema),
2687
- z.lazy(() => MessagesToolMessage$outboundSchema),
2688
- ]);
2689
-
2690
- export function deploymentInvokeMessagesToJSON(
2691
- deploymentInvokeMessages: DeploymentInvokeMessages,
2692
- ): string {
2693
- return JSON.stringify(
2694
- DeploymentInvokeMessages$outboundSchema.parse(deploymentInvokeMessages),
2695
- );
2696
- }
2697
-
2698
- /** @internal */
2699
- export type Metadata$Outbound = {
2700
- file_name?: string | undefined;
2701
- file_type?: string | undefined;
2702
- page_number?: number | undefined;
2703
- };
2704
-
2705
- /** @internal */
2706
- export const Metadata$outboundSchema: z.ZodType<
2707
- Metadata$Outbound,
2708
- z.ZodTypeDef,
2709
- Metadata
2710
- > = z.object({
2711
- fileName: z.string().optional(),
2712
- fileType: z.string().optional(),
2713
- pageNumber: z.number().optional(),
2714
- }).transform((v) => {
2715
- return remap$(v, {
2716
- fileName: "file_name",
2717
- fileType: "file_type",
2718
- pageNumber: "page_number",
2719
- });
2720
- });
2721
-
2722
- export function metadataToJSON(metadata: Metadata): string {
2723
- return JSON.stringify(Metadata$outboundSchema.parse(metadata));
2724
- }
2725
-
2726
- /** @internal */
2727
- export type Documents$Outbound = {
2728
- text: string;
2729
- metadata?: Metadata$Outbound | undefined;
2730
- };
2731
-
2732
- /** @internal */
2733
- export const Documents$outboundSchema: z.ZodType<
2734
- Documents$Outbound,
2735
- z.ZodTypeDef,
2736
- Documents
2737
- > = z.object({
2738
- text: z.string(),
2739
- metadata: z.lazy(() => Metadata$outboundSchema).optional(),
2740
- });
2741
-
2742
- export function documentsToJSON(documents: Documents): string {
2743
- return JSON.stringify(Documents$outboundSchema.parse(documents));
2744
- }
2745
-
2746
- /** @internal */
2747
- export type InvokeOptions$Outbound = {
2748
- include_retrievals: boolean;
2749
- include_usage: boolean;
2750
- mock_response?: string | undefined;
2751
- };
2752
-
2753
- /** @internal */
2754
- export const InvokeOptions$outboundSchema: z.ZodType<
2755
- InvokeOptions$Outbound,
2756
- z.ZodTypeDef,
2757
- InvokeOptions
2758
- > = z.object({
2759
- includeRetrievals: z.boolean().default(false),
2760
- includeUsage: z.boolean().default(false),
2761
- mockResponse: z.string().optional(),
2762
- }).transform((v) => {
2763
- return remap$(v, {
2764
- includeRetrievals: "include_retrievals",
2765
- includeUsage: "include_usage",
2766
- mockResponse: "mock_response",
2767
- });
2768
- });
2769
-
2770
- export function invokeOptionsToJSON(invokeOptions: InvokeOptions): string {
2771
- return JSON.stringify(InvokeOptions$outboundSchema.parse(invokeOptions));
2772
- }
2773
-
2774
- /** @internal */
2775
- export type Thread$Outbound = {
2776
- id: string;
2777
- tags?: Array<string> | undefined;
2778
- };
2779
-
2780
- /** @internal */
2781
- export const Thread$outboundSchema: z.ZodType<
2782
- Thread$Outbound,
2783
- z.ZodTypeDef,
2784
- Thread
2785
- > = z.object({
2786
- id: z.string(),
2787
- tags: z.array(z.string()).optional(),
2788
- });
2789
-
2790
- export function threadToJSON(thread: Thread): string {
2791
- return JSON.stringify(Thread$outboundSchema.parse(thread));
2792
- }
2793
-
2794
- /** @internal */
2795
- export type OrExists$Outbound = {
2796
- exists: boolean;
2797
- };
2798
-
2799
- /** @internal */
2800
- export const OrExists$outboundSchema: z.ZodType<
2801
- OrExists$Outbound,
2802
- z.ZodTypeDef,
2803
- OrExists
2804
- > = z.object({
2805
- exists: z.boolean(),
2806
- });
2807
-
2808
- export function orExistsToJSON(orExists: OrExists): string {
2809
- return JSON.stringify(OrExists$outboundSchema.parse(orExists));
2810
- }
2811
-
2812
- /** @internal */
2813
- export type DeploymentInvokeOrNin$Outbound = string | number | boolean;
2814
-
2815
- /** @internal */
2816
- export const DeploymentInvokeOrNin$outboundSchema: z.ZodType<
2817
- DeploymentInvokeOrNin$Outbound,
2818
- z.ZodTypeDef,
2819
- DeploymentInvokeOrNin
2820
- > = z.union([z.string(), z.number(), z.boolean()]);
2821
-
2822
- export function deploymentInvokeOrNinToJSON(
2823
- deploymentInvokeOrNin: DeploymentInvokeOrNin,
2824
- ): string {
2825
- return JSON.stringify(
2826
- DeploymentInvokeOrNin$outboundSchema.parse(deploymentInvokeOrNin),
2827
- );
2828
- }
2829
-
2830
- /** @internal */
2831
- export type OrNin$Outbound = {
2832
- nin: Array<string | number | boolean>;
2833
- };
2834
-
2835
- /** @internal */
2836
- export const OrNin$outboundSchema: z.ZodType<
2837
- OrNin$Outbound,
2838
- z.ZodTypeDef,
2839
- OrNin
2840
- > = z.object({
2841
- nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
2842
- });
2843
-
2844
- export function orNinToJSON(orNin: OrNin): string {
2845
- return JSON.stringify(OrNin$outboundSchema.parse(orNin));
2846
- }
2847
-
2848
- /** @internal */
2849
- export type DeploymentInvokeOrIn$Outbound = string | number | boolean;
2850
-
2851
- /** @internal */
2852
- export const DeploymentInvokeOrIn$outboundSchema: z.ZodType<
2853
- DeploymentInvokeOrIn$Outbound,
2854
- z.ZodTypeDef,
2855
- DeploymentInvokeOrIn
2856
- > = z.union([z.string(), z.number(), z.boolean()]);
2857
-
2858
- export function deploymentInvokeOrInToJSON(
2859
- deploymentInvokeOrIn: DeploymentInvokeOrIn,
2860
- ): string {
2861
- return JSON.stringify(
2862
- DeploymentInvokeOrIn$outboundSchema.parse(deploymentInvokeOrIn),
2863
- );
2864
- }
2865
-
2866
- /** @internal */
2867
- export type OrIn$Outbound = {
2868
- in: Array<string | number | boolean>;
2869
- };
2870
-
2871
- /** @internal */
2872
- export const OrIn$outboundSchema: z.ZodType<OrIn$Outbound, z.ZodTypeDef, OrIn> =
2873
- z.object({
2874
- in: z.array(z.union([z.string(), z.number(), z.boolean()])),
2875
- });
2876
-
2877
- export function orInToJSON(orIn: OrIn): string {
2878
- return JSON.stringify(OrIn$outboundSchema.parse(orIn));
2879
- }
2880
-
2881
- /** @internal */
2882
- export type OrLte$Outbound = {
2883
- lte: number;
2884
- };
2885
-
2886
- /** @internal */
2887
- export const OrLte$outboundSchema: z.ZodType<
2888
- OrLte$Outbound,
2889
- z.ZodTypeDef,
2890
- OrLte
2891
- > = z.object({
2892
- lte: z.number(),
2893
- });
2894
-
2895
- export function orLteToJSON(orLte: OrLte): string {
2896
- return JSON.stringify(OrLte$outboundSchema.parse(orLte));
2897
- }
2898
-
2899
- /** @internal */
2900
- export type OrLt$Outbound = {
2901
- lt: number;
2902
- };
2903
-
2904
- /** @internal */
2905
- export const OrLt$outboundSchema: z.ZodType<OrLt$Outbound, z.ZodTypeDef, OrLt> =
2906
- z.object({
2907
- lt: z.number(),
2908
- });
2909
-
2910
- export function orLtToJSON(orLt: OrLt): string {
2911
- return JSON.stringify(OrLt$outboundSchema.parse(orLt));
2912
- }
2913
-
2914
- /** @internal */
2915
- export type OrGte$Outbound = {
2916
- gte: number;
2917
- };
2918
-
2919
- /** @internal */
2920
- export const OrGte$outboundSchema: z.ZodType<
2921
- OrGte$Outbound,
2922
- z.ZodTypeDef,
2923
- OrGte
2924
- > = z.object({
2925
- gte: z.number(),
2926
- });
2927
-
2928
- export function orGteToJSON(orGte: OrGte): string {
2929
- return JSON.stringify(OrGte$outboundSchema.parse(orGte));
2930
- }
2931
-
2932
- /** @internal */
2933
- export type OrGt$Outbound = {
2934
- gt: number;
2935
- };
2936
-
2937
- /** @internal */
2938
- export const OrGt$outboundSchema: z.ZodType<OrGt$Outbound, z.ZodTypeDef, OrGt> =
2939
- z.object({
2940
- gt: z.number(),
2941
- });
2942
-
2943
- export function orGtToJSON(orGt: OrGt): string {
2944
- return JSON.stringify(OrGt$outboundSchema.parse(orGt));
2945
- }
2946
-
2947
- /** @internal */
2948
- export type DeploymentInvokeOrNe$Outbound = string | number | boolean;
2949
-
2950
- /** @internal */
2951
- export const DeploymentInvokeOrNe$outboundSchema: z.ZodType<
2952
- DeploymentInvokeOrNe$Outbound,
2953
- z.ZodTypeDef,
2954
- DeploymentInvokeOrNe
2955
- > = z.union([z.string(), z.number(), z.boolean()]);
2956
-
2957
- export function deploymentInvokeOrNeToJSON(
2958
- deploymentInvokeOrNe: DeploymentInvokeOrNe,
2959
- ): string {
2960
- return JSON.stringify(
2961
- DeploymentInvokeOrNe$outboundSchema.parse(deploymentInvokeOrNe),
2962
- );
2963
- }
2964
-
2965
- /** @internal */
2966
- export type OrNe$Outbound = {
2967
- ne: string | number | boolean;
2968
- };
2969
-
2970
- /** @internal */
2971
- export const OrNe$outboundSchema: z.ZodType<OrNe$Outbound, z.ZodTypeDef, OrNe> =
2972
- z.object({
2973
- ne: z.union([z.string(), z.number(), z.boolean()]),
2974
- });
2975
-
2976
- export function orNeToJSON(orNe: OrNe): string {
2977
- return JSON.stringify(OrNe$outboundSchema.parse(orNe));
2978
- }
2979
-
2980
- /** @internal */
2981
- export type DeploymentInvokeOrEq$Outbound = string | number | boolean;
2982
-
2983
- /** @internal */
2984
- export const DeploymentInvokeOrEq$outboundSchema: z.ZodType<
2985
- DeploymentInvokeOrEq$Outbound,
2986
- z.ZodTypeDef,
2987
- DeploymentInvokeOrEq
2988
- > = z.union([z.string(), z.number(), z.boolean()]);
2989
-
2990
- export function deploymentInvokeOrEqToJSON(
2991
- deploymentInvokeOrEq: DeploymentInvokeOrEq,
2992
- ): string {
2993
- return JSON.stringify(
2994
- DeploymentInvokeOrEq$outboundSchema.parse(deploymentInvokeOrEq),
2995
- );
2996
- }
2997
-
2998
- /** @internal */
2999
- export type OrEq$Outbound = {
3000
- eq: string | number | boolean;
3001
- };
3002
-
3003
- /** @internal */
3004
- export const OrEq$outboundSchema: z.ZodType<OrEq$Outbound, z.ZodTypeDef, OrEq> =
3005
- z.object({
3006
- eq: z.union([z.string(), z.number(), z.boolean()]),
3007
- });
3008
-
3009
- export function orEqToJSON(orEq: OrEq): string {
3010
- return JSON.stringify(OrEq$outboundSchema.parse(orEq));
3011
- }
3012
-
3013
- /** @internal */
3014
- export type KnowledgeFilterOr$Outbound =
3015
- | OrEq$Outbound
3016
- | OrNe$Outbound
3017
- | OrGt$Outbound
3018
- | OrGte$Outbound
3019
- | OrLt$Outbound
3020
- | OrLte$Outbound
3021
- | OrIn$Outbound
3022
- | OrNin$Outbound
3023
- | OrExists$Outbound;
3024
-
3025
- /** @internal */
3026
- export const KnowledgeFilterOr$outboundSchema: z.ZodType<
3027
- KnowledgeFilterOr$Outbound,
3028
- z.ZodTypeDef,
3029
- KnowledgeFilterOr
3030
- > = z.union([
3031
- z.lazy(() => OrEq$outboundSchema),
3032
- z.lazy(() => OrNe$outboundSchema),
3033
- z.lazy(() => OrGt$outboundSchema),
3034
- z.lazy(() => OrGte$outboundSchema),
3035
- z.lazy(() => OrLt$outboundSchema),
3036
- z.lazy(() => OrLte$outboundSchema),
3037
- z.lazy(() => OrIn$outboundSchema),
3038
- z.lazy(() => OrNin$outboundSchema),
3039
- z.lazy(() => OrExists$outboundSchema),
3040
- ]);
3041
-
3042
- export function knowledgeFilterOrToJSON(
3043
- knowledgeFilterOr: KnowledgeFilterOr,
3044
- ): string {
3045
- return JSON.stringify(
3046
- KnowledgeFilterOr$outboundSchema.parse(knowledgeFilterOr),
3047
- );
3048
- }
3049
-
3050
- /** @internal */
3051
- export type Or$Outbound = {
3052
- or: Array<
3053
- {
3054
- [k: string]:
3055
- | OrEq$Outbound
3056
- | OrNe$Outbound
3057
- | OrGt$Outbound
3058
- | OrGte$Outbound
3059
- | OrLt$Outbound
3060
- | OrLte$Outbound
3061
- | OrIn$Outbound
3062
- | OrNin$Outbound
3063
- | OrExists$Outbound;
3064
- }
3065
- >;
3066
- };
3067
-
3068
- /** @internal */
3069
- export const Or$outboundSchema: z.ZodType<Or$Outbound, z.ZodTypeDef, Or> = z
3070
- .object({
3071
- or: z.array(
3072
- z.record(z.union([
3073
- z.lazy(() => OrEq$outboundSchema),
3074
- z.lazy(() =>
3075
- OrNe$outboundSchema
3076
- ),
3077
- z.lazy(() => OrGt$outboundSchema),
3078
- z.lazy(() => OrGte$outboundSchema),
3079
- z.lazy(() => OrLt$outboundSchema),
3080
- z.lazy(() => OrLte$outboundSchema),
3081
- z.lazy(() => OrIn$outboundSchema),
3082
- z.lazy(() => OrNin$outboundSchema),
3083
- z.lazy(() => OrExists$outboundSchema),
3084
- ])),
3085
- ),
3086
- });
3087
-
3088
- export function orToJSON(or: Or): string {
3089
- return JSON.stringify(Or$outboundSchema.parse(or));
3090
- }
3091
-
3092
- /** @internal */
3093
- export type AndExists$Outbound = {
3094
- exists: boolean;
3095
- };
3096
-
3097
- /** @internal */
3098
- export const AndExists$outboundSchema: z.ZodType<
3099
- AndExists$Outbound,
3100
- z.ZodTypeDef,
3101
- AndExists
3102
- > = z.object({
3103
- exists: z.boolean(),
3104
- });
3105
-
3106
- export function andExistsToJSON(andExists: AndExists): string {
3107
- return JSON.stringify(AndExists$outboundSchema.parse(andExists));
3108
- }
3109
-
3110
- /** @internal */
3111
- export type DeploymentInvokeAndNin$Outbound = string | number | boolean;
3112
-
3113
- /** @internal */
3114
- export const DeploymentInvokeAndNin$outboundSchema: z.ZodType<
3115
- DeploymentInvokeAndNin$Outbound,
3116
- z.ZodTypeDef,
3117
- DeploymentInvokeAndNin
3118
- > = z.union([z.string(), z.number(), z.boolean()]);
3119
-
3120
- export function deploymentInvokeAndNinToJSON(
3121
- deploymentInvokeAndNin: DeploymentInvokeAndNin,
3122
- ): string {
3123
- return JSON.stringify(
3124
- DeploymentInvokeAndNin$outboundSchema.parse(deploymentInvokeAndNin),
3125
- );
3126
- }
3127
-
3128
- /** @internal */
3129
- export type AndNin$Outbound = {
3130
- nin: Array<string | number | boolean>;
3131
- };
3132
-
3133
- /** @internal */
3134
- export const AndNin$outboundSchema: z.ZodType<
3135
- AndNin$Outbound,
3136
- z.ZodTypeDef,
3137
- AndNin
3138
- > = z.object({
3139
- nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
3140
- });
3141
-
3142
- export function andNinToJSON(andNin: AndNin): string {
3143
- return JSON.stringify(AndNin$outboundSchema.parse(andNin));
3144
- }
3145
-
3146
- /** @internal */
3147
- export type DeploymentInvokeAndIn$Outbound = string | number | boolean;
3148
-
3149
- /** @internal */
3150
- export const DeploymentInvokeAndIn$outboundSchema: z.ZodType<
3151
- DeploymentInvokeAndIn$Outbound,
3152
- z.ZodTypeDef,
3153
- DeploymentInvokeAndIn
3154
- > = z.union([z.string(), z.number(), z.boolean()]);
3155
-
3156
- export function deploymentInvokeAndInToJSON(
3157
- deploymentInvokeAndIn: DeploymentInvokeAndIn,
3158
- ): string {
3159
- return JSON.stringify(
3160
- DeploymentInvokeAndIn$outboundSchema.parse(deploymentInvokeAndIn),
3161
- );
3162
- }
3163
-
3164
- /** @internal */
3165
- export type AndIn$Outbound = {
3166
- in: Array<string | number | boolean>;
3167
- };
3168
-
3169
- /** @internal */
3170
- export const AndIn$outboundSchema: z.ZodType<
3171
- AndIn$Outbound,
3172
- z.ZodTypeDef,
3173
- AndIn
3174
- > = z.object({
3175
- in: z.array(z.union([z.string(), z.number(), z.boolean()])),
3176
- });
3177
-
3178
- export function andInToJSON(andIn: AndIn): string {
3179
- return JSON.stringify(AndIn$outboundSchema.parse(andIn));
3180
- }
3181
-
3182
- /** @internal */
3183
- export type AndLte$Outbound = {
3184
- lte: number;
3185
- };
3186
-
3187
- /** @internal */
3188
- export const AndLte$outboundSchema: z.ZodType<
3189
- AndLte$Outbound,
3190
- z.ZodTypeDef,
3191
- AndLte
3192
- > = z.object({
3193
- lte: z.number(),
3194
- });
3195
-
3196
- export function andLteToJSON(andLte: AndLte): string {
3197
- return JSON.stringify(AndLte$outboundSchema.parse(andLte));
3198
- }
3199
-
3200
- /** @internal */
3201
- export type AndLt$Outbound = {
3202
- lt: number;
3203
- };
3204
-
3205
- /** @internal */
3206
- export const AndLt$outboundSchema: z.ZodType<
3207
- AndLt$Outbound,
3208
- z.ZodTypeDef,
3209
- AndLt
3210
- > = z.object({
3211
- lt: z.number(),
3212
- });
3213
-
3214
- export function andLtToJSON(andLt: AndLt): string {
3215
- return JSON.stringify(AndLt$outboundSchema.parse(andLt));
3216
- }
3217
-
3218
- /** @internal */
3219
- export type AndGte$Outbound = {
3220
- gte: number;
3221
- };
3222
-
3223
- /** @internal */
3224
- export const AndGte$outboundSchema: z.ZodType<
3225
- AndGte$Outbound,
3226
- z.ZodTypeDef,
3227
- AndGte
3228
- > = z.object({
3229
- gte: z.number(),
3230
- });
3231
-
3232
- export function andGteToJSON(andGte: AndGte): string {
3233
- return JSON.stringify(AndGte$outboundSchema.parse(andGte));
3234
- }
3235
-
3236
- /** @internal */
3237
- export type AndGt$Outbound = {
3238
- gt: number;
3239
- };
3240
-
3241
- /** @internal */
3242
- export const AndGt$outboundSchema: z.ZodType<
3243
- AndGt$Outbound,
3244
- z.ZodTypeDef,
3245
- AndGt
3246
- > = z.object({
3247
- gt: z.number(),
3248
- });
3249
-
3250
- export function andGtToJSON(andGt: AndGt): string {
3251
- return JSON.stringify(AndGt$outboundSchema.parse(andGt));
3252
- }
3253
-
3254
- /** @internal */
3255
- export type DeploymentInvokeAndNe$Outbound = string | number | boolean;
3256
-
3257
- /** @internal */
3258
- export const DeploymentInvokeAndNe$outboundSchema: z.ZodType<
3259
- DeploymentInvokeAndNe$Outbound,
3260
- z.ZodTypeDef,
3261
- DeploymentInvokeAndNe
3262
- > = z.union([z.string(), z.number(), z.boolean()]);
3263
-
3264
- export function deploymentInvokeAndNeToJSON(
3265
- deploymentInvokeAndNe: DeploymentInvokeAndNe,
3266
- ): string {
3267
- return JSON.stringify(
3268
- DeploymentInvokeAndNe$outboundSchema.parse(deploymentInvokeAndNe),
3269
- );
3270
- }
3271
-
3272
- /** @internal */
3273
- export type AndNe$Outbound = {
3274
- ne: string | number | boolean;
3275
- };
3276
-
3277
- /** @internal */
3278
- export const AndNe$outboundSchema: z.ZodType<
3279
- AndNe$Outbound,
3280
- z.ZodTypeDef,
3281
- AndNe
3282
- > = z.object({
3283
- ne: z.union([z.string(), z.number(), z.boolean()]),
3284
- });
3285
-
3286
- export function andNeToJSON(andNe: AndNe): string {
3287
- return JSON.stringify(AndNe$outboundSchema.parse(andNe));
3288
- }
3289
-
3290
- /** @internal */
3291
- export type DeploymentInvokeAndEq$Outbound = string | number | boolean;
3292
-
3293
- /** @internal */
3294
- export const DeploymentInvokeAndEq$outboundSchema: z.ZodType<
3295
- DeploymentInvokeAndEq$Outbound,
3296
- z.ZodTypeDef,
3297
- DeploymentInvokeAndEq
3298
- > = z.union([z.string(), z.number(), z.boolean()]);
3299
-
3300
- export function deploymentInvokeAndEqToJSON(
3301
- deploymentInvokeAndEq: DeploymentInvokeAndEq,
3302
- ): string {
3303
- return JSON.stringify(
3304
- DeploymentInvokeAndEq$outboundSchema.parse(deploymentInvokeAndEq),
3305
- );
3306
- }
3307
-
3308
- /** @internal */
3309
- export type AndEq$Outbound = {
3310
- eq: string | number | boolean;
3311
- };
3312
-
3313
- /** @internal */
3314
- export const AndEq$outboundSchema: z.ZodType<
3315
- AndEq$Outbound,
3316
- z.ZodTypeDef,
3317
- AndEq
3318
- > = z.object({
3319
- eq: z.union([z.string(), z.number(), z.boolean()]),
3320
- });
3321
-
3322
- export function andEqToJSON(andEq: AndEq): string {
3323
- return JSON.stringify(AndEq$outboundSchema.parse(andEq));
3324
- }
3325
-
3326
- /** @internal */
3327
- export type KnowledgeFilterAnd$Outbound =
3328
- | AndEq$Outbound
3329
- | AndNe$Outbound
3330
- | AndGt$Outbound
3331
- | AndGte$Outbound
3332
- | AndLt$Outbound
3333
- | AndLte$Outbound
3334
- | AndIn$Outbound
3335
- | AndNin$Outbound
3336
- | AndExists$Outbound;
3337
-
3338
- /** @internal */
3339
- export const KnowledgeFilterAnd$outboundSchema: z.ZodType<
3340
- KnowledgeFilterAnd$Outbound,
3341
- z.ZodTypeDef,
3342
- KnowledgeFilterAnd
3343
- > = z.union([
3344
- z.lazy(() => AndEq$outboundSchema),
3345
- z.lazy(() => AndNe$outboundSchema),
3346
- z.lazy(() => AndGt$outboundSchema),
3347
- z.lazy(() => AndGte$outboundSchema),
3348
- z.lazy(() => AndLt$outboundSchema),
3349
- z.lazy(() => AndLte$outboundSchema),
3350
- z.lazy(() => AndIn$outboundSchema),
3351
- z.lazy(() => AndNin$outboundSchema),
3352
- z.lazy(() => AndExists$outboundSchema),
3353
- ]);
3354
-
3355
- export function knowledgeFilterAndToJSON(
3356
- knowledgeFilterAnd: KnowledgeFilterAnd,
3357
- ): string {
3358
- return JSON.stringify(
3359
- KnowledgeFilterAnd$outboundSchema.parse(knowledgeFilterAnd),
3360
- );
3361
- }
3362
-
3363
- /** @internal */
3364
- export type And$Outbound = {
3365
- and: Array<
3366
- {
3367
- [k: string]:
3368
- | AndEq$Outbound
3369
- | AndNe$Outbound
3370
- | AndGt$Outbound
3371
- | AndGte$Outbound
3372
- | AndLt$Outbound
3373
- | AndLte$Outbound
3374
- | AndIn$Outbound
3375
- | AndNin$Outbound
3376
- | AndExists$Outbound;
3377
- }
3378
- >;
3379
- };
3380
-
3381
- /** @internal */
3382
- export const And$outboundSchema: z.ZodType<And$Outbound, z.ZodTypeDef, And> = z
3383
- .object({
3384
- and: z.array(
3385
- z.record(z.union([
3386
- z.lazy(() => AndEq$outboundSchema),
3387
- z.lazy(() =>
3388
- AndNe$outboundSchema
3389
- ),
3390
- z.lazy(() => AndGt$outboundSchema),
3391
- z.lazy(() => AndGte$outboundSchema),
3392
- z.lazy(() => AndLt$outboundSchema),
3393
- z.lazy(() => AndLte$outboundSchema),
3394
- z.lazy(() => AndIn$outboundSchema),
3395
- z.lazy(() => AndNin$outboundSchema),
3396
- z.lazy(() => AndExists$outboundSchema),
3397
- ])),
3398
- ),
3399
- });
3400
-
3401
- export function andToJSON(and: And): string {
3402
- return JSON.stringify(And$outboundSchema.parse(and));
3403
- }
3404
-
3405
- /** @internal */
3406
- export type Exists$Outbound = {
3407
- exists: boolean;
3408
- };
3409
-
3410
- /** @internal */
3411
- export const Exists$outboundSchema: z.ZodType<
3412
- Exists$Outbound,
3413
- z.ZodTypeDef,
3414
- Exists
3415
- > = z.object({
3416
- exists: z.boolean(),
3417
- });
3418
-
3419
- export function existsToJSON(exists: Exists): string {
3420
- return JSON.stringify(Exists$outboundSchema.parse(exists));
3421
- }
3422
-
3423
- /** @internal */
3424
- export type OneNin$Outbound = string | number | boolean;
3425
-
3426
- /** @internal */
3427
- export const OneNin$outboundSchema: z.ZodType<
3428
- OneNin$Outbound,
3429
- z.ZodTypeDef,
3430
- OneNin
3431
- > = z.union([z.string(), z.number(), z.boolean()]);
3432
-
3433
- export function oneNinToJSON(oneNin: OneNin): string {
3434
- return JSON.stringify(OneNin$outboundSchema.parse(oneNin));
3435
- }
3436
-
3437
- /** @internal */
3438
- export type Nin$Outbound = {
3439
- nin: Array<string | number | boolean>;
3440
- };
3441
-
3442
- /** @internal */
3443
- export const Nin$outboundSchema: z.ZodType<Nin$Outbound, z.ZodTypeDef, Nin> = z
3444
- .object({
3445
- nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
3446
- });
3447
-
3448
- export function ninToJSON(nin: Nin): string {
3449
- return JSON.stringify(Nin$outboundSchema.parse(nin));
3450
- }
3451
-
3452
- /** @internal */
3453
- export type OneIn$Outbound = string | number | boolean;
3454
-
3455
- /** @internal */
3456
- export const OneIn$outboundSchema: z.ZodType<
3457
- OneIn$Outbound,
3458
- z.ZodTypeDef,
3459
- OneIn
3460
- > = z.union([z.string(), z.number(), z.boolean()]);
3461
-
3462
- export function oneInToJSON(oneIn: OneIn): string {
3463
- return JSON.stringify(OneIn$outboundSchema.parse(oneIn));
3464
- }
3465
-
3466
- /** @internal */
3467
- export type In$Outbound = {
3468
- in: Array<string | number | boolean>;
3469
- };
3470
-
3471
- /** @internal */
3472
- export const In$outboundSchema: z.ZodType<In$Outbound, z.ZodTypeDef, In> = z
3473
- .object({
3474
- in: z.array(z.union([z.string(), z.number(), z.boolean()])),
3475
- });
3476
-
3477
- export function inToJSON(value: In): string {
3478
- return JSON.stringify(In$outboundSchema.parse(value));
3479
- }
3480
-
3481
- /** @internal */
3482
- export type Lte$Outbound = {
3483
- lte: number;
3484
- };
3485
-
3486
- /** @internal */
3487
- export const Lte$outboundSchema: z.ZodType<Lte$Outbound, z.ZodTypeDef, Lte> = z
3488
- .object({
3489
- lte: z.number(),
3490
- });
3491
-
3492
- export function lteToJSON(lte: Lte): string {
3493
- return JSON.stringify(Lte$outboundSchema.parse(lte));
3494
- }
3495
-
3496
- /** @internal */
3497
- export type Lt$Outbound = {
3498
- lt: number;
3499
- };
3500
-
3501
- /** @internal */
3502
- export const Lt$outboundSchema: z.ZodType<Lt$Outbound, z.ZodTypeDef, Lt> = z
3503
- .object({
3504
- lt: z.number(),
3505
- });
3506
-
3507
- export function ltToJSON(lt: Lt): string {
3508
- return JSON.stringify(Lt$outboundSchema.parse(lt));
3509
- }
3510
-
3511
- /** @internal */
3512
- export type Gte$Outbound = {
3513
- gte: number;
3514
- };
3515
-
3516
- /** @internal */
3517
- export const Gte$outboundSchema: z.ZodType<Gte$Outbound, z.ZodTypeDef, Gte> = z
3518
- .object({
3519
- gte: z.number(),
3520
- });
3521
-
3522
- export function gteToJSON(gte: Gte): string {
3523
- return JSON.stringify(Gte$outboundSchema.parse(gte));
3524
- }
3525
-
3526
- /** @internal */
3527
- export type Gt$Outbound = {
3528
- gt: number;
3529
- };
3530
-
3531
- /** @internal */
3532
- export const Gt$outboundSchema: z.ZodType<Gt$Outbound, z.ZodTypeDef, Gt> = z
3533
- .object({
3534
- gt: z.number(),
3535
- });
3536
-
3537
- export function gtToJSON(gt: Gt): string {
3538
- return JSON.stringify(Gt$outboundSchema.parse(gt));
3539
- }
3540
-
3541
- /** @internal */
3542
- export type OneNe$Outbound = string | number | boolean;
3543
-
3544
- /** @internal */
3545
- export const OneNe$outboundSchema: z.ZodType<
3546
- OneNe$Outbound,
3547
- z.ZodTypeDef,
3548
- OneNe
3549
- > = z.union([z.string(), z.number(), z.boolean()]);
3550
-
3551
- export function oneNeToJSON(oneNe: OneNe): string {
3552
- return JSON.stringify(OneNe$outboundSchema.parse(oneNe));
3553
- }
3554
-
3555
- /** @internal */
3556
- export type Ne$Outbound = {
3557
- ne: string | number | boolean;
3558
- };
3559
-
3560
- /** @internal */
3561
- export const Ne$outboundSchema: z.ZodType<Ne$Outbound, z.ZodTypeDef, Ne> = z
3562
- .object({
3563
- ne: z.union([z.string(), z.number(), z.boolean()]),
3564
- });
3565
-
3566
- export function neToJSON(ne: Ne): string {
3567
- return JSON.stringify(Ne$outboundSchema.parse(ne));
3568
- }
3569
-
3570
- /** @internal */
3571
- export type OneEq$Outbound = string | number | boolean;
3572
-
3573
- /** @internal */
3574
- export const OneEq$outboundSchema: z.ZodType<
3575
- OneEq$Outbound,
3576
- z.ZodTypeDef,
3577
- OneEq
3578
- > = z.union([z.string(), z.number(), z.boolean()]);
3579
-
3580
- export function oneEqToJSON(oneEq: OneEq): string {
3581
- return JSON.stringify(OneEq$outboundSchema.parse(oneEq));
3582
- }
3583
-
3584
- /** @internal */
3585
- export type Eq$Outbound = {
3586
- eq: string | number | boolean;
3587
- };
3588
-
3589
- /** @internal */
3590
- export const Eq$outboundSchema: z.ZodType<Eq$Outbound, z.ZodTypeDef, Eq> = z
3591
- .object({
3592
- eq: z.union([z.string(), z.number(), z.boolean()]),
3593
- });
3594
-
3595
- export function eqToJSON(eq: Eq): string {
3596
- return JSON.stringify(Eq$outboundSchema.parse(eq));
3597
- }
3598
-
3599
- /** @internal */
3600
- export type KnowledgeFilter1$Outbound =
3601
- | Eq$Outbound
3602
- | Ne$Outbound
3603
- | Gt$Outbound
3604
- | Gte$Outbound
3605
- | Lt$Outbound
3606
- | Lte$Outbound
3607
- | In$Outbound
3608
- | Nin$Outbound
3609
- | Exists$Outbound;
3610
-
3611
- /** @internal */
3612
- export const KnowledgeFilter1$outboundSchema: z.ZodType<
3613
- KnowledgeFilter1$Outbound,
3614
- z.ZodTypeDef,
3615
- KnowledgeFilter1
3616
- > = z.union([
3617
- z.lazy(() => Eq$outboundSchema),
3618
- z.lazy(() => Ne$outboundSchema),
3619
- z.lazy(() => Gt$outboundSchema),
3620
- z.lazy(() => Gte$outboundSchema),
3621
- z.lazy(() => Lt$outboundSchema),
3622
- z.lazy(() => Lte$outboundSchema),
3623
- z.lazy(() => In$outboundSchema),
3624
- z.lazy(() => Nin$outboundSchema),
3625
- z.lazy(() => Exists$outboundSchema),
3626
- ]);
3627
-
3628
- export function knowledgeFilter1ToJSON(
3629
- knowledgeFilter1: KnowledgeFilter1,
3630
- ): string {
3631
- return JSON.stringify(
3632
- KnowledgeFilter1$outboundSchema.parse(knowledgeFilter1),
3633
- );
3634
- }
3635
-
3636
- /** @internal */
3637
- export type KnowledgeFilter$Outbound = And$Outbound | Or$Outbound | {
3638
- [k: string]:
3639
- | Eq$Outbound
3640
- | Ne$Outbound
3641
- | Gt$Outbound
3642
- | Gte$Outbound
3643
- | Lt$Outbound
3644
- | Lte$Outbound
3645
- | In$Outbound
3646
- | Nin$Outbound
3647
- | Exists$Outbound;
3648
- };
3649
-
3650
- /** @internal */
3651
- export const KnowledgeFilter$outboundSchema: z.ZodType<
3652
- KnowledgeFilter$Outbound,
3653
- z.ZodTypeDef,
3654
- KnowledgeFilter
3655
- > = z.union([
3656
- z.lazy(() => And$outboundSchema),
3657
- z.lazy(() => Or$outboundSchema),
3658
- z.record(z.union([
3659
- z.lazy(() => Eq$outboundSchema),
3660
- z.lazy(() => Ne$outboundSchema),
3661
- z.lazy(() => Gt$outboundSchema),
3662
- z.lazy(() => Gte$outboundSchema),
3663
- z.lazy(() => Lt$outboundSchema),
3664
- z.lazy(() => Lte$outboundSchema),
3665
- z.lazy(() => In$outboundSchema),
3666
- z.lazy(() => Nin$outboundSchema),
3667
- z.lazy(() => Exists$outboundSchema),
3668
- ])),
3669
- ]);
3670
-
3671
- export function knowledgeFilterToJSON(
3672
- knowledgeFilter: KnowledgeFilter,
3673
- ): string {
3674
- return JSON.stringify(KnowledgeFilter$outboundSchema.parse(knowledgeFilter));
3675
- }
3676
-
3677
- /** @internal */
3678
- export type DeploymentInvokeRequestBody$Outbound = {
3679
- key: string;
3680
- stream: boolean;
3681
- inputs?: { [k: string]: any } | undefined;
3682
- context?: { [k: string]: any } | undefined;
3683
- prefix_messages?:
3684
- | Array<
3685
- | SystemMessage$Outbound
3686
- | DeveloperMessage$Outbound
3687
- | UserMessage$Outbound
3688
- | AssistantMessage$Outbound
3689
- | ToolMessage$Outbound
3690
- >
3691
- | undefined;
3692
- messages?:
3693
- | Array<
3694
- | MessagesSystemMessage$Outbound
3695
- | MessagesDeveloperMessage$Outbound
3696
- | MessagesUserMessage$Outbound
3697
- | MessagesAssistantMessage$Outbound
3698
- | MessagesToolMessage$Outbound
3699
- >
3700
- | undefined;
3701
- identity?: components.PublicIdentity$Outbound | undefined;
3702
- file_ids?: Array<string> | undefined;
3703
- metadata?: { [k: string]: any } | undefined;
3704
- extra_params?: { [k: string]: any } | undefined;
3705
- documents?: Array<Documents$Outbound> | undefined;
3706
- invoke_options?: InvokeOptions$Outbound | undefined;
3707
- thread?: Thread$Outbound | undefined;
3708
- knowledge_filter?: And$Outbound | Or$Outbound | {
3709
- [k: string]:
3710
- | Eq$Outbound
3711
- | Ne$Outbound
3712
- | Gt$Outbound
3713
- | Gte$Outbound
3714
- | Lt$Outbound
3715
- | Lte$Outbound
3716
- | In$Outbound
3717
- | Nin$Outbound
3718
- | Exists$Outbound;
3719
- } | undefined;
3720
- };
3721
-
3722
- /** @internal */
3723
- export const DeploymentInvokeRequestBody$outboundSchema: z.ZodType<
3724
- DeploymentInvokeRequestBody$Outbound,
3725
- z.ZodTypeDef,
3726
- DeploymentInvokeRequestBody
3727
- > = z.object({
3728
- key: z.string(),
3729
- stream: z.boolean().default(false),
3730
- inputs: z.record(z.any()).optional(),
3731
- context: z.record(z.any()).optional(),
3732
- prefixMessages: z.array(
3733
- z.union([
3734
- z.lazy(() => SystemMessage$outboundSchema),
3735
- z.lazy(() => DeveloperMessage$outboundSchema),
3736
- z.lazy(() => UserMessage$outboundSchema),
3737
- z.lazy(() => AssistantMessage$outboundSchema),
3738
- z.lazy(() => ToolMessage$outboundSchema),
3739
- ]),
3740
- ).optional(),
3741
- messages: z.array(
3742
- z.union([
3743
- z.lazy(() => MessagesSystemMessage$outboundSchema),
3744
- z.lazy(() => MessagesDeveloperMessage$outboundSchema),
3745
- z.lazy(() => MessagesUserMessage$outboundSchema),
3746
- z.lazy(() => MessagesAssistantMessage$outboundSchema),
3747
- z.lazy(() => MessagesToolMessage$outboundSchema),
3748
- ]),
3749
- ).optional(),
3750
- identity: components.PublicIdentity$outboundSchema.optional(),
3751
- fileIds: z.array(z.string()).optional(),
3752
- metadata: z.record(z.any()).optional(),
3753
- extraParams: z.record(z.any()).optional(),
3754
- documents: z.array(z.lazy(() => Documents$outboundSchema)).optional(),
3755
- invokeOptions: z.lazy(() => InvokeOptions$outboundSchema).optional(),
3756
- thread: z.lazy(() => Thread$outboundSchema).optional(),
3757
- knowledgeFilter: z.union([
3758
- z.lazy(() => And$outboundSchema),
3759
- z.lazy(() => Or$outboundSchema),
3760
- z.record(z.union([
3761
- z.lazy(() => Eq$outboundSchema),
3762
- z.lazy(() => Ne$outboundSchema),
3763
- z.lazy(() => Gt$outboundSchema),
3764
- z.lazy(() => Gte$outboundSchema),
3765
- z.lazy(() => Lt$outboundSchema),
3766
- z.lazy(() => Lte$outboundSchema),
3767
- z.lazy(() => In$outboundSchema),
3768
- z.lazy(() => Nin$outboundSchema),
3769
- z.lazy(() => Exists$outboundSchema),
3770
- ])),
3771
- ]).optional(),
3772
- }).transform((v) => {
3773
- return remap$(v, {
3774
- prefixMessages: "prefix_messages",
3775
- fileIds: "file_ids",
3776
- extraParams: "extra_params",
3777
- invokeOptions: "invoke_options",
3778
- knowledgeFilter: "knowledge_filter",
3779
- });
3780
- });
3781
-
3782
- export function deploymentInvokeRequestBodyToJSON(
3783
- deploymentInvokeRequestBody: DeploymentInvokeRequestBody,
3784
- ): string {
3785
- return JSON.stringify(
3786
- DeploymentInvokeRequestBody$outboundSchema.parse(
3787
- deploymentInvokeRequestBody,
3788
- ),
3789
- );
3790
- }
3791
-
3792
- /** @internal */
3793
- export const DeploymentInvokeObject$inboundSchema: z.ZodNativeEnum<
3794
- typeof DeploymentInvokeObject
3795
- > = z.nativeEnum(DeploymentInvokeObject);
3796
-
3797
- /** @internal */
3798
- export const Provider$inboundSchema: z.ZodNativeEnum<typeof Provider> = z
3799
- .nativeEnum(Provider);
3800
-
3801
- /** @internal */
3802
- export const Telemetry$inboundSchema: z.ZodType<
3803
- Telemetry,
3804
- z.ZodTypeDef,
3805
- unknown
3806
- > = z.object({
3807
- trace_id: z.string(),
3808
- span_id: z.string(),
3809
- }).transform((v) => {
3810
- return remap$(v, {
3811
- "trace_id": "traceId",
3812
- "span_id": "spanId",
3813
- });
3814
- });
3815
-
3816
- export function telemetryFromJSON(
3817
- jsonString: string,
3818
- ): SafeParseResult<Telemetry, SDKValidationError> {
3819
- return safeParse(
3820
- jsonString,
3821
- (x) => Telemetry$inboundSchema.parse(JSON.parse(x)),
3822
- `Failed to parse 'Telemetry' from JSON`,
3823
- );
3824
- }
3825
-
3826
- /** @internal */
3827
- export const DeploymentInvokeMetadata$inboundSchema: z.ZodType<
3828
- DeploymentInvokeMetadata,
3829
- z.ZodTypeDef,
3830
- unknown
3831
- > = z.object({
3832
- file_name: z.string(),
3833
- page_number: z.nullable(z.number()),
3834
- file_type: z.string(),
3835
- rerank_score: z.number().optional(),
3836
- search_score: z.number(),
3837
- }).transform((v) => {
3838
- return remap$(v, {
3839
- "file_name": "fileName",
3840
- "page_number": "pageNumber",
3841
- "file_type": "fileType",
3842
- "rerank_score": "rerankScore",
3843
- "search_score": "searchScore",
3844
- });
3845
- });
3846
-
3847
- export function deploymentInvokeMetadataFromJSON(
3848
- jsonString: string,
3849
- ): SafeParseResult<DeploymentInvokeMetadata, SDKValidationError> {
3850
- return safeParse(
3851
- jsonString,
3852
- (x) => DeploymentInvokeMetadata$inboundSchema.parse(JSON.parse(x)),
3853
- `Failed to parse 'DeploymentInvokeMetadata' from JSON`,
3854
- );
3855
- }
3856
-
3857
- /** @internal */
3858
- export const Retrievals$inboundSchema: z.ZodType<
3859
- Retrievals,
3860
- z.ZodTypeDef,
3861
- unknown
3862
- > = z.object({
3863
- document: z.string(),
3864
- metadata: z.lazy(() => DeploymentInvokeMetadata$inboundSchema),
3865
- });
3866
-
3867
- export function retrievalsFromJSON(
3868
- jsonString: string,
3869
- ): SafeParseResult<Retrievals, SDKValidationError> {
3870
- return safeParse(
3871
- jsonString,
3872
- (x) => Retrievals$inboundSchema.parse(JSON.parse(x)),
3873
- `Failed to parse 'Retrievals' from JSON`,
3874
- );
3875
- }
3876
-
3877
- /** @internal */
3878
- export const PromptTokensDetails$inboundSchema: z.ZodType<
3879
- PromptTokensDetails,
3880
- z.ZodTypeDef,
3881
- unknown
3882
- > = z.object({
3883
- cached_tokens: z.nullable(z.number()).optional(),
3884
- }).transform((v) => {
3885
- return remap$(v, {
3886
- "cached_tokens": "cachedTokens",
3887
- });
3888
- });
3889
-
3890
- export function promptTokensDetailsFromJSON(
3891
- jsonString: string,
3892
- ): SafeParseResult<PromptTokensDetails, SDKValidationError> {
3893
- return safeParse(
3894
- jsonString,
3895
- (x) => PromptTokensDetails$inboundSchema.parse(JSON.parse(x)),
3896
- `Failed to parse 'PromptTokensDetails' from JSON`,
3897
- );
3898
- }
3899
-
3900
- /** @internal */
3901
- export const CompletionTokensDetails$inboundSchema: z.ZodType<
3902
- CompletionTokensDetails,
3903
- z.ZodTypeDef,
3904
- unknown
3905
- > = z.object({
3906
- reasoning_tokens: z.nullable(z.number()).optional(),
3907
- }).transform((v) => {
3908
- return remap$(v, {
3909
- "reasoning_tokens": "reasoningTokens",
3910
- });
3911
- });
3912
-
3913
- export function completionTokensDetailsFromJSON(
3914
- jsonString: string,
3915
- ): SafeParseResult<CompletionTokensDetails, SDKValidationError> {
3916
- return safeParse(
3917
- jsonString,
3918
- (x) => CompletionTokensDetails$inboundSchema.parse(JSON.parse(x)),
3919
- `Failed to parse 'CompletionTokensDetails' from JSON`,
3920
- );
3921
- }
3922
-
3923
- /** @internal */
3924
- export const Usage$inboundSchema: z.ZodType<Usage, z.ZodTypeDef, unknown> = z
3925
- .object({
3926
- total_tokens: z.number().optional(),
3927
- prompt_tokens: z.number().optional(),
3928
- completion_tokens: z.number().optional(),
3929
- prompt_tokens_details: z.lazy(() => PromptTokensDetails$inboundSchema)
3930
- .optional(),
3931
- completion_tokens_details: z.nullable(
3932
- z.lazy(() => CompletionTokensDetails$inboundSchema),
3933
- ).optional(),
3934
- }).transform((v) => {
3935
- return remap$(v, {
3936
- "total_tokens": "totalTokens",
3937
- "prompt_tokens": "promptTokens",
3938
- "completion_tokens": "completionTokens",
3939
- "prompt_tokens_details": "promptTokensDetails",
3940
- "completion_tokens_details": "completionTokensDetails",
3941
- });
3942
- });
3943
-
3944
- export function usageFromJSON(
3945
- jsonString: string,
3946
- ): SafeParseResult<Usage, SDKValidationError> {
3947
- return safeParse(
3948
- jsonString,
3949
- (x) => Usage$inboundSchema.parse(JSON.parse(x)),
3950
- `Failed to parse 'Usage' from JSON`,
3951
- );
3952
- }
3953
-
3954
- /** @internal */
3955
- export const DeploymentInvokeMessageDeploymentsRole$inboundSchema:
3956
- z.ZodNativeEnum<typeof DeploymentInvokeMessageDeploymentsRole> = z.nativeEnum(
3957
- DeploymentInvokeMessageDeploymentsRole,
3958
- );
3959
-
3960
- /** @internal */
3961
- export const Message3$inboundSchema: z.ZodType<
3962
- Message3,
3963
- z.ZodTypeDef,
3964
- unknown
3965
- > = z.object({
3966
- type: z.literal("image"),
3967
- role: DeploymentInvokeMessageDeploymentsRole$inboundSchema,
3968
- url: z.string(),
3969
- });
3970
-
3971
- export function message3FromJSON(
3972
- jsonString: string,
3973
- ): SafeParseResult<Message3, SDKValidationError> {
3974
- return safeParse(
3975
- jsonString,
3976
- (x) => Message3$inboundSchema.parse(JSON.parse(x)),
3977
- `Failed to parse 'Message3' from JSON`,
3978
- );
3979
- }
3980
-
3981
- /** @internal */
3982
- export const DeploymentInvokeMessageRole$inboundSchema: z.ZodNativeEnum<
3983
- typeof DeploymentInvokeMessageRole
3984
- > = z.nativeEnum(DeploymentInvokeMessageRole);
3985
-
3986
- /** @internal */
3987
- export const Message2$inboundSchema: z.ZodType<
3988
- Message2,
3989
- z.ZodTypeDef,
3990
- unknown
3991
- > = z.object({
3992
- type: z.literal("content"),
3993
- role: DeploymentInvokeMessageRole$inboundSchema,
3994
- content: z.nullable(z.string()),
3995
- reasoning: z.string().optional(),
3996
- reasoning_signature: z.string().optional(),
3997
- redacted_reasoning: z.string().optional(),
3998
- }).transform((v) => {
3999
- return remap$(v, {
4000
- "reasoning_signature": "reasoningSignature",
4001
- "redacted_reasoning": "redactedReasoning",
4002
- });
4003
- });
4004
-
4005
- export function message2FromJSON(
4006
- jsonString: string,
4007
- ): SafeParseResult<Message2, SDKValidationError> {
4008
- return safeParse(
4009
- jsonString,
4010
- (x) => Message2$inboundSchema.parse(JSON.parse(x)),
4011
- `Failed to parse 'Message2' from JSON`,
4012
- );
4013
- }
4014
-
4015
- /** @internal */
4016
- export const MessageRole$inboundSchema: z.ZodNativeEnum<typeof MessageRole> = z
4017
- .nativeEnum(MessageRole);
4018
-
4019
- /** @internal */
4020
- export const DeploymentInvokeMessageDeploymentsResponseType$inboundSchema:
4021
- z.ZodNativeEnum<typeof DeploymentInvokeMessageDeploymentsResponseType> = z
4022
- .nativeEnum(DeploymentInvokeMessageDeploymentsResponseType);
4023
-
4024
- /** @internal */
4025
- export const MessageFunction$inboundSchema: z.ZodType<
4026
- MessageFunction,
4027
- z.ZodTypeDef,
4028
- unknown
4029
- > = z.object({
4030
- name: z.string(),
4031
- arguments: z.string(),
4032
- });
4033
-
4034
- export function messageFunctionFromJSON(
4035
- jsonString: string,
4036
- ): SafeParseResult<MessageFunction, SDKValidationError> {
4037
- return safeParse(
4038
- jsonString,
4039
- (x) => MessageFunction$inboundSchema.parse(JSON.parse(x)),
4040
- `Failed to parse 'MessageFunction' from JSON`,
4041
- );
4042
- }
4043
-
4044
- /** @internal */
4045
- export const MessageToolCalls$inboundSchema: z.ZodType<
4046
- MessageToolCalls,
4047
- z.ZodTypeDef,
4048
- unknown
4049
- > = z.object({
4050
- id: z.string().optional(),
4051
- index: z.number().optional(),
4052
- type: DeploymentInvokeMessageDeploymentsResponseType$inboundSchema,
4053
- function: z.lazy(() => MessageFunction$inboundSchema),
4054
- });
4055
-
4056
- export function messageToolCallsFromJSON(
4057
- jsonString: string,
4058
- ): SafeParseResult<MessageToolCalls, SDKValidationError> {
4059
- return safeParse(
4060
- jsonString,
4061
- (x) => MessageToolCalls$inboundSchema.parse(JSON.parse(x)),
4062
- `Failed to parse 'MessageToolCalls' from JSON`,
4063
- );
4064
- }
4065
-
4066
- /** @internal */
4067
- export const Message1$inboundSchema: z.ZodType<
4068
- Message1,
4069
- z.ZodTypeDef,
4070
- unknown
4071
- > = z.object({
4072
- type: z.literal("tool_calls"),
4073
- role: MessageRole$inboundSchema,
4074
- content: z.nullable(z.string()).optional(),
4075
- tool_calls: z.array(z.lazy(() => MessageToolCalls$inboundSchema)),
4076
- reasoning: z.string().optional(),
4077
- reasoning_signature: z.string().optional(),
4078
- redacted_reasoning: z.string().optional(),
4079
- }).transform((v) => {
4080
- return remap$(v, {
4081
- "tool_calls": "toolCalls",
4082
- "reasoning_signature": "reasoningSignature",
4083
- "redacted_reasoning": "redactedReasoning",
4084
- });
4085
- });
4086
-
4087
- export function message1FromJSON(
4088
- jsonString: string,
4089
- ): SafeParseResult<Message1, SDKValidationError> {
4090
- return safeParse(
4091
- jsonString,
4092
- (x) => Message1$inboundSchema.parse(JSON.parse(x)),
4093
- `Failed to parse 'Message1' from JSON`,
4094
- );
4095
- }
4096
-
4097
- /** @internal */
4098
- export const Message$inboundSchema: z.ZodType<Message, z.ZodTypeDef, unknown> =
4099
- z.union([
4100
- z.lazy(() => Message1$inboundSchema),
4101
- z.lazy(() => Message2$inboundSchema),
4102
- z.lazy(() => Message3$inboundSchema),
4103
- ]);
4104
-
4105
- export function messageFromJSON(
4106
- jsonString: string,
4107
- ): SafeParseResult<Message, SDKValidationError> {
4108
- return safeParse(
4109
- jsonString,
4110
- (x) => Message$inboundSchema.parse(JSON.parse(x)),
4111
- `Failed to parse 'Message' from JSON`,
4112
- );
4113
- }
4114
-
4115
- /** @internal */
4116
- export const Choices$inboundSchema: z.ZodType<Choices, z.ZodTypeDef, unknown> =
4117
- z.object({
4118
- index: z.number(),
4119
- message: z.union([
4120
- z.lazy(() => Message1$inboundSchema),
4121
- z.lazy(() => Message2$inboundSchema),
4122
- z.lazy(() => Message3$inboundSchema),
4123
- ]),
4124
- finish_reason: z.nullable(z.string()).optional(),
4125
- }).transform((v) => {
4126
- return remap$(v, {
4127
- "finish_reason": "finishReason",
4128
- });
4129
- });
4130
-
4131
- export function choicesFromJSON(
4132
- jsonString: string,
4133
- ): SafeParseResult<Choices, SDKValidationError> {
4134
- return safeParse(
4135
- jsonString,
4136
- (x) => Choices$inboundSchema.parse(JSON.parse(x)),
4137
- `Failed to parse 'Choices' from JSON`,
4138
- );
4139
- }
4140
-
4141
- /** @internal */
4142
- export const DeploymentInvokeResponseBody$inboundSchema: z.ZodType<
4143
- DeploymentInvokeResponseBody,
4144
- z.ZodTypeDef,
4145
- unknown
4146
- > = z.object({
4147
- id: z.string(),
4148
- created: z.string().datetime({ offset: true }).transform(v => new Date(v)),
4149
- object: DeploymentInvokeObject$inboundSchema,
4150
- model: z.string(),
4151
- provider: Provider$inboundSchema,
4152
- is_final: z.boolean(),
4153
- integration_id: z.string().optional(),
4154
- telemetry: z.lazy(() => Telemetry$inboundSchema),
4155
- finalized: z.string().datetime({ offset: true }).transform(v => new Date(v))
4156
- .optional(),
4157
- system_fingerprint: z.nullable(z.string()).optional(),
4158
- retrievals: z.array(z.lazy(() => Retrievals$inboundSchema)).optional(),
4159
- provider_response: z.any().optional(),
4160
- usage: z.nullable(z.lazy(() => Usage$inboundSchema)).optional(),
4161
- choices: z.array(z.lazy(() => Choices$inboundSchema)),
4162
- }).transform((v) => {
4163
- return remap$(v, {
4164
- "is_final": "isFinal",
4165
- "integration_id": "integrationId",
4166
- "system_fingerprint": "systemFingerprint",
4167
- "provider_response": "providerResponse",
4168
- });
4169
- });
4170
-
4171
- export function deploymentInvokeResponseBodyFromJSON(
4172
- jsonString: string,
4173
- ): SafeParseResult<DeploymentInvokeResponseBody, SDKValidationError> {
4174
- return safeParse(
4175
- jsonString,
4176
- (x) => DeploymentInvokeResponseBody$inboundSchema.parse(JSON.parse(x)),
4177
- `Failed to parse 'DeploymentInvokeResponseBody' from JSON`,
4178
- );
4179
- }