@orq-ai/node 4.7.0-rc.58 → 4.7.3

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 (502) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +2 -2
  3. package/lib/config.js +2 -2
  4. package/lib/config.js.map +1 -1
  5. package/models/components/reasoningpart.js +1 -1
  6. package/models/operations/createcontact.js +1 -1
  7. package/models/operations/createdataset.js +1 -1
  8. package/models/operations/createdatasetitem.js +4 -4
  9. package/models/operations/createdatasource.js +1 -1
  10. package/models/operations/createeval.js +16 -16
  11. package/models/operations/createidentity.js +1 -1
  12. package/models/operations/createtool.js +6 -6
  13. package/models/operations/getalltools.js +6 -6
  14. package/models/operations/getevals.js +16 -16
  15. package/models/operations/getv2humanevals.js +6 -6
  16. package/models/operations/getv2humanevalsets.js +2 -2
  17. package/models/operations/getv2humanevalsetsid.js +2 -2
  18. package/models/operations/getv2humanevalsid.js +6 -6
  19. package/models/operations/listdatasetdatapoints.js +4 -4
  20. package/models/operations/listdatasets.js +1 -1
  21. package/models/operations/listdatasources.js +1 -1
  22. package/models/operations/listidentities.js +1 -1
  23. package/models/operations/patchv2humanevalsetsid.js +2 -2
  24. package/models/operations/patchv2humanevalsid.js +12 -12
  25. package/models/operations/postv2feedbackevaluation.js +3 -3
  26. package/models/operations/postv2humanevals.js +12 -12
  27. package/models/operations/postv2humanevalsets.js +2 -2
  28. package/models/operations/retrievedatapoint.js +4 -4
  29. package/models/operations/retrievedataset.js +1 -1
  30. package/models/operations/retrievedatasource.js +1 -1
  31. package/models/operations/retrieveidentity.js +1 -1
  32. package/models/operations/retrievetool.js +6 -6
  33. package/models/operations/runagent.js +1 -1
  34. package/models/operations/streamrunagent.js +1 -1
  35. package/models/operations/updatedatapoint.js +4 -4
  36. package/models/operations/updatedataset.js +1 -1
  37. package/models/operations/updatedatasource.js +1 -1
  38. package/models/operations/updateeval.js +16 -16
  39. package/models/operations/updateidentity.js +1 -1
  40. package/models/operations/updatetool.js +7 -7
  41. package/package.json +3 -4
  42. package/packages/orq-rc/examples/postV2Feedback.example.ts +26 -0
  43. package/packages/orq-rc/src/core.ts +13 -0
  44. package/packages/orq-rc/src/funcs/agentsCreate.ts +161 -0
  45. package/packages/orq-rc/src/funcs/agentsDelete.ts +179 -0
  46. package/packages/orq-rc/src/funcs/agentsInvoke.ts +176 -0
  47. package/packages/orq-rc/src/funcs/agentsList.ts +184 -0
  48. package/packages/orq-rc/src/funcs/agentsPostV2AgentsA2a.ts +178 -0
  49. package/packages/orq-rc/src/funcs/agentsPostV2AgentsKeyCardRefresh.ts +186 -0
  50. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +182 -0
  51. package/packages/orq-rc/src/funcs/agentsResponsesGet.ts +181 -0
  52. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +179 -0
  53. package/packages/orq-rc/src/funcs/agentsRun.ts +162 -0
  54. package/packages/orq-rc/src/funcs/agentsStream.ts +203 -0
  55. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +189 -0
  56. package/packages/orq-rc/src/funcs/agentsUpdate.ts +183 -0
  57. package/packages/orq-rc/src/funcs/annotationsCreate.ts +170 -0
  58. package/packages/orq-rc/src/funcs/annotationsDelete.ts +170 -0
  59. package/packages/orq-rc/src/funcs/chunkingParse.ts +160 -0
  60. package/packages/orq-rc/src/funcs/contactsCreate.ts +160 -0
  61. package/packages/orq-rc/src/funcs/datasetsClear.ts +166 -0
  62. package/packages/orq-rc/src/funcs/datasetsCreate.ts +165 -0
  63. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +170 -0
  64. package/packages/orq-rc/src/funcs/datasetsDelete.ts +166 -0
  65. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +181 -0
  66. package/packages/orq-rc/src/funcs/datasetsList.ts +167 -0
  67. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +173 -0
  68. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +174 -0
  69. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +180 -0
  70. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +175 -0
  71. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +178 -0
  72. package/packages/orq-rc/src/funcs/deleteV2HumanEvalsId.ts +169 -0
  73. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +168 -0
  74. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +176 -0
  75. package/packages/orq-rc/src/funcs/deploymentsList.ts +176 -0
  76. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +169 -0
  77. package/packages/orq-rc/src/funcs/deploymentsStream.ts +186 -0
  78. package/packages/orq-rc/src/funcs/evalsAll.ts +173 -0
  79. package/packages/orq-rc/src/funcs/evalsCreate.ts +169 -0
  80. package/packages/orq-rc/src/funcs/evalsDelete.ts +172 -0
  81. package/packages/orq-rc/src/funcs/evalsInvoke.ts +180 -0
  82. package/packages/orq-rc/src/funcs/evalsUpdate.ts +172 -0
  83. package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts +182 -0
  84. package/packages/orq-rc/src/funcs/filesCreate.ts +194 -0
  85. package/packages/orq-rc/src/funcs/filesDelete.ts +163 -0
  86. package/packages/orq-rc/src/funcs/filesGet.ts +165 -0
  87. package/packages/orq-rc/src/funcs/filesGetContent.ts +166 -0
  88. package/packages/orq-rc/src/funcs/filesList.ts +167 -0
  89. package/packages/orq-rc/src/funcs/filesUpdate.ts +166 -0
  90. package/packages/orq-rc/src/funcs/getV2HumanEvals.ts +169 -0
  91. package/packages/orq-rc/src/funcs/getV2HumanEvalsId.ts +168 -0
  92. package/packages/orq-rc/src/funcs/humanReviewSetsDeleteV2HumanEvalSetsId.ts +164 -0
  93. package/packages/orq-rc/src/funcs/humanReviewSetsGetV2HumanEvalSets.ts +168 -0
  94. package/packages/orq-rc/src/funcs/humanReviewSetsGetV2HumanEvalSetsId.ts +163 -0
  95. package/packages/orq-rc/src/funcs/humanReviewSetsPatchV2HumanEvalSetsId.ts +164 -0
  96. package/packages/orq-rc/src/funcs/humanReviewSetsPostV2HumanEvalSets.ts +162 -0
  97. package/packages/orq-rc/src/funcs/identitiesCreate.ts +165 -0
  98. package/packages/orq-rc/src/funcs/identitiesDelete.ts +175 -0
  99. package/packages/orq-rc/src/funcs/identitiesList.ts +170 -0
  100. package/packages/orq-rc/src/funcs/identitiesRetrieve.ts +183 -0
  101. package/packages/orq-rc/src/funcs/identitiesUpdate.ts +175 -0
  102. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +158 -0
  103. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +170 -0
  104. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +165 -0
  105. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +166 -0
  106. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +173 -0
  107. package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +169 -0
  108. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +172 -0
  109. package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +169 -0
  110. package/packages/orq-rc/src/funcs/knowledgeList.ts +169 -0
  111. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +177 -0
  112. package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +170 -0
  113. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +173 -0
  114. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +165 -0
  115. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +172 -0
  116. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +168 -0
  117. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +166 -0
  118. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +163 -0
  119. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +173 -0
  120. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +169 -0
  121. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +162 -0
  122. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +175 -0
  123. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +169 -0
  124. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +167 -0
  125. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +184 -0
  126. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +179 -0
  127. package/packages/orq-rc/src/funcs/memoryStoresList.ts +178 -0
  128. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +183 -0
  129. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +176 -0
  130. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +176 -0
  131. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +178 -0
  132. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +173 -0
  133. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +167 -0
  134. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +179 -0
  135. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +174 -0
  136. package/packages/orq-rc/src/funcs/modelsList.ts +165 -0
  137. package/packages/orq-rc/src/funcs/patchV2HumanEvalsId.ts +170 -0
  138. package/packages/orq-rc/src/funcs/postV2Feedback.ts +172 -0
  139. package/packages/orq-rc/src/funcs/postV2FeedbackEvaluation.ts +159 -0
  140. package/packages/orq-rc/src/funcs/postV2FeedbackEvaluationRemove.ts +159 -0
  141. package/packages/orq-rc/src/funcs/postV2FeedbackRemove.ts +167 -0
  142. package/packages/orq-rc/src/funcs/postV2HumanEvals.ts +168 -0
  143. package/packages/orq-rc/src/funcs/promptsCreate.ts +160 -0
  144. package/packages/orq-rc/src/funcs/promptsDelete.ts +172 -0
  145. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +180 -0
  146. package/packages/orq-rc/src/funcs/promptsList.ts +167 -0
  147. package/packages/orq-rc/src/funcs/promptsListVersions.ts +172 -0
  148. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +165 -0
  149. package/packages/orq-rc/src/funcs/promptsUpdate.ts +172 -0
  150. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +161 -0
  151. package/packages/orq-rc/src/funcs/routerAudioSpeechCreate.ts +161 -0
  152. package/packages/orq-rc/src/funcs/routerAudioTranscriptionsCreate.ts +269 -0
  153. package/packages/orq-rc/src/funcs/routerAudioTranslationsCreate.ts +259 -0
  154. package/packages/orq-rc/src/funcs/routerChatCompletionsCreate.ts +168 -0
  155. package/packages/orq-rc/src/funcs/routerCompletionsCreate.ts +168 -0
  156. package/packages/orq-rc/src/funcs/routerEmbeddingsCreate.ts +161 -0
  157. package/packages/orq-rc/src/funcs/routerImagesEditsCreate.ts +222 -0
  158. package/packages/orq-rc/src/funcs/routerImagesGenerationsCreate.ts +160 -0
  159. package/packages/orq-rc/src/funcs/routerImagesVariationsCreate.ts +218 -0
  160. package/packages/orq-rc/src/funcs/routerModerationsCreate.ts +167 -0
  161. package/packages/orq-rc/src/funcs/routerOcr.ts +158 -0
  162. package/packages/orq-rc/src/funcs/routerRerankCreate.ts +160 -0
  163. package/packages/orq-rc/src/funcs/routerResponsesCreate.ts +167 -0
  164. package/packages/orq-rc/src/funcs/toolsCreate.ts +163 -0
  165. package/packages/orq-rc/src/funcs/toolsDelete.ts +166 -0
  166. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersions.ts +182 -0
  167. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +189 -0
  168. package/packages/orq-rc/src/funcs/toolsList.ts +176 -0
  169. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +165 -0
  170. package/packages/orq-rc/src/funcs/toolsUpdate.ts +175 -0
  171. package/packages/orq-rc/src/hooks/global.ts +44 -0
  172. package/packages/orq-rc/src/hooks/hooks.ts +132 -0
  173. package/packages/orq-rc/src/hooks/index.ts +6 -0
  174. package/packages/orq-rc/src/hooks/registration.ts +15 -0
  175. package/packages/orq-rc/src/hooks/types.ts +112 -0
  176. package/packages/orq-rc/src/index.ts +9 -0
  177. package/packages/orq-rc/src/lib/base64.ts +37 -0
  178. package/packages/orq-rc/src/lib/config.ts +74 -0
  179. package/packages/orq-rc/src/lib/dlv.ts +53 -0
  180. package/packages/orq-rc/src/lib/encodings.ts +516 -0
  181. package/packages/orq-rc/src/lib/env.ts +89 -0
  182. package/packages/orq-rc/src/lib/event-streams.ts +165 -0
  183. package/packages/orq-rc/src/lib/files.ts +104 -0
  184. package/packages/orq-rc/src/lib/http.ts +323 -0
  185. package/packages/orq-rc/src/lib/is-plain-object.ts +43 -0
  186. package/packages/orq-rc/src/lib/logger.ts +9 -0
  187. package/packages/orq-rc/src/lib/matchers.ts +346 -0
  188. package/packages/orq-rc/src/lib/primitives.ts +150 -0
  189. package/packages/orq-rc/src/lib/retries.ts +218 -0
  190. package/packages/orq-rc/src/lib/schemas.ts +91 -0
  191. package/packages/orq-rc/src/lib/sdks.ts +409 -0
  192. package/packages/orq-rc/src/lib/security.ts +275 -0
  193. package/packages/orq-rc/src/lib/url.ts +35 -0
  194. package/packages/orq-rc/src/models/components/actionreviewedstreamingevent.ts +99 -0
  195. package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +185 -0
  196. package/packages/orq-rc/src/models/components/agenterroredstreamingevent.ts +73 -0
  197. package/packages/orq-rc/src/models/components/agentexecutionstartedstreamingevent.ts +91 -0
  198. package/packages/orq-rc/src/models/components/agenthandedoffstreamingevent.ts +71 -0
  199. package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +507 -0
  200. package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +165 -0
  201. package/packages/orq-rc/src/models/components/agentresponsemessage.ts +103 -0
  202. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +517 -0
  203. package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +807 -0
  204. package/packages/orq-rc/src/models/components/audiocontentpartschema.ts +136 -0
  205. package/packages/orq-rc/src/models/components/createagentresponse.ts +305 -0
  206. package/packages/orq-rc/src/models/components/datapart.ts +38 -0
  207. package/packages/orq-rc/src/models/components/errorpart.ts +58 -0
  208. package/packages/orq-rc/src/models/components/errorstreamingevent.ts +66 -0
  209. package/packages/orq-rc/src/models/components/executionnamedstreamingevent.ts +71 -0
  210. package/packages/orq-rc/src/models/components/executionreviewedstreamingevent.ts +61 -0
  211. package/packages/orq-rc/src/models/components/executionreviewrequiredstreamingevent.ts +67 -0
  212. package/packages/orq-rc/src/models/components/extendedmessage.ts +146 -0
  213. package/packages/orq-rc/src/models/components/filecontentpartschema.ts +87 -0
  214. package/packages/orq-rc/src/models/components/filedocument.ts +48 -0
  215. package/packages/orq-rc/src/models/components/filepart.ts +218 -0
  216. package/packages/orq-rc/src/models/components/getagentresponse.ts +348 -0
  217. package/packages/orq-rc/src/models/components/imagecontentpartschema.ts +268 -0
  218. package/packages/orq-rc/src/models/components/index.ts +61 -0
  219. package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +3450 -0
  220. package/packages/orq-rc/src/models/components/partdelta.ts +39 -0
  221. package/packages/orq-rc/src/models/components/partdeltaevent.ts +73 -0
  222. package/packages/orq-rc/src/models/components/partdoneevent.ts +70 -0
  223. package/packages/orq-rc/src/models/components/publiccontact.ts +71 -0
  224. package/packages/orq-rc/src/models/components/publicidentity.ts +69 -0
  225. package/packages/orq-rc/src/models/components/reasoningpart.ts +62 -0
  226. package/packages/orq-rc/src/models/components/reasoningpartschema.ts +71 -0
  227. package/packages/orq-rc/src/models/components/redactedreasoningpartschema.ts +66 -0
  228. package/packages/orq-rc/src/models/components/refusalpartschema.ts +64 -0
  229. package/packages/orq-rc/src/models/components/responsedoneevent.ts +324 -0
  230. package/packages/orq-rc/src/models/components/responsefailedevent.ts +72 -0
  231. package/packages/orq-rc/src/models/components/responsestartedevent.ts +97 -0
  232. package/packages/orq-rc/src/models/components/responsestreamingevent.ts +85 -0
  233. package/packages/orq-rc/src/models/components/reviewoutcome.ts +23 -0
  234. package/packages/orq-rc/src/models/components/security.ts +32 -0
  235. package/packages/orq-rc/src/models/components/telemetry.ts +48 -0
  236. package/packages/orq-rc/src/models/components/textcontentpartschema.ts +207 -0
  237. package/packages/orq-rc/src/models/components/textpart.ts +54 -0
  238. package/packages/orq-rc/src/models/components/thinkingconfigadaptiveschema.ts +59 -0
  239. package/packages/orq-rc/src/models/components/thinkingconfigdisabledschema.ts +59 -0
  240. package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +106 -0
  241. package/packages/orq-rc/src/models/components/timeoutstreamingevent.ts +64 -0
  242. package/packages/orq-rc/src/models/components/toolcallpart.ts +51 -0
  243. package/packages/orq-rc/src/models/components/tooldoneevent.ts +77 -0
  244. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +235 -0
  245. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +219 -0
  246. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +205 -0
  247. package/packages/orq-rc/src/models/components/toolfailedevent.ts +77 -0
  248. package/packages/orq-rc/src/models/components/toolresultpart.ts +71 -0
  249. package/packages/orq-rc/src/models/components/toolreviewdoneevent.ts +78 -0
  250. package/packages/orq-rc/src/models/components/toolreviewrequestedevent.ts +87 -0
  251. package/packages/orq-rc/src/models/components/toolstartedevent.ts +82 -0
  252. package/packages/orq-rc/src/models/errors/apierror.ts +40 -0
  253. package/packages/orq-rc/src/models/errors/createeval.ts +51 -0
  254. package/packages/orq-rc/src/models/errors/createmoderation.ts +84 -0
  255. package/packages/orq-rc/src/models/errors/createtranscription.ts +87 -0
  256. package/packages/orq-rc/src/models/errors/createtranslation.ts +87 -0
  257. package/packages/orq-rc/src/models/errors/deleteagent.ts +51 -0
  258. package/packages/orq-rc/src/models/errors/deleteeval.ts +51 -0
  259. package/packages/orq-rc/src/models/errors/deleteidentity.ts +62 -0
  260. package/packages/orq-rc/src/models/errors/deleteprompt.ts +51 -0
  261. package/packages/orq-rc/src/models/errors/deletev2humanevalsid.ts +51 -0
  262. package/packages/orq-rc/src/models/errors/getevals.ts +51 -0
  263. package/packages/orq-rc/src/models/errors/getpromptversion.ts +51 -0
  264. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +51 -0
  265. package/packages/orq-rc/src/models/errors/getv2humanevals.ts +51 -0
  266. package/packages/orq-rc/src/models/errors/getv2humanevalsid.ts +51 -0
  267. package/packages/orq-rc/src/models/errors/getv2toolstoolidversions.ts +51 -0
  268. package/packages/orq-rc/src/models/errors/getv2toolstoolidversionsversionid.ts +52 -0
  269. package/packages/orq-rc/src/models/errors/honoapierror.ts +59 -0
  270. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +62 -0
  271. package/packages/orq-rc/src/models/errors/index.ts +42 -0
  272. package/packages/orq-rc/src/models/errors/invokeeval.ts +141 -0
  273. package/packages/orq-rc/src/models/errors/orqerror.ts +35 -0
  274. package/packages/orq-rc/src/models/errors/patchv2humanevalsid.ts +51 -0
  275. package/packages/orq-rc/src/models/errors/postv2agentsa2a.ts +96 -0
  276. package/packages/orq-rc/src/models/errors/postv2agentskeycardrefresh.ts +97 -0
  277. package/packages/orq-rc/src/models/errors/postv2feedback.ts +96 -0
  278. package/packages/orq-rc/src/models/errors/postv2feedbackremove.ts +51 -0
  279. package/packages/orq-rc/src/models/errors/postv2humanevals.ts +51 -0
  280. package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +50 -0
  281. package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +51 -0
  282. package/packages/orq-rc/src/models/errors/retrieveidentity.ts +118 -0
  283. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +109 -0
  284. package/packages/orq-rc/src/models/errors/streamagent.ts +51 -0
  285. package/packages/orq-rc/src/models/errors/streamrunagent.ts +51 -0
  286. package/packages/orq-rc/src/models/errors/updateagent.ts +51 -0
  287. package/packages/orq-rc/src/models/errors/updateeval.ts +51 -0
  288. package/packages/orq-rc/src/models/errors/updateidentity.ts +54 -0
  289. package/packages/orq-rc/src/models/errors/updateprompt.ts +51 -0
  290. package/packages/orq-rc/src/models/errors/updatetool.ts +62 -0
  291. package/packages/orq-rc/src/models/operations/cleardataset.ts +39 -0
  292. package/packages/orq-rc/src/models/operations/createagentrequest.ts +6459 -0
  293. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +670 -0
  294. package/packages/orq-rc/src/models/operations/createannotation.ts +166 -0
  295. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +6398 -0
  296. package/packages/orq-rc/src/models/operations/createchunk.ts +222 -0
  297. package/packages/orq-rc/src/models/operations/createcompletion.ts +3473 -0
  298. package/packages/orq-rc/src/models/operations/createcontact.ts +156 -0
  299. package/packages/orq-rc/src/models/operations/createdataset.ts +162 -0
  300. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2554 -0
  301. package/packages/orq-rc/src/models/operations/createdatasource.ts +437 -0
  302. package/packages/orq-rc/src/models/operations/createembedding.ts +947 -0
  303. package/packages/orq-rc/src/models/operations/createeval.ts +4229 -0
  304. package/packages/orq-rc/src/models/operations/createidentity.ts +162 -0
  305. package/packages/orq-rc/src/models/operations/createimage.ts +1034 -0
  306. package/packages/orq-rc/src/models/operations/createimageedit.ts +1045 -0
  307. package/packages/orq-rc/src/models/operations/createimagevariation.ts +1067 -0
  308. package/packages/orq-rc/src/models/operations/createknowledge.ts +960 -0
  309. package/packages/orq-rc/src/models/operations/creatememory.ts +142 -0
  310. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +152 -0
  311. package/packages/orq-rc/src/models/operations/creatememorystore.ts +199 -0
  312. package/packages/orq-rc/src/models/operations/createmoderation.ts +664 -0
  313. package/packages/orq-rc/src/models/operations/createprompt.ts +5405 -0
  314. package/packages/orq-rc/src/models/operations/creatererank.ts +890 -0
  315. package/packages/orq-rc/src/models/operations/createresponse.ts +3864 -0
  316. package/packages/orq-rc/src/models/operations/createspeech.ts +700 -0
  317. package/packages/orq-rc/src/models/operations/createtool.ts +2509 -0
  318. package/packages/orq-rc/src/models/operations/createtranscription.ts +955 -0
  319. package/packages/orq-rc/src/models/operations/createtranslation.ts +930 -0
  320. package/packages/orq-rc/src/models/operations/deleteagent.ts +39 -0
  321. package/packages/orq-rc/src/models/operations/deleteannotation.ts +82 -0
  322. package/packages/orq-rc/src/models/operations/deletechunk.ts +53 -0
  323. package/packages/orq-rc/src/models/operations/deletechunks.ts +125 -0
  324. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +46 -0
  325. package/packages/orq-rc/src/models/operations/deletedataset.ts +39 -0
  326. package/packages/orq-rc/src/models/operations/deletedatasource.ts +46 -0
  327. package/packages/orq-rc/src/models/operations/deleteeval.ts +31 -0
  328. package/packages/orq-rc/src/models/operations/deleteidentity.ts +34 -0
  329. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +39 -0
  330. package/packages/orq-rc/src/models/operations/deletememory.ts +46 -0
  331. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +55 -0
  332. package/packages/orq-rc/src/models/operations/deletememorystore.ts +39 -0
  333. package/packages/orq-rc/src/models/operations/deleteprompt.ts +34 -0
  334. package/packages/orq-rc/src/models/operations/deletetool.ts +36 -0
  335. package/packages/orq-rc/src/models/operations/deletev2humanevalsetsid.ts +36 -0
  336. package/packages/orq-rc/src/models/operations/deletev2humanevalsid.ts +67 -0
  337. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +2370 -0
  338. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +4526 -0
  339. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +735 -0
  340. package/packages/orq-rc/src/models/operations/deployments.ts +1273 -0
  341. package/packages/orq-rc/src/models/operations/deploymentstream.ts +4659 -0
  342. package/packages/orq-rc/src/models/operations/filecontent.ts +39 -0
  343. package/packages/orq-rc/src/models/operations/filedelete.ts +39 -0
  344. package/packages/orq-rc/src/models/operations/fileget.ts +80 -0
  345. package/packages/orq-rc/src/models/operations/filelist.ts +85 -0
  346. package/packages/orq-rc/src/models/operations/fileupdate.ts +118 -0
  347. package/packages/orq-rc/src/models/operations/fileupload.ts +135 -0
  348. package/packages/orq-rc/src/models/operations/getagentresponse.ts +46 -0
  349. package/packages/orq-rc/src/models/operations/getallmemories.ts +173 -0
  350. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +188 -0
  351. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +200 -0
  352. package/packages/orq-rc/src/models/operations/getallprompts.ts +3173 -0
  353. package/packages/orq-rc/src/models/operations/getalltools.ts +1404 -0
  354. package/packages/orq-rc/src/models/operations/getchunkscount.ts +121 -0
  355. package/packages/orq-rc/src/models/operations/getevals.ts +2868 -0
  356. package/packages/orq-rc/src/models/operations/getonechunk.ts +171 -0
  357. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +652 -0
  358. package/packages/orq-rc/src/models/operations/getoneprompt.ts +3098 -0
  359. package/packages/orq-rc/src/models/operations/getpromptversion.ts +3143 -0
  360. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +162 -0
  361. package/packages/orq-rc/src/models/operations/getv2humanevals.ts +696 -0
  362. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +234 -0
  363. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +235 -0
  364. package/packages/orq-rc/src/models/operations/getv2humanevalsid.ts +707 -0
  365. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +163 -0
  366. package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +110 -0
  367. package/packages/orq-rc/src/models/operations/index.ts +131 -0
  368. package/packages/orq-rc/src/models/operations/invokeagent.ts +801 -0
  369. package/packages/orq-rc/src/models/operations/invokeeval.ts +1254 -0
  370. package/packages/orq-rc/src/models/operations/listagents.ts +2781 -0
  371. package/packages/orq-rc/src/models/operations/listchunks.ts +260 -0
  372. package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +263 -0
  373. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +1498 -0
  374. package/packages/orq-rc/src/models/operations/listdatasets.ts +205 -0
  375. package/packages/orq-rc/src/models/operations/listdatasources.ts +235 -0
  376. package/packages/orq-rc/src/models/operations/listidentities.ts +275 -0
  377. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +642 -0
  378. package/packages/orq-rc/src/models/operations/listmodels.ts +169 -0
  379. package/packages/orq-rc/src/models/operations/listpromptversions.ts +3218 -0
  380. package/packages/orq-rc/src/models/operations/parse.ts +784 -0
  381. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +415 -0
  382. package/packages/orq-rc/src/models/operations/patchv2humanevalsid.ts +1362 -0
  383. package/packages/orq-rc/src/models/operations/postv2agentsa2a.ts +255 -0
  384. package/packages/orq-rc/src/models/operations/postv2agentskeycardrefresh.ts +100 -0
  385. package/packages/orq-rc/src/models/operations/postv2feedback.ts +207 -0
  386. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +321 -0
  387. package/packages/orq-rc/src/models/operations/postv2feedbackevaluationremove.ts +43 -0
  388. package/packages/orq-rc/src/models/operations/postv2feedbackremove.ts +138 -0
  389. package/packages/orq-rc/src/models/operations/postv2humanevals.ts +1193 -0
  390. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +365 -0
  391. package/packages/orq-rc/src/models/operations/postv2routerocr.ts +478 -0
  392. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +108 -0
  393. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +2843 -0
  394. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +1402 -0
  395. package/packages/orq-rc/src/models/operations/retrievedataset.ts +150 -0
  396. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +152 -0
  397. package/packages/orq-rc/src/models/operations/retrieveidentity.ts +174 -0
  398. package/packages/orq-rc/src/models/operations/retrievememory.ts +112 -0
  399. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +118 -0
  400. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +144 -0
  401. package/packages/orq-rc/src/models/operations/retrievetool.ts +1385 -0
  402. package/packages/orq-rc/src/models/operations/runagent.ts +4963 -0
  403. package/packages/orq-rc/src/models/operations/searchknowledge.ts +1762 -0
  404. package/packages/orq-rc/src/models/operations/streamagent.ts +692 -0
  405. package/packages/orq-rc/src/models/operations/streamrunagent.ts +5125 -0
  406. package/packages/orq-rc/src/models/operations/updateagent.ts +6889 -0
  407. package/packages/orq-rc/src/models/operations/updatechunk.ts +236 -0
  408. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2555 -0
  409. package/packages/orq-rc/src/models/operations/updatedataset.ts +206 -0
  410. package/packages/orq-rc/src/models/operations/updatedatasource.ts +186 -0
  411. package/packages/orq-rc/src/models/operations/updateeval.ts +3160 -0
  412. package/packages/orq-rc/src/models/operations/updateidentity.ts +189 -0
  413. package/packages/orq-rc/src/models/operations/updateknowledge.ts +1231 -0
  414. package/packages/orq-rc/src/models/operations/updatememory.ts +142 -0
  415. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +159 -0
  416. package/packages/orq-rc/src/models/operations/updatememorystore.ts +188 -0
  417. package/packages/orq-rc/src/models/operations/updateprompt.ts +5487 -0
  418. package/packages/orq-rc/src/models/operations/updatetool.ts +2816 -0
  419. package/packages/orq-rc/src/sdk/agents.ts +234 -0
  420. package/packages/orq-rc/src/sdk/annotations.ts +39 -0
  421. package/packages/orq-rc/src/sdk/audio.ts +25 -0
  422. package/packages/orq-rc/src/sdk/chat.ts +13 -0
  423. package/packages/orq-rc/src/sdk/chunking.ts +27 -0
  424. package/packages/orq-rc/src/sdk/completions.ts +32 -0
  425. package/packages/orq-rc/src/sdk/contacts.ts +27 -0
  426. package/packages/orq-rc/src/sdk/datasets.ts +204 -0
  427. package/packages/orq-rc/src/sdk/deployments.ts +89 -0
  428. package/packages/orq-rc/src/sdk/edits.ts +27 -0
  429. package/packages/orq-rc/src/sdk/embeddings.ts +27 -0
  430. package/packages/orq-rc/src/sdk/evals.ts +84 -0
  431. package/packages/orq-rc/src/sdk/evaluators.ts +27 -0
  432. package/packages/orq-rc/src/sdk/files.ts +114 -0
  433. package/packages/orq-rc/src/sdk/generations.ts +27 -0
  434. package/packages/orq-rc/src/sdk/humanreviewsets.ts +84 -0
  435. package/packages/orq-rc/src/sdk/identities.ts +99 -0
  436. package/packages/orq-rc/src/sdk/images.ts +25 -0
  437. package/packages/orq-rc/src/sdk/index.ts +5 -0
  438. package/packages/orq-rc/src/sdk/knowledge.ts +309 -0
  439. package/packages/orq-rc/src/sdk/memorystores.ts +286 -0
  440. package/packages/orq-rc/src/sdk/metrics.ts +29 -0
  441. package/packages/orq-rc/src/sdk/models.ts +27 -0
  442. package/packages/orq-rc/src/sdk/moderations.ts +24 -0
  443. package/packages/orq-rc/src/sdk/orqcompletions.ts +32 -0
  444. package/packages/orq-rc/src/sdk/orqresponses.ts +32 -0
  445. package/packages/orq-rc/src/sdk/prompts.ts +126 -0
  446. package/packages/orq-rc/src/sdk/remoteconfigs.ts +24 -0
  447. package/packages/orq-rc/src/sdk/rerank.ts +27 -0
  448. package/packages/orq-rc/src/sdk/responses.ts +53 -0
  449. package/packages/orq-rc/src/sdk/router.ts +72 -0
  450. package/packages/orq-rc/src/sdk/sdk.ts +225 -0
  451. package/packages/orq-rc/src/sdk/speech.ts +27 -0
  452. package/packages/orq-rc/src/sdk/tools.ts +135 -0
  453. package/packages/orq-rc/src/sdk/transcriptions.ts +24 -0
  454. package/packages/orq-rc/src/sdk/translations.ts +24 -0
  455. package/packages/orq-rc/src/sdk/variations.ts +27 -0
  456. package/packages/orq-rc/src/types/async.ts +68 -0
  457. package/packages/orq-rc/src/types/blobs.ts +32 -0
  458. package/packages/orq-rc/src/types/constdatetime.ts +15 -0
  459. package/packages/orq-rc/src/types/enums.ts +45 -0
  460. package/packages/orq-rc/src/types/fp.ts +50 -0
  461. package/packages/orq-rc/src/types/index.ts +11 -0
  462. package/packages/orq-rc/src/types/operations.ts +105 -0
  463. package/packages/orq-rc/src/types/rfcdate.ts +54 -0
  464. package/packages/orq-rc/src/types/streams.ts +21 -0
  465. package/packages/orq-rc/src/types/unrecognized.ts +35 -0
  466. package/src/lib/config.ts +2 -2
  467. package/src/models/components/reasoningpart.ts +1 -1
  468. package/src/models/operations/createcontact.ts +1 -1
  469. package/src/models/operations/createdataset.ts +1 -1
  470. package/src/models/operations/createdatasetitem.ts +4 -4
  471. package/src/models/operations/createdatasource.ts +1 -1
  472. package/src/models/operations/createeval.ts +16 -16
  473. package/src/models/operations/createidentity.ts +1 -1
  474. package/src/models/operations/createtool.ts +6 -6
  475. package/src/models/operations/getalltools.ts +6 -6
  476. package/src/models/operations/getevals.ts +16 -16
  477. package/src/models/operations/getv2humanevals.ts +6 -6
  478. package/src/models/operations/getv2humanevalsets.ts +2 -2
  479. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  480. package/src/models/operations/getv2humanevalsid.ts +6 -6
  481. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  482. package/src/models/operations/listdatasets.ts +1 -1
  483. package/src/models/operations/listdatasources.ts +1 -1
  484. package/src/models/operations/listidentities.ts +1 -1
  485. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  486. package/src/models/operations/patchv2humanevalsid.ts +12 -12
  487. package/src/models/operations/postv2feedbackevaluation.ts +3 -3
  488. package/src/models/operations/postv2humanevals.ts +12 -12
  489. package/src/models/operations/postv2humanevalsets.ts +2 -2
  490. package/src/models/operations/retrievedatapoint.ts +4 -4
  491. package/src/models/operations/retrievedataset.ts +1 -1
  492. package/src/models/operations/retrievedatasource.ts +1 -1
  493. package/src/models/operations/retrieveidentity.ts +1 -1
  494. package/src/models/operations/retrievetool.ts +6 -6
  495. package/src/models/operations/runagent.ts +1 -1
  496. package/src/models/operations/streamrunagent.ts +1 -1
  497. package/src/models/operations/updatedatapoint.ts +4 -4
  498. package/src/models/operations/updatedataset.ts +1 -1
  499. package/src/models/operations/updatedatasource.ts +1 -1
  500. package/src/models/operations/updateeval.ts +16 -16
  501. package/src/models/operations/updateidentity.ts +1 -1
  502. package/src/models/operations/updatetool.ts +7 -7
@@ -0,0 +1,4526 @@
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 DeploymentGetConfigContentDeployments2 =
14
+ components.TextContentPartSchema;
15
+
16
+ /**
17
+ * The contents of the tool message.
18
+ */
19
+ export type DeploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContent =
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 DeploymentGetConfigPrefixMessagesType = {
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 DeploymentGetConfigPrefixMessagesType = ClosedEnum<
33
+ typeof DeploymentGetConfigPrefixMessagesType
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: DeploymentGetConfigPrefixMessagesType;
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 DeploymentGetConfigContent2 =
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 DeploymentGetConfigPrefixMessagesDeploymentsRequestContent =
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 DeploymentGetConfig2DeploymentsType = {
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 DeploymentGetConfig2DeploymentsType = ClosedEnum<
208
+ typeof DeploymentGetConfig2DeploymentsType
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: DeploymentGetConfig2DeploymentsType;
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 DeploymentGetConfigPrefixMessagesDeploymentsContent =
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 DeploymentGetConfigPrefixMessagesContent =
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 DeploymentGetConfigContentDeploymentsRequestRequestBodyMessages2 =
362
+ components.TextContentPartSchema;
363
+
364
+ /**
365
+ * The contents of the tool message.
366
+ */
367
+ export type DeploymentGetConfigMessagesDeploymentsRequestRequestBodyContent =
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 DeploymentGetConfigMessagesType = {
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 DeploymentGetConfigMessagesType = ClosedEnum<
381
+ typeof DeploymentGetConfigMessagesType
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: DeploymentGetConfigMessagesType;
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 DeploymentGetConfigContentDeploymentsRequestRequestBody2 =
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 DeploymentGetConfigMessagesDeploymentsRequestContent =
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 DeploymentGetConfig2DeploymentsRequestRequestBodyType = {
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 DeploymentGetConfig2DeploymentsRequestRequestBodyType = ClosedEnum<
556
+ typeof DeploymentGetConfig2DeploymentsRequestRequestBodyType
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: DeploymentGetConfig2DeploymentsRequestRequestBodyType;
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 DeploymentGetConfigContentDeploymentsRequest2 =
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 DeploymentGetConfigMessagesDeploymentsContent =
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 DeploymentGetConfigMessagesContent =
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 DeploymentGetConfigMessages =
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 DeploymentGetConfigOrNin = string | number | boolean;
770
+
771
+ /**
772
+ * Not in
773
+ */
774
+ export type OrNin = {
775
+ nin: Array<string | number | boolean>;
776
+ };
777
+
778
+ export type DeploymentGetConfigOrIn = 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 DeploymentGetConfigOrNe = string | number | boolean;
816
+
817
+ /**
818
+ * Not equal to
819
+ */
820
+ export type OrNe = {
821
+ ne: string | number | boolean;
822
+ };
823
+
824
+ export type DeploymentGetConfigOrEq = 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 DeploymentGetConfigAndNin = string | number | boolean;
872
+
873
+ /**
874
+ * Not in
875
+ */
876
+ export type AndNin = {
877
+ nin: Array<string | number | boolean>;
878
+ };
879
+
880
+ export type DeploymentGetConfigAndIn = 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 DeploymentGetConfigAndNe = string | number | boolean;
918
+
919
+ /**
920
+ * Not equal to
921
+ */
922
+ export type AndNe = {
923
+ ne: string | number | boolean;
924
+ };
925
+
926
+ export type DeploymentGetConfigAndEq = 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 DeploymentGetConfigRequestBody = {
1056
+ /**
1057
+ * The deployment key to invoke
1058
+ */
1059
+ key: string;
1060
+ /**
1061
+ * 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.
1062
+ */
1063
+ inputs?: { [k: string]: any } | undefined;
1064
+ /**
1065
+ * Key-value pairs that match your data model and fields declared in your deployment routing configuration
1066
+ */
1067
+ context?: { [k: string]: any } | undefined;
1068
+ /**
1069
+ * A list of messages to include after the `System` message, but before the `User` and `Assistant` pairs configured in your deployment.
1070
+ */
1071
+ prefixMessages?:
1072
+ | Array<
1073
+ | SystemMessage
1074
+ | DeveloperMessage
1075
+ | UserMessage
1076
+ | AssistantMessage
1077
+ | ToolMessage
1078
+ >
1079
+ | undefined;
1080
+ /**
1081
+ * A list of messages to send to the deployment.
1082
+ */
1083
+ messages?:
1084
+ | Array<
1085
+ | MessagesSystemMessage
1086
+ | MessagesDeveloperMessage
1087
+ | MessagesUserMessage
1088
+ | MessagesAssistantMessage
1089
+ | MessagesToolMessage
1090
+ >
1091
+ | undefined;
1092
+ /**
1093
+ * Information about the identity making the request. If the identity does not exist, it will be created automatically.
1094
+ */
1095
+ identity?: components.PublicIdentity | undefined;
1096
+ /**
1097
+ * A list of file IDs that are associated with the deployment request.
1098
+ */
1099
+ fileIds?: Array<string> | undefined;
1100
+ /**
1101
+ * Key-value pairs that you want to attach to the log generated by this request.
1102
+ */
1103
+ metadata?: { [k: string]: any } | undefined;
1104
+ /**
1105
+ * 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.
1106
+ */
1107
+ extraParams?: { [k: string]: any } | undefined;
1108
+ /**
1109
+ * 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.
1110
+ */
1111
+ documents?: Array<Documents> | undefined;
1112
+ invokeOptions?: InvokeOptions | undefined;
1113
+ thread?: Thread | undefined;
1114
+ /**
1115
+ * A filter to apply to the knowledge base chunk metadata when using knowledge bases in the deployment.
1116
+ */
1117
+ knowledgeFilter?: And | Or | {
1118
+ [k: string]: Eq | Ne | Gt | Gte | Lt | Lte | In | Nin | Exists;
1119
+ } | undefined;
1120
+ };
1121
+
1122
+ /**
1123
+ * The type of the model. Current `chat`,`completion` and `image` are supported
1124
+ */
1125
+ export const DeploymentGetConfigType = {
1126
+ Chat: "chat",
1127
+ Completion: "completion",
1128
+ Embedding: "embedding",
1129
+ Image: "image",
1130
+ Tts: "tts",
1131
+ Stt: "stt",
1132
+ Rerank: "rerank",
1133
+ Ocr: "ocr",
1134
+ Moderation: "moderation",
1135
+ Vision: "vision",
1136
+ } as const;
1137
+ /**
1138
+ * The type of the model. Current `chat`,`completion` and `image` are supported
1139
+ */
1140
+ export type DeploymentGetConfigType = ClosedEnum<
1141
+ typeof DeploymentGetConfigType
1142
+ >;
1143
+
1144
+ /**
1145
+ * The role of the prompt message
1146
+ */
1147
+ export const DeploymentGetConfigRole = {
1148
+ System: "system",
1149
+ Developer: "developer",
1150
+ Assistant: "assistant",
1151
+ User: "user",
1152
+ Exception: "exception",
1153
+ Tool: "tool",
1154
+ Prompt: "prompt",
1155
+ Correction: "correction",
1156
+ ExpectedOutput: "expected_output",
1157
+ } as const;
1158
+ /**
1159
+ * The role of the prompt message
1160
+ */
1161
+ export type DeploymentGetConfigRole = ClosedEnum<
1162
+ typeof DeploymentGetConfigRole
1163
+ >;
1164
+
1165
+ export type TwoFile = {
1166
+ /**
1167
+ * The file data as a data URI string in the format 'data:<mime-type>;base64,<base64-encoded-data>'. Example: 'data:image/png;base64,iVBORw0KGgoAAAANS...'
1168
+ */
1169
+ fileData?: string | undefined;
1170
+ /**
1171
+ * URL to the file. Only supported by Anthropic Claude models for PDF files.
1172
+ */
1173
+ uri?: string | undefined;
1174
+ /**
1175
+ * MIME type of the file (e.g., application/pdf, image/png)
1176
+ */
1177
+ mimeType?: string | undefined;
1178
+ /**
1179
+ * The name of the file, used when passing the file to the model as a string.
1180
+ */
1181
+ filename?: string | undefined;
1182
+ };
1183
+
1184
+ export type DeploymentGetConfig23 = {
1185
+ /**
1186
+ * The type of the content part. Always `file`.
1187
+ */
1188
+ type: "file";
1189
+ file: TwoFile;
1190
+ };
1191
+
1192
+ export type TwoImageUrl = {
1193
+ /**
1194
+ * The orq.ai id of the image
1195
+ */
1196
+ id?: string | undefined;
1197
+ /**
1198
+ * Either a URL of the image or the base64 encoded data URI.
1199
+ */
1200
+ url: string;
1201
+ /**
1202
+ * Specifies the detail level of the image. Currently only supported with OpenAI models
1203
+ */
1204
+ detail?: string | undefined;
1205
+ };
1206
+
1207
+ /**
1208
+ * The image part of the prompt message. Only supported with vision models.
1209
+ */
1210
+ export type DeploymentGetConfig22 = {
1211
+ type: "image_url";
1212
+ imageUrl: TwoImageUrl;
1213
+ };
1214
+
1215
+ /**
1216
+ * Text content part of a prompt message
1217
+ */
1218
+ export type DeploymentGetConfig21 = {
1219
+ type: "text";
1220
+ text: string;
1221
+ };
1222
+
1223
+ export type DeploymentGetConfigContentDeploymentsResponse2 =
1224
+ | DeploymentGetConfig21
1225
+ | DeploymentGetConfig22
1226
+ | DeploymentGetConfig23;
1227
+
1228
+ /**
1229
+ * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Can be null for tool messages in certain scenarios.
1230
+ */
1231
+ export type DeploymentGetConfigContent =
1232
+ | string
1233
+ | Array<
1234
+ DeploymentGetConfig21 | DeploymentGetConfig22 | DeploymentGetConfig23
1235
+ >;
1236
+
1237
+ export const DeploymentGetConfigDeploymentsResponseType = {
1238
+ Function: "function",
1239
+ } as const;
1240
+ export type DeploymentGetConfigDeploymentsResponseType = ClosedEnum<
1241
+ typeof DeploymentGetConfigDeploymentsResponseType
1242
+ >;
1243
+
1244
+ export type DeploymentGetConfigDeploymentsFunction = {
1245
+ name: string;
1246
+ /**
1247
+ * JSON string arguments for the functions
1248
+ */
1249
+ arguments: string;
1250
+ };
1251
+
1252
+ export type DeploymentGetConfigToolCalls = {
1253
+ id?: string | undefined;
1254
+ index?: number | undefined;
1255
+ type: DeploymentGetConfigDeploymentsResponseType;
1256
+ function: DeploymentGetConfigDeploymentsFunction;
1257
+ };
1258
+
1259
+ export type DeploymentGetConfigDeploymentsMessages = {
1260
+ /**
1261
+ * The role of the prompt message
1262
+ */
1263
+ role: DeploymentGetConfigRole;
1264
+ /**
1265
+ * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Can be null for tool messages in certain scenarios.
1266
+ */
1267
+ content:
1268
+ | string
1269
+ | Array<
1270
+ DeploymentGetConfig21 | DeploymentGetConfig22 | DeploymentGetConfig23
1271
+ >
1272
+ | null;
1273
+ toolCalls?: Array<DeploymentGetConfigToolCalls> | undefined;
1274
+ toolCallId?: string | null | undefined;
1275
+ };
1276
+
1277
+ /**
1278
+ * Only supported on `image` models.
1279
+ */
1280
+ export const DeploymentGetConfigFormat = {
1281
+ Url: "url",
1282
+ B64Json: "b64_json",
1283
+ Text: "text",
1284
+ JsonObject: "json_object",
1285
+ } as const;
1286
+ /**
1287
+ * Only supported on `image` models.
1288
+ */
1289
+ export type DeploymentGetConfigFormat = ClosedEnum<
1290
+ typeof DeploymentGetConfigFormat
1291
+ >;
1292
+
1293
+ export const ResponseFormat6 = {
1294
+ Json: "json",
1295
+ Text: "text",
1296
+ Srt: "srt",
1297
+ VerboseJson: "verbose_json",
1298
+ Vtt: "vtt",
1299
+ } as const;
1300
+ export type ResponseFormat6 = ClosedEnum<typeof ResponseFormat6>;
1301
+
1302
+ export const ResponseFormat5 = {
1303
+ Url: "url",
1304
+ Base64Json: "base64_json",
1305
+ } as const;
1306
+ export type ResponseFormat5 = ClosedEnum<typeof ResponseFormat5>;
1307
+
1308
+ export const ResponseFormat4 = {
1309
+ Mp3: "mp3",
1310
+ Opus: "opus",
1311
+ Aac: "aac",
1312
+ Flac: "flac",
1313
+ Wav: "wav",
1314
+ Pcm: "pcm",
1315
+ } as const;
1316
+ export type ResponseFormat4 = ClosedEnum<typeof ResponseFormat4>;
1317
+
1318
+ export const DeploymentGetConfigResponseFormatDeploymentsType = {
1319
+ Text: "text",
1320
+ } as const;
1321
+ export type DeploymentGetConfigResponseFormatDeploymentsType = ClosedEnum<
1322
+ typeof DeploymentGetConfigResponseFormatDeploymentsType
1323
+ >;
1324
+
1325
+ export type ResponseFormat3 = {
1326
+ type: DeploymentGetConfigResponseFormatDeploymentsType;
1327
+ };
1328
+
1329
+ export const DeploymentGetConfigResponseFormatType = {
1330
+ JsonObject: "json_object",
1331
+ } as const;
1332
+ export type DeploymentGetConfigResponseFormatType = ClosedEnum<
1333
+ typeof DeploymentGetConfigResponseFormatType
1334
+ >;
1335
+
1336
+ export type ResponseFormat2 = {
1337
+ type: DeploymentGetConfigResponseFormatType;
1338
+ };
1339
+
1340
+ export const DeploymentGetConfigResponseFormatDeploymentsResponseType = {
1341
+ JsonSchema: "json_schema",
1342
+ } as const;
1343
+ export type DeploymentGetConfigResponseFormatDeploymentsResponseType =
1344
+ ClosedEnum<typeof DeploymentGetConfigResponseFormatDeploymentsResponseType>;
1345
+
1346
+ export type DeploymentGetConfigResponseFormatJsonSchema = {
1347
+ name: string;
1348
+ description?: string | undefined;
1349
+ strict?: boolean | undefined;
1350
+ schema: { [k: string]: any };
1351
+ };
1352
+
1353
+ export type ResponseFormat1 = {
1354
+ type: DeploymentGetConfigResponseFormatDeploymentsResponseType;
1355
+ displayName?: string | undefined;
1356
+ jsonSchema: DeploymentGetConfigResponseFormatJsonSchema;
1357
+ };
1358
+
1359
+ /**
1360
+ * An object specifying the format that the model must output.
1361
+ *
1362
+ * @remarks
1363
+ *
1364
+ * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
1365
+ *
1366
+ * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
1367
+ *
1368
+ * Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
1369
+ */
1370
+ export type DeploymentGetConfigResponseFormat =
1371
+ | ResponseFormat1
1372
+ | ResponseFormat2
1373
+ | ResponseFormat3
1374
+ | ResponseFormat4
1375
+ | ResponseFormat5
1376
+ | ResponseFormat6;
1377
+
1378
+ /**
1379
+ * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
1380
+ */
1381
+ export const PhotoRealVersion = {
1382
+ V1: "v1",
1383
+ V2: "v2",
1384
+ } as const;
1385
+ /**
1386
+ * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
1387
+ */
1388
+ export type PhotoRealVersion = ClosedEnum<typeof PhotoRealVersion>;
1389
+
1390
+ /**
1391
+ * The format to return the embeddings
1392
+ */
1393
+ export const DeploymentGetConfigEncodingFormat = {
1394
+ Float: "float",
1395
+ Base64: "base64",
1396
+ } as const;
1397
+ /**
1398
+ * The format to return the embeddings
1399
+ */
1400
+ export type DeploymentGetConfigEncodingFormat = ClosedEnum<
1401
+ typeof DeploymentGetConfigEncodingFormat
1402
+ >;
1403
+
1404
+ /**
1405
+ * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
1406
+ */
1407
+ export const DeploymentGetConfigReasoningEffort = {
1408
+ None: "none",
1409
+ Disable: "disable",
1410
+ Minimal: "minimal",
1411
+ Low: "low",
1412
+ Medium: "medium",
1413
+ High: "high",
1414
+ } as const;
1415
+ /**
1416
+ * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
1417
+ */
1418
+ export type DeploymentGetConfigReasoningEffort = ClosedEnum<
1419
+ typeof DeploymentGetConfigReasoningEffort
1420
+ >;
1421
+
1422
+ /**
1423
+ * Controls the verbosity of the model output.
1424
+ */
1425
+ export const Verbosity = {
1426
+ Low: "low",
1427
+ Medium: "medium",
1428
+ High: "high",
1429
+ } as const;
1430
+ /**
1431
+ * Controls the verbosity of the model output.
1432
+ */
1433
+ export type Verbosity = ClosedEnum<typeof Verbosity>;
1434
+
1435
+ /**
1436
+ * The level of thinking to use for the model. Only supported by `Google AI`
1437
+ */
1438
+ export const ThinkingLevel = {
1439
+ Low: "low",
1440
+ High: "high",
1441
+ } as const;
1442
+ /**
1443
+ * The level of thinking to use for the model. Only supported by `Google AI`
1444
+ */
1445
+ export type ThinkingLevel = ClosedEnum<typeof ThinkingLevel>;
1446
+
1447
+ /**
1448
+ * Model Parameters: Not all parameters apply to every model
1449
+ */
1450
+ export type DeploymentGetConfigParameters = {
1451
+ /**
1452
+ * Only supported on `chat` and `completion` models.
1453
+ */
1454
+ temperature?: number | undefined;
1455
+ /**
1456
+ * Only supported on `chat` and `completion` models.
1457
+ */
1458
+ maxTokens?: number | undefined;
1459
+ /**
1460
+ * Only supported on `chat` and `completion` models.
1461
+ */
1462
+ topK?: number | undefined;
1463
+ /**
1464
+ * Only supported on `chat` and `completion` models.
1465
+ */
1466
+ topP?: number | undefined;
1467
+ /**
1468
+ * Only supported on `chat` and `completion` models.
1469
+ */
1470
+ frequencyPenalty?: number | undefined;
1471
+ /**
1472
+ * Only supported on `chat` and `completion` models.
1473
+ */
1474
+ presencePenalty?: number | undefined;
1475
+ /**
1476
+ * Only supported on `image` models.
1477
+ */
1478
+ numImages?: number | undefined;
1479
+ /**
1480
+ * Best effort deterministic seed for the model. Currently only OpenAI models support these
1481
+ */
1482
+ seed?: number | undefined;
1483
+ /**
1484
+ * Only supported on `image` models.
1485
+ */
1486
+ format?: DeploymentGetConfigFormat | undefined;
1487
+ /**
1488
+ * Only supported on `image` models.
1489
+ */
1490
+ dimensions?: string | undefined;
1491
+ /**
1492
+ * Only supported on `image` models.
1493
+ */
1494
+ quality?: string | undefined;
1495
+ /**
1496
+ * Only supported on `image` models.
1497
+ */
1498
+ style?: string | undefined;
1499
+ /**
1500
+ * An object specifying the format that the model must output.
1501
+ *
1502
+ * @remarks
1503
+ *
1504
+ * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
1505
+ *
1506
+ * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
1507
+ *
1508
+ * Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
1509
+ */
1510
+ responseFormat?:
1511
+ | ResponseFormat1
1512
+ | ResponseFormat2
1513
+ | ResponseFormat3
1514
+ | ResponseFormat4
1515
+ | ResponseFormat5
1516
+ | ResponseFormat6
1517
+ | null
1518
+ | undefined;
1519
+ /**
1520
+ * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
1521
+ */
1522
+ photoRealVersion?: PhotoRealVersion | undefined;
1523
+ /**
1524
+ * The format to return the embeddings
1525
+ */
1526
+ encodingFormat?: DeploymentGetConfigEncodingFormat | undefined;
1527
+ /**
1528
+ * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
1529
+ */
1530
+ reasoningEffort?: DeploymentGetConfigReasoningEffort | undefined;
1531
+ /**
1532
+ * Gives the model enhanced reasoning capabilities for complex tasks. A value of 0 disables thinking. The minimum budget tokens for thinking are 1024. The Budget Tokens should never exceed the Max Tokens parameter. Only supported by `Anthropic`
1533
+ */
1534
+ budgetTokens?: number | undefined;
1535
+ /**
1536
+ * Controls the verbosity of the model output.
1537
+ */
1538
+ verbosity?: Verbosity | undefined;
1539
+ /**
1540
+ * The level of thinking to use for the model. Only supported by `Google AI`
1541
+ */
1542
+ thinkingLevel?: ThinkingLevel | undefined;
1543
+ };
1544
+
1545
+ /**
1546
+ * The type of the tool. Currently, only `function` is supported.
1547
+ */
1548
+ export const DeploymentGetConfigDeploymentsType = {
1549
+ Function: "function",
1550
+ } as const;
1551
+ /**
1552
+ * The type of the tool. Currently, only `function` is supported.
1553
+ */
1554
+ export type DeploymentGetConfigDeploymentsType = ClosedEnum<
1555
+ typeof DeploymentGetConfigDeploymentsType
1556
+ >;
1557
+
1558
+ export type DeploymentGetConfigFunction = {
1559
+ /**
1560
+ * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
1561
+ */
1562
+ name: string;
1563
+ /**
1564
+ * A description of what the function does, used by the model to choose when and how to call the function.
1565
+ */
1566
+ description?: string | undefined;
1567
+ /**
1568
+ * The parameters the functions accepts, described as a JSON Schema object.
1569
+ *
1570
+ * @remarks
1571
+ *
1572
+ * Omitting `parameters` defines a function with an empty parameter list.
1573
+ */
1574
+ parameters?: { [k: string]: any } | undefined;
1575
+ };
1576
+
1577
+ export type DeploymentGetConfigTools = {
1578
+ /**
1579
+ * The type of the tool. Currently, only `function` is supported.
1580
+ */
1581
+ type: DeploymentGetConfigDeploymentsType;
1582
+ function: DeploymentGetConfigFunction;
1583
+ };
1584
+
1585
+ /**
1586
+ * The deployment configuration
1587
+ */
1588
+ export type DeploymentGetConfigResponseBody = {
1589
+ /**
1590
+ * A unique identifier for the response. Can be used to add metrics to the transaction.
1591
+ */
1592
+ id: string;
1593
+ /**
1594
+ * The provider of the model
1595
+ */
1596
+ provider: string;
1597
+ /**
1598
+ * The model of the configuration
1599
+ */
1600
+ model: string;
1601
+ /**
1602
+ * The type of the model. Current `chat`,`completion` and `image` are supported
1603
+ */
1604
+ type?: DeploymentGetConfigType | undefined;
1605
+ /**
1606
+ * The current version of the deployment
1607
+ */
1608
+ version: string;
1609
+ messages: Array<DeploymentGetConfigDeploymentsMessages>;
1610
+ /**
1611
+ * Model Parameters: Not all parameters apply to every model
1612
+ */
1613
+ parameters: DeploymentGetConfigParameters;
1614
+ /**
1615
+ * A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for.
1616
+ */
1617
+ tools?: Array<DeploymentGetConfigTools> | undefined;
1618
+ };
1619
+
1620
+ /** @internal */
1621
+ export type DeploymentGetConfigContentDeployments2$Outbound =
1622
+ components.TextContentPartSchema$Outbound;
1623
+
1624
+ /** @internal */
1625
+ export const DeploymentGetConfigContentDeployments2$outboundSchema: z.ZodType<
1626
+ DeploymentGetConfigContentDeployments2$Outbound,
1627
+ z.ZodTypeDef,
1628
+ DeploymentGetConfigContentDeployments2
1629
+ > = components.TextContentPartSchema$outboundSchema;
1630
+
1631
+ export function deploymentGetConfigContentDeployments2ToJSON(
1632
+ deploymentGetConfigContentDeployments2:
1633
+ DeploymentGetConfigContentDeployments2,
1634
+ ): string {
1635
+ return JSON.stringify(
1636
+ DeploymentGetConfigContentDeployments2$outboundSchema.parse(
1637
+ deploymentGetConfigContentDeployments2,
1638
+ ),
1639
+ );
1640
+ }
1641
+
1642
+ /** @internal */
1643
+ export type DeploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContent$Outbound =
1644
+ | string
1645
+ | Array<components.TextContentPartSchema$Outbound>;
1646
+
1647
+ /** @internal */
1648
+ export const DeploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContent$outboundSchema:
1649
+ z.ZodType<
1650
+ DeploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContent$Outbound,
1651
+ z.ZodTypeDef,
1652
+ DeploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContent
1653
+ > = z.union([
1654
+ z.string(),
1655
+ z.array(components.TextContentPartSchema$outboundSchema),
1656
+ ]);
1657
+
1658
+ export function deploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContentToJSON(
1659
+ deploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContent:
1660
+ DeploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContent,
1661
+ ): string {
1662
+ return JSON.stringify(
1663
+ DeploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContent$outboundSchema
1664
+ .parse(
1665
+ deploymentGetConfigPrefixMessagesDeploymentsRequestRequestBodyContent,
1666
+ ),
1667
+ );
1668
+ }
1669
+
1670
+ /** @internal */
1671
+ export const DeploymentGetConfigPrefixMessagesType$outboundSchema:
1672
+ z.ZodNativeEnum<typeof DeploymentGetConfigPrefixMessagesType> = z.nativeEnum(
1673
+ DeploymentGetConfigPrefixMessagesType,
1674
+ );
1675
+
1676
+ /** @internal */
1677
+ export const PrefixMessagesTtl$outboundSchema: z.ZodNativeEnum<
1678
+ typeof PrefixMessagesTtl
1679
+ > = z.nativeEnum(PrefixMessagesTtl);
1680
+
1681
+ /** @internal */
1682
+ export type PrefixMessagesCacheControl$Outbound = {
1683
+ type: string;
1684
+ ttl: string;
1685
+ };
1686
+
1687
+ /** @internal */
1688
+ export const PrefixMessagesCacheControl$outboundSchema: z.ZodType<
1689
+ PrefixMessagesCacheControl$Outbound,
1690
+ z.ZodTypeDef,
1691
+ PrefixMessagesCacheControl
1692
+ > = z.object({
1693
+ type: DeploymentGetConfigPrefixMessagesType$outboundSchema,
1694
+ ttl: PrefixMessagesTtl$outboundSchema.default("5m"),
1695
+ });
1696
+
1697
+ export function prefixMessagesCacheControlToJSON(
1698
+ prefixMessagesCacheControl: PrefixMessagesCacheControl,
1699
+ ): string {
1700
+ return JSON.stringify(
1701
+ PrefixMessagesCacheControl$outboundSchema.parse(prefixMessagesCacheControl),
1702
+ );
1703
+ }
1704
+
1705
+ /** @internal */
1706
+ export type ToolMessage$Outbound = {
1707
+ role: "tool";
1708
+ content: string | Array<components.TextContentPartSchema$Outbound>;
1709
+ tool_call_id: string | null;
1710
+ cache_control?: PrefixMessagesCacheControl$Outbound | undefined;
1711
+ };
1712
+
1713
+ /** @internal */
1714
+ export const ToolMessage$outboundSchema: z.ZodType<
1715
+ ToolMessage$Outbound,
1716
+ z.ZodTypeDef,
1717
+ ToolMessage
1718
+ > = z.object({
1719
+ role: z.literal("tool"),
1720
+ content: z.union([
1721
+ z.string(),
1722
+ z.array(components.TextContentPartSchema$outboundSchema),
1723
+ ]),
1724
+ toolCallId: z.nullable(z.string()),
1725
+ cacheControl: z.lazy(() => PrefixMessagesCacheControl$outboundSchema)
1726
+ .optional(),
1727
+ }).transform((v) => {
1728
+ return remap$(v, {
1729
+ toolCallId: "tool_call_id",
1730
+ cacheControl: "cache_control",
1731
+ });
1732
+ });
1733
+
1734
+ export function toolMessageToJSON(toolMessage: ToolMessage): string {
1735
+ return JSON.stringify(ToolMessage$outboundSchema.parse(toolMessage));
1736
+ }
1737
+
1738
+ /** @internal */
1739
+ export type DeploymentGetConfigContent2$Outbound =
1740
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
1741
+ | components.RefusalPartSchema$Outbound
1742
+ | components.ReasoningPartSchema$Outbound
1743
+ | components.RedactedReasoningPartSchema$Outbound;
1744
+
1745
+ /** @internal */
1746
+ export const DeploymentGetConfigContent2$outboundSchema: z.ZodType<
1747
+ DeploymentGetConfigContent2$Outbound,
1748
+ z.ZodTypeDef,
1749
+ DeploymentGetConfigContent2
1750
+ > = z.union([
1751
+ components.TextContentPartSchema$outboundSchema.and(
1752
+ z.object({ type: z.literal("text") }),
1753
+ ),
1754
+ components.RefusalPartSchema$outboundSchema,
1755
+ components.ReasoningPartSchema$outboundSchema,
1756
+ components.RedactedReasoningPartSchema$outboundSchema,
1757
+ ]);
1758
+
1759
+ export function deploymentGetConfigContent2ToJSON(
1760
+ deploymentGetConfigContent2: DeploymentGetConfigContent2,
1761
+ ): string {
1762
+ return JSON.stringify(
1763
+ DeploymentGetConfigContent2$outboundSchema.parse(
1764
+ deploymentGetConfigContent2,
1765
+ ),
1766
+ );
1767
+ }
1768
+
1769
+ /** @internal */
1770
+ export type DeploymentGetConfigPrefixMessagesDeploymentsRequestContent$Outbound =
1771
+ | string
1772
+ | Array<
1773
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
1774
+ | components.RefusalPartSchema$Outbound
1775
+ | components.ReasoningPartSchema$Outbound
1776
+ | components.RedactedReasoningPartSchema$Outbound
1777
+ >;
1778
+
1779
+ /** @internal */
1780
+ export const DeploymentGetConfigPrefixMessagesDeploymentsRequestContent$outboundSchema:
1781
+ z.ZodType<
1782
+ DeploymentGetConfigPrefixMessagesDeploymentsRequestContent$Outbound,
1783
+ z.ZodTypeDef,
1784
+ DeploymentGetConfigPrefixMessagesDeploymentsRequestContent
1785
+ > = z.union([
1786
+ z.string(),
1787
+ z.array(
1788
+ z.union([
1789
+ components.TextContentPartSchema$outboundSchema.and(
1790
+ z.object({ type: z.literal("text") }),
1791
+ ),
1792
+ components.RefusalPartSchema$outboundSchema,
1793
+ components.ReasoningPartSchema$outboundSchema,
1794
+ components.RedactedReasoningPartSchema$outboundSchema,
1795
+ ]),
1796
+ ),
1797
+ ]);
1798
+
1799
+ export function deploymentGetConfigPrefixMessagesDeploymentsRequestContentToJSON(
1800
+ deploymentGetConfigPrefixMessagesDeploymentsRequestContent:
1801
+ DeploymentGetConfigPrefixMessagesDeploymentsRequestContent,
1802
+ ): string {
1803
+ return JSON.stringify(
1804
+ DeploymentGetConfigPrefixMessagesDeploymentsRequestContent$outboundSchema
1805
+ .parse(deploymentGetConfigPrefixMessagesDeploymentsRequestContent),
1806
+ );
1807
+ }
1808
+
1809
+ /** @internal */
1810
+ export type Audio$Outbound = {
1811
+ id: string;
1812
+ };
1813
+
1814
+ /** @internal */
1815
+ export const Audio$outboundSchema: z.ZodType<
1816
+ Audio$Outbound,
1817
+ z.ZodTypeDef,
1818
+ Audio
1819
+ > = z.object({
1820
+ id: z.string(),
1821
+ });
1822
+
1823
+ export function audioToJSON(audio: Audio): string {
1824
+ return JSON.stringify(Audio$outboundSchema.parse(audio));
1825
+ }
1826
+
1827
+ /** @internal */
1828
+ export const PrefixMessagesType$outboundSchema: z.ZodNativeEnum<
1829
+ typeof PrefixMessagesType
1830
+ > = z.nativeEnum(PrefixMessagesType);
1831
+
1832
+ /** @internal */
1833
+ export type PrefixMessagesFunction$Outbound = {
1834
+ name?: string | undefined;
1835
+ arguments?: string | undefined;
1836
+ };
1837
+
1838
+ /** @internal */
1839
+ export const PrefixMessagesFunction$outboundSchema: z.ZodType<
1840
+ PrefixMessagesFunction$Outbound,
1841
+ z.ZodTypeDef,
1842
+ PrefixMessagesFunction
1843
+ > = z.object({
1844
+ name: z.string().optional(),
1845
+ arguments: z.string().optional(),
1846
+ });
1847
+
1848
+ export function prefixMessagesFunctionToJSON(
1849
+ prefixMessagesFunction: PrefixMessagesFunction,
1850
+ ): string {
1851
+ return JSON.stringify(
1852
+ PrefixMessagesFunction$outboundSchema.parse(prefixMessagesFunction),
1853
+ );
1854
+ }
1855
+
1856
+ /** @internal */
1857
+ export type PrefixMessagesToolCalls$Outbound = {
1858
+ id: string;
1859
+ type: string;
1860
+ function: PrefixMessagesFunction$Outbound;
1861
+ thought_signature?: string | undefined;
1862
+ };
1863
+
1864
+ /** @internal */
1865
+ export const PrefixMessagesToolCalls$outboundSchema: z.ZodType<
1866
+ PrefixMessagesToolCalls$Outbound,
1867
+ z.ZodTypeDef,
1868
+ PrefixMessagesToolCalls
1869
+ > = z.object({
1870
+ id: z.string(),
1871
+ type: PrefixMessagesType$outboundSchema,
1872
+ function: z.lazy(() => PrefixMessagesFunction$outboundSchema),
1873
+ thoughtSignature: z.string().optional(),
1874
+ }).transform((v) => {
1875
+ return remap$(v, {
1876
+ thoughtSignature: "thought_signature",
1877
+ });
1878
+ });
1879
+
1880
+ export function prefixMessagesToolCallsToJSON(
1881
+ prefixMessagesToolCalls: PrefixMessagesToolCalls,
1882
+ ): string {
1883
+ return JSON.stringify(
1884
+ PrefixMessagesToolCalls$outboundSchema.parse(prefixMessagesToolCalls),
1885
+ );
1886
+ }
1887
+
1888
+ /** @internal */
1889
+ export type AssistantMessage$Outbound = {
1890
+ content?:
1891
+ | string
1892
+ | Array<
1893
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
1894
+ | components.RefusalPartSchema$Outbound
1895
+ | components.ReasoningPartSchema$Outbound
1896
+ | components.RedactedReasoningPartSchema$Outbound
1897
+ >
1898
+ | null
1899
+ | undefined;
1900
+ refusal?: string | null | undefined;
1901
+ role: "assistant";
1902
+ name?: string | undefined;
1903
+ audio?: Audio$Outbound | null | undefined;
1904
+ tool_calls?: Array<PrefixMessagesToolCalls$Outbound> | undefined;
1905
+ };
1906
+
1907
+ /** @internal */
1908
+ export const AssistantMessage$outboundSchema: z.ZodType<
1909
+ AssistantMessage$Outbound,
1910
+ z.ZodTypeDef,
1911
+ AssistantMessage
1912
+ > = z.object({
1913
+ content: z.nullable(
1914
+ z.union([
1915
+ z.string(),
1916
+ z.array(
1917
+ z.union([
1918
+ components.TextContentPartSchema$outboundSchema.and(
1919
+ z.object({ type: z.literal("text") }),
1920
+ ),
1921
+ components.RefusalPartSchema$outboundSchema,
1922
+ components.ReasoningPartSchema$outboundSchema,
1923
+ components.RedactedReasoningPartSchema$outboundSchema,
1924
+ ]),
1925
+ ),
1926
+ ]),
1927
+ ).optional(),
1928
+ refusal: z.nullable(z.string()).optional(),
1929
+ role: z.literal("assistant"),
1930
+ name: z.string().optional(),
1931
+ audio: z.nullable(z.lazy(() => Audio$outboundSchema)).optional(),
1932
+ toolCalls: z.array(z.lazy(() => PrefixMessagesToolCalls$outboundSchema))
1933
+ .optional(),
1934
+ }).transform((v) => {
1935
+ return remap$(v, {
1936
+ toolCalls: "tool_calls",
1937
+ });
1938
+ });
1939
+
1940
+ export function assistantMessageToJSON(
1941
+ assistantMessage: AssistantMessage,
1942
+ ): string {
1943
+ return JSON.stringify(
1944
+ AssistantMessage$outboundSchema.parse(assistantMessage),
1945
+ );
1946
+ }
1947
+
1948
+ /** @internal */
1949
+ export const DeploymentGetConfig2DeploymentsType$outboundSchema:
1950
+ z.ZodNativeEnum<typeof DeploymentGetConfig2DeploymentsType> = z.nativeEnum(
1951
+ DeploymentGetConfig2DeploymentsType,
1952
+ );
1953
+
1954
+ /** @internal */
1955
+ export const Ttl$outboundSchema: z.ZodNativeEnum<typeof Ttl> = z.nativeEnum(
1956
+ Ttl,
1957
+ );
1958
+
1959
+ /** @internal */
1960
+ export type CacheControl$Outbound = {
1961
+ type: string;
1962
+ ttl: string;
1963
+ };
1964
+
1965
+ /** @internal */
1966
+ export const CacheControl$outboundSchema: z.ZodType<
1967
+ CacheControl$Outbound,
1968
+ z.ZodTypeDef,
1969
+ CacheControl
1970
+ > = z.object({
1971
+ type: DeploymentGetConfig2DeploymentsType$outboundSchema,
1972
+ ttl: Ttl$outboundSchema.default("5m"),
1973
+ });
1974
+
1975
+ export function cacheControlToJSON(cacheControl: CacheControl): string {
1976
+ return JSON.stringify(CacheControl$outboundSchema.parse(cacheControl));
1977
+ }
1978
+
1979
+ /** @internal */
1980
+ export type Four$Outbound = {
1981
+ type: "file";
1982
+ cache_control?: CacheControl$Outbound | undefined;
1983
+ file: components.FileContentPartSchema$Outbound;
1984
+ };
1985
+
1986
+ /** @internal */
1987
+ export const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four> =
1988
+ z.object({
1989
+ type: z.literal("file"),
1990
+ cacheControl: z.lazy(() => CacheControl$outboundSchema).optional(),
1991
+ file: components.FileContentPartSchema$outboundSchema,
1992
+ }).transform((v) => {
1993
+ return remap$(v, {
1994
+ cacheControl: "cache_control",
1995
+ });
1996
+ });
1997
+
1998
+ export function fourToJSON(four: Four): string {
1999
+ return JSON.stringify(Four$outboundSchema.parse(four));
2000
+ }
2001
+
2002
+ /** @internal */
2003
+ export type Content2$Outbound =
2004
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2005
+ | components.ImageContentPartSchema$Outbound
2006
+ | components.AudioContentPartSchema$Outbound
2007
+ | Four$Outbound;
2008
+
2009
+ /** @internal */
2010
+ export const Content2$outboundSchema: z.ZodType<
2011
+ Content2$Outbound,
2012
+ z.ZodTypeDef,
2013
+ Content2
2014
+ > = z.union([
2015
+ components.TextContentPartSchema$outboundSchema.and(
2016
+ z.object({ type: z.literal("text") }),
2017
+ ),
2018
+ components.ImageContentPartSchema$outboundSchema,
2019
+ components.AudioContentPartSchema$outboundSchema,
2020
+ z.lazy(() => Four$outboundSchema),
2021
+ ]);
2022
+
2023
+ export function content2ToJSON(content2: Content2): string {
2024
+ return JSON.stringify(Content2$outboundSchema.parse(content2));
2025
+ }
2026
+
2027
+ /** @internal */
2028
+ export type DeploymentGetConfigPrefixMessagesDeploymentsContent$Outbound =
2029
+ | string
2030
+ | Array<
2031
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2032
+ | components.ImageContentPartSchema$Outbound
2033
+ | components.AudioContentPartSchema$Outbound
2034
+ | Four$Outbound
2035
+ >;
2036
+
2037
+ /** @internal */
2038
+ export const DeploymentGetConfigPrefixMessagesDeploymentsContent$outboundSchema:
2039
+ z.ZodType<
2040
+ DeploymentGetConfigPrefixMessagesDeploymentsContent$Outbound,
2041
+ z.ZodTypeDef,
2042
+ DeploymentGetConfigPrefixMessagesDeploymentsContent
2043
+ > = z.union([
2044
+ z.string(),
2045
+ z.array(
2046
+ z.union([
2047
+ components.TextContentPartSchema$outboundSchema.and(
2048
+ z.object({ type: z.literal("text") }),
2049
+ ),
2050
+ components.ImageContentPartSchema$outboundSchema,
2051
+ components.AudioContentPartSchema$outboundSchema,
2052
+ z.lazy(() => Four$outboundSchema),
2053
+ ]),
2054
+ ),
2055
+ ]);
2056
+
2057
+ export function deploymentGetConfigPrefixMessagesDeploymentsContentToJSON(
2058
+ deploymentGetConfigPrefixMessagesDeploymentsContent:
2059
+ DeploymentGetConfigPrefixMessagesDeploymentsContent,
2060
+ ): string {
2061
+ return JSON.stringify(
2062
+ DeploymentGetConfigPrefixMessagesDeploymentsContent$outboundSchema.parse(
2063
+ deploymentGetConfigPrefixMessagesDeploymentsContent,
2064
+ ),
2065
+ );
2066
+ }
2067
+
2068
+ /** @internal */
2069
+ export type UserMessage$Outbound = {
2070
+ role: "user";
2071
+ name?: string | undefined;
2072
+ content:
2073
+ | string
2074
+ | Array<
2075
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2076
+ | components.ImageContentPartSchema$Outbound
2077
+ | components.AudioContentPartSchema$Outbound
2078
+ | Four$Outbound
2079
+ >;
2080
+ };
2081
+
2082
+ /** @internal */
2083
+ export const UserMessage$outboundSchema: z.ZodType<
2084
+ UserMessage$Outbound,
2085
+ z.ZodTypeDef,
2086
+ UserMessage
2087
+ > = z.object({
2088
+ role: z.literal("user"),
2089
+ name: z.string().optional(),
2090
+ content: z.union([
2091
+ z.string(),
2092
+ z.array(
2093
+ z.union([
2094
+ components.TextContentPartSchema$outboundSchema.and(
2095
+ z.object({ type: z.literal("text") }),
2096
+ ),
2097
+ components.ImageContentPartSchema$outboundSchema,
2098
+ components.AudioContentPartSchema$outboundSchema,
2099
+ z.lazy(() => Four$outboundSchema),
2100
+ ]),
2101
+ ),
2102
+ ]),
2103
+ });
2104
+
2105
+ export function userMessageToJSON(userMessage: UserMessage): string {
2106
+ return JSON.stringify(UserMessage$outboundSchema.parse(userMessage));
2107
+ }
2108
+
2109
+ /** @internal */
2110
+ export type DeploymentGetConfigPrefixMessagesContent$Outbound =
2111
+ | string
2112
+ | Array<components.TextContentPartSchema$Outbound>;
2113
+
2114
+ /** @internal */
2115
+ export const DeploymentGetConfigPrefixMessagesContent$outboundSchema: z.ZodType<
2116
+ DeploymentGetConfigPrefixMessagesContent$Outbound,
2117
+ z.ZodTypeDef,
2118
+ DeploymentGetConfigPrefixMessagesContent
2119
+ > = z.union([
2120
+ z.string(),
2121
+ z.array(components.TextContentPartSchema$outboundSchema),
2122
+ ]);
2123
+
2124
+ export function deploymentGetConfigPrefixMessagesContentToJSON(
2125
+ deploymentGetConfigPrefixMessagesContent:
2126
+ DeploymentGetConfigPrefixMessagesContent,
2127
+ ): string {
2128
+ return JSON.stringify(
2129
+ DeploymentGetConfigPrefixMessagesContent$outboundSchema.parse(
2130
+ deploymentGetConfigPrefixMessagesContent,
2131
+ ),
2132
+ );
2133
+ }
2134
+
2135
+ /** @internal */
2136
+ export type DeveloperMessage$Outbound = {
2137
+ role: "developer";
2138
+ content: string | Array<components.TextContentPartSchema$Outbound>;
2139
+ name?: string | undefined;
2140
+ };
2141
+
2142
+ /** @internal */
2143
+ export const DeveloperMessage$outboundSchema: z.ZodType<
2144
+ DeveloperMessage$Outbound,
2145
+ z.ZodTypeDef,
2146
+ DeveloperMessage
2147
+ > = z.object({
2148
+ role: z.literal("developer"),
2149
+ content: z.union([
2150
+ z.string(),
2151
+ z.array(components.TextContentPartSchema$outboundSchema),
2152
+ ]),
2153
+ name: z.string().optional(),
2154
+ });
2155
+
2156
+ export function developerMessageToJSON(
2157
+ developerMessage: DeveloperMessage,
2158
+ ): string {
2159
+ return JSON.stringify(
2160
+ DeveloperMessage$outboundSchema.parse(developerMessage),
2161
+ );
2162
+ }
2163
+
2164
+ /** @internal */
2165
+ export type PrefixMessagesContent$Outbound =
2166
+ | string
2167
+ | Array<components.TextContentPartSchema$Outbound>;
2168
+
2169
+ /** @internal */
2170
+ export const PrefixMessagesContent$outboundSchema: z.ZodType<
2171
+ PrefixMessagesContent$Outbound,
2172
+ z.ZodTypeDef,
2173
+ PrefixMessagesContent
2174
+ > = z.union([
2175
+ z.string(),
2176
+ z.array(components.TextContentPartSchema$outboundSchema),
2177
+ ]);
2178
+
2179
+ export function prefixMessagesContentToJSON(
2180
+ prefixMessagesContent: PrefixMessagesContent,
2181
+ ): string {
2182
+ return JSON.stringify(
2183
+ PrefixMessagesContent$outboundSchema.parse(prefixMessagesContent),
2184
+ );
2185
+ }
2186
+
2187
+ /** @internal */
2188
+ export type SystemMessage$Outbound = {
2189
+ role: "system";
2190
+ content: string | Array<components.TextContentPartSchema$Outbound>;
2191
+ name?: string | undefined;
2192
+ };
2193
+
2194
+ /** @internal */
2195
+ export const SystemMessage$outboundSchema: z.ZodType<
2196
+ SystemMessage$Outbound,
2197
+ z.ZodTypeDef,
2198
+ SystemMessage
2199
+ > = z.object({
2200
+ role: z.literal("system"),
2201
+ content: z.union([
2202
+ z.string(),
2203
+ z.array(components.TextContentPartSchema$outboundSchema),
2204
+ ]),
2205
+ name: z.string().optional(),
2206
+ });
2207
+
2208
+ export function systemMessageToJSON(systemMessage: SystemMessage): string {
2209
+ return JSON.stringify(SystemMessage$outboundSchema.parse(systemMessage));
2210
+ }
2211
+
2212
+ /** @internal */
2213
+ export type PrefixMessages$Outbound =
2214
+ | SystemMessage$Outbound
2215
+ | DeveloperMessage$Outbound
2216
+ | UserMessage$Outbound
2217
+ | AssistantMessage$Outbound
2218
+ | ToolMessage$Outbound;
2219
+
2220
+ /** @internal */
2221
+ export const PrefixMessages$outboundSchema: z.ZodType<
2222
+ PrefixMessages$Outbound,
2223
+ z.ZodTypeDef,
2224
+ PrefixMessages
2225
+ > = z.union([
2226
+ z.lazy(() => SystemMessage$outboundSchema),
2227
+ z.lazy(() => DeveloperMessage$outboundSchema),
2228
+ z.lazy(() => UserMessage$outboundSchema),
2229
+ z.lazy(() => AssistantMessage$outboundSchema),
2230
+ z.lazy(() => ToolMessage$outboundSchema),
2231
+ ]);
2232
+
2233
+ export function prefixMessagesToJSON(prefixMessages: PrefixMessages): string {
2234
+ return JSON.stringify(PrefixMessages$outboundSchema.parse(prefixMessages));
2235
+ }
2236
+
2237
+ /** @internal */
2238
+ export type DeploymentGetConfigContentDeploymentsRequestRequestBodyMessages2$Outbound =
2239
+ components.TextContentPartSchema$Outbound;
2240
+
2241
+ /** @internal */
2242
+ export const DeploymentGetConfigContentDeploymentsRequestRequestBodyMessages2$outboundSchema:
2243
+ z.ZodType<
2244
+ DeploymentGetConfigContentDeploymentsRequestRequestBodyMessages2$Outbound,
2245
+ z.ZodTypeDef,
2246
+ DeploymentGetConfigContentDeploymentsRequestRequestBodyMessages2
2247
+ > = components.TextContentPartSchema$outboundSchema;
2248
+
2249
+ export function deploymentGetConfigContentDeploymentsRequestRequestBodyMessages2ToJSON(
2250
+ deploymentGetConfigContentDeploymentsRequestRequestBodyMessages2:
2251
+ DeploymentGetConfigContentDeploymentsRequestRequestBodyMessages2,
2252
+ ): string {
2253
+ return JSON.stringify(
2254
+ DeploymentGetConfigContentDeploymentsRequestRequestBodyMessages2$outboundSchema
2255
+ .parse(deploymentGetConfigContentDeploymentsRequestRequestBodyMessages2),
2256
+ );
2257
+ }
2258
+
2259
+ /** @internal */
2260
+ export type DeploymentGetConfigMessagesDeploymentsRequestRequestBodyContent$Outbound =
2261
+ | string
2262
+ | Array<components.TextContentPartSchema$Outbound>;
2263
+
2264
+ /** @internal */
2265
+ export const DeploymentGetConfigMessagesDeploymentsRequestRequestBodyContent$outboundSchema:
2266
+ z.ZodType<
2267
+ DeploymentGetConfigMessagesDeploymentsRequestRequestBodyContent$Outbound,
2268
+ z.ZodTypeDef,
2269
+ DeploymentGetConfigMessagesDeploymentsRequestRequestBodyContent
2270
+ > = z.union([
2271
+ z.string(),
2272
+ z.array(components.TextContentPartSchema$outboundSchema),
2273
+ ]);
2274
+
2275
+ export function deploymentGetConfigMessagesDeploymentsRequestRequestBodyContentToJSON(
2276
+ deploymentGetConfigMessagesDeploymentsRequestRequestBodyContent:
2277
+ DeploymentGetConfigMessagesDeploymentsRequestRequestBodyContent,
2278
+ ): string {
2279
+ return JSON.stringify(
2280
+ DeploymentGetConfigMessagesDeploymentsRequestRequestBodyContent$outboundSchema
2281
+ .parse(deploymentGetConfigMessagesDeploymentsRequestRequestBodyContent),
2282
+ );
2283
+ }
2284
+
2285
+ /** @internal */
2286
+ export const DeploymentGetConfigMessagesType$outboundSchema: z.ZodNativeEnum<
2287
+ typeof DeploymentGetConfigMessagesType
2288
+ > = z.nativeEnum(DeploymentGetConfigMessagesType);
2289
+
2290
+ /** @internal */
2291
+ export const MessagesTtl$outboundSchema: z.ZodNativeEnum<typeof MessagesTtl> = z
2292
+ .nativeEnum(MessagesTtl);
2293
+
2294
+ /** @internal */
2295
+ export type MessagesCacheControl$Outbound = {
2296
+ type: string;
2297
+ ttl: string;
2298
+ };
2299
+
2300
+ /** @internal */
2301
+ export const MessagesCacheControl$outboundSchema: z.ZodType<
2302
+ MessagesCacheControl$Outbound,
2303
+ z.ZodTypeDef,
2304
+ MessagesCacheControl
2305
+ > = z.object({
2306
+ type: DeploymentGetConfigMessagesType$outboundSchema,
2307
+ ttl: MessagesTtl$outboundSchema.default("5m"),
2308
+ });
2309
+
2310
+ export function messagesCacheControlToJSON(
2311
+ messagesCacheControl: MessagesCacheControl,
2312
+ ): string {
2313
+ return JSON.stringify(
2314
+ MessagesCacheControl$outboundSchema.parse(messagesCacheControl),
2315
+ );
2316
+ }
2317
+
2318
+ /** @internal */
2319
+ export type MessagesToolMessage$Outbound = {
2320
+ role: "tool";
2321
+ content: string | Array<components.TextContentPartSchema$Outbound>;
2322
+ tool_call_id: string | null;
2323
+ cache_control?: MessagesCacheControl$Outbound | undefined;
2324
+ };
2325
+
2326
+ /** @internal */
2327
+ export const MessagesToolMessage$outboundSchema: z.ZodType<
2328
+ MessagesToolMessage$Outbound,
2329
+ z.ZodTypeDef,
2330
+ MessagesToolMessage
2331
+ > = z.object({
2332
+ role: z.literal("tool"),
2333
+ content: z.union([
2334
+ z.string(),
2335
+ z.array(components.TextContentPartSchema$outboundSchema),
2336
+ ]),
2337
+ toolCallId: z.nullable(z.string()),
2338
+ cacheControl: z.lazy(() => MessagesCacheControl$outboundSchema).optional(),
2339
+ }).transform((v) => {
2340
+ return remap$(v, {
2341
+ toolCallId: "tool_call_id",
2342
+ cacheControl: "cache_control",
2343
+ });
2344
+ });
2345
+
2346
+ export function messagesToolMessageToJSON(
2347
+ messagesToolMessage: MessagesToolMessage,
2348
+ ): string {
2349
+ return JSON.stringify(
2350
+ MessagesToolMessage$outboundSchema.parse(messagesToolMessage),
2351
+ );
2352
+ }
2353
+
2354
+ /** @internal */
2355
+ export type DeploymentGetConfigContentDeploymentsRequestRequestBody2$Outbound =
2356
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2357
+ | components.RefusalPartSchema$Outbound
2358
+ | components.ReasoningPartSchema$Outbound
2359
+ | components.RedactedReasoningPartSchema$Outbound;
2360
+
2361
+ /** @internal */
2362
+ export const DeploymentGetConfigContentDeploymentsRequestRequestBody2$outboundSchema:
2363
+ z.ZodType<
2364
+ DeploymentGetConfigContentDeploymentsRequestRequestBody2$Outbound,
2365
+ z.ZodTypeDef,
2366
+ DeploymentGetConfigContentDeploymentsRequestRequestBody2
2367
+ > = z.union([
2368
+ components.TextContentPartSchema$outboundSchema.and(
2369
+ z.object({ type: z.literal("text") }),
2370
+ ),
2371
+ components.RefusalPartSchema$outboundSchema,
2372
+ components.ReasoningPartSchema$outboundSchema,
2373
+ components.RedactedReasoningPartSchema$outboundSchema,
2374
+ ]);
2375
+
2376
+ export function deploymentGetConfigContentDeploymentsRequestRequestBody2ToJSON(
2377
+ deploymentGetConfigContentDeploymentsRequestRequestBody2:
2378
+ DeploymentGetConfigContentDeploymentsRequestRequestBody2,
2379
+ ): string {
2380
+ return JSON.stringify(
2381
+ DeploymentGetConfigContentDeploymentsRequestRequestBody2$outboundSchema
2382
+ .parse(deploymentGetConfigContentDeploymentsRequestRequestBody2),
2383
+ );
2384
+ }
2385
+
2386
+ /** @internal */
2387
+ export type DeploymentGetConfigMessagesDeploymentsRequestContent$Outbound =
2388
+ | string
2389
+ | Array<
2390
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2391
+ | components.RefusalPartSchema$Outbound
2392
+ | components.ReasoningPartSchema$Outbound
2393
+ | components.RedactedReasoningPartSchema$Outbound
2394
+ >;
2395
+
2396
+ /** @internal */
2397
+ export const DeploymentGetConfigMessagesDeploymentsRequestContent$outboundSchema:
2398
+ z.ZodType<
2399
+ DeploymentGetConfigMessagesDeploymentsRequestContent$Outbound,
2400
+ z.ZodTypeDef,
2401
+ DeploymentGetConfigMessagesDeploymentsRequestContent
2402
+ > = z.union([
2403
+ z.string(),
2404
+ z.array(
2405
+ z.union([
2406
+ components.TextContentPartSchema$outboundSchema.and(
2407
+ z.object({ type: z.literal("text") }),
2408
+ ),
2409
+ components.RefusalPartSchema$outboundSchema,
2410
+ components.ReasoningPartSchema$outboundSchema,
2411
+ components.RedactedReasoningPartSchema$outboundSchema,
2412
+ ]),
2413
+ ),
2414
+ ]);
2415
+
2416
+ export function deploymentGetConfigMessagesDeploymentsRequestContentToJSON(
2417
+ deploymentGetConfigMessagesDeploymentsRequestContent:
2418
+ DeploymentGetConfigMessagesDeploymentsRequestContent,
2419
+ ): string {
2420
+ return JSON.stringify(
2421
+ DeploymentGetConfigMessagesDeploymentsRequestContent$outboundSchema.parse(
2422
+ deploymentGetConfigMessagesDeploymentsRequestContent,
2423
+ ),
2424
+ );
2425
+ }
2426
+
2427
+ /** @internal */
2428
+ export type MessagesAudio$Outbound = {
2429
+ id: string;
2430
+ };
2431
+
2432
+ /** @internal */
2433
+ export const MessagesAudio$outboundSchema: z.ZodType<
2434
+ MessagesAudio$Outbound,
2435
+ z.ZodTypeDef,
2436
+ MessagesAudio
2437
+ > = z.object({
2438
+ id: z.string(),
2439
+ });
2440
+
2441
+ export function messagesAudioToJSON(messagesAudio: MessagesAudio): string {
2442
+ return JSON.stringify(MessagesAudio$outboundSchema.parse(messagesAudio));
2443
+ }
2444
+
2445
+ /** @internal */
2446
+ export const MessagesType$outboundSchema: z.ZodNativeEnum<typeof MessagesType> =
2447
+ z.nativeEnum(MessagesType);
2448
+
2449
+ /** @internal */
2450
+ export type MessagesFunction$Outbound = {
2451
+ name?: string | undefined;
2452
+ arguments?: string | undefined;
2453
+ };
2454
+
2455
+ /** @internal */
2456
+ export const MessagesFunction$outboundSchema: z.ZodType<
2457
+ MessagesFunction$Outbound,
2458
+ z.ZodTypeDef,
2459
+ MessagesFunction
2460
+ > = z.object({
2461
+ name: z.string().optional(),
2462
+ arguments: z.string().optional(),
2463
+ });
2464
+
2465
+ export function messagesFunctionToJSON(
2466
+ messagesFunction: MessagesFunction,
2467
+ ): string {
2468
+ return JSON.stringify(
2469
+ MessagesFunction$outboundSchema.parse(messagesFunction),
2470
+ );
2471
+ }
2472
+
2473
+ /** @internal */
2474
+ export type MessagesToolCalls$Outbound = {
2475
+ id: string;
2476
+ type: string;
2477
+ function: MessagesFunction$Outbound;
2478
+ thought_signature?: string | undefined;
2479
+ };
2480
+
2481
+ /** @internal */
2482
+ export const MessagesToolCalls$outboundSchema: z.ZodType<
2483
+ MessagesToolCalls$Outbound,
2484
+ z.ZodTypeDef,
2485
+ MessagesToolCalls
2486
+ > = z.object({
2487
+ id: z.string(),
2488
+ type: MessagesType$outboundSchema,
2489
+ function: z.lazy(() => MessagesFunction$outboundSchema),
2490
+ thoughtSignature: z.string().optional(),
2491
+ }).transform((v) => {
2492
+ return remap$(v, {
2493
+ thoughtSignature: "thought_signature",
2494
+ });
2495
+ });
2496
+
2497
+ export function messagesToolCallsToJSON(
2498
+ messagesToolCalls: MessagesToolCalls,
2499
+ ): string {
2500
+ return JSON.stringify(
2501
+ MessagesToolCalls$outboundSchema.parse(messagesToolCalls),
2502
+ );
2503
+ }
2504
+
2505
+ /** @internal */
2506
+ export type MessagesAssistantMessage$Outbound = {
2507
+ content?:
2508
+ | string
2509
+ | Array<
2510
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2511
+ | components.RefusalPartSchema$Outbound
2512
+ | components.ReasoningPartSchema$Outbound
2513
+ | components.RedactedReasoningPartSchema$Outbound
2514
+ >
2515
+ | null
2516
+ | undefined;
2517
+ refusal?: string | null | undefined;
2518
+ role: "assistant";
2519
+ name?: string | undefined;
2520
+ audio?: MessagesAudio$Outbound | null | undefined;
2521
+ tool_calls?: Array<MessagesToolCalls$Outbound> | undefined;
2522
+ };
2523
+
2524
+ /** @internal */
2525
+ export const MessagesAssistantMessage$outboundSchema: z.ZodType<
2526
+ MessagesAssistantMessage$Outbound,
2527
+ z.ZodTypeDef,
2528
+ MessagesAssistantMessage
2529
+ > = z.object({
2530
+ content: z.nullable(
2531
+ z.union([
2532
+ z.string(),
2533
+ z.array(
2534
+ z.union([
2535
+ components.TextContentPartSchema$outboundSchema.and(
2536
+ z.object({ type: z.literal("text") }),
2537
+ ),
2538
+ components.RefusalPartSchema$outboundSchema,
2539
+ components.ReasoningPartSchema$outboundSchema,
2540
+ components.RedactedReasoningPartSchema$outboundSchema,
2541
+ ]),
2542
+ ),
2543
+ ]),
2544
+ ).optional(),
2545
+ refusal: z.nullable(z.string()).optional(),
2546
+ role: z.literal("assistant"),
2547
+ name: z.string().optional(),
2548
+ audio: z.nullable(z.lazy(() => MessagesAudio$outboundSchema)).optional(),
2549
+ toolCalls: z.array(z.lazy(() => MessagesToolCalls$outboundSchema)).optional(),
2550
+ }).transform((v) => {
2551
+ return remap$(v, {
2552
+ toolCalls: "tool_calls",
2553
+ });
2554
+ });
2555
+
2556
+ export function messagesAssistantMessageToJSON(
2557
+ messagesAssistantMessage: MessagesAssistantMessage,
2558
+ ): string {
2559
+ return JSON.stringify(
2560
+ MessagesAssistantMessage$outboundSchema.parse(messagesAssistantMessage),
2561
+ );
2562
+ }
2563
+
2564
+ /** @internal */
2565
+ export const DeploymentGetConfig2DeploymentsRequestRequestBodyType$outboundSchema:
2566
+ z.ZodNativeEnum<
2567
+ typeof DeploymentGetConfig2DeploymentsRequestRequestBodyType
2568
+ > = z.nativeEnum(DeploymentGetConfig2DeploymentsRequestRequestBodyType);
2569
+
2570
+ /** @internal */
2571
+ export const TwoTtl$outboundSchema: z.ZodNativeEnum<typeof TwoTtl> = z
2572
+ .nativeEnum(TwoTtl);
2573
+
2574
+ /** @internal */
2575
+ export type TwoCacheControl$Outbound = {
2576
+ type: string;
2577
+ ttl: string;
2578
+ };
2579
+
2580
+ /** @internal */
2581
+ export const TwoCacheControl$outboundSchema: z.ZodType<
2582
+ TwoCacheControl$Outbound,
2583
+ z.ZodTypeDef,
2584
+ TwoCacheControl
2585
+ > = z.object({
2586
+ type: DeploymentGetConfig2DeploymentsRequestRequestBodyType$outboundSchema,
2587
+ ttl: TwoTtl$outboundSchema.default("5m"),
2588
+ });
2589
+
2590
+ export function twoCacheControlToJSON(
2591
+ twoCacheControl: TwoCacheControl,
2592
+ ): string {
2593
+ return JSON.stringify(TwoCacheControl$outboundSchema.parse(twoCacheControl));
2594
+ }
2595
+
2596
+ /** @internal */
2597
+ export type Two4$Outbound = {
2598
+ type: "file";
2599
+ cache_control?: TwoCacheControl$Outbound | undefined;
2600
+ file: components.FileContentPartSchema$Outbound;
2601
+ };
2602
+
2603
+ /** @internal */
2604
+ export const Two4$outboundSchema: z.ZodType<Two4$Outbound, z.ZodTypeDef, Two4> =
2605
+ z.object({
2606
+ type: z.literal("file"),
2607
+ cacheControl: z.lazy(() => TwoCacheControl$outboundSchema).optional(),
2608
+ file: components.FileContentPartSchema$outboundSchema,
2609
+ }).transform((v) => {
2610
+ return remap$(v, {
2611
+ cacheControl: "cache_control",
2612
+ });
2613
+ });
2614
+
2615
+ export function two4ToJSON(two4: Two4): string {
2616
+ return JSON.stringify(Two4$outboundSchema.parse(two4));
2617
+ }
2618
+
2619
+ /** @internal */
2620
+ export type DeploymentGetConfigContentDeploymentsRequest2$Outbound =
2621
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2622
+ | components.ImageContentPartSchema$Outbound
2623
+ | components.AudioContentPartSchema$Outbound
2624
+ | Two4$Outbound;
2625
+
2626
+ /** @internal */
2627
+ export const DeploymentGetConfigContentDeploymentsRequest2$outboundSchema:
2628
+ z.ZodType<
2629
+ DeploymentGetConfigContentDeploymentsRequest2$Outbound,
2630
+ z.ZodTypeDef,
2631
+ DeploymentGetConfigContentDeploymentsRequest2
2632
+ > = z.union([
2633
+ components.TextContentPartSchema$outboundSchema.and(
2634
+ z.object({ type: z.literal("text") }),
2635
+ ),
2636
+ components.ImageContentPartSchema$outboundSchema,
2637
+ components.AudioContentPartSchema$outboundSchema,
2638
+ z.lazy(() => Two4$outboundSchema),
2639
+ ]);
2640
+
2641
+ export function deploymentGetConfigContentDeploymentsRequest2ToJSON(
2642
+ deploymentGetConfigContentDeploymentsRequest2:
2643
+ DeploymentGetConfigContentDeploymentsRequest2,
2644
+ ): string {
2645
+ return JSON.stringify(
2646
+ DeploymentGetConfigContentDeploymentsRequest2$outboundSchema.parse(
2647
+ deploymentGetConfigContentDeploymentsRequest2,
2648
+ ),
2649
+ );
2650
+ }
2651
+
2652
+ /** @internal */
2653
+ export type DeploymentGetConfigMessagesDeploymentsContent$Outbound =
2654
+ | string
2655
+ | Array<
2656
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2657
+ | components.ImageContentPartSchema$Outbound
2658
+ | components.AudioContentPartSchema$Outbound
2659
+ | Two4$Outbound
2660
+ >;
2661
+
2662
+ /** @internal */
2663
+ export const DeploymentGetConfigMessagesDeploymentsContent$outboundSchema:
2664
+ z.ZodType<
2665
+ DeploymentGetConfigMessagesDeploymentsContent$Outbound,
2666
+ z.ZodTypeDef,
2667
+ DeploymentGetConfigMessagesDeploymentsContent
2668
+ > = z.union([
2669
+ z.string(),
2670
+ z.array(
2671
+ z.union([
2672
+ components.TextContentPartSchema$outboundSchema.and(
2673
+ z.object({ type: z.literal("text") }),
2674
+ ),
2675
+ components.ImageContentPartSchema$outboundSchema,
2676
+ components.AudioContentPartSchema$outboundSchema,
2677
+ z.lazy(() => Two4$outboundSchema),
2678
+ ]),
2679
+ ),
2680
+ ]);
2681
+
2682
+ export function deploymentGetConfigMessagesDeploymentsContentToJSON(
2683
+ deploymentGetConfigMessagesDeploymentsContent:
2684
+ DeploymentGetConfigMessagesDeploymentsContent,
2685
+ ): string {
2686
+ return JSON.stringify(
2687
+ DeploymentGetConfigMessagesDeploymentsContent$outboundSchema.parse(
2688
+ deploymentGetConfigMessagesDeploymentsContent,
2689
+ ),
2690
+ );
2691
+ }
2692
+
2693
+ /** @internal */
2694
+ export type MessagesUserMessage$Outbound = {
2695
+ role: "user";
2696
+ name?: string | undefined;
2697
+ content:
2698
+ | string
2699
+ | Array<
2700
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
2701
+ | components.ImageContentPartSchema$Outbound
2702
+ | components.AudioContentPartSchema$Outbound
2703
+ | Two4$Outbound
2704
+ >;
2705
+ };
2706
+
2707
+ /** @internal */
2708
+ export const MessagesUserMessage$outboundSchema: z.ZodType<
2709
+ MessagesUserMessage$Outbound,
2710
+ z.ZodTypeDef,
2711
+ MessagesUserMessage
2712
+ > = z.object({
2713
+ role: z.literal("user"),
2714
+ name: z.string().optional(),
2715
+ content: z.union([
2716
+ z.string(),
2717
+ z.array(
2718
+ z.union([
2719
+ components.TextContentPartSchema$outboundSchema.and(
2720
+ z.object({ type: z.literal("text") }),
2721
+ ),
2722
+ components.ImageContentPartSchema$outboundSchema,
2723
+ components.AudioContentPartSchema$outboundSchema,
2724
+ z.lazy(() => Two4$outboundSchema),
2725
+ ]),
2726
+ ),
2727
+ ]),
2728
+ });
2729
+
2730
+ export function messagesUserMessageToJSON(
2731
+ messagesUserMessage: MessagesUserMessage,
2732
+ ): string {
2733
+ return JSON.stringify(
2734
+ MessagesUserMessage$outboundSchema.parse(messagesUserMessage),
2735
+ );
2736
+ }
2737
+
2738
+ /** @internal */
2739
+ export type DeploymentGetConfigMessagesContent$Outbound =
2740
+ | string
2741
+ | Array<components.TextContentPartSchema$Outbound>;
2742
+
2743
+ /** @internal */
2744
+ export const DeploymentGetConfigMessagesContent$outboundSchema: z.ZodType<
2745
+ DeploymentGetConfigMessagesContent$Outbound,
2746
+ z.ZodTypeDef,
2747
+ DeploymentGetConfigMessagesContent
2748
+ > = z.union([
2749
+ z.string(),
2750
+ z.array(components.TextContentPartSchema$outboundSchema),
2751
+ ]);
2752
+
2753
+ export function deploymentGetConfigMessagesContentToJSON(
2754
+ deploymentGetConfigMessagesContent: DeploymentGetConfigMessagesContent,
2755
+ ): string {
2756
+ return JSON.stringify(
2757
+ DeploymentGetConfigMessagesContent$outboundSchema.parse(
2758
+ deploymentGetConfigMessagesContent,
2759
+ ),
2760
+ );
2761
+ }
2762
+
2763
+ /** @internal */
2764
+ export type MessagesDeveloperMessage$Outbound = {
2765
+ role: "developer";
2766
+ content: string | Array<components.TextContentPartSchema$Outbound>;
2767
+ name?: string | undefined;
2768
+ };
2769
+
2770
+ /** @internal */
2771
+ export const MessagesDeveloperMessage$outboundSchema: z.ZodType<
2772
+ MessagesDeveloperMessage$Outbound,
2773
+ z.ZodTypeDef,
2774
+ MessagesDeveloperMessage
2775
+ > = z.object({
2776
+ role: z.literal("developer"),
2777
+ content: z.union([
2778
+ z.string(),
2779
+ z.array(components.TextContentPartSchema$outboundSchema),
2780
+ ]),
2781
+ name: z.string().optional(),
2782
+ });
2783
+
2784
+ export function messagesDeveloperMessageToJSON(
2785
+ messagesDeveloperMessage: MessagesDeveloperMessage,
2786
+ ): string {
2787
+ return JSON.stringify(
2788
+ MessagesDeveloperMessage$outboundSchema.parse(messagesDeveloperMessage),
2789
+ );
2790
+ }
2791
+
2792
+ /** @internal */
2793
+ export type MessagesContent$Outbound =
2794
+ | string
2795
+ | Array<components.TextContentPartSchema$Outbound>;
2796
+
2797
+ /** @internal */
2798
+ export const MessagesContent$outboundSchema: z.ZodType<
2799
+ MessagesContent$Outbound,
2800
+ z.ZodTypeDef,
2801
+ MessagesContent
2802
+ > = z.union([
2803
+ z.string(),
2804
+ z.array(components.TextContentPartSchema$outboundSchema),
2805
+ ]);
2806
+
2807
+ export function messagesContentToJSON(
2808
+ messagesContent: MessagesContent,
2809
+ ): string {
2810
+ return JSON.stringify(MessagesContent$outboundSchema.parse(messagesContent));
2811
+ }
2812
+
2813
+ /** @internal */
2814
+ export type MessagesSystemMessage$Outbound = {
2815
+ role: "system";
2816
+ content: string | Array<components.TextContentPartSchema$Outbound>;
2817
+ name?: string | undefined;
2818
+ };
2819
+
2820
+ /** @internal */
2821
+ export const MessagesSystemMessage$outboundSchema: z.ZodType<
2822
+ MessagesSystemMessage$Outbound,
2823
+ z.ZodTypeDef,
2824
+ MessagesSystemMessage
2825
+ > = z.object({
2826
+ role: z.literal("system"),
2827
+ content: z.union([
2828
+ z.string(),
2829
+ z.array(components.TextContentPartSchema$outboundSchema),
2830
+ ]),
2831
+ name: z.string().optional(),
2832
+ });
2833
+
2834
+ export function messagesSystemMessageToJSON(
2835
+ messagesSystemMessage: MessagesSystemMessage,
2836
+ ): string {
2837
+ return JSON.stringify(
2838
+ MessagesSystemMessage$outboundSchema.parse(messagesSystemMessage),
2839
+ );
2840
+ }
2841
+
2842
+ /** @internal */
2843
+ export type DeploymentGetConfigMessages$Outbound =
2844
+ | MessagesSystemMessage$Outbound
2845
+ | MessagesDeveloperMessage$Outbound
2846
+ | MessagesUserMessage$Outbound
2847
+ | MessagesAssistantMessage$Outbound
2848
+ | MessagesToolMessage$Outbound;
2849
+
2850
+ /** @internal */
2851
+ export const DeploymentGetConfigMessages$outboundSchema: z.ZodType<
2852
+ DeploymentGetConfigMessages$Outbound,
2853
+ z.ZodTypeDef,
2854
+ DeploymentGetConfigMessages
2855
+ > = z.union([
2856
+ z.lazy(() => MessagesSystemMessage$outboundSchema),
2857
+ z.lazy(() => MessagesDeveloperMessage$outboundSchema),
2858
+ z.lazy(() => MessagesUserMessage$outboundSchema),
2859
+ z.lazy(() => MessagesAssistantMessage$outboundSchema),
2860
+ z.lazy(() => MessagesToolMessage$outboundSchema),
2861
+ ]);
2862
+
2863
+ export function deploymentGetConfigMessagesToJSON(
2864
+ deploymentGetConfigMessages: DeploymentGetConfigMessages,
2865
+ ): string {
2866
+ return JSON.stringify(
2867
+ DeploymentGetConfigMessages$outboundSchema.parse(
2868
+ deploymentGetConfigMessages,
2869
+ ),
2870
+ );
2871
+ }
2872
+
2873
+ /** @internal */
2874
+ export type Metadata$Outbound = {
2875
+ file_name?: string | undefined;
2876
+ file_type?: string | undefined;
2877
+ page_number?: number | undefined;
2878
+ };
2879
+
2880
+ /** @internal */
2881
+ export const Metadata$outboundSchema: z.ZodType<
2882
+ Metadata$Outbound,
2883
+ z.ZodTypeDef,
2884
+ Metadata
2885
+ > = z.object({
2886
+ fileName: z.string().optional(),
2887
+ fileType: z.string().optional(),
2888
+ pageNumber: z.number().optional(),
2889
+ }).transform((v) => {
2890
+ return remap$(v, {
2891
+ fileName: "file_name",
2892
+ fileType: "file_type",
2893
+ pageNumber: "page_number",
2894
+ });
2895
+ });
2896
+
2897
+ export function metadataToJSON(metadata: Metadata): string {
2898
+ return JSON.stringify(Metadata$outboundSchema.parse(metadata));
2899
+ }
2900
+
2901
+ /** @internal */
2902
+ export type Documents$Outbound = {
2903
+ text: string;
2904
+ metadata?: Metadata$Outbound | undefined;
2905
+ };
2906
+
2907
+ /** @internal */
2908
+ export const Documents$outboundSchema: z.ZodType<
2909
+ Documents$Outbound,
2910
+ z.ZodTypeDef,
2911
+ Documents
2912
+ > = z.object({
2913
+ text: z.string(),
2914
+ metadata: z.lazy(() => Metadata$outboundSchema).optional(),
2915
+ });
2916
+
2917
+ export function documentsToJSON(documents: Documents): string {
2918
+ return JSON.stringify(Documents$outboundSchema.parse(documents));
2919
+ }
2920
+
2921
+ /** @internal */
2922
+ export type InvokeOptions$Outbound = {
2923
+ include_retrievals: boolean;
2924
+ include_usage: boolean;
2925
+ mock_response?: string | undefined;
2926
+ };
2927
+
2928
+ /** @internal */
2929
+ export const InvokeOptions$outboundSchema: z.ZodType<
2930
+ InvokeOptions$Outbound,
2931
+ z.ZodTypeDef,
2932
+ InvokeOptions
2933
+ > = z.object({
2934
+ includeRetrievals: z.boolean().default(false),
2935
+ includeUsage: z.boolean().default(false),
2936
+ mockResponse: z.string().optional(),
2937
+ }).transform((v) => {
2938
+ return remap$(v, {
2939
+ includeRetrievals: "include_retrievals",
2940
+ includeUsage: "include_usage",
2941
+ mockResponse: "mock_response",
2942
+ });
2943
+ });
2944
+
2945
+ export function invokeOptionsToJSON(invokeOptions: InvokeOptions): string {
2946
+ return JSON.stringify(InvokeOptions$outboundSchema.parse(invokeOptions));
2947
+ }
2948
+
2949
+ /** @internal */
2950
+ export type Thread$Outbound = {
2951
+ id: string;
2952
+ tags?: Array<string> | undefined;
2953
+ };
2954
+
2955
+ /** @internal */
2956
+ export const Thread$outboundSchema: z.ZodType<
2957
+ Thread$Outbound,
2958
+ z.ZodTypeDef,
2959
+ Thread
2960
+ > = z.object({
2961
+ id: z.string(),
2962
+ tags: z.array(z.string()).optional(),
2963
+ });
2964
+
2965
+ export function threadToJSON(thread: Thread): string {
2966
+ return JSON.stringify(Thread$outboundSchema.parse(thread));
2967
+ }
2968
+
2969
+ /** @internal */
2970
+ export type OrExists$Outbound = {
2971
+ exists: boolean;
2972
+ };
2973
+
2974
+ /** @internal */
2975
+ export const OrExists$outboundSchema: z.ZodType<
2976
+ OrExists$Outbound,
2977
+ z.ZodTypeDef,
2978
+ OrExists
2979
+ > = z.object({
2980
+ exists: z.boolean(),
2981
+ });
2982
+
2983
+ export function orExistsToJSON(orExists: OrExists): string {
2984
+ return JSON.stringify(OrExists$outboundSchema.parse(orExists));
2985
+ }
2986
+
2987
+ /** @internal */
2988
+ export type DeploymentGetConfigOrNin$Outbound = string | number | boolean;
2989
+
2990
+ /** @internal */
2991
+ export const DeploymentGetConfigOrNin$outboundSchema: z.ZodType<
2992
+ DeploymentGetConfigOrNin$Outbound,
2993
+ z.ZodTypeDef,
2994
+ DeploymentGetConfigOrNin
2995
+ > = z.union([z.string(), z.number(), z.boolean()]);
2996
+
2997
+ export function deploymentGetConfigOrNinToJSON(
2998
+ deploymentGetConfigOrNin: DeploymentGetConfigOrNin,
2999
+ ): string {
3000
+ return JSON.stringify(
3001
+ DeploymentGetConfigOrNin$outboundSchema.parse(deploymentGetConfigOrNin),
3002
+ );
3003
+ }
3004
+
3005
+ /** @internal */
3006
+ export type OrNin$Outbound = {
3007
+ nin: Array<string | number | boolean>;
3008
+ };
3009
+
3010
+ /** @internal */
3011
+ export const OrNin$outboundSchema: z.ZodType<
3012
+ OrNin$Outbound,
3013
+ z.ZodTypeDef,
3014
+ OrNin
3015
+ > = z.object({
3016
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
3017
+ });
3018
+
3019
+ export function orNinToJSON(orNin: OrNin): string {
3020
+ return JSON.stringify(OrNin$outboundSchema.parse(orNin));
3021
+ }
3022
+
3023
+ /** @internal */
3024
+ export type DeploymentGetConfigOrIn$Outbound = string | number | boolean;
3025
+
3026
+ /** @internal */
3027
+ export const DeploymentGetConfigOrIn$outboundSchema: z.ZodType<
3028
+ DeploymentGetConfigOrIn$Outbound,
3029
+ z.ZodTypeDef,
3030
+ DeploymentGetConfigOrIn
3031
+ > = z.union([z.string(), z.number(), z.boolean()]);
3032
+
3033
+ export function deploymentGetConfigOrInToJSON(
3034
+ deploymentGetConfigOrIn: DeploymentGetConfigOrIn,
3035
+ ): string {
3036
+ return JSON.stringify(
3037
+ DeploymentGetConfigOrIn$outboundSchema.parse(deploymentGetConfigOrIn),
3038
+ );
3039
+ }
3040
+
3041
+ /** @internal */
3042
+ export type OrIn$Outbound = {
3043
+ in: Array<string | number | boolean>;
3044
+ };
3045
+
3046
+ /** @internal */
3047
+ export const OrIn$outboundSchema: z.ZodType<OrIn$Outbound, z.ZodTypeDef, OrIn> =
3048
+ z.object({
3049
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
3050
+ });
3051
+
3052
+ export function orInToJSON(orIn: OrIn): string {
3053
+ return JSON.stringify(OrIn$outboundSchema.parse(orIn));
3054
+ }
3055
+
3056
+ /** @internal */
3057
+ export type OrLte$Outbound = {
3058
+ lte: number;
3059
+ };
3060
+
3061
+ /** @internal */
3062
+ export const OrLte$outboundSchema: z.ZodType<
3063
+ OrLte$Outbound,
3064
+ z.ZodTypeDef,
3065
+ OrLte
3066
+ > = z.object({
3067
+ lte: z.number(),
3068
+ });
3069
+
3070
+ export function orLteToJSON(orLte: OrLte): string {
3071
+ return JSON.stringify(OrLte$outboundSchema.parse(orLte));
3072
+ }
3073
+
3074
+ /** @internal */
3075
+ export type OrLt$Outbound = {
3076
+ lt: number;
3077
+ };
3078
+
3079
+ /** @internal */
3080
+ export const OrLt$outboundSchema: z.ZodType<OrLt$Outbound, z.ZodTypeDef, OrLt> =
3081
+ z.object({
3082
+ lt: z.number(),
3083
+ });
3084
+
3085
+ export function orLtToJSON(orLt: OrLt): string {
3086
+ return JSON.stringify(OrLt$outboundSchema.parse(orLt));
3087
+ }
3088
+
3089
+ /** @internal */
3090
+ export type OrGte$Outbound = {
3091
+ gte: number;
3092
+ };
3093
+
3094
+ /** @internal */
3095
+ export const OrGte$outboundSchema: z.ZodType<
3096
+ OrGte$Outbound,
3097
+ z.ZodTypeDef,
3098
+ OrGte
3099
+ > = z.object({
3100
+ gte: z.number(),
3101
+ });
3102
+
3103
+ export function orGteToJSON(orGte: OrGte): string {
3104
+ return JSON.stringify(OrGte$outboundSchema.parse(orGte));
3105
+ }
3106
+
3107
+ /** @internal */
3108
+ export type OrGt$Outbound = {
3109
+ gt: number;
3110
+ };
3111
+
3112
+ /** @internal */
3113
+ export const OrGt$outboundSchema: z.ZodType<OrGt$Outbound, z.ZodTypeDef, OrGt> =
3114
+ z.object({
3115
+ gt: z.number(),
3116
+ });
3117
+
3118
+ export function orGtToJSON(orGt: OrGt): string {
3119
+ return JSON.stringify(OrGt$outboundSchema.parse(orGt));
3120
+ }
3121
+
3122
+ /** @internal */
3123
+ export type DeploymentGetConfigOrNe$Outbound = string | number | boolean;
3124
+
3125
+ /** @internal */
3126
+ export const DeploymentGetConfigOrNe$outboundSchema: z.ZodType<
3127
+ DeploymentGetConfigOrNe$Outbound,
3128
+ z.ZodTypeDef,
3129
+ DeploymentGetConfigOrNe
3130
+ > = z.union([z.string(), z.number(), z.boolean()]);
3131
+
3132
+ export function deploymentGetConfigOrNeToJSON(
3133
+ deploymentGetConfigOrNe: DeploymentGetConfigOrNe,
3134
+ ): string {
3135
+ return JSON.stringify(
3136
+ DeploymentGetConfigOrNe$outboundSchema.parse(deploymentGetConfigOrNe),
3137
+ );
3138
+ }
3139
+
3140
+ /** @internal */
3141
+ export type OrNe$Outbound = {
3142
+ ne: string | number | boolean;
3143
+ };
3144
+
3145
+ /** @internal */
3146
+ export const OrNe$outboundSchema: z.ZodType<OrNe$Outbound, z.ZodTypeDef, OrNe> =
3147
+ z.object({
3148
+ ne: z.union([z.string(), z.number(), z.boolean()]),
3149
+ });
3150
+
3151
+ export function orNeToJSON(orNe: OrNe): string {
3152
+ return JSON.stringify(OrNe$outboundSchema.parse(orNe));
3153
+ }
3154
+
3155
+ /** @internal */
3156
+ export type DeploymentGetConfigOrEq$Outbound = string | number | boolean;
3157
+
3158
+ /** @internal */
3159
+ export const DeploymentGetConfigOrEq$outboundSchema: z.ZodType<
3160
+ DeploymentGetConfigOrEq$Outbound,
3161
+ z.ZodTypeDef,
3162
+ DeploymentGetConfigOrEq
3163
+ > = z.union([z.string(), z.number(), z.boolean()]);
3164
+
3165
+ export function deploymentGetConfigOrEqToJSON(
3166
+ deploymentGetConfigOrEq: DeploymentGetConfigOrEq,
3167
+ ): string {
3168
+ return JSON.stringify(
3169
+ DeploymentGetConfigOrEq$outboundSchema.parse(deploymentGetConfigOrEq),
3170
+ );
3171
+ }
3172
+
3173
+ /** @internal */
3174
+ export type OrEq$Outbound = {
3175
+ eq: string | number | boolean;
3176
+ };
3177
+
3178
+ /** @internal */
3179
+ export const OrEq$outboundSchema: z.ZodType<OrEq$Outbound, z.ZodTypeDef, OrEq> =
3180
+ z.object({
3181
+ eq: z.union([z.string(), z.number(), z.boolean()]),
3182
+ });
3183
+
3184
+ export function orEqToJSON(orEq: OrEq): string {
3185
+ return JSON.stringify(OrEq$outboundSchema.parse(orEq));
3186
+ }
3187
+
3188
+ /** @internal */
3189
+ export type KnowledgeFilterOr$Outbound =
3190
+ | OrEq$Outbound
3191
+ | OrNe$Outbound
3192
+ | OrGt$Outbound
3193
+ | OrGte$Outbound
3194
+ | OrLt$Outbound
3195
+ | OrLte$Outbound
3196
+ | OrIn$Outbound
3197
+ | OrNin$Outbound
3198
+ | OrExists$Outbound;
3199
+
3200
+ /** @internal */
3201
+ export const KnowledgeFilterOr$outboundSchema: z.ZodType<
3202
+ KnowledgeFilterOr$Outbound,
3203
+ z.ZodTypeDef,
3204
+ KnowledgeFilterOr
3205
+ > = z.union([
3206
+ z.lazy(() => OrEq$outboundSchema),
3207
+ z.lazy(() => OrNe$outboundSchema),
3208
+ z.lazy(() => OrGt$outboundSchema),
3209
+ z.lazy(() => OrGte$outboundSchema),
3210
+ z.lazy(() => OrLt$outboundSchema),
3211
+ z.lazy(() => OrLte$outboundSchema),
3212
+ z.lazy(() => OrIn$outboundSchema),
3213
+ z.lazy(() => OrNin$outboundSchema),
3214
+ z.lazy(() => OrExists$outboundSchema),
3215
+ ]);
3216
+
3217
+ export function knowledgeFilterOrToJSON(
3218
+ knowledgeFilterOr: KnowledgeFilterOr,
3219
+ ): string {
3220
+ return JSON.stringify(
3221
+ KnowledgeFilterOr$outboundSchema.parse(knowledgeFilterOr),
3222
+ );
3223
+ }
3224
+
3225
+ /** @internal */
3226
+ export type Or$Outbound = {
3227
+ or: Array<
3228
+ {
3229
+ [k: string]:
3230
+ | OrEq$Outbound
3231
+ | OrNe$Outbound
3232
+ | OrGt$Outbound
3233
+ | OrGte$Outbound
3234
+ | OrLt$Outbound
3235
+ | OrLte$Outbound
3236
+ | OrIn$Outbound
3237
+ | OrNin$Outbound
3238
+ | OrExists$Outbound;
3239
+ }
3240
+ >;
3241
+ };
3242
+
3243
+ /** @internal */
3244
+ export const Or$outboundSchema: z.ZodType<Or$Outbound, z.ZodTypeDef, Or> = z
3245
+ .object({
3246
+ or: z.array(
3247
+ z.record(z.union([
3248
+ z.lazy(() => OrEq$outboundSchema),
3249
+ z.lazy(() =>
3250
+ OrNe$outboundSchema
3251
+ ),
3252
+ z.lazy(() => OrGt$outboundSchema),
3253
+ z.lazy(() => OrGte$outboundSchema),
3254
+ z.lazy(() => OrLt$outboundSchema),
3255
+ z.lazy(() => OrLte$outboundSchema),
3256
+ z.lazy(() => OrIn$outboundSchema),
3257
+ z.lazy(() => OrNin$outboundSchema),
3258
+ z.lazy(() => OrExists$outboundSchema),
3259
+ ])),
3260
+ ),
3261
+ });
3262
+
3263
+ export function orToJSON(or: Or): string {
3264
+ return JSON.stringify(Or$outboundSchema.parse(or));
3265
+ }
3266
+
3267
+ /** @internal */
3268
+ export type AndExists$Outbound = {
3269
+ exists: boolean;
3270
+ };
3271
+
3272
+ /** @internal */
3273
+ export const AndExists$outboundSchema: z.ZodType<
3274
+ AndExists$Outbound,
3275
+ z.ZodTypeDef,
3276
+ AndExists
3277
+ > = z.object({
3278
+ exists: z.boolean(),
3279
+ });
3280
+
3281
+ export function andExistsToJSON(andExists: AndExists): string {
3282
+ return JSON.stringify(AndExists$outboundSchema.parse(andExists));
3283
+ }
3284
+
3285
+ /** @internal */
3286
+ export type DeploymentGetConfigAndNin$Outbound = string | number | boolean;
3287
+
3288
+ /** @internal */
3289
+ export const DeploymentGetConfigAndNin$outboundSchema: z.ZodType<
3290
+ DeploymentGetConfigAndNin$Outbound,
3291
+ z.ZodTypeDef,
3292
+ DeploymentGetConfigAndNin
3293
+ > = z.union([z.string(), z.number(), z.boolean()]);
3294
+
3295
+ export function deploymentGetConfigAndNinToJSON(
3296
+ deploymentGetConfigAndNin: DeploymentGetConfigAndNin,
3297
+ ): string {
3298
+ return JSON.stringify(
3299
+ DeploymentGetConfigAndNin$outboundSchema.parse(deploymentGetConfigAndNin),
3300
+ );
3301
+ }
3302
+
3303
+ /** @internal */
3304
+ export type AndNin$Outbound = {
3305
+ nin: Array<string | number | boolean>;
3306
+ };
3307
+
3308
+ /** @internal */
3309
+ export const AndNin$outboundSchema: z.ZodType<
3310
+ AndNin$Outbound,
3311
+ z.ZodTypeDef,
3312
+ AndNin
3313
+ > = z.object({
3314
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
3315
+ });
3316
+
3317
+ export function andNinToJSON(andNin: AndNin): string {
3318
+ return JSON.stringify(AndNin$outboundSchema.parse(andNin));
3319
+ }
3320
+
3321
+ /** @internal */
3322
+ export type DeploymentGetConfigAndIn$Outbound = string | number | boolean;
3323
+
3324
+ /** @internal */
3325
+ export const DeploymentGetConfigAndIn$outboundSchema: z.ZodType<
3326
+ DeploymentGetConfigAndIn$Outbound,
3327
+ z.ZodTypeDef,
3328
+ DeploymentGetConfigAndIn
3329
+ > = z.union([z.string(), z.number(), z.boolean()]);
3330
+
3331
+ export function deploymentGetConfigAndInToJSON(
3332
+ deploymentGetConfigAndIn: DeploymentGetConfigAndIn,
3333
+ ): string {
3334
+ return JSON.stringify(
3335
+ DeploymentGetConfigAndIn$outboundSchema.parse(deploymentGetConfigAndIn),
3336
+ );
3337
+ }
3338
+
3339
+ /** @internal */
3340
+ export type AndIn$Outbound = {
3341
+ in: Array<string | number | boolean>;
3342
+ };
3343
+
3344
+ /** @internal */
3345
+ export const AndIn$outboundSchema: z.ZodType<
3346
+ AndIn$Outbound,
3347
+ z.ZodTypeDef,
3348
+ AndIn
3349
+ > = z.object({
3350
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
3351
+ });
3352
+
3353
+ export function andInToJSON(andIn: AndIn): string {
3354
+ return JSON.stringify(AndIn$outboundSchema.parse(andIn));
3355
+ }
3356
+
3357
+ /** @internal */
3358
+ export type AndLte$Outbound = {
3359
+ lte: number;
3360
+ };
3361
+
3362
+ /** @internal */
3363
+ export const AndLte$outboundSchema: z.ZodType<
3364
+ AndLte$Outbound,
3365
+ z.ZodTypeDef,
3366
+ AndLte
3367
+ > = z.object({
3368
+ lte: z.number(),
3369
+ });
3370
+
3371
+ export function andLteToJSON(andLte: AndLte): string {
3372
+ return JSON.stringify(AndLte$outboundSchema.parse(andLte));
3373
+ }
3374
+
3375
+ /** @internal */
3376
+ export type AndLt$Outbound = {
3377
+ lt: number;
3378
+ };
3379
+
3380
+ /** @internal */
3381
+ export const AndLt$outboundSchema: z.ZodType<
3382
+ AndLt$Outbound,
3383
+ z.ZodTypeDef,
3384
+ AndLt
3385
+ > = z.object({
3386
+ lt: z.number(),
3387
+ });
3388
+
3389
+ export function andLtToJSON(andLt: AndLt): string {
3390
+ return JSON.stringify(AndLt$outboundSchema.parse(andLt));
3391
+ }
3392
+
3393
+ /** @internal */
3394
+ export type AndGte$Outbound = {
3395
+ gte: number;
3396
+ };
3397
+
3398
+ /** @internal */
3399
+ export const AndGte$outboundSchema: z.ZodType<
3400
+ AndGte$Outbound,
3401
+ z.ZodTypeDef,
3402
+ AndGte
3403
+ > = z.object({
3404
+ gte: z.number(),
3405
+ });
3406
+
3407
+ export function andGteToJSON(andGte: AndGte): string {
3408
+ return JSON.stringify(AndGte$outboundSchema.parse(andGte));
3409
+ }
3410
+
3411
+ /** @internal */
3412
+ export type AndGt$Outbound = {
3413
+ gt: number;
3414
+ };
3415
+
3416
+ /** @internal */
3417
+ export const AndGt$outboundSchema: z.ZodType<
3418
+ AndGt$Outbound,
3419
+ z.ZodTypeDef,
3420
+ AndGt
3421
+ > = z.object({
3422
+ gt: z.number(),
3423
+ });
3424
+
3425
+ export function andGtToJSON(andGt: AndGt): string {
3426
+ return JSON.stringify(AndGt$outboundSchema.parse(andGt));
3427
+ }
3428
+
3429
+ /** @internal */
3430
+ export type DeploymentGetConfigAndNe$Outbound = string | number | boolean;
3431
+
3432
+ /** @internal */
3433
+ export const DeploymentGetConfigAndNe$outboundSchema: z.ZodType<
3434
+ DeploymentGetConfigAndNe$Outbound,
3435
+ z.ZodTypeDef,
3436
+ DeploymentGetConfigAndNe
3437
+ > = z.union([z.string(), z.number(), z.boolean()]);
3438
+
3439
+ export function deploymentGetConfigAndNeToJSON(
3440
+ deploymentGetConfigAndNe: DeploymentGetConfigAndNe,
3441
+ ): string {
3442
+ return JSON.stringify(
3443
+ DeploymentGetConfigAndNe$outboundSchema.parse(deploymentGetConfigAndNe),
3444
+ );
3445
+ }
3446
+
3447
+ /** @internal */
3448
+ export type AndNe$Outbound = {
3449
+ ne: string | number | boolean;
3450
+ };
3451
+
3452
+ /** @internal */
3453
+ export const AndNe$outboundSchema: z.ZodType<
3454
+ AndNe$Outbound,
3455
+ z.ZodTypeDef,
3456
+ AndNe
3457
+ > = z.object({
3458
+ ne: z.union([z.string(), z.number(), z.boolean()]),
3459
+ });
3460
+
3461
+ export function andNeToJSON(andNe: AndNe): string {
3462
+ return JSON.stringify(AndNe$outboundSchema.parse(andNe));
3463
+ }
3464
+
3465
+ /** @internal */
3466
+ export type DeploymentGetConfigAndEq$Outbound = string | number | boolean;
3467
+
3468
+ /** @internal */
3469
+ export const DeploymentGetConfigAndEq$outboundSchema: z.ZodType<
3470
+ DeploymentGetConfigAndEq$Outbound,
3471
+ z.ZodTypeDef,
3472
+ DeploymentGetConfigAndEq
3473
+ > = z.union([z.string(), z.number(), z.boolean()]);
3474
+
3475
+ export function deploymentGetConfigAndEqToJSON(
3476
+ deploymentGetConfigAndEq: DeploymentGetConfigAndEq,
3477
+ ): string {
3478
+ return JSON.stringify(
3479
+ DeploymentGetConfigAndEq$outboundSchema.parse(deploymentGetConfigAndEq),
3480
+ );
3481
+ }
3482
+
3483
+ /** @internal */
3484
+ export type AndEq$Outbound = {
3485
+ eq: string | number | boolean;
3486
+ };
3487
+
3488
+ /** @internal */
3489
+ export const AndEq$outboundSchema: z.ZodType<
3490
+ AndEq$Outbound,
3491
+ z.ZodTypeDef,
3492
+ AndEq
3493
+ > = z.object({
3494
+ eq: z.union([z.string(), z.number(), z.boolean()]),
3495
+ });
3496
+
3497
+ export function andEqToJSON(andEq: AndEq): string {
3498
+ return JSON.stringify(AndEq$outboundSchema.parse(andEq));
3499
+ }
3500
+
3501
+ /** @internal */
3502
+ export type KnowledgeFilterAnd$Outbound =
3503
+ | AndEq$Outbound
3504
+ | AndNe$Outbound
3505
+ | AndGt$Outbound
3506
+ | AndGte$Outbound
3507
+ | AndLt$Outbound
3508
+ | AndLte$Outbound
3509
+ | AndIn$Outbound
3510
+ | AndNin$Outbound
3511
+ | AndExists$Outbound;
3512
+
3513
+ /** @internal */
3514
+ export const KnowledgeFilterAnd$outboundSchema: z.ZodType<
3515
+ KnowledgeFilterAnd$Outbound,
3516
+ z.ZodTypeDef,
3517
+ KnowledgeFilterAnd
3518
+ > = z.union([
3519
+ z.lazy(() => AndEq$outboundSchema),
3520
+ z.lazy(() => AndNe$outboundSchema),
3521
+ z.lazy(() => AndGt$outboundSchema),
3522
+ z.lazy(() => AndGte$outboundSchema),
3523
+ z.lazy(() => AndLt$outboundSchema),
3524
+ z.lazy(() => AndLte$outboundSchema),
3525
+ z.lazy(() => AndIn$outboundSchema),
3526
+ z.lazy(() => AndNin$outboundSchema),
3527
+ z.lazy(() => AndExists$outboundSchema),
3528
+ ]);
3529
+
3530
+ export function knowledgeFilterAndToJSON(
3531
+ knowledgeFilterAnd: KnowledgeFilterAnd,
3532
+ ): string {
3533
+ return JSON.stringify(
3534
+ KnowledgeFilterAnd$outboundSchema.parse(knowledgeFilterAnd),
3535
+ );
3536
+ }
3537
+
3538
+ /** @internal */
3539
+ export type And$Outbound = {
3540
+ and: Array<
3541
+ {
3542
+ [k: string]:
3543
+ | AndEq$Outbound
3544
+ | AndNe$Outbound
3545
+ | AndGt$Outbound
3546
+ | AndGte$Outbound
3547
+ | AndLt$Outbound
3548
+ | AndLte$Outbound
3549
+ | AndIn$Outbound
3550
+ | AndNin$Outbound
3551
+ | AndExists$Outbound;
3552
+ }
3553
+ >;
3554
+ };
3555
+
3556
+ /** @internal */
3557
+ export const And$outboundSchema: z.ZodType<And$Outbound, z.ZodTypeDef, And> = z
3558
+ .object({
3559
+ and: z.array(
3560
+ z.record(z.union([
3561
+ z.lazy(() => AndEq$outboundSchema),
3562
+ z.lazy(() =>
3563
+ AndNe$outboundSchema
3564
+ ),
3565
+ z.lazy(() => AndGt$outboundSchema),
3566
+ z.lazy(() => AndGte$outboundSchema),
3567
+ z.lazy(() => AndLt$outboundSchema),
3568
+ z.lazy(() => AndLte$outboundSchema),
3569
+ z.lazy(() => AndIn$outboundSchema),
3570
+ z.lazy(() => AndNin$outboundSchema),
3571
+ z.lazy(() => AndExists$outboundSchema),
3572
+ ])),
3573
+ ),
3574
+ });
3575
+
3576
+ export function andToJSON(and: And): string {
3577
+ return JSON.stringify(And$outboundSchema.parse(and));
3578
+ }
3579
+
3580
+ /** @internal */
3581
+ export type Exists$Outbound = {
3582
+ exists: boolean;
3583
+ };
3584
+
3585
+ /** @internal */
3586
+ export const Exists$outboundSchema: z.ZodType<
3587
+ Exists$Outbound,
3588
+ z.ZodTypeDef,
3589
+ Exists
3590
+ > = z.object({
3591
+ exists: z.boolean(),
3592
+ });
3593
+
3594
+ export function existsToJSON(exists: Exists): string {
3595
+ return JSON.stringify(Exists$outboundSchema.parse(exists));
3596
+ }
3597
+
3598
+ /** @internal */
3599
+ export type OneNin$Outbound = string | number | boolean;
3600
+
3601
+ /** @internal */
3602
+ export const OneNin$outboundSchema: z.ZodType<
3603
+ OneNin$Outbound,
3604
+ z.ZodTypeDef,
3605
+ OneNin
3606
+ > = z.union([z.string(), z.number(), z.boolean()]);
3607
+
3608
+ export function oneNinToJSON(oneNin: OneNin): string {
3609
+ return JSON.stringify(OneNin$outboundSchema.parse(oneNin));
3610
+ }
3611
+
3612
+ /** @internal */
3613
+ export type Nin$Outbound = {
3614
+ nin: Array<string | number | boolean>;
3615
+ };
3616
+
3617
+ /** @internal */
3618
+ export const Nin$outboundSchema: z.ZodType<Nin$Outbound, z.ZodTypeDef, Nin> = z
3619
+ .object({
3620
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
3621
+ });
3622
+
3623
+ export function ninToJSON(nin: Nin): string {
3624
+ return JSON.stringify(Nin$outboundSchema.parse(nin));
3625
+ }
3626
+
3627
+ /** @internal */
3628
+ export type OneIn$Outbound = string | number | boolean;
3629
+
3630
+ /** @internal */
3631
+ export const OneIn$outboundSchema: z.ZodType<
3632
+ OneIn$Outbound,
3633
+ z.ZodTypeDef,
3634
+ OneIn
3635
+ > = z.union([z.string(), z.number(), z.boolean()]);
3636
+
3637
+ export function oneInToJSON(oneIn: OneIn): string {
3638
+ return JSON.stringify(OneIn$outboundSchema.parse(oneIn));
3639
+ }
3640
+
3641
+ /** @internal */
3642
+ export type In$Outbound = {
3643
+ in: Array<string | number | boolean>;
3644
+ };
3645
+
3646
+ /** @internal */
3647
+ export const In$outboundSchema: z.ZodType<In$Outbound, z.ZodTypeDef, In> = z
3648
+ .object({
3649
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
3650
+ });
3651
+
3652
+ export function inToJSON(value: In): string {
3653
+ return JSON.stringify(In$outboundSchema.parse(value));
3654
+ }
3655
+
3656
+ /** @internal */
3657
+ export type Lte$Outbound = {
3658
+ lte: number;
3659
+ };
3660
+
3661
+ /** @internal */
3662
+ export const Lte$outboundSchema: z.ZodType<Lte$Outbound, z.ZodTypeDef, Lte> = z
3663
+ .object({
3664
+ lte: z.number(),
3665
+ });
3666
+
3667
+ export function lteToJSON(lte: Lte): string {
3668
+ return JSON.stringify(Lte$outboundSchema.parse(lte));
3669
+ }
3670
+
3671
+ /** @internal */
3672
+ export type Lt$Outbound = {
3673
+ lt: number;
3674
+ };
3675
+
3676
+ /** @internal */
3677
+ export const Lt$outboundSchema: z.ZodType<Lt$Outbound, z.ZodTypeDef, Lt> = z
3678
+ .object({
3679
+ lt: z.number(),
3680
+ });
3681
+
3682
+ export function ltToJSON(lt: Lt): string {
3683
+ return JSON.stringify(Lt$outboundSchema.parse(lt));
3684
+ }
3685
+
3686
+ /** @internal */
3687
+ export type Gte$Outbound = {
3688
+ gte: number;
3689
+ };
3690
+
3691
+ /** @internal */
3692
+ export const Gte$outboundSchema: z.ZodType<Gte$Outbound, z.ZodTypeDef, Gte> = z
3693
+ .object({
3694
+ gte: z.number(),
3695
+ });
3696
+
3697
+ export function gteToJSON(gte: Gte): string {
3698
+ return JSON.stringify(Gte$outboundSchema.parse(gte));
3699
+ }
3700
+
3701
+ /** @internal */
3702
+ export type Gt$Outbound = {
3703
+ gt: number;
3704
+ };
3705
+
3706
+ /** @internal */
3707
+ export const Gt$outboundSchema: z.ZodType<Gt$Outbound, z.ZodTypeDef, Gt> = z
3708
+ .object({
3709
+ gt: z.number(),
3710
+ });
3711
+
3712
+ export function gtToJSON(gt: Gt): string {
3713
+ return JSON.stringify(Gt$outboundSchema.parse(gt));
3714
+ }
3715
+
3716
+ /** @internal */
3717
+ export type OneNe$Outbound = string | number | boolean;
3718
+
3719
+ /** @internal */
3720
+ export const OneNe$outboundSchema: z.ZodType<
3721
+ OneNe$Outbound,
3722
+ z.ZodTypeDef,
3723
+ OneNe
3724
+ > = z.union([z.string(), z.number(), z.boolean()]);
3725
+
3726
+ export function oneNeToJSON(oneNe: OneNe): string {
3727
+ return JSON.stringify(OneNe$outboundSchema.parse(oneNe));
3728
+ }
3729
+
3730
+ /** @internal */
3731
+ export type Ne$Outbound = {
3732
+ ne: string | number | boolean;
3733
+ };
3734
+
3735
+ /** @internal */
3736
+ export const Ne$outboundSchema: z.ZodType<Ne$Outbound, z.ZodTypeDef, Ne> = z
3737
+ .object({
3738
+ ne: z.union([z.string(), z.number(), z.boolean()]),
3739
+ });
3740
+
3741
+ export function neToJSON(ne: Ne): string {
3742
+ return JSON.stringify(Ne$outboundSchema.parse(ne));
3743
+ }
3744
+
3745
+ /** @internal */
3746
+ export type OneEq$Outbound = string | number | boolean;
3747
+
3748
+ /** @internal */
3749
+ export const OneEq$outboundSchema: z.ZodType<
3750
+ OneEq$Outbound,
3751
+ z.ZodTypeDef,
3752
+ OneEq
3753
+ > = z.union([z.string(), z.number(), z.boolean()]);
3754
+
3755
+ export function oneEqToJSON(oneEq: OneEq): string {
3756
+ return JSON.stringify(OneEq$outboundSchema.parse(oneEq));
3757
+ }
3758
+
3759
+ /** @internal */
3760
+ export type Eq$Outbound = {
3761
+ eq: string | number | boolean;
3762
+ };
3763
+
3764
+ /** @internal */
3765
+ export const Eq$outboundSchema: z.ZodType<Eq$Outbound, z.ZodTypeDef, Eq> = z
3766
+ .object({
3767
+ eq: z.union([z.string(), z.number(), z.boolean()]),
3768
+ });
3769
+
3770
+ export function eqToJSON(eq: Eq): string {
3771
+ return JSON.stringify(Eq$outboundSchema.parse(eq));
3772
+ }
3773
+
3774
+ /** @internal */
3775
+ export type KnowledgeFilter1$Outbound =
3776
+ | Eq$Outbound
3777
+ | Ne$Outbound
3778
+ | Gt$Outbound
3779
+ | Gte$Outbound
3780
+ | Lt$Outbound
3781
+ | Lte$Outbound
3782
+ | In$Outbound
3783
+ | Nin$Outbound
3784
+ | Exists$Outbound;
3785
+
3786
+ /** @internal */
3787
+ export const KnowledgeFilter1$outboundSchema: z.ZodType<
3788
+ KnowledgeFilter1$Outbound,
3789
+ z.ZodTypeDef,
3790
+ KnowledgeFilter1
3791
+ > = z.union([
3792
+ z.lazy(() => Eq$outboundSchema),
3793
+ z.lazy(() => Ne$outboundSchema),
3794
+ z.lazy(() => Gt$outboundSchema),
3795
+ z.lazy(() => Gte$outboundSchema),
3796
+ z.lazy(() => Lt$outboundSchema),
3797
+ z.lazy(() => Lte$outboundSchema),
3798
+ z.lazy(() => In$outboundSchema),
3799
+ z.lazy(() => Nin$outboundSchema),
3800
+ z.lazy(() => Exists$outboundSchema),
3801
+ ]);
3802
+
3803
+ export function knowledgeFilter1ToJSON(
3804
+ knowledgeFilter1: KnowledgeFilter1,
3805
+ ): string {
3806
+ return JSON.stringify(
3807
+ KnowledgeFilter1$outboundSchema.parse(knowledgeFilter1),
3808
+ );
3809
+ }
3810
+
3811
+ /** @internal */
3812
+ export type KnowledgeFilter$Outbound = And$Outbound | Or$Outbound | {
3813
+ [k: string]:
3814
+ | Eq$Outbound
3815
+ | Ne$Outbound
3816
+ | Gt$Outbound
3817
+ | Gte$Outbound
3818
+ | Lt$Outbound
3819
+ | Lte$Outbound
3820
+ | In$Outbound
3821
+ | Nin$Outbound
3822
+ | Exists$Outbound;
3823
+ };
3824
+
3825
+ /** @internal */
3826
+ export const KnowledgeFilter$outboundSchema: z.ZodType<
3827
+ KnowledgeFilter$Outbound,
3828
+ z.ZodTypeDef,
3829
+ KnowledgeFilter
3830
+ > = z.union([
3831
+ z.lazy(() => And$outboundSchema),
3832
+ z.lazy(() => Or$outboundSchema),
3833
+ z.record(z.union([
3834
+ z.lazy(() => Eq$outboundSchema),
3835
+ z.lazy(() => Ne$outboundSchema),
3836
+ z.lazy(() => Gt$outboundSchema),
3837
+ z.lazy(() => Gte$outboundSchema),
3838
+ z.lazy(() => Lt$outboundSchema),
3839
+ z.lazy(() => Lte$outboundSchema),
3840
+ z.lazy(() => In$outboundSchema),
3841
+ z.lazy(() => Nin$outboundSchema),
3842
+ z.lazy(() => Exists$outboundSchema),
3843
+ ])),
3844
+ ]);
3845
+
3846
+ export function knowledgeFilterToJSON(
3847
+ knowledgeFilter: KnowledgeFilter,
3848
+ ): string {
3849
+ return JSON.stringify(KnowledgeFilter$outboundSchema.parse(knowledgeFilter));
3850
+ }
3851
+
3852
+ /** @internal */
3853
+ export type DeploymentGetConfigRequestBody$Outbound = {
3854
+ key: string;
3855
+ inputs?: { [k: string]: any } | undefined;
3856
+ context?: { [k: string]: any } | undefined;
3857
+ prefix_messages?:
3858
+ | Array<
3859
+ | SystemMessage$Outbound
3860
+ | DeveloperMessage$Outbound
3861
+ | UserMessage$Outbound
3862
+ | AssistantMessage$Outbound
3863
+ | ToolMessage$Outbound
3864
+ >
3865
+ | undefined;
3866
+ messages?:
3867
+ | Array<
3868
+ | MessagesSystemMessage$Outbound
3869
+ | MessagesDeveloperMessage$Outbound
3870
+ | MessagesUserMessage$Outbound
3871
+ | MessagesAssistantMessage$Outbound
3872
+ | MessagesToolMessage$Outbound
3873
+ >
3874
+ | undefined;
3875
+ identity?: components.PublicIdentity$Outbound | undefined;
3876
+ file_ids?: Array<string> | undefined;
3877
+ metadata?: { [k: string]: any } | undefined;
3878
+ extra_params?: { [k: string]: any } | undefined;
3879
+ documents?: Array<Documents$Outbound> | undefined;
3880
+ invoke_options?: InvokeOptions$Outbound | undefined;
3881
+ thread?: Thread$Outbound | undefined;
3882
+ knowledge_filter?: And$Outbound | Or$Outbound | {
3883
+ [k: string]:
3884
+ | Eq$Outbound
3885
+ | Ne$Outbound
3886
+ | Gt$Outbound
3887
+ | Gte$Outbound
3888
+ | Lt$Outbound
3889
+ | Lte$Outbound
3890
+ | In$Outbound
3891
+ | Nin$Outbound
3892
+ | Exists$Outbound;
3893
+ } | undefined;
3894
+ };
3895
+
3896
+ /** @internal */
3897
+ export const DeploymentGetConfigRequestBody$outboundSchema: z.ZodType<
3898
+ DeploymentGetConfigRequestBody$Outbound,
3899
+ z.ZodTypeDef,
3900
+ DeploymentGetConfigRequestBody
3901
+ > = z.object({
3902
+ key: z.string(),
3903
+ inputs: z.record(z.any()).optional(),
3904
+ context: z.record(z.any()).optional(),
3905
+ prefixMessages: z.array(
3906
+ z.union([
3907
+ z.lazy(() => SystemMessage$outboundSchema),
3908
+ z.lazy(() => DeveloperMessage$outboundSchema),
3909
+ z.lazy(() => UserMessage$outboundSchema),
3910
+ z.lazy(() => AssistantMessage$outboundSchema),
3911
+ z.lazy(() => ToolMessage$outboundSchema),
3912
+ ]),
3913
+ ).optional(),
3914
+ messages: z.array(
3915
+ z.union([
3916
+ z.lazy(() => MessagesSystemMessage$outboundSchema),
3917
+ z.lazy(() => MessagesDeveloperMessage$outboundSchema),
3918
+ z.lazy(() => MessagesUserMessage$outboundSchema),
3919
+ z.lazy(() => MessagesAssistantMessage$outboundSchema),
3920
+ z.lazy(() => MessagesToolMessage$outboundSchema),
3921
+ ]),
3922
+ ).optional(),
3923
+ identity: components.PublicIdentity$outboundSchema.optional(),
3924
+ fileIds: z.array(z.string()).optional(),
3925
+ metadata: z.record(z.any()).optional(),
3926
+ extraParams: z.record(z.any()).optional(),
3927
+ documents: z.array(z.lazy(() => Documents$outboundSchema)).optional(),
3928
+ invokeOptions: z.lazy(() => InvokeOptions$outboundSchema).optional(),
3929
+ thread: z.lazy(() => Thread$outboundSchema).optional(),
3930
+ knowledgeFilter: z.union([
3931
+ z.lazy(() => And$outboundSchema),
3932
+ z.lazy(() => Or$outboundSchema),
3933
+ z.record(z.union([
3934
+ z.lazy(() => Eq$outboundSchema),
3935
+ z.lazy(() => Ne$outboundSchema),
3936
+ z.lazy(() => Gt$outboundSchema),
3937
+ z.lazy(() => Gte$outboundSchema),
3938
+ z.lazy(() => Lt$outboundSchema),
3939
+ z.lazy(() => Lte$outboundSchema),
3940
+ z.lazy(() => In$outboundSchema),
3941
+ z.lazy(() => Nin$outboundSchema),
3942
+ z.lazy(() => Exists$outboundSchema),
3943
+ ])),
3944
+ ]).optional(),
3945
+ }).transform((v) => {
3946
+ return remap$(v, {
3947
+ prefixMessages: "prefix_messages",
3948
+ fileIds: "file_ids",
3949
+ extraParams: "extra_params",
3950
+ invokeOptions: "invoke_options",
3951
+ knowledgeFilter: "knowledge_filter",
3952
+ });
3953
+ });
3954
+
3955
+ export function deploymentGetConfigRequestBodyToJSON(
3956
+ deploymentGetConfigRequestBody: DeploymentGetConfigRequestBody,
3957
+ ): string {
3958
+ return JSON.stringify(
3959
+ DeploymentGetConfigRequestBody$outboundSchema.parse(
3960
+ deploymentGetConfigRequestBody,
3961
+ ),
3962
+ );
3963
+ }
3964
+
3965
+ /** @internal */
3966
+ export const DeploymentGetConfigType$inboundSchema: z.ZodNativeEnum<
3967
+ typeof DeploymentGetConfigType
3968
+ > = z.nativeEnum(DeploymentGetConfigType);
3969
+
3970
+ /** @internal */
3971
+ export const DeploymentGetConfigRole$inboundSchema: z.ZodNativeEnum<
3972
+ typeof DeploymentGetConfigRole
3973
+ > = z.nativeEnum(DeploymentGetConfigRole);
3974
+
3975
+ /** @internal */
3976
+ export const TwoFile$inboundSchema: z.ZodType<TwoFile, z.ZodTypeDef, unknown> =
3977
+ z.object({
3978
+ file_data: z.string().optional(),
3979
+ uri: z.string().optional(),
3980
+ mimeType: z.string().optional(),
3981
+ filename: z.string().optional(),
3982
+ }).transform((v) => {
3983
+ return remap$(v, {
3984
+ "file_data": "fileData",
3985
+ });
3986
+ });
3987
+
3988
+ export function twoFileFromJSON(
3989
+ jsonString: string,
3990
+ ): SafeParseResult<TwoFile, SDKValidationError> {
3991
+ return safeParse(
3992
+ jsonString,
3993
+ (x) => TwoFile$inboundSchema.parse(JSON.parse(x)),
3994
+ `Failed to parse 'TwoFile' from JSON`,
3995
+ );
3996
+ }
3997
+
3998
+ /** @internal */
3999
+ export const DeploymentGetConfig23$inboundSchema: z.ZodType<
4000
+ DeploymentGetConfig23,
4001
+ z.ZodTypeDef,
4002
+ unknown
4003
+ > = z.object({
4004
+ type: z.literal("file"),
4005
+ file: z.lazy(() => TwoFile$inboundSchema),
4006
+ });
4007
+
4008
+ export function deploymentGetConfig23FromJSON(
4009
+ jsonString: string,
4010
+ ): SafeParseResult<DeploymentGetConfig23, SDKValidationError> {
4011
+ return safeParse(
4012
+ jsonString,
4013
+ (x) => DeploymentGetConfig23$inboundSchema.parse(JSON.parse(x)),
4014
+ `Failed to parse 'DeploymentGetConfig23' from JSON`,
4015
+ );
4016
+ }
4017
+
4018
+ /** @internal */
4019
+ export const TwoImageUrl$inboundSchema: z.ZodType<
4020
+ TwoImageUrl,
4021
+ z.ZodTypeDef,
4022
+ unknown
4023
+ > = z.object({
4024
+ id: z.string().optional(),
4025
+ url: z.string(),
4026
+ detail: z.string().optional(),
4027
+ });
4028
+
4029
+ export function twoImageUrlFromJSON(
4030
+ jsonString: string,
4031
+ ): SafeParseResult<TwoImageUrl, SDKValidationError> {
4032
+ return safeParse(
4033
+ jsonString,
4034
+ (x) => TwoImageUrl$inboundSchema.parse(JSON.parse(x)),
4035
+ `Failed to parse 'TwoImageUrl' from JSON`,
4036
+ );
4037
+ }
4038
+
4039
+ /** @internal */
4040
+ export const DeploymentGetConfig22$inboundSchema: z.ZodType<
4041
+ DeploymentGetConfig22,
4042
+ z.ZodTypeDef,
4043
+ unknown
4044
+ > = z.object({
4045
+ type: z.literal("image_url"),
4046
+ image_url: z.lazy(() => TwoImageUrl$inboundSchema),
4047
+ }).transform((v) => {
4048
+ return remap$(v, {
4049
+ "image_url": "imageUrl",
4050
+ });
4051
+ });
4052
+
4053
+ export function deploymentGetConfig22FromJSON(
4054
+ jsonString: string,
4055
+ ): SafeParseResult<DeploymentGetConfig22, SDKValidationError> {
4056
+ return safeParse(
4057
+ jsonString,
4058
+ (x) => DeploymentGetConfig22$inboundSchema.parse(JSON.parse(x)),
4059
+ `Failed to parse 'DeploymentGetConfig22' from JSON`,
4060
+ );
4061
+ }
4062
+
4063
+ /** @internal */
4064
+ export const DeploymentGetConfig21$inboundSchema: z.ZodType<
4065
+ DeploymentGetConfig21,
4066
+ z.ZodTypeDef,
4067
+ unknown
4068
+ > = z.object({
4069
+ type: z.literal("text"),
4070
+ text: z.string(),
4071
+ });
4072
+
4073
+ export function deploymentGetConfig21FromJSON(
4074
+ jsonString: string,
4075
+ ): SafeParseResult<DeploymentGetConfig21, SDKValidationError> {
4076
+ return safeParse(
4077
+ jsonString,
4078
+ (x) => DeploymentGetConfig21$inboundSchema.parse(JSON.parse(x)),
4079
+ `Failed to parse 'DeploymentGetConfig21' from JSON`,
4080
+ );
4081
+ }
4082
+
4083
+ /** @internal */
4084
+ export const DeploymentGetConfigContentDeploymentsResponse2$inboundSchema:
4085
+ z.ZodType<
4086
+ DeploymentGetConfigContentDeploymentsResponse2,
4087
+ z.ZodTypeDef,
4088
+ unknown
4089
+ > = z.union([
4090
+ z.lazy(() => DeploymentGetConfig21$inboundSchema),
4091
+ z.lazy(() => DeploymentGetConfig22$inboundSchema),
4092
+ z.lazy(() => DeploymentGetConfig23$inboundSchema),
4093
+ ]);
4094
+
4095
+ export function deploymentGetConfigContentDeploymentsResponse2FromJSON(
4096
+ jsonString: string,
4097
+ ): SafeParseResult<
4098
+ DeploymentGetConfigContentDeploymentsResponse2,
4099
+ SDKValidationError
4100
+ > {
4101
+ return safeParse(
4102
+ jsonString,
4103
+ (x) =>
4104
+ DeploymentGetConfigContentDeploymentsResponse2$inboundSchema.parse(
4105
+ JSON.parse(x),
4106
+ ),
4107
+ `Failed to parse 'DeploymentGetConfigContentDeploymentsResponse2' from JSON`,
4108
+ );
4109
+ }
4110
+
4111
+ /** @internal */
4112
+ export const DeploymentGetConfigContent$inboundSchema: z.ZodType<
4113
+ DeploymentGetConfigContent,
4114
+ z.ZodTypeDef,
4115
+ unknown
4116
+ > = z.union([
4117
+ z.string(),
4118
+ z.array(z.union([
4119
+ z.lazy(() => DeploymentGetConfig21$inboundSchema),
4120
+ z.lazy(() => DeploymentGetConfig22$inboundSchema),
4121
+ z.lazy(() => DeploymentGetConfig23$inboundSchema),
4122
+ ])),
4123
+ ]);
4124
+
4125
+ export function deploymentGetConfigContentFromJSON(
4126
+ jsonString: string,
4127
+ ): SafeParseResult<DeploymentGetConfigContent, SDKValidationError> {
4128
+ return safeParse(
4129
+ jsonString,
4130
+ (x) => DeploymentGetConfigContent$inboundSchema.parse(JSON.parse(x)),
4131
+ `Failed to parse 'DeploymentGetConfigContent' from JSON`,
4132
+ );
4133
+ }
4134
+
4135
+ /** @internal */
4136
+ export const DeploymentGetConfigDeploymentsResponseType$inboundSchema:
4137
+ z.ZodNativeEnum<typeof DeploymentGetConfigDeploymentsResponseType> = z
4138
+ .nativeEnum(DeploymentGetConfigDeploymentsResponseType);
4139
+
4140
+ /** @internal */
4141
+ export const DeploymentGetConfigDeploymentsFunction$inboundSchema: z.ZodType<
4142
+ DeploymentGetConfigDeploymentsFunction,
4143
+ z.ZodTypeDef,
4144
+ unknown
4145
+ > = z.object({
4146
+ name: z.string(),
4147
+ arguments: z.string(),
4148
+ });
4149
+
4150
+ export function deploymentGetConfigDeploymentsFunctionFromJSON(
4151
+ jsonString: string,
4152
+ ): SafeParseResult<DeploymentGetConfigDeploymentsFunction, SDKValidationError> {
4153
+ return safeParse(
4154
+ jsonString,
4155
+ (x) =>
4156
+ DeploymentGetConfigDeploymentsFunction$inboundSchema.parse(JSON.parse(x)),
4157
+ `Failed to parse 'DeploymentGetConfigDeploymentsFunction' from JSON`,
4158
+ );
4159
+ }
4160
+
4161
+ /** @internal */
4162
+ export const DeploymentGetConfigToolCalls$inboundSchema: z.ZodType<
4163
+ DeploymentGetConfigToolCalls,
4164
+ z.ZodTypeDef,
4165
+ unknown
4166
+ > = z.object({
4167
+ id: z.string().optional(),
4168
+ index: z.number().optional(),
4169
+ type: DeploymentGetConfigDeploymentsResponseType$inboundSchema,
4170
+ function: z.lazy(() => DeploymentGetConfigDeploymentsFunction$inboundSchema),
4171
+ });
4172
+
4173
+ export function deploymentGetConfigToolCallsFromJSON(
4174
+ jsonString: string,
4175
+ ): SafeParseResult<DeploymentGetConfigToolCalls, SDKValidationError> {
4176
+ return safeParse(
4177
+ jsonString,
4178
+ (x) => DeploymentGetConfigToolCalls$inboundSchema.parse(JSON.parse(x)),
4179
+ `Failed to parse 'DeploymentGetConfigToolCalls' from JSON`,
4180
+ );
4181
+ }
4182
+
4183
+ /** @internal */
4184
+ export const DeploymentGetConfigDeploymentsMessages$inboundSchema: z.ZodType<
4185
+ DeploymentGetConfigDeploymentsMessages,
4186
+ z.ZodTypeDef,
4187
+ unknown
4188
+ > = z.object({
4189
+ role: DeploymentGetConfigRole$inboundSchema,
4190
+ content: z.nullable(
4191
+ z.union([
4192
+ z.string(),
4193
+ z.array(
4194
+ z.union([
4195
+ z.lazy(() => DeploymentGetConfig21$inboundSchema),
4196
+ z.lazy(() => DeploymentGetConfig22$inboundSchema),
4197
+ z.lazy(() => DeploymentGetConfig23$inboundSchema),
4198
+ ]),
4199
+ ),
4200
+ ]),
4201
+ ),
4202
+ tool_calls: z.array(z.lazy(() => DeploymentGetConfigToolCalls$inboundSchema))
4203
+ .optional(),
4204
+ tool_call_id: z.nullable(z.string()).optional(),
4205
+ }).transform((v) => {
4206
+ return remap$(v, {
4207
+ "tool_calls": "toolCalls",
4208
+ "tool_call_id": "toolCallId",
4209
+ });
4210
+ });
4211
+
4212
+ export function deploymentGetConfigDeploymentsMessagesFromJSON(
4213
+ jsonString: string,
4214
+ ): SafeParseResult<DeploymentGetConfigDeploymentsMessages, SDKValidationError> {
4215
+ return safeParse(
4216
+ jsonString,
4217
+ (x) =>
4218
+ DeploymentGetConfigDeploymentsMessages$inboundSchema.parse(JSON.parse(x)),
4219
+ `Failed to parse 'DeploymentGetConfigDeploymentsMessages' from JSON`,
4220
+ );
4221
+ }
4222
+
4223
+ /** @internal */
4224
+ export const DeploymentGetConfigFormat$inboundSchema: z.ZodNativeEnum<
4225
+ typeof DeploymentGetConfigFormat
4226
+ > = z.nativeEnum(DeploymentGetConfigFormat);
4227
+
4228
+ /** @internal */
4229
+ export const ResponseFormat6$inboundSchema: z.ZodNativeEnum<
4230
+ typeof ResponseFormat6
4231
+ > = z.nativeEnum(ResponseFormat6);
4232
+
4233
+ /** @internal */
4234
+ export const ResponseFormat5$inboundSchema: z.ZodNativeEnum<
4235
+ typeof ResponseFormat5
4236
+ > = z.nativeEnum(ResponseFormat5);
4237
+
4238
+ /** @internal */
4239
+ export const ResponseFormat4$inboundSchema: z.ZodNativeEnum<
4240
+ typeof ResponseFormat4
4241
+ > = z.nativeEnum(ResponseFormat4);
4242
+
4243
+ /** @internal */
4244
+ export const DeploymentGetConfigResponseFormatDeploymentsType$inboundSchema:
4245
+ z.ZodNativeEnum<typeof DeploymentGetConfigResponseFormatDeploymentsType> = z
4246
+ .nativeEnum(DeploymentGetConfigResponseFormatDeploymentsType);
4247
+
4248
+ /** @internal */
4249
+ export const ResponseFormat3$inboundSchema: z.ZodType<
4250
+ ResponseFormat3,
4251
+ z.ZodTypeDef,
4252
+ unknown
4253
+ > = z.object({
4254
+ type: DeploymentGetConfigResponseFormatDeploymentsType$inboundSchema,
4255
+ });
4256
+
4257
+ export function responseFormat3FromJSON(
4258
+ jsonString: string,
4259
+ ): SafeParseResult<ResponseFormat3, SDKValidationError> {
4260
+ return safeParse(
4261
+ jsonString,
4262
+ (x) => ResponseFormat3$inboundSchema.parse(JSON.parse(x)),
4263
+ `Failed to parse 'ResponseFormat3' from JSON`,
4264
+ );
4265
+ }
4266
+
4267
+ /** @internal */
4268
+ export const DeploymentGetConfigResponseFormatType$inboundSchema:
4269
+ z.ZodNativeEnum<typeof DeploymentGetConfigResponseFormatType> = z.nativeEnum(
4270
+ DeploymentGetConfigResponseFormatType,
4271
+ );
4272
+
4273
+ /** @internal */
4274
+ export const ResponseFormat2$inboundSchema: z.ZodType<
4275
+ ResponseFormat2,
4276
+ z.ZodTypeDef,
4277
+ unknown
4278
+ > = z.object({
4279
+ type: DeploymentGetConfigResponseFormatType$inboundSchema,
4280
+ });
4281
+
4282
+ export function responseFormat2FromJSON(
4283
+ jsonString: string,
4284
+ ): SafeParseResult<ResponseFormat2, SDKValidationError> {
4285
+ return safeParse(
4286
+ jsonString,
4287
+ (x) => ResponseFormat2$inboundSchema.parse(JSON.parse(x)),
4288
+ `Failed to parse 'ResponseFormat2' from JSON`,
4289
+ );
4290
+ }
4291
+
4292
+ /** @internal */
4293
+ export const DeploymentGetConfigResponseFormatDeploymentsResponseType$inboundSchema:
4294
+ z.ZodNativeEnum<
4295
+ typeof DeploymentGetConfigResponseFormatDeploymentsResponseType
4296
+ > = z.nativeEnum(DeploymentGetConfigResponseFormatDeploymentsResponseType);
4297
+
4298
+ /** @internal */
4299
+ export const DeploymentGetConfigResponseFormatJsonSchema$inboundSchema:
4300
+ z.ZodType<
4301
+ DeploymentGetConfigResponseFormatJsonSchema,
4302
+ z.ZodTypeDef,
4303
+ unknown
4304
+ > = z.object({
4305
+ name: z.string(),
4306
+ description: z.string().optional(),
4307
+ strict: z.boolean().optional(),
4308
+ schema: z.record(z.any()),
4309
+ });
4310
+
4311
+ export function deploymentGetConfigResponseFormatJsonSchemaFromJSON(
4312
+ jsonString: string,
4313
+ ): SafeParseResult<
4314
+ DeploymentGetConfigResponseFormatJsonSchema,
4315
+ SDKValidationError
4316
+ > {
4317
+ return safeParse(
4318
+ jsonString,
4319
+ (x) =>
4320
+ DeploymentGetConfigResponseFormatJsonSchema$inboundSchema.parse(
4321
+ JSON.parse(x),
4322
+ ),
4323
+ `Failed to parse 'DeploymentGetConfigResponseFormatJsonSchema' from JSON`,
4324
+ );
4325
+ }
4326
+
4327
+ /** @internal */
4328
+ export const ResponseFormat1$inboundSchema: z.ZodType<
4329
+ ResponseFormat1,
4330
+ z.ZodTypeDef,
4331
+ unknown
4332
+ > = z.object({
4333
+ type: DeploymentGetConfigResponseFormatDeploymentsResponseType$inboundSchema,
4334
+ display_name: z.string().optional(),
4335
+ json_schema: z.lazy(() =>
4336
+ DeploymentGetConfigResponseFormatJsonSchema$inboundSchema
4337
+ ),
4338
+ }).transform((v) => {
4339
+ return remap$(v, {
4340
+ "display_name": "displayName",
4341
+ "json_schema": "jsonSchema",
4342
+ });
4343
+ });
4344
+
4345
+ export function responseFormat1FromJSON(
4346
+ jsonString: string,
4347
+ ): SafeParseResult<ResponseFormat1, SDKValidationError> {
4348
+ return safeParse(
4349
+ jsonString,
4350
+ (x) => ResponseFormat1$inboundSchema.parse(JSON.parse(x)),
4351
+ `Failed to parse 'ResponseFormat1' from JSON`,
4352
+ );
4353
+ }
4354
+
4355
+ /** @internal */
4356
+ export const DeploymentGetConfigResponseFormat$inboundSchema: z.ZodType<
4357
+ DeploymentGetConfigResponseFormat,
4358
+ z.ZodTypeDef,
4359
+ unknown
4360
+ > = z.union([
4361
+ z.lazy(() => ResponseFormat1$inboundSchema),
4362
+ z.lazy(() => ResponseFormat2$inboundSchema),
4363
+ z.lazy(() => ResponseFormat3$inboundSchema),
4364
+ ResponseFormat4$inboundSchema,
4365
+ ResponseFormat5$inboundSchema,
4366
+ ResponseFormat6$inboundSchema,
4367
+ ]);
4368
+
4369
+ export function deploymentGetConfigResponseFormatFromJSON(
4370
+ jsonString: string,
4371
+ ): SafeParseResult<DeploymentGetConfigResponseFormat, SDKValidationError> {
4372
+ return safeParse(
4373
+ jsonString,
4374
+ (x) => DeploymentGetConfigResponseFormat$inboundSchema.parse(JSON.parse(x)),
4375
+ `Failed to parse 'DeploymentGetConfigResponseFormat' from JSON`,
4376
+ );
4377
+ }
4378
+
4379
+ /** @internal */
4380
+ export const PhotoRealVersion$inboundSchema: z.ZodNativeEnum<
4381
+ typeof PhotoRealVersion
4382
+ > = z.nativeEnum(PhotoRealVersion);
4383
+
4384
+ /** @internal */
4385
+ export const DeploymentGetConfigEncodingFormat$inboundSchema: z.ZodNativeEnum<
4386
+ typeof DeploymentGetConfigEncodingFormat
4387
+ > = z.nativeEnum(DeploymentGetConfigEncodingFormat);
4388
+
4389
+ /** @internal */
4390
+ export const DeploymentGetConfigReasoningEffort$inboundSchema: z.ZodNativeEnum<
4391
+ typeof DeploymentGetConfigReasoningEffort
4392
+ > = z.nativeEnum(DeploymentGetConfigReasoningEffort);
4393
+
4394
+ /** @internal */
4395
+ export const Verbosity$inboundSchema: z.ZodNativeEnum<typeof Verbosity> = z
4396
+ .nativeEnum(Verbosity);
4397
+
4398
+ /** @internal */
4399
+ export const ThinkingLevel$inboundSchema: z.ZodNativeEnum<
4400
+ typeof ThinkingLevel
4401
+ > = z.nativeEnum(ThinkingLevel);
4402
+
4403
+ /** @internal */
4404
+ export const DeploymentGetConfigParameters$inboundSchema: z.ZodType<
4405
+ DeploymentGetConfigParameters,
4406
+ z.ZodTypeDef,
4407
+ unknown
4408
+ > = z.object({
4409
+ temperature: z.number().optional(),
4410
+ maxTokens: z.number().optional(),
4411
+ topK: z.number().optional(),
4412
+ topP: z.number().optional(),
4413
+ frequencyPenalty: z.number().optional(),
4414
+ presencePenalty: z.number().optional(),
4415
+ numImages: z.number().optional(),
4416
+ seed: z.number().optional(),
4417
+ format: DeploymentGetConfigFormat$inboundSchema.optional(),
4418
+ dimensions: z.string().optional(),
4419
+ quality: z.string().optional(),
4420
+ style: z.string().optional(),
4421
+ responseFormat: z.nullable(
4422
+ z.union([
4423
+ z.lazy(() => ResponseFormat1$inboundSchema),
4424
+ z.lazy(() => ResponseFormat2$inboundSchema),
4425
+ z.lazy(() => ResponseFormat3$inboundSchema),
4426
+ ResponseFormat4$inboundSchema,
4427
+ ResponseFormat5$inboundSchema,
4428
+ ResponseFormat6$inboundSchema,
4429
+ ]),
4430
+ ).optional(),
4431
+ photoRealVersion: PhotoRealVersion$inboundSchema.optional(),
4432
+ encoding_format: DeploymentGetConfigEncodingFormat$inboundSchema.optional(),
4433
+ reasoningEffort: DeploymentGetConfigReasoningEffort$inboundSchema.optional(),
4434
+ budgetTokens: z.number().optional(),
4435
+ verbosity: Verbosity$inboundSchema.optional(),
4436
+ thinkingLevel: ThinkingLevel$inboundSchema.optional(),
4437
+ }).transform((v) => {
4438
+ return remap$(v, {
4439
+ "encoding_format": "encodingFormat",
4440
+ });
4441
+ });
4442
+
4443
+ export function deploymentGetConfigParametersFromJSON(
4444
+ jsonString: string,
4445
+ ): SafeParseResult<DeploymentGetConfigParameters, SDKValidationError> {
4446
+ return safeParse(
4447
+ jsonString,
4448
+ (x) => DeploymentGetConfigParameters$inboundSchema.parse(JSON.parse(x)),
4449
+ `Failed to parse 'DeploymentGetConfigParameters' from JSON`,
4450
+ );
4451
+ }
4452
+
4453
+ /** @internal */
4454
+ export const DeploymentGetConfigDeploymentsType$inboundSchema: z.ZodNativeEnum<
4455
+ typeof DeploymentGetConfigDeploymentsType
4456
+ > = z.nativeEnum(DeploymentGetConfigDeploymentsType);
4457
+
4458
+ /** @internal */
4459
+ export const DeploymentGetConfigFunction$inboundSchema: z.ZodType<
4460
+ DeploymentGetConfigFunction,
4461
+ z.ZodTypeDef,
4462
+ unknown
4463
+ > = z.object({
4464
+ name: z.string(),
4465
+ description: z.string().optional(),
4466
+ parameters: z.record(z.any()).optional(),
4467
+ });
4468
+
4469
+ export function deploymentGetConfigFunctionFromJSON(
4470
+ jsonString: string,
4471
+ ): SafeParseResult<DeploymentGetConfigFunction, SDKValidationError> {
4472
+ return safeParse(
4473
+ jsonString,
4474
+ (x) => DeploymentGetConfigFunction$inboundSchema.parse(JSON.parse(x)),
4475
+ `Failed to parse 'DeploymentGetConfigFunction' from JSON`,
4476
+ );
4477
+ }
4478
+
4479
+ /** @internal */
4480
+ export const DeploymentGetConfigTools$inboundSchema: z.ZodType<
4481
+ DeploymentGetConfigTools,
4482
+ z.ZodTypeDef,
4483
+ unknown
4484
+ > = z.object({
4485
+ type: DeploymentGetConfigDeploymentsType$inboundSchema,
4486
+ function: z.lazy(() => DeploymentGetConfigFunction$inboundSchema),
4487
+ });
4488
+
4489
+ export function deploymentGetConfigToolsFromJSON(
4490
+ jsonString: string,
4491
+ ): SafeParseResult<DeploymentGetConfigTools, SDKValidationError> {
4492
+ return safeParse(
4493
+ jsonString,
4494
+ (x) => DeploymentGetConfigTools$inboundSchema.parse(JSON.parse(x)),
4495
+ `Failed to parse 'DeploymentGetConfigTools' from JSON`,
4496
+ );
4497
+ }
4498
+
4499
+ /** @internal */
4500
+ export const DeploymentGetConfigResponseBody$inboundSchema: z.ZodType<
4501
+ DeploymentGetConfigResponseBody,
4502
+ z.ZodTypeDef,
4503
+ unknown
4504
+ > = z.object({
4505
+ id: z.string(),
4506
+ provider: z.string(),
4507
+ model: z.string(),
4508
+ type: DeploymentGetConfigType$inboundSchema.optional(),
4509
+ version: z.string(),
4510
+ messages: z.array(
4511
+ z.lazy(() => DeploymentGetConfigDeploymentsMessages$inboundSchema),
4512
+ ),
4513
+ parameters: z.lazy(() => DeploymentGetConfigParameters$inboundSchema),
4514
+ tools: z.array(z.lazy(() => DeploymentGetConfigTools$inboundSchema))
4515
+ .optional(),
4516
+ });
4517
+
4518
+ export function deploymentGetConfigResponseBodyFromJSON(
4519
+ jsonString: string,
4520
+ ): SafeParseResult<DeploymentGetConfigResponseBody, SDKValidationError> {
4521
+ return safeParse(
4522
+ jsonString,
4523
+ (x) => DeploymentGetConfigResponseBody$inboundSchema.parse(JSON.parse(x)),
4524
+ `Failed to parse 'DeploymentGetConfigResponseBody' from JSON`,
4525
+ );
4526
+ }