@orq-ai/node 4.4.0 → 4.5.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (451) hide show
  1. package/examples/package-lock.json +4 -7
  2. package/jsr.json +1 -1
  3. package/lib/config.d.ts +2 -2
  4. package/lib/config.js +2 -2
  5. package/lib/config.js.map +1 -1
  6. package/models/components/partdoneevent.js +1 -1
  7. package/models/components/reasoningpart.js +1 -1
  8. package/models/operations/createcontact.js +1 -1
  9. package/models/operations/createdataset.js +1 -1
  10. package/models/operations/createdatasetitem.js +4 -4
  11. package/models/operations/createdatasource.js +1 -1
  12. package/models/operations/createeval.js +16 -16
  13. package/models/operations/createidentity.js +1 -1
  14. package/models/operations/createtool.js +6 -6
  15. package/models/operations/fileget.js +1 -1
  16. package/models/operations/filelist.js +1 -1
  17. package/models/operations/fileupload.js +1 -1
  18. package/models/operations/getalltools.js +6 -6
  19. package/models/operations/getevals.js +16 -16
  20. package/models/operations/listdatasetdatapoints.js +4 -4
  21. package/models/operations/listdatasets.js +1 -1
  22. package/models/operations/listdatasources.js +1 -1
  23. package/models/operations/listidentities.js +1 -1
  24. package/models/operations/retrievedatapoint.js +4 -4
  25. package/models/operations/retrievedataset.js +1 -1
  26. package/models/operations/retrievedatasource.js +1 -1
  27. package/models/operations/retrieveidentity.js +1 -1
  28. package/models/operations/retrievetool.js +6 -6
  29. package/models/operations/runagent.js +1 -1
  30. package/models/operations/streamrunagent.js +1 -1
  31. package/models/operations/updatedatapoint.js +4 -4
  32. package/models/operations/updatedataset.js +1 -1
  33. package/models/operations/updatedatasource.js +1 -1
  34. package/models/operations/updateeval.js +16 -16
  35. package/models/operations/updateidentity.js +1 -1
  36. package/models/operations/updatetool.js +7 -7
  37. package/package.json +4 -3
  38. package/src/lib/config.ts +2 -2
  39. package/src/models/components/partdoneevent.ts +1 -1
  40. package/src/models/components/reasoningpart.ts +1 -1
  41. package/src/models/operations/createcontact.ts +1 -1
  42. package/src/models/operations/createdataset.ts +1 -1
  43. package/src/models/operations/createdatasetitem.ts +4 -4
  44. package/src/models/operations/createdatasource.ts +1 -1
  45. package/src/models/operations/createeval.ts +16 -16
  46. package/src/models/operations/createidentity.ts +1 -1
  47. package/src/models/operations/createtool.ts +6 -6
  48. package/src/models/operations/fileget.ts +1 -1
  49. package/src/models/operations/filelist.ts +1 -1
  50. package/src/models/operations/fileupload.ts +1 -1
  51. package/src/models/operations/getalltools.ts +6 -6
  52. package/src/models/operations/getevals.ts +16 -16
  53. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  54. package/src/models/operations/listdatasets.ts +1 -1
  55. package/src/models/operations/listdatasources.ts +1 -1
  56. package/src/models/operations/listidentities.ts +1 -1
  57. package/src/models/operations/retrievedatapoint.ts +4 -4
  58. package/src/models/operations/retrievedataset.ts +1 -1
  59. package/src/models/operations/retrievedatasource.ts +1 -1
  60. package/src/models/operations/retrieveidentity.ts +1 -1
  61. package/src/models/operations/retrievetool.ts +6 -6
  62. package/src/models/operations/runagent.ts +1 -1
  63. package/src/models/operations/streamrunagent.ts +1 -1
  64. package/src/models/operations/updatedatapoint.ts +4 -4
  65. package/src/models/operations/updatedataset.ts +1 -1
  66. package/src/models/operations/updatedatasource.ts +1 -1
  67. package/src/models/operations/updateeval.ts +16 -16
  68. package/src/models/operations/updateidentity.ts +1 -1
  69. package/src/models/operations/updatetool.ts +7 -7
  70. package/_speakeasy/.github/action-inputs-config.json +0 -53
  71. package/_speakeasy/.github/action-security-config.json +0 -88
  72. package/packages/orq-rc/examples/contactsCreate.example.ts +0 -42
  73. package/packages/orq-rc/examples/package-lock.json +0 -610
  74. package/packages/orq-rc/examples/package.json +0 -18
  75. package/packages/orq-rc/jsr.json +0 -28
  76. package/packages/orq-rc/package-lock.json +0 -1740
  77. package/packages/orq-rc/package.json +0 -30
  78. package/packages/orq-rc/src/core.ts +0 -13
  79. package/packages/orq-rc/src/funcs/agentsCreate.ts +0 -161
  80. package/packages/orq-rc/src/funcs/agentsDelete.ts +0 -180
  81. package/packages/orq-rc/src/funcs/agentsInvoke.ts +0 -177
  82. package/packages/orq-rc/src/funcs/agentsList.ts +0 -179
  83. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +0 -183
  84. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +0 -180
  85. package/packages/orq-rc/src/funcs/agentsRun.ts +0 -162
  86. package/packages/orq-rc/src/funcs/agentsStream.ts +0 -201
  87. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +0 -186
  88. package/packages/orq-rc/src/funcs/agentsUpdate.ts +0 -184
  89. package/packages/orq-rc/src/funcs/annotationsCreate.ts +0 -171
  90. package/packages/orq-rc/src/funcs/annotationsDelete.ts +0 -171
  91. package/packages/orq-rc/src/funcs/chunkingParse.ts +0 -160
  92. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -160
  93. package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -167
  94. package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -165
  95. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -171
  96. package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -167
  97. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -182
  98. package/packages/orq-rc/src/funcs/datasetsList.ts +0 -167
  99. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -174
  100. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -175
  101. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -181
  102. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -176
  103. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -179
  104. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -168
  105. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -176
  106. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -176
  107. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -168
  108. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -183
  109. package/packages/orq-rc/src/funcs/evalsAll.ts +0 -173
  110. package/packages/orq-rc/src/funcs/evalsCreate.ts +0 -169
  111. package/packages/orq-rc/src/funcs/evalsDelete.ts +0 -173
  112. package/packages/orq-rc/src/funcs/evalsInvoke.ts +0 -181
  113. package/packages/orq-rc/src/funcs/evalsUpdate.ts +0 -173
  114. package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts +0 -183
  115. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -160
  116. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -187
  117. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -164
  118. package/packages/orq-rc/src/funcs/filesGet.ts +0 -166
  119. package/packages/orq-rc/src/funcs/filesList.ts +0 -167
  120. package/packages/orq-rc/src/funcs/identitiesCreate.ts +0 -165
  121. package/packages/orq-rc/src/funcs/identitiesDelete.ts +0 -176
  122. package/packages/orq-rc/src/funcs/identitiesList.ts +0 -170
  123. package/packages/orq-rc/src/funcs/identitiesRetrieve.ts +0 -175
  124. package/packages/orq-rc/src/funcs/identitiesUpdate.ts +0 -176
  125. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +0 -158
  126. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -171
  127. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -166
  128. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -167
  129. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -174
  130. package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +0 -170
  131. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -173
  132. package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +0 -170
  133. package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -169
  134. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -178
  135. package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +0 -171
  136. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -174
  137. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -166
  138. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -173
  139. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -169
  140. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +0 -167
  141. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -164
  142. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -174
  143. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -170
  144. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +0 -162
  145. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +0 -176
  146. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +0 -170
  147. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +0 -168
  148. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +0 -185
  149. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +0 -180
  150. package/packages/orq-rc/src/funcs/memoryStoresList.ts +0 -178
  151. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +0 -184
  152. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +0 -177
  153. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +0 -177
  154. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +0 -179
  155. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +0 -174
  156. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +0 -168
  157. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +0 -180
  158. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +0 -175
  159. package/packages/orq-rc/src/funcs/modelsList.ts +0 -142
  160. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -160
  161. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -173
  162. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -181
  163. package/packages/orq-rc/src/funcs/promptsList.ts +0 -167
  164. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -173
  165. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -166
  166. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -173
  167. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -161
  168. package/packages/orq-rc/src/funcs/routerAudioSpeechCreate.ts +0 -161
  169. package/packages/orq-rc/src/funcs/routerAudioTranscriptionsCreate.ts +0 -262
  170. package/packages/orq-rc/src/funcs/routerAudioTranslationsCreate.ts +0 -252
  171. package/packages/orq-rc/src/funcs/routerChatCompletionsCreate.ts +0 -168
  172. package/packages/orq-rc/src/funcs/routerCompletionsCreate.ts +0 -168
  173. package/packages/orq-rc/src/funcs/routerEmbeddingsCreate.ts +0 -161
  174. package/packages/orq-rc/src/funcs/routerImagesEditsCreate.ts +0 -222
  175. package/packages/orq-rc/src/funcs/routerImagesGenerationsCreate.ts +0 -160
  176. package/packages/orq-rc/src/funcs/routerImagesVariationsCreate.ts +0 -218
  177. package/packages/orq-rc/src/funcs/routerModerationsCreate.ts +0 -167
  178. package/packages/orq-rc/src/funcs/routerOcr.ts +0 -158
  179. package/packages/orq-rc/src/funcs/routerRerankCreate.ts +0 -160
  180. package/packages/orq-rc/src/funcs/routerResponsesCreate.ts +0 -167
  181. package/packages/orq-rc/src/funcs/toolsCreate.ts +0 -163
  182. package/packages/orq-rc/src/funcs/toolsDelete.ts +0 -167
  183. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersions.ts +0 -183
  184. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +0 -190
  185. package/packages/orq-rc/src/funcs/toolsList.ts +0 -176
  186. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +0 -166
  187. package/packages/orq-rc/src/funcs/toolsUpdate.ts +0 -176
  188. package/packages/orq-rc/src/hooks/global.ts +0 -44
  189. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  190. package/packages/orq-rc/src/hooks/index.ts +0 -6
  191. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  192. package/packages/orq-rc/src/hooks/types.ts +0 -112
  193. package/packages/orq-rc/src/index.ts +0 -9
  194. package/packages/orq-rc/src/lib/base64.ts +0 -37
  195. package/packages/orq-rc/src/lib/config.ts +0 -74
  196. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  197. package/packages/orq-rc/src/lib/encodings.ts +0 -497
  198. package/packages/orq-rc/src/lib/env.ts +0 -89
  199. package/packages/orq-rc/src/lib/event-streams.ts +0 -152
  200. package/packages/orq-rc/src/lib/files.ts +0 -82
  201. package/packages/orq-rc/src/lib/http.ts +0 -323
  202. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  203. package/packages/orq-rc/src/lib/logger.ts +0 -9
  204. package/packages/orq-rc/src/lib/matchers.ts +0 -345
  205. package/packages/orq-rc/src/lib/primitives.ts +0 -150
  206. package/packages/orq-rc/src/lib/retries.ts +0 -218
  207. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  208. package/packages/orq-rc/src/lib/sdks.ts +0 -407
  209. package/packages/orq-rc/src/lib/security.ts +0 -264
  210. package/packages/orq-rc/src/lib/url.ts +0 -33
  211. package/packages/orq-rc/src/models/components/actionreviewedstreamingevent.ts +0 -99
  212. package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +0 -185
  213. package/packages/orq-rc/src/models/components/agenterroredstreamingevent.ts +0 -73
  214. package/packages/orq-rc/src/models/components/agentexecutionstartedstreamingevent.ts +0 -91
  215. package/packages/orq-rc/src/models/components/agenthandedoffstreamingevent.ts +0 -71
  216. package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +0 -507
  217. package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +0 -165
  218. package/packages/orq-rc/src/models/components/agentresponsemessage.ts +0 -103
  219. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +0 -517
  220. package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +0 -807
  221. package/packages/orq-rc/src/models/components/audiocontentpartschema.ts +0 -136
  222. package/packages/orq-rc/src/models/components/createagentresponse.ts +0 -299
  223. package/packages/orq-rc/src/models/components/datapart.ts +0 -38
  224. package/packages/orq-rc/src/models/components/errorpart.ts +0 -58
  225. package/packages/orq-rc/src/models/components/errorstreamingevent.ts +0 -66
  226. package/packages/orq-rc/src/models/components/executionnamedstreamingevent.ts +0 -71
  227. package/packages/orq-rc/src/models/components/executionreviewedstreamingevent.ts +0 -61
  228. package/packages/orq-rc/src/models/components/executionreviewrequiredstreamingevent.ts +0 -67
  229. package/packages/orq-rc/src/models/components/filecontentpartschema.ts +0 -87
  230. package/packages/orq-rc/src/models/components/filepart.ts +0 -218
  231. package/packages/orq-rc/src/models/components/imagecontentpartschema.ts +0 -268
  232. package/packages/orq-rc/src/models/components/index.ts +0 -56
  233. package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +0 -3450
  234. package/packages/orq-rc/src/models/components/partdelta.ts +0 -39
  235. package/packages/orq-rc/src/models/components/partdeltaevent.ts +0 -73
  236. package/packages/orq-rc/src/models/components/partdoneevent.ts +0 -139
  237. package/packages/orq-rc/src/models/components/publiccontact.ts +0 -71
  238. package/packages/orq-rc/src/models/components/publicidentity.ts +0 -69
  239. package/packages/orq-rc/src/models/components/reasoningpart.ts +0 -62
  240. package/packages/orq-rc/src/models/components/reasoningpartschema.ts +0 -71
  241. package/packages/orq-rc/src/models/components/redactedreasoningpartschema.ts +0 -66
  242. package/packages/orq-rc/src/models/components/refusalpartschema.ts +0 -64
  243. package/packages/orq-rc/src/models/components/responsedoneevent.ts +0 -318
  244. package/packages/orq-rc/src/models/components/responsefailedevent.ts +0 -72
  245. package/packages/orq-rc/src/models/components/responsestartedevent.ts +0 -91
  246. package/packages/orq-rc/src/models/components/responsestreamingevent.ts +0 -85
  247. package/packages/orq-rc/src/models/components/reviewoutcome.ts +0 -23
  248. package/packages/orq-rc/src/models/components/security.ts +0 -32
  249. package/packages/orq-rc/src/models/components/textcontentpartschema.ts +0 -207
  250. package/packages/orq-rc/src/models/components/textpart.ts +0 -54
  251. package/packages/orq-rc/src/models/components/thinkingconfigdisabledschema.ts +0 -59
  252. package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +0 -106
  253. package/packages/orq-rc/src/models/components/timeoutstreamingevent.ts +0 -64
  254. package/packages/orq-rc/src/models/components/toolcallpart.ts +0 -51
  255. package/packages/orq-rc/src/models/components/tooldoneevent.ts +0 -77
  256. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +0 -230
  257. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +0 -214
  258. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +0 -200
  259. package/packages/orq-rc/src/models/components/toolfailedevent.ts +0 -77
  260. package/packages/orq-rc/src/models/components/toolresultpart.ts +0 -71
  261. package/packages/orq-rc/src/models/components/toolreviewdoneevent.ts +0 -78
  262. package/packages/orq-rc/src/models/components/toolreviewrequestedevent.ts +0 -87
  263. package/packages/orq-rc/src/models/components/toolstartedevent.ts +0 -82
  264. package/packages/orq-rc/src/models/errors/apierror.ts +0 -40
  265. package/packages/orq-rc/src/models/errors/createeval.ts +0 -51
  266. package/packages/orq-rc/src/models/errors/createmoderation.ts +0 -84
  267. package/packages/orq-rc/src/models/errors/createtranscription.ts +0 -87
  268. package/packages/orq-rc/src/models/errors/createtranslation.ts +0 -87
  269. package/packages/orq-rc/src/models/errors/deleteagent.ts +0 -51
  270. package/packages/orq-rc/src/models/errors/deleteeval.ts +0 -51
  271. package/packages/orq-rc/src/models/errors/deleteidentity.ts +0 -62
  272. package/packages/orq-rc/src/models/errors/deleteprompt.ts +0 -51
  273. package/packages/orq-rc/src/models/errors/getevals.ts +0 -51
  274. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -51
  275. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +0 -51
  276. package/packages/orq-rc/src/models/errors/getv2toolstoolidversions.ts +0 -51
  277. package/packages/orq-rc/src/models/errors/getv2toolstoolidversionsversionid.ts +0 -52
  278. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -59
  279. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  280. package/packages/orq-rc/src/models/errors/index.ts +0 -33
  281. package/packages/orq-rc/src/models/errors/invokeeval.ts +0 -141
  282. package/packages/orq-rc/src/models/errors/orqerror.ts +0 -35
  283. package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +0 -50
  284. package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +0 -51
  285. package/packages/orq-rc/src/models/errors/retrieveidentity.ts +0 -62
  286. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -109
  287. package/packages/orq-rc/src/models/errors/streamagent.ts +0 -51
  288. package/packages/orq-rc/src/models/errors/streamrunagent.ts +0 -51
  289. package/packages/orq-rc/src/models/errors/updateagent.ts +0 -51
  290. package/packages/orq-rc/src/models/errors/updateeval.ts +0 -51
  291. package/packages/orq-rc/src/models/errors/updateidentity.ts +0 -54
  292. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -51
  293. package/packages/orq-rc/src/models/errors/updatetool.ts +0 -62
  294. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -39
  295. package/packages/orq-rc/src/models/operations/createagentrequest.ts +0 -7093
  296. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +0 -609
  297. package/packages/orq-rc/src/models/operations/createannotation.ts +0 -162
  298. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +0 -6381
  299. package/packages/orq-rc/src/models/operations/createchunk.ts +0 -222
  300. package/packages/orq-rc/src/models/operations/createcompletion.ts +0 -3413
  301. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -156
  302. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -162
  303. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -2551
  304. package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -437
  305. package/packages/orq-rc/src/models/operations/createembedding.ts +0 -947
  306. package/packages/orq-rc/src/models/operations/createeval.ts +0 -4170
  307. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -144
  308. package/packages/orq-rc/src/models/operations/createidentity.ts +0 -162
  309. package/packages/orq-rc/src/models/operations/createimage.ts +0 -1028
  310. package/packages/orq-rc/src/models/operations/createimageedit.ts +0 -1045
  311. package/packages/orq-rc/src/models/operations/createimagevariation.ts +0 -1067
  312. package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -944
  313. package/packages/orq-rc/src/models/operations/creatememory.ts +0 -142
  314. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +0 -152
  315. package/packages/orq-rc/src/models/operations/creatememorystore.ts +0 -199
  316. package/packages/orq-rc/src/models/operations/createmoderation.ts +0 -664
  317. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -5401
  318. package/packages/orq-rc/src/models/operations/creatererank.ts +0 -890
  319. package/packages/orq-rc/src/models/operations/createresponse.ts +0 -3324
  320. package/packages/orq-rc/src/models/operations/createspeech.ts +0 -700
  321. package/packages/orq-rc/src/models/operations/createtool.ts +0 -2499
  322. package/packages/orq-rc/src/models/operations/createtranscription.ts +0 -955
  323. package/packages/orq-rc/src/models/operations/createtranslation.ts +0 -930
  324. package/packages/orq-rc/src/models/operations/deleteagent.ts +0 -39
  325. package/packages/orq-rc/src/models/operations/deleteannotation.ts +0 -79
  326. package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -53
  327. package/packages/orq-rc/src/models/operations/deletechunks.ts +0 -125
  328. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -46
  329. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -39
  330. package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -46
  331. package/packages/orq-rc/src/models/operations/deleteeval.ts +0 -31
  332. package/packages/orq-rc/src/models/operations/deleteidentity.ts +0 -34
  333. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -39
  334. package/packages/orq-rc/src/models/operations/deletememory.ts +0 -46
  335. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +0 -55
  336. package/packages/orq-rc/src/models/operations/deletememorystore.ts +0 -39
  337. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -34
  338. package/packages/orq-rc/src/models/operations/deletetool.ts +0 -36
  339. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -2370
  340. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -4525
  341. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -690
  342. package/packages/orq-rc/src/models/operations/deployments.ts +0 -1268
  343. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -4614
  344. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -39
  345. package/packages/orq-rc/src/models/operations/fileget.ts +0 -116
  346. package/packages/orq-rc/src/models/operations/filelist.ts +0 -172
  347. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -170
  348. package/packages/orq-rc/src/models/operations/getallmemories.ts +0 -173
  349. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +0 -188
  350. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +0 -200
  351. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -3164
  352. package/packages/orq-rc/src/models/operations/getalltools.ts +0 -1398
  353. package/packages/orq-rc/src/models/operations/getchunkscount.ts +0 -121
  354. package/packages/orq-rc/src/models/operations/getevals.ts +0 -2842
  355. package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -171
  356. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -652
  357. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -3089
  358. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -3134
  359. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +0 -162
  360. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +0 -163
  361. package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +0 -110
  362. package/packages/orq-rc/src/models/operations/index.ts +0 -113
  363. package/packages/orq-rc/src/models/operations/invokeagent.ts +0 -733
  364. package/packages/orq-rc/src/models/operations/invokeeval.ts +0 -1253
  365. package/packages/orq-rc/src/models/operations/listagents.ts +0 -3018
  366. package/packages/orq-rc/src/models/operations/listchunks.ts +0 -260
  367. package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +0 -263
  368. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -1498
  369. package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -205
  370. package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -235
  371. package/packages/orq-rc/src/models/operations/listidentities.ts +0 -275
  372. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -642
  373. package/packages/orq-rc/src/models/operations/listmodels.ts +0 -143
  374. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -3209
  375. package/packages/orq-rc/src/models/operations/parse.ts +0 -777
  376. package/packages/orq-rc/src/models/operations/postv2routerocr.ts +0 -478
  377. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -108
  378. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +0 -3104
  379. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -1402
  380. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -150
  381. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -152
  382. package/packages/orq-rc/src/models/operations/retrieveidentity.ts +0 -117
  383. package/packages/orq-rc/src/models/operations/retrievememory.ts +0 -112
  384. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +0 -118
  385. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +0 -144
  386. package/packages/orq-rc/src/models/operations/retrievetool.ts +0 -1379
  387. package/packages/orq-rc/src/models/operations/runagent.ts +0 -5351
  388. package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -1762
  389. package/packages/orq-rc/src/models/operations/streamagent.ts +0 -629
  390. package/packages/orq-rc/src/models/operations/streamrunagent.ts +0 -5546
  391. package/packages/orq-rc/src/models/operations/updateagent.ts +0 -7447
  392. package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -236
  393. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -2555
  394. package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -206
  395. package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -186
  396. package/packages/orq-rc/src/models/operations/updateeval.ts +0 -4066
  397. package/packages/orq-rc/src/models/operations/updateidentity.ts +0 -189
  398. package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -1231
  399. package/packages/orq-rc/src/models/operations/updatememory.ts +0 -142
  400. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +0 -159
  401. package/packages/orq-rc/src/models/operations/updatememorystore.ts +0 -246
  402. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -5472
  403. package/packages/orq-rc/src/models/operations/updatetool.ts +0 -2696
  404. package/packages/orq-rc/src/sdk/agents.ts +0 -196
  405. package/packages/orq-rc/src/sdk/annotations.ts +0 -39
  406. package/packages/orq-rc/src/sdk/audio.ts +0 -25
  407. package/packages/orq-rc/src/sdk/chat.ts +0 -13
  408. package/packages/orq-rc/src/sdk/chunking.ts +0 -27
  409. package/packages/orq-rc/src/sdk/completions.ts +0 -32
  410. package/packages/orq-rc/src/sdk/contacts.ts +0 -27
  411. package/packages/orq-rc/src/sdk/datasets.ts +0 -204
  412. package/packages/orq-rc/src/sdk/deployments.ts +0 -89
  413. package/packages/orq-rc/src/sdk/edits.ts +0 -27
  414. package/packages/orq-rc/src/sdk/embeddings.ts +0 -27
  415. package/packages/orq-rc/src/sdk/evals.ts +0 -84
  416. package/packages/orq-rc/src/sdk/evaluators.ts +0 -27
  417. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  418. package/packages/orq-rc/src/sdk/files.ts +0 -78
  419. package/packages/orq-rc/src/sdk/generations.ts +0 -27
  420. package/packages/orq-rc/src/sdk/identities.ts +0 -99
  421. package/packages/orq-rc/src/sdk/images.ts +0 -25
  422. package/packages/orq-rc/src/sdk/index.ts +0 -5
  423. package/packages/orq-rc/src/sdk/knowledge.ts +0 -309
  424. package/packages/orq-rc/src/sdk/memorystores.ts +0 -286
  425. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  426. package/packages/orq-rc/src/sdk/models.ts +0 -25
  427. package/packages/orq-rc/src/sdk/moderations.ts +0 -24
  428. package/packages/orq-rc/src/sdk/orqcompletions.ts +0 -32
  429. package/packages/orq-rc/src/sdk/orqresponses.ts +0 -32
  430. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  431. package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
  432. package/packages/orq-rc/src/sdk/rerank.ts +0 -27
  433. package/packages/orq-rc/src/sdk/responses.ts +0 -34
  434. package/packages/orq-rc/src/sdk/router.ts +0 -72
  435. package/packages/orq-rc/src/sdk/sdk.ts +0 -115
  436. package/packages/orq-rc/src/sdk/speech.ts +0 -27
  437. package/packages/orq-rc/src/sdk/tools.ts +0 -135
  438. package/packages/orq-rc/src/sdk/transcriptions.ts +0 -24
  439. package/packages/orq-rc/src/sdk/translations.ts +0 -24
  440. package/packages/orq-rc/src/sdk/variations.ts +0 -27
  441. package/packages/orq-rc/src/types/async.ts +0 -68
  442. package/packages/orq-rc/src/types/blobs.ts +0 -32
  443. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  444. package/packages/orq-rc/src/types/enums.ts +0 -45
  445. package/packages/orq-rc/src/types/fp.ts +0 -50
  446. package/packages/orq-rc/src/types/index.ts +0 -11
  447. package/packages/orq-rc/src/types/operations.ts +0 -105
  448. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  449. package/packages/orq-rc/src/types/streams.ts +0 -21
  450. package/packages/orq-rc/src/types/unrecognized.ts +0 -35
  451. package/packages/orq-rc/tsconfig.json +0 -40
@@ -1,4614 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { ClosedEnum } from "../../types/enums.js";
9
- import { Result as SafeParseResult } from "../../types/fp.js";
10
- import * as components from "../components/index.js";
11
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
-
13
- export type DeploymentStreamGlobals = {
14
- environment?: string | undefined;
15
- contactId?: string | undefined;
16
- };
17
-
18
- export type DeploymentStreamContentDeploymentsRequest2 =
19
- components.TextContentPartSchema;
20
-
21
- /**
22
- * The contents of the tool message.
23
- */
24
- export type DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content =
25
- | string
26
- | Array<components.TextContentPartSchema>;
27
-
28
- /**
29
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
30
- */
31
- export const DeploymentStreamPrefixMessagesDeploymentsType = {
32
- Ephemeral: "ephemeral",
33
- } as const;
34
- /**
35
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
36
- */
37
- export type DeploymentStreamPrefixMessagesDeploymentsType = ClosedEnum<
38
- typeof DeploymentStreamPrefixMessagesDeploymentsType
39
- >;
40
-
41
- /**
42
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
43
- *
44
- * @remarks
45
- *
46
- * - `5m`: 5 minutes
47
- * - `1h`: 1 hour
48
- *
49
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
50
- */
51
- export const DeploymentStreamPrefixMessagesTtl = {
52
- Fivem: "5m",
53
- Oneh: "1h",
54
- } as const;
55
- /**
56
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
57
- *
58
- * @remarks
59
- *
60
- * - `5m`: 5 minutes
61
- * - `1h`: 1 hour
62
- *
63
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
64
- */
65
- export type DeploymentStreamPrefixMessagesTtl = ClosedEnum<
66
- typeof DeploymentStreamPrefixMessagesTtl
67
- >;
68
-
69
- export type DeploymentStreamPrefixMessagesCacheControl = {
70
- /**
71
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
72
- */
73
- type: DeploymentStreamPrefixMessagesDeploymentsType;
74
- /**
75
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
76
- *
77
- * @remarks
78
- *
79
- * - `5m`: 5 minutes
80
- * - `1h`: 1 hour
81
- *
82
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
83
- */
84
- ttl?: DeploymentStreamPrefixMessagesTtl | undefined;
85
- };
86
-
87
- export type PrefixMessagesToolMessage = {
88
- /**
89
- * The role of the messages author, in this case tool.
90
- */
91
- role: "tool";
92
- /**
93
- * The contents of the tool message.
94
- */
95
- content: string | Array<components.TextContentPartSchema>;
96
- /**
97
- * Tool call that this message is responding to.
98
- */
99
- toolCallId: string | null;
100
- cacheControl?: DeploymentStreamPrefixMessagesCacheControl | undefined;
101
- };
102
-
103
- export type DeploymentStreamContentDeployments2 =
104
- | (components.TextContentPartSchema & { type: "text" })
105
- | components.RefusalPartSchema
106
- | components.ReasoningPartSchema
107
- | components.RedactedReasoningPartSchema;
108
-
109
- /**
110
- * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
111
- */
112
- export type DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent =
113
- | string
114
- | Array<
115
- | (components.TextContentPartSchema & { type: "text" })
116
- | components.RefusalPartSchema
117
- | components.ReasoningPartSchema
118
- | components.RedactedReasoningPartSchema
119
- >;
120
-
121
- /**
122
- * Data about a previous audio response from the model.
123
- */
124
- export type PrefixMessagesAudio = {
125
- /**
126
- * Unique identifier for a previous audio response from the model.
127
- */
128
- id: string;
129
- };
130
-
131
- /**
132
- * The type of the tool. Currently, only `function` is supported.
133
- */
134
- export const DeploymentStreamPrefixMessagesType = {
135
- Function: "function",
136
- } as const;
137
- /**
138
- * The type of the tool. Currently, only `function` is supported.
139
- */
140
- export type DeploymentStreamPrefixMessagesType = ClosedEnum<
141
- typeof DeploymentStreamPrefixMessagesType
142
- >;
143
-
144
- export type DeploymentStreamPrefixMessagesFunction = {
145
- /**
146
- * The name of the function to call.
147
- */
148
- name?: string | undefined;
149
- /**
150
- * 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.
151
- */
152
- arguments?: string | undefined;
153
- };
154
-
155
- export type DeploymentStreamPrefixMessagesToolCalls = {
156
- /**
157
- * The ID of the tool call.
158
- */
159
- id: string;
160
- /**
161
- * The type of the tool. Currently, only `function` is supported.
162
- */
163
- type: DeploymentStreamPrefixMessagesType;
164
- function: DeploymentStreamPrefixMessagesFunction;
165
- /**
166
- * Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call.
167
- */
168
- thoughtSignature?: string | undefined;
169
- };
170
-
171
- export type PrefixMessagesAssistantMessage = {
172
- /**
173
- * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
174
- */
175
- content?:
176
- | string
177
- | Array<
178
- | (components.TextContentPartSchema & { type: "text" })
179
- | components.RefusalPartSchema
180
- | components.ReasoningPartSchema
181
- | components.RedactedReasoningPartSchema
182
- >
183
- | null
184
- | undefined;
185
- /**
186
- * The refusal message by the assistant.
187
- */
188
- refusal?: string | null | undefined;
189
- /**
190
- * The role of the messages author, in this case `assistant`.
191
- */
192
- role: "assistant";
193
- /**
194
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
195
- */
196
- name?: string | undefined;
197
- /**
198
- * Data about a previous audio response from the model.
199
- */
200
- audio?: PrefixMessagesAudio | null | undefined;
201
- /**
202
- * The tool calls generated by the model, such as function calls.
203
- */
204
- toolCalls?: Array<DeploymentStreamPrefixMessagesToolCalls> | undefined;
205
- };
206
-
207
- /**
208
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
209
- */
210
- export const DeploymentStream2DeploymentsType = {
211
- Ephemeral: "ephemeral",
212
- } as const;
213
- /**
214
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
215
- */
216
- export type DeploymentStream2DeploymentsType = ClosedEnum<
217
- typeof DeploymentStream2DeploymentsType
218
- >;
219
-
220
- /**
221
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
222
- *
223
- * @remarks
224
- *
225
- * - `5m`: 5 minutes
226
- * - `1h`: 1 hour
227
- *
228
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
229
- */
230
- export const DeploymentStream2Ttl = {
231
- Fivem: "5m",
232
- Oneh: "1h",
233
- } as const;
234
- /**
235
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
236
- *
237
- * @remarks
238
- *
239
- * - `5m`: 5 minutes
240
- * - `1h`: 1 hour
241
- *
242
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
243
- */
244
- export type DeploymentStream2Ttl = ClosedEnum<typeof DeploymentStream2Ttl>;
245
-
246
- export type DeploymentStream2CacheControl = {
247
- /**
248
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
249
- */
250
- type: DeploymentStream2DeploymentsType;
251
- /**
252
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
253
- *
254
- * @remarks
255
- *
256
- * - `5m`: 5 minutes
257
- * - `1h`: 1 hour
258
- *
259
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
260
- */
261
- ttl?: DeploymentStream2Ttl | undefined;
262
- };
263
-
264
- export type DeploymentStream24 = {
265
- /**
266
- * The type of the content part. Always `file`.
267
- */
268
- type: "file";
269
- cacheControl?: DeploymentStream2CacheControl | undefined;
270
- /**
271
- * File data for the content part. Must contain either file_data or uri, but not both.
272
- */
273
- file: components.FileContentPartSchema;
274
- };
275
-
276
- export type DeploymentStreamContent2 =
277
- | (components.TextContentPartSchema & { type: "text" })
278
- | components.ImageContentPartSchema
279
- | components.AudioContentPartSchema
280
- | DeploymentStream24;
281
-
282
- /**
283
- * The contents of the user message.
284
- */
285
- export type DeploymentStreamPrefixMessagesDeploymentsRequestContent =
286
- | string
287
- | Array<
288
- | (components.TextContentPartSchema & { type: "text" })
289
- | components.ImageContentPartSchema
290
- | components.AudioContentPartSchema
291
- | DeploymentStream24
292
- >;
293
-
294
- export type PrefixMessagesUserMessage = {
295
- /**
296
- * The role of the messages author, in this case `user`.
297
- */
298
- role: "user";
299
- /**
300
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
301
- */
302
- name?: string | undefined;
303
- /**
304
- * The contents of the user message.
305
- */
306
- content:
307
- | string
308
- | Array<
309
- | (components.TextContentPartSchema & { type: "text" })
310
- | components.ImageContentPartSchema
311
- | components.AudioContentPartSchema
312
- | DeploymentStream24
313
- >;
314
- };
315
-
316
- /**
317
- * The contents of the developer message.
318
- */
319
- export type DeploymentStreamPrefixMessagesDeploymentsContent =
320
- | string
321
- | Array<components.TextContentPartSchema>;
322
-
323
- export type PrefixMessagesDeveloperMessage = {
324
- /**
325
- * The role of the messages author, in this case `developer`.
326
- */
327
- role: "developer";
328
- /**
329
- * The contents of the developer message.
330
- */
331
- content: string | Array<components.TextContentPartSchema>;
332
- /**
333
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
334
- */
335
- name?: string | undefined;
336
- };
337
-
338
- /**
339
- * The contents of the system message.
340
- */
341
- export type DeploymentStreamPrefixMessagesContent =
342
- | string
343
- | Array<components.TextContentPartSchema>;
344
-
345
- /**
346
- * Developer-provided instructions that the model should follow, regardless of messages sent by the user.
347
- */
348
- export type PrefixMessagesSystemMessage = {
349
- /**
350
- * The role of the messages author, in this case `system`.
351
- */
352
- role: "system";
353
- /**
354
- * The contents of the system message.
355
- */
356
- content: string | Array<components.TextContentPartSchema>;
357
- /**
358
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
359
- */
360
- name?: string | undefined;
361
- };
362
-
363
- export type DeploymentStreamPrefixMessages =
364
- | PrefixMessagesSystemMessage
365
- | PrefixMessagesDeveloperMessage
366
- | PrefixMessagesUserMessage
367
- | PrefixMessagesAssistantMessage
368
- | PrefixMessagesToolMessage;
369
-
370
- export type DeploymentStreamContentDeploymentsRequestRequestBodyMessages52 =
371
- components.TextContentPartSchema;
372
-
373
- /**
374
- * The contents of the tool message.
375
- */
376
- export type DeploymentStreamMessagesDeploymentsRequestRequestBody5Content =
377
- | string
378
- | Array<components.TextContentPartSchema>;
379
-
380
- /**
381
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
382
- */
383
- export const DeploymentStreamMessagesDeploymentsType = {
384
- Ephemeral: "ephemeral",
385
- } as const;
386
- /**
387
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
388
- */
389
- export type DeploymentStreamMessagesDeploymentsType = ClosedEnum<
390
- typeof DeploymentStreamMessagesDeploymentsType
391
- >;
392
-
393
- /**
394
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
395
- *
396
- * @remarks
397
- *
398
- * - `5m`: 5 minutes
399
- * - `1h`: 1 hour
400
- *
401
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
402
- */
403
- export const DeploymentStreamMessagesTtl = {
404
- Fivem: "5m",
405
- Oneh: "1h",
406
- } as const;
407
- /**
408
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
409
- *
410
- * @remarks
411
- *
412
- * - `5m`: 5 minutes
413
- * - `1h`: 1 hour
414
- *
415
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
416
- */
417
- export type DeploymentStreamMessagesTtl = ClosedEnum<
418
- typeof DeploymentStreamMessagesTtl
419
- >;
420
-
421
- export type DeploymentStreamMessagesCacheControl = {
422
- /**
423
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
424
- */
425
- type: DeploymentStreamMessagesDeploymentsType;
426
- /**
427
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
428
- *
429
- * @remarks
430
- *
431
- * - `5m`: 5 minutes
432
- * - `1h`: 1 hour
433
- *
434
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
435
- */
436
- ttl?: DeploymentStreamMessagesTtl | undefined;
437
- };
438
-
439
- export type DeploymentStreamMessagesToolMessage = {
440
- /**
441
- * The role of the messages author, in this case tool.
442
- */
443
- role: "tool";
444
- /**
445
- * The contents of the tool message.
446
- */
447
- content: string | Array<components.TextContentPartSchema>;
448
- /**
449
- * Tool call that this message is responding to.
450
- */
451
- toolCallId: string | null;
452
- cacheControl?: DeploymentStreamMessagesCacheControl | undefined;
453
- };
454
-
455
- export type DeploymentStreamContentDeploymentsRequestRequestBodyMessages2 =
456
- | (components.TextContentPartSchema & { type: "text" })
457
- | components.RefusalPartSchema
458
- | components.ReasoningPartSchema
459
- | components.RedactedReasoningPartSchema;
460
-
461
- /**
462
- * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
463
- */
464
- export type DeploymentStreamMessagesDeploymentsRequestRequestBodyContent =
465
- | string
466
- | Array<
467
- | (components.TextContentPartSchema & { type: "text" })
468
- | components.RefusalPartSchema
469
- | components.ReasoningPartSchema
470
- | components.RedactedReasoningPartSchema
471
- >;
472
-
473
- /**
474
- * Data about a previous audio response from the model.
475
- */
476
- export type DeploymentStreamMessagesAudio = {
477
- /**
478
- * Unique identifier for a previous audio response from the model.
479
- */
480
- id: string;
481
- };
482
-
483
- /**
484
- * The type of the tool. Currently, only `function` is supported.
485
- */
486
- export const DeploymentStreamMessagesType = {
487
- Function: "function",
488
- } as const;
489
- /**
490
- * The type of the tool. Currently, only `function` is supported.
491
- */
492
- export type DeploymentStreamMessagesType = ClosedEnum<
493
- typeof DeploymentStreamMessagesType
494
- >;
495
-
496
- export type DeploymentStreamMessagesFunction = {
497
- /**
498
- * The name of the function to call.
499
- */
500
- name?: string | undefined;
501
- /**
502
- * 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.
503
- */
504
- arguments?: string | undefined;
505
- };
506
-
507
- export type DeploymentStreamMessagesToolCalls = {
508
- /**
509
- * The ID of the tool call.
510
- */
511
- id: string;
512
- /**
513
- * The type of the tool. Currently, only `function` is supported.
514
- */
515
- type: DeploymentStreamMessagesType;
516
- function: DeploymentStreamMessagesFunction;
517
- /**
518
- * Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call.
519
- */
520
- thoughtSignature?: string | undefined;
521
- };
522
-
523
- export type DeploymentStreamMessagesAssistantMessage = {
524
- /**
525
- * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
526
- */
527
- content?:
528
- | string
529
- | Array<
530
- | (components.TextContentPartSchema & { type: "text" })
531
- | components.RefusalPartSchema
532
- | components.ReasoningPartSchema
533
- | components.RedactedReasoningPartSchema
534
- >
535
- | null
536
- | undefined;
537
- /**
538
- * The refusal message by the assistant.
539
- */
540
- refusal?: string | null | undefined;
541
- /**
542
- * The role of the messages author, in this case `assistant`.
543
- */
544
- role: "assistant";
545
- /**
546
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
547
- */
548
- name?: string | undefined;
549
- /**
550
- * Data about a previous audio response from the model.
551
- */
552
- audio?: DeploymentStreamMessagesAudio | null | undefined;
553
- /**
554
- * The tool calls generated by the model, such as function calls.
555
- */
556
- toolCalls?: Array<DeploymentStreamMessagesToolCalls> | undefined;
557
- };
558
-
559
- /**
560
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
561
- */
562
- export const DeploymentStream2DeploymentsRequestRequestBodyType = {
563
- Ephemeral: "ephemeral",
564
- } as const;
565
- /**
566
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
567
- */
568
- export type DeploymentStream2DeploymentsRequestRequestBodyType = ClosedEnum<
569
- typeof DeploymentStream2DeploymentsRequestRequestBodyType
570
- >;
571
-
572
- /**
573
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
574
- *
575
- * @remarks
576
- *
577
- * - `5m`: 5 minutes
578
- * - `1h`: 1 hour
579
- *
580
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
581
- */
582
- export const DeploymentStream2DeploymentsTtl = {
583
- Fivem: "5m",
584
- Oneh: "1h",
585
- } as const;
586
- /**
587
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
588
- *
589
- * @remarks
590
- *
591
- * - `5m`: 5 minutes
592
- * - `1h`: 1 hour
593
- *
594
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
595
- */
596
- export type DeploymentStream2DeploymentsTtl = ClosedEnum<
597
- typeof DeploymentStream2DeploymentsTtl
598
- >;
599
-
600
- export type DeploymentStream2DeploymentsCacheControl = {
601
- /**
602
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
603
- */
604
- type: DeploymentStream2DeploymentsRequestRequestBodyType;
605
- /**
606
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
607
- *
608
- * @remarks
609
- *
610
- * - `5m`: 5 minutes
611
- * - `1h`: 1 hour
612
- *
613
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
614
- */
615
- ttl?: DeploymentStream2DeploymentsTtl | undefined;
616
- };
617
-
618
- export type DeploymentStream2Deployments4 = {
619
- /**
620
- * The type of the content part. Always `file`.
621
- */
622
- type: "file";
623
- cacheControl?: DeploymentStream2DeploymentsCacheControl | undefined;
624
- /**
625
- * File data for the content part. Must contain either file_data or uri, but not both.
626
- */
627
- file: components.FileContentPartSchema;
628
- };
629
-
630
- export type DeploymentStreamContentDeploymentsRequestRequestBody2 =
631
- | (components.TextContentPartSchema & { type: "text" })
632
- | components.ImageContentPartSchema
633
- | components.AudioContentPartSchema
634
- | DeploymentStream2Deployments4;
635
-
636
- /**
637
- * The contents of the user message.
638
- */
639
- export type DeploymentStreamMessagesDeploymentsRequestContent =
640
- | string
641
- | Array<
642
- | (components.TextContentPartSchema & { type: "text" })
643
- | components.ImageContentPartSchema
644
- | components.AudioContentPartSchema
645
- | DeploymentStream2Deployments4
646
- >;
647
-
648
- export type DeploymentStreamMessagesUserMessage = {
649
- /**
650
- * The role of the messages author, in this case `user`.
651
- */
652
- role: "user";
653
- /**
654
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
655
- */
656
- name?: string | undefined;
657
- /**
658
- * The contents of the user message.
659
- */
660
- content:
661
- | string
662
- | Array<
663
- | (components.TextContentPartSchema & { type: "text" })
664
- | components.ImageContentPartSchema
665
- | components.AudioContentPartSchema
666
- | DeploymentStream2Deployments4
667
- >;
668
- };
669
-
670
- /**
671
- * The contents of the developer message.
672
- */
673
- export type DeploymentStreamMessagesDeploymentsContent =
674
- | string
675
- | Array<components.TextContentPartSchema>;
676
-
677
- export type DeploymentStreamMessagesDeveloperMessage = {
678
- /**
679
- * The role of the messages author, in this case `developer`.
680
- */
681
- role: "developer";
682
- /**
683
- * The contents of the developer message.
684
- */
685
- content: string | Array<components.TextContentPartSchema>;
686
- /**
687
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
688
- */
689
- name?: string | undefined;
690
- };
691
-
692
- /**
693
- * The contents of the system message.
694
- */
695
- export type DeploymentStreamMessagesContent =
696
- | string
697
- | Array<components.TextContentPartSchema>;
698
-
699
- /**
700
- * Developer-provided instructions that the model should follow, regardless of messages sent by the user.
701
- */
702
- export type DeploymentStreamMessagesSystemMessage = {
703
- /**
704
- * The role of the messages author, in this case `system`.
705
- */
706
- role: "system";
707
- /**
708
- * The contents of the system message.
709
- */
710
- content: string | Array<components.TextContentPartSchema>;
711
- /**
712
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
713
- */
714
- name?: string | undefined;
715
- };
716
-
717
- export type DeploymentStreamMessages =
718
- | DeploymentStreamMessagesSystemMessage
719
- | DeploymentStreamMessagesDeveloperMessage
720
- | DeploymentStreamMessagesUserMessage
721
- | DeploymentStreamMessagesAssistantMessage
722
- | DeploymentStreamMessagesToolMessage;
723
-
724
- /**
725
- * Metadata about the document
726
- */
727
- export type DeploymentStreamMetadata = {
728
- /**
729
- * Name of the file the text is from.
730
- */
731
- fileName?: string | undefined;
732
- /**
733
- * Content type of the file the text is from.
734
- */
735
- fileType?: string | undefined;
736
- /**
737
- * The page number the text is from.
738
- */
739
- pageNumber?: number | undefined;
740
- };
741
-
742
- export type DeploymentStreamDocuments = {
743
- /**
744
- * The text content of the document
745
- */
746
- text: string;
747
- /**
748
- * Metadata about the document
749
- */
750
- metadata?: DeploymentStreamMetadata | undefined;
751
- };
752
-
753
- export type DeploymentStreamInvokeOptions = {
754
- /**
755
- * Whether to include the retrieved knowledge chunks in the response.
756
- */
757
- includeRetrievals?: boolean | undefined;
758
- /**
759
- * Whether to include the usage metrics in the response.
760
- */
761
- includeUsage?: boolean | undefined;
762
- /**
763
- * 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.
764
- */
765
- mockResponse?: string | undefined;
766
- };
767
-
768
- export type DeploymentStreamThread = {
769
- /**
770
- * Unique thread identifier to group related invocations.
771
- */
772
- id: string;
773
- /**
774
- * Optional tags to differentiate or categorize threads
775
- */
776
- tags?: Array<string> | undefined;
777
- };
778
-
779
- /**
780
- * Exists
781
- */
782
- export type DeploymentStreamOrExists = {
783
- exists: boolean;
784
- };
785
-
786
- export type DeploymentStreamOrDeploymentsNin = string | number | boolean;
787
-
788
- /**
789
- * Not in
790
- */
791
- export type DeploymentStreamOrNin = {
792
- nin: Array<string | number | boolean>;
793
- };
794
-
795
- export type DeploymentStreamOrDeploymentsIn = string | number | boolean;
796
-
797
- /**
798
- * In
799
- */
800
- export type DeploymentStreamOrIn = {
801
- in: Array<string | number | boolean>;
802
- };
803
-
804
- /**
805
- * Less than or equal to
806
- */
807
- export type DeploymentStreamOrLte = {
808
- lte: number;
809
- };
810
-
811
- /**
812
- * Less than
813
- */
814
- export type DeploymentStreamOrLt = {
815
- lt: number;
816
- };
817
-
818
- /**
819
- * Greater than or equal to
820
- */
821
- export type DeploymentStreamOrGte = {
822
- gte: number;
823
- };
824
-
825
- /**
826
- * Greater than
827
- */
828
- export type DeploymentStreamOrGt = {
829
- gt: number;
830
- };
831
-
832
- export type DeploymentStreamOrDeploymentsNe = string | number | boolean;
833
-
834
- /**
835
- * Not equal to
836
- */
837
- export type DeploymentStreamOrNe = {
838
- ne: string | number | boolean;
839
- };
840
-
841
- export type DeploymentStreamOrDeploymentsEq = string | number | boolean;
842
-
843
- /**
844
- * Equal to
845
- */
846
- export type DeploymentStreamOrEq = {
847
- eq: string | number | boolean;
848
- };
849
-
850
- export type DeploymentStreamKnowledgeFilterDeploymentsOr =
851
- | DeploymentStreamOrEq
852
- | DeploymentStreamOrNe
853
- | DeploymentStreamOrGt
854
- | DeploymentStreamOrGte
855
- | DeploymentStreamOrLt
856
- | DeploymentStreamOrLte
857
- | DeploymentStreamOrIn
858
- | DeploymentStreamOrNin
859
- | DeploymentStreamOrExists;
860
-
861
- /**
862
- * Or
863
- */
864
- export type DeploymentStreamKnowledgeFilterOr = {
865
- or: Array<
866
- {
867
- [k: string]:
868
- | DeploymentStreamOrEq
869
- | DeploymentStreamOrNe
870
- | DeploymentStreamOrGt
871
- | DeploymentStreamOrGte
872
- | DeploymentStreamOrLt
873
- | DeploymentStreamOrLte
874
- | DeploymentStreamOrIn
875
- | DeploymentStreamOrNin
876
- | DeploymentStreamOrExists;
877
- }
878
- >;
879
- };
880
-
881
- /**
882
- * Exists
883
- */
884
- export type DeploymentStreamAndExists = {
885
- exists: boolean;
886
- };
887
-
888
- export type DeploymentStreamAndDeploymentsNin = string | number | boolean;
889
-
890
- /**
891
- * Not in
892
- */
893
- export type DeploymentStreamAndNin = {
894
- nin: Array<string | number | boolean>;
895
- };
896
-
897
- export type DeploymentStreamAndDeploymentsIn = string | number | boolean;
898
-
899
- /**
900
- * In
901
- */
902
- export type DeploymentStreamAndIn = {
903
- in: Array<string | number | boolean>;
904
- };
905
-
906
- /**
907
- * Less than or equal to
908
- */
909
- export type DeploymentStreamAndLte = {
910
- lte: number;
911
- };
912
-
913
- /**
914
- * Less than
915
- */
916
- export type DeploymentStreamAndLt = {
917
- lt: number;
918
- };
919
-
920
- /**
921
- * Greater than or equal to
922
- */
923
- export type DeploymentStreamAndGte = {
924
- gte: number;
925
- };
926
-
927
- /**
928
- * Greater than
929
- */
930
- export type DeploymentStreamAndGt = {
931
- gt: number;
932
- };
933
-
934
- export type DeploymentStreamAndDeploymentsNe = string | number | boolean;
935
-
936
- /**
937
- * Not equal to
938
- */
939
- export type DeploymentStreamAndNe = {
940
- ne: string | number | boolean;
941
- };
942
-
943
- export type DeploymentStreamAndDeploymentsEq = string | number | boolean;
944
-
945
- /**
946
- * Equal to
947
- */
948
- export type DeploymentStreamAndEq = {
949
- eq: string | number | boolean;
950
- };
951
-
952
- export type DeploymentStreamKnowledgeFilterDeploymentsAnd =
953
- | DeploymentStreamAndEq
954
- | DeploymentStreamAndNe
955
- | DeploymentStreamAndGt
956
- | DeploymentStreamAndGte
957
- | DeploymentStreamAndLt
958
- | DeploymentStreamAndLte
959
- | DeploymentStreamAndIn
960
- | DeploymentStreamAndNin
961
- | DeploymentStreamAndExists;
962
-
963
- /**
964
- * And
965
- */
966
- export type DeploymentStreamKnowledgeFilterAnd = {
967
- and: Array<
968
- {
969
- [k: string]:
970
- | DeploymentStreamAndEq
971
- | DeploymentStreamAndNe
972
- | DeploymentStreamAndGt
973
- | DeploymentStreamAndGte
974
- | DeploymentStreamAndLt
975
- | DeploymentStreamAndLte
976
- | DeploymentStreamAndIn
977
- | DeploymentStreamAndNin
978
- | DeploymentStreamAndExists;
979
- }
980
- >;
981
- };
982
-
983
- /**
984
- * Exists
985
- */
986
- export type OneExists = {
987
- exists: boolean;
988
- };
989
-
990
- export type DeploymentStream1DeploymentsNin = string | number | boolean;
991
-
992
- /**
993
- * Not in
994
- */
995
- export type DeploymentStream1Nin = {
996
- nin: Array<string | number | boolean>;
997
- };
998
-
999
- export type DeploymentStream1DeploymentsIn = string | number | boolean;
1000
-
1001
- /**
1002
- * In
1003
- */
1004
- export type DeploymentStream1In = {
1005
- in: Array<string | number | boolean>;
1006
- };
1007
-
1008
- /**
1009
- * Less than or equal to
1010
- */
1011
- export type OneLte = {
1012
- lte: number;
1013
- };
1014
-
1015
- /**
1016
- * Less than
1017
- */
1018
- export type OneLt = {
1019
- lt: number;
1020
- };
1021
-
1022
- /**
1023
- * Greater than or equal to
1024
- */
1025
- export type OneGte = {
1026
- gte: number;
1027
- };
1028
-
1029
- /**
1030
- * Greater than
1031
- */
1032
- export type OneGt = {
1033
- gt: number;
1034
- };
1035
-
1036
- export type DeploymentStream1DeploymentsNe = string | number | boolean;
1037
-
1038
- /**
1039
- * Not equal to
1040
- */
1041
- export type DeploymentStream1Ne = {
1042
- ne: string | number | boolean;
1043
- };
1044
-
1045
- export type DeploymentStream1DeploymentsEq = string | number | boolean;
1046
-
1047
- /**
1048
- * Equal to
1049
- */
1050
- export type DeploymentStream1Eq = {
1051
- eq: string | number | boolean;
1052
- };
1053
-
1054
- export type DeploymentStreamKnowledgeFilter1 =
1055
- | DeploymentStream1Eq
1056
- | DeploymentStream1Ne
1057
- | OneGt
1058
- | OneGte
1059
- | OneLt
1060
- | OneLte
1061
- | DeploymentStream1In
1062
- | DeploymentStream1Nin
1063
- | OneExists;
1064
-
1065
- /**
1066
- * A filter to apply to the knowledge base chunk metadata when using knowledge bases in the deployment.
1067
- */
1068
- export type DeploymentStreamKnowledgeFilter =
1069
- | DeploymentStreamKnowledgeFilterAnd
1070
- | DeploymentStreamKnowledgeFilterOr
1071
- | {
1072
- [k: string]:
1073
- | DeploymentStream1Eq
1074
- | DeploymentStream1Ne
1075
- | OneGt
1076
- | OneGte
1077
- | OneLt
1078
- | OneLte
1079
- | DeploymentStream1In
1080
- | DeploymentStream1Nin
1081
- | OneExists;
1082
- };
1083
-
1084
- export type DeploymentStreamRequestBody = {
1085
- /**
1086
- * The deployment key to invoke
1087
- */
1088
- key: string;
1089
- /**
1090
- * Key-value pairs variables to replace in your prompts. If a variable is not provided that is defined in the prompt, the default variables are used.
1091
- */
1092
- inputs?: { [k: string]: any } | undefined;
1093
- /**
1094
- * Key-value pairs that match your data model and fields declared in your deployment routing configuration
1095
- */
1096
- context?: { [k: string]: any } | undefined;
1097
- /**
1098
- * A list of messages to include after the `System` message, but before the `User` and `Assistant` pairs configured in your deployment.
1099
- */
1100
- prefixMessages?:
1101
- | Array<
1102
- | PrefixMessagesSystemMessage
1103
- | PrefixMessagesDeveloperMessage
1104
- | PrefixMessagesUserMessage
1105
- | PrefixMessagesAssistantMessage
1106
- | PrefixMessagesToolMessage
1107
- >
1108
- | undefined;
1109
- /**
1110
- * A list of messages to send to the deployment.
1111
- */
1112
- messages?:
1113
- | Array<
1114
- | DeploymentStreamMessagesSystemMessage
1115
- | DeploymentStreamMessagesDeveloperMessage
1116
- | DeploymentStreamMessagesUserMessage
1117
- | DeploymentStreamMessagesAssistantMessage
1118
- | DeploymentStreamMessagesToolMessage
1119
- >
1120
- | undefined;
1121
- /**
1122
- * Information about the identity making the request. If the identity does not exist, it will be created automatically.
1123
- */
1124
- identity?: components.PublicIdentity | undefined;
1125
- /**
1126
- * A list of file IDs that are associated with the deployment request.
1127
- */
1128
- fileIds?: Array<string> | undefined;
1129
- /**
1130
- * Key-value pairs that you want to attach to the log generated by this request.
1131
- */
1132
- metadata?: { [k: string]: any } | undefined;
1133
- /**
1134
- * Utilized for passing additional parameters to the model provider. Exercise caution when using this feature, as the included parameters will overwrite any parameters specified in the deployment prompt configuration.
1135
- */
1136
- extraParams?: { [k: string]: any } | undefined;
1137
- /**
1138
- * A list of documents from your external knowledge base (e.g., chunks retrieved from your own vector database or RAG pipeline) that provide context for the model response. These documents can be used by evaluators and guardrails to assess the relevance and accuracy of the model output against the provided context.
1139
- */
1140
- documents?: Array<DeploymentStreamDocuments> | undefined;
1141
- invokeOptions?: DeploymentStreamInvokeOptions | undefined;
1142
- thread?: DeploymentStreamThread | undefined;
1143
- /**
1144
- * A filter to apply to the knowledge base chunk metadata when using knowledge bases in the deployment.
1145
- */
1146
- knowledgeFilter?:
1147
- | DeploymentStreamKnowledgeFilterAnd
1148
- | DeploymentStreamKnowledgeFilterOr
1149
- | {
1150
- [k: string]:
1151
- | DeploymentStream1Eq
1152
- | DeploymentStream1Ne
1153
- | OneGt
1154
- | OneGte
1155
- | OneLt
1156
- | OneLte
1157
- | DeploymentStream1In
1158
- | DeploymentStream1Nin
1159
- | OneExists;
1160
- }
1161
- | undefined;
1162
- };
1163
-
1164
- /**
1165
- * Indicates the type of model used to generate the response
1166
- */
1167
- export const DeploymentStreamObject = {
1168
- Chat: "chat",
1169
- Completion: "completion",
1170
- Image: "image",
1171
- } as const;
1172
- /**
1173
- * Indicates the type of model used to generate the response
1174
- */
1175
- export type DeploymentStreamObject = ClosedEnum<typeof DeploymentStreamObject>;
1176
-
1177
- /**
1178
- * The provider used to generate the response
1179
- */
1180
- export const DeploymentStreamProvider = {
1181
- Openai: "openai",
1182
- Groq: "groq",
1183
- Cohere: "cohere",
1184
- Azure: "azure",
1185
- Aws: "aws",
1186
- Google: "google",
1187
- GoogleAi: "google-ai",
1188
- Huggingface: "huggingface",
1189
- Togetherai: "togetherai",
1190
- Perplexity: "perplexity",
1191
- Anthropic: "anthropic",
1192
- Leonardoai: "leonardoai",
1193
- Fal: "fal",
1194
- Nvidia: "nvidia",
1195
- Jina: "jina",
1196
- Elevenlabs: "elevenlabs",
1197
- Litellm: "litellm",
1198
- Cerebras: "cerebras",
1199
- Openailike: "openailike",
1200
- Bytedance: "bytedance",
1201
- Mistral: "mistral",
1202
- Deepseek: "deepseek",
1203
- Contextualai: "contextualai",
1204
- Moonshotai: "moonshotai",
1205
- Zai: "zai",
1206
- Minimax: "minimax",
1207
- Alibaba: "alibaba",
1208
- Slack: "slack",
1209
- } as const;
1210
- /**
1211
- * The provider used to generate the response
1212
- */
1213
- export type DeploymentStreamProvider = ClosedEnum<
1214
- typeof DeploymentStreamProvider
1215
- >;
1216
-
1217
- /**
1218
- * Metadata of the retrieved chunk from the knowledge base
1219
- */
1220
- export type DeploymentStreamDeploymentsMetadata = {
1221
- /**
1222
- * Name of the file
1223
- */
1224
- fileName: string;
1225
- /**
1226
- * Page number of the chunk
1227
- */
1228
- pageNumber: number | null;
1229
- /**
1230
- * Type of the file
1231
- */
1232
- fileType: string;
1233
- /**
1234
- * Rerank scores are normalized to be in the range [0, 1]. Scores close to 1 indicate a high relevance to the query, and scores closer to 0 indicate low relevance. It is not accurate to assume a score of 0.9 means the document is 2x more relevant than a document with a score of 0.45
1235
- */
1236
- rerankScore?: number | undefined;
1237
- /**
1238
- * Search scores are normalized to be in the range [0, 1]. Search score is calculated based on `[Cosine Similarity](https://en.wikipedia.org/wiki/Cosine_similarity)` algorithm. Scores close to 1 indicate the document is closer to the query, and scores closer to 0 indicate the document is farther from the query.
1239
- */
1240
- searchScore: number;
1241
- };
1242
-
1243
- export type DeploymentStreamRetrievals = {
1244
- /**
1245
- * Content of the retrieved chunk from the knowledge base
1246
- */
1247
- document: string;
1248
- /**
1249
- * Metadata of the retrieved chunk from the knowledge base
1250
- */
1251
- metadata: DeploymentStreamDeploymentsMetadata;
1252
- };
1253
-
1254
- export type DeploymentStreamPromptTokensDetails = {
1255
- cachedTokens?: number | null | undefined;
1256
- };
1257
-
1258
- export type DeploymentStreamCompletionTokensDetails = {
1259
- reasoningTokens?: number | null | undefined;
1260
- };
1261
-
1262
- /**
1263
- * Usage metrics for the response
1264
- */
1265
- export type DeploymentStreamUsage = {
1266
- totalTokens?: number | undefined;
1267
- promptTokens?: number | undefined;
1268
- completionTokens?: number | undefined;
1269
- promptTokensDetails?: DeploymentStreamPromptTokensDetails | undefined;
1270
- completionTokensDetails?:
1271
- | DeploymentStreamCompletionTokensDetails
1272
- | null
1273
- | undefined;
1274
- };
1275
-
1276
- /**
1277
- * The role of the prompt message
1278
- */
1279
- export const DeploymentStreamMessageDeploymentsResponseRole = {
1280
- System: "system",
1281
- Assistant: "assistant",
1282
- User: "user",
1283
- Exception: "exception",
1284
- Tool: "tool",
1285
- Prompt: "prompt",
1286
- Correction: "correction",
1287
- ExpectedOutput: "expected_output",
1288
- } as const;
1289
- /**
1290
- * The role of the prompt message
1291
- */
1292
- export type DeploymentStreamMessageDeploymentsResponseRole = ClosedEnum<
1293
- typeof DeploymentStreamMessageDeploymentsResponseRole
1294
- >;
1295
-
1296
- export type DeploymentStreamMessage3 = {
1297
- type: "image";
1298
- /**
1299
- * The role of the prompt message
1300
- */
1301
- role: DeploymentStreamMessageDeploymentsResponseRole;
1302
- url: string;
1303
- };
1304
-
1305
- /**
1306
- * The role of the prompt message
1307
- */
1308
- export const DeploymentStreamMessageDeploymentsRole = {
1309
- System: "system",
1310
- Assistant: "assistant",
1311
- User: "user",
1312
- Exception: "exception",
1313
- Tool: "tool",
1314
- Prompt: "prompt",
1315
- Correction: "correction",
1316
- ExpectedOutput: "expected_output",
1317
- } as const;
1318
- /**
1319
- * The role of the prompt message
1320
- */
1321
- export type DeploymentStreamMessageDeploymentsRole = ClosedEnum<
1322
- typeof DeploymentStreamMessageDeploymentsRole
1323
- >;
1324
-
1325
- export type DeploymentStreamMessage2 = {
1326
- type: "content";
1327
- /**
1328
- * The role of the prompt message
1329
- */
1330
- role: DeploymentStreamMessageDeploymentsRole;
1331
- content: string | null;
1332
- /**
1333
- * Internal thought process of the model
1334
- */
1335
- reasoning?: string | undefined;
1336
- /**
1337
- * The signature holds a cryptographic token which verifies that the thinking block was generated by the model, and is verified when thinking is part of a multiturn conversation. This value should not be modified and should always be sent to the API when the reasoning is redacted. Currently only supported by `Anthropic`.
1338
- */
1339
- reasoningSignature?: string | undefined;
1340
- /**
1341
- * Occasionally the model's internal reasoning will be flagged by the safety systems of the provider. When this occurs, the provider will encrypt the reasoning. These redacted reasoning is decrypted when passed back to the API, allowing the model to continue its response without losing context.
1342
- */
1343
- redactedReasoning?: string | undefined;
1344
- };
1345
-
1346
- /**
1347
- * The role of the prompt message
1348
- */
1349
- export const DeploymentStreamMessageRole = {
1350
- System: "system",
1351
- Assistant: "assistant",
1352
- User: "user",
1353
- Exception: "exception",
1354
- Tool: "tool",
1355
- Prompt: "prompt",
1356
- Correction: "correction",
1357
- ExpectedOutput: "expected_output",
1358
- } as const;
1359
- /**
1360
- * The role of the prompt message
1361
- */
1362
- export type DeploymentStreamMessageRole = ClosedEnum<
1363
- typeof DeploymentStreamMessageRole
1364
- >;
1365
-
1366
- export const DeploymentStreamMessageDeploymentsResponse200Type = {
1367
- Function: "function",
1368
- } as const;
1369
- export type DeploymentStreamMessageDeploymentsResponse200Type = ClosedEnum<
1370
- typeof DeploymentStreamMessageDeploymentsResponse200Type
1371
- >;
1372
-
1373
- export type DeploymentStreamMessageFunction = {
1374
- name: string;
1375
- /**
1376
- * JSON string arguments for the functions
1377
- */
1378
- arguments: string;
1379
- };
1380
-
1381
- export type DeploymentStreamMessageToolCalls = {
1382
- id?: string | undefined;
1383
- index?: number | undefined;
1384
- type: DeploymentStreamMessageDeploymentsResponse200Type;
1385
- function: DeploymentStreamMessageFunction;
1386
- };
1387
-
1388
- export type DeploymentStreamMessage1 = {
1389
- type: "tool_calls";
1390
- /**
1391
- * The role of the prompt message
1392
- */
1393
- role: DeploymentStreamMessageRole;
1394
- content?: string | null | undefined;
1395
- toolCalls: Array<DeploymentStreamMessageToolCalls>;
1396
- /**
1397
- * Internal thought process of the model
1398
- */
1399
- reasoning?: string | undefined;
1400
- /**
1401
- * The signature holds a cryptographic token which verifies that the thinking block was generated by the model, and is verified when thinking is part of a multiturn conversation. This value should not be modified and should always be sent to the API when the reasoning is redacted. Currently only supported by `Anthropic`.
1402
- */
1403
- reasoningSignature?: string | undefined;
1404
- /**
1405
- * Occasionally the model's internal reasoning will be flagged by the safety systems of the provider. When this occurs, the provider will encrypt the reasoning. These redacted reasoning is decrypted when passed back to the API, allowing the model to continue its response without losing context.
1406
- */
1407
- redactedReasoning?: string | undefined;
1408
- };
1409
-
1410
- export type DeploymentStreamMessage =
1411
- | DeploymentStreamMessage1
1412
- | DeploymentStreamMessage2
1413
- | DeploymentStreamMessage3;
1414
-
1415
- export type DeploymentStreamChoices = {
1416
- index: number;
1417
- message:
1418
- | DeploymentStreamMessage1
1419
- | DeploymentStreamMessage2
1420
- | DeploymentStreamMessage3;
1421
- finishReason?: string | null | undefined;
1422
- };
1423
-
1424
- export type DeploymentStreamData = {
1425
- /**
1426
- * A unique identifier for the response. Can be used to add metrics to the transaction.
1427
- */
1428
- id: string;
1429
- /**
1430
- * A timestamp indicating when the object was created. Usually in a standardized format like ISO 8601
1431
- */
1432
- created: Date;
1433
- /**
1434
- * Indicates the type of model used to generate the response
1435
- */
1436
- object: DeploymentStreamObject;
1437
- /**
1438
- * The model used to generate the response
1439
- */
1440
- model: string;
1441
- /**
1442
- * The provider used to generate the response
1443
- */
1444
- provider: DeploymentStreamProvider;
1445
- /**
1446
- * Indicates if the response is the final response
1447
- */
1448
- isFinal: boolean;
1449
- /**
1450
- * Indicates integration id used to generate the response
1451
- */
1452
- integrationId?: string | undefined;
1453
- /**
1454
- * A timestamp indicating when the object was finalized. Usually in a standardized format like ISO 8601
1455
- */
1456
- finalized?: Date | undefined;
1457
- /**
1458
- * Provider backed system fingerprint.
1459
- */
1460
- systemFingerprint?: string | null | undefined;
1461
- /**
1462
- * List of documents retrieved from the knowledge base. This property is only available when the `include_retrievals` flag is set to `true` in the invoke settings. When stream is set to true, the `retrievals` property will be returned in the last streamed chunk where the property `is_final` is set to `true`.
1463
- */
1464
- retrievals?: Array<DeploymentStreamRetrievals> | undefined;
1465
- /**
1466
- * Response returned by the model provider. This functionality is only supported when streaming is not used. If streaming is used, the `provider_response` property will be set to `null`.
1467
- */
1468
- providerResponse?: any | undefined;
1469
- /**
1470
- * Usage metrics for the response
1471
- */
1472
- usage?: DeploymentStreamUsage | null | undefined;
1473
- /**
1474
- * A list of choices generated by the model
1475
- */
1476
- choices: Array<DeploymentStreamChoices>;
1477
- };
1478
-
1479
- /**
1480
- * Successful operation
1481
- */
1482
- export type DeploymentStreamResponseBody = {
1483
- data?: DeploymentStreamData | undefined;
1484
- };
1485
-
1486
- /** @internal */
1487
- export type DeploymentStreamContentDeploymentsRequest2$Outbound =
1488
- components.TextContentPartSchema$Outbound;
1489
-
1490
- /** @internal */
1491
- export const DeploymentStreamContentDeploymentsRequest2$outboundSchema:
1492
- z.ZodType<
1493
- DeploymentStreamContentDeploymentsRequest2$Outbound,
1494
- z.ZodTypeDef,
1495
- DeploymentStreamContentDeploymentsRequest2
1496
- > = components.TextContentPartSchema$outboundSchema;
1497
-
1498
- export function deploymentStreamContentDeploymentsRequest2ToJSON(
1499
- deploymentStreamContentDeploymentsRequest2:
1500
- DeploymentStreamContentDeploymentsRequest2,
1501
- ): string {
1502
- return JSON.stringify(
1503
- DeploymentStreamContentDeploymentsRequest2$outboundSchema.parse(
1504
- deploymentStreamContentDeploymentsRequest2,
1505
- ),
1506
- );
1507
- }
1508
-
1509
- /** @internal */
1510
- export type DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content$Outbound =
1511
- | string
1512
- | Array<components.TextContentPartSchema$Outbound>;
1513
-
1514
- /** @internal */
1515
- export const DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content$outboundSchema:
1516
- z.ZodType<
1517
- DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content$Outbound,
1518
- z.ZodTypeDef,
1519
- DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content
1520
- > = z.union([
1521
- z.string(),
1522
- z.array(components.TextContentPartSchema$outboundSchema),
1523
- ]);
1524
-
1525
- export function deploymentStreamPrefixMessagesDeploymentsRequestRequestBody5ContentToJSON(
1526
- deploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content:
1527
- DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content,
1528
- ): string {
1529
- return JSON.stringify(
1530
- DeploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content$outboundSchema
1531
- .parse(
1532
- deploymentStreamPrefixMessagesDeploymentsRequestRequestBody5Content,
1533
- ),
1534
- );
1535
- }
1536
-
1537
- /** @internal */
1538
- export const DeploymentStreamPrefixMessagesDeploymentsType$outboundSchema:
1539
- z.ZodNativeEnum<typeof DeploymentStreamPrefixMessagesDeploymentsType> = z
1540
- .nativeEnum(DeploymentStreamPrefixMessagesDeploymentsType);
1541
-
1542
- /** @internal */
1543
- export const DeploymentStreamPrefixMessagesTtl$outboundSchema: z.ZodNativeEnum<
1544
- typeof DeploymentStreamPrefixMessagesTtl
1545
- > = z.nativeEnum(DeploymentStreamPrefixMessagesTtl);
1546
-
1547
- /** @internal */
1548
- export type DeploymentStreamPrefixMessagesCacheControl$Outbound = {
1549
- type: string;
1550
- ttl: string;
1551
- };
1552
-
1553
- /** @internal */
1554
- export const DeploymentStreamPrefixMessagesCacheControl$outboundSchema:
1555
- z.ZodType<
1556
- DeploymentStreamPrefixMessagesCacheControl$Outbound,
1557
- z.ZodTypeDef,
1558
- DeploymentStreamPrefixMessagesCacheControl
1559
- > = z.object({
1560
- type: DeploymentStreamPrefixMessagesDeploymentsType$outboundSchema,
1561
- ttl: DeploymentStreamPrefixMessagesTtl$outboundSchema.default("5m"),
1562
- });
1563
-
1564
- export function deploymentStreamPrefixMessagesCacheControlToJSON(
1565
- deploymentStreamPrefixMessagesCacheControl:
1566
- DeploymentStreamPrefixMessagesCacheControl,
1567
- ): string {
1568
- return JSON.stringify(
1569
- DeploymentStreamPrefixMessagesCacheControl$outboundSchema.parse(
1570
- deploymentStreamPrefixMessagesCacheControl,
1571
- ),
1572
- );
1573
- }
1574
-
1575
- /** @internal */
1576
- export type PrefixMessagesToolMessage$Outbound = {
1577
- role: "tool";
1578
- content: string | Array<components.TextContentPartSchema$Outbound>;
1579
- tool_call_id: string | null;
1580
- cache_control?:
1581
- | DeploymentStreamPrefixMessagesCacheControl$Outbound
1582
- | undefined;
1583
- };
1584
-
1585
- /** @internal */
1586
- export const PrefixMessagesToolMessage$outboundSchema: z.ZodType<
1587
- PrefixMessagesToolMessage$Outbound,
1588
- z.ZodTypeDef,
1589
- PrefixMessagesToolMessage
1590
- > = z.object({
1591
- role: z.literal("tool"),
1592
- content: z.union([
1593
- z.string(),
1594
- z.array(components.TextContentPartSchema$outboundSchema),
1595
- ]),
1596
- toolCallId: z.nullable(z.string()),
1597
- cacheControl: z.lazy(() =>
1598
- DeploymentStreamPrefixMessagesCacheControl$outboundSchema
1599
- ).optional(),
1600
- }).transform((v) => {
1601
- return remap$(v, {
1602
- toolCallId: "tool_call_id",
1603
- cacheControl: "cache_control",
1604
- });
1605
- });
1606
-
1607
- export function prefixMessagesToolMessageToJSON(
1608
- prefixMessagesToolMessage: PrefixMessagesToolMessage,
1609
- ): string {
1610
- return JSON.stringify(
1611
- PrefixMessagesToolMessage$outboundSchema.parse(prefixMessagesToolMessage),
1612
- );
1613
- }
1614
-
1615
- /** @internal */
1616
- export type DeploymentStreamContentDeployments2$Outbound =
1617
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1618
- | components.RefusalPartSchema$Outbound
1619
- | components.ReasoningPartSchema$Outbound
1620
- | components.RedactedReasoningPartSchema$Outbound;
1621
-
1622
- /** @internal */
1623
- export const DeploymentStreamContentDeployments2$outboundSchema: z.ZodType<
1624
- DeploymentStreamContentDeployments2$Outbound,
1625
- z.ZodTypeDef,
1626
- DeploymentStreamContentDeployments2
1627
- > = z.union([
1628
- components.TextContentPartSchema$outboundSchema.and(
1629
- z.object({ type: z.literal("text") }),
1630
- ),
1631
- components.RefusalPartSchema$outboundSchema,
1632
- components.ReasoningPartSchema$outboundSchema,
1633
- components.RedactedReasoningPartSchema$outboundSchema,
1634
- ]);
1635
-
1636
- export function deploymentStreamContentDeployments2ToJSON(
1637
- deploymentStreamContentDeployments2: DeploymentStreamContentDeployments2,
1638
- ): string {
1639
- return JSON.stringify(
1640
- DeploymentStreamContentDeployments2$outboundSchema.parse(
1641
- deploymentStreamContentDeployments2,
1642
- ),
1643
- );
1644
- }
1645
-
1646
- /** @internal */
1647
- export type DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent$Outbound =
1648
- | string
1649
- | Array<
1650
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1651
- | components.RefusalPartSchema$Outbound
1652
- | components.ReasoningPartSchema$Outbound
1653
- | components.RedactedReasoningPartSchema$Outbound
1654
- >;
1655
-
1656
- /** @internal */
1657
- export const DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent$outboundSchema:
1658
- z.ZodType<
1659
- DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent$Outbound,
1660
- z.ZodTypeDef,
1661
- DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent
1662
- > = z.union([
1663
- z.string(),
1664
- z.array(
1665
- z.union([
1666
- components.TextContentPartSchema$outboundSchema.and(
1667
- z.object({ type: z.literal("text") }),
1668
- ),
1669
- components.RefusalPartSchema$outboundSchema,
1670
- components.ReasoningPartSchema$outboundSchema,
1671
- components.RedactedReasoningPartSchema$outboundSchema,
1672
- ]),
1673
- ),
1674
- ]);
1675
-
1676
- export function deploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContentToJSON(
1677
- deploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent:
1678
- DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent,
1679
- ): string {
1680
- return JSON.stringify(
1681
- DeploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent$outboundSchema
1682
- .parse(
1683
- deploymentStreamPrefixMessagesDeploymentsRequestRequestBodyContent,
1684
- ),
1685
- );
1686
- }
1687
-
1688
- /** @internal */
1689
- export type PrefixMessagesAudio$Outbound = {
1690
- id: string;
1691
- };
1692
-
1693
- /** @internal */
1694
- export const PrefixMessagesAudio$outboundSchema: z.ZodType<
1695
- PrefixMessagesAudio$Outbound,
1696
- z.ZodTypeDef,
1697
- PrefixMessagesAudio
1698
- > = z.object({
1699
- id: z.string(),
1700
- });
1701
-
1702
- export function prefixMessagesAudioToJSON(
1703
- prefixMessagesAudio: PrefixMessagesAudio,
1704
- ): string {
1705
- return JSON.stringify(
1706
- PrefixMessagesAudio$outboundSchema.parse(prefixMessagesAudio),
1707
- );
1708
- }
1709
-
1710
- /** @internal */
1711
- export const DeploymentStreamPrefixMessagesType$outboundSchema: z.ZodNativeEnum<
1712
- typeof DeploymentStreamPrefixMessagesType
1713
- > = z.nativeEnum(DeploymentStreamPrefixMessagesType);
1714
-
1715
- /** @internal */
1716
- export type DeploymentStreamPrefixMessagesFunction$Outbound = {
1717
- name?: string | undefined;
1718
- arguments?: string | undefined;
1719
- };
1720
-
1721
- /** @internal */
1722
- export const DeploymentStreamPrefixMessagesFunction$outboundSchema: z.ZodType<
1723
- DeploymentStreamPrefixMessagesFunction$Outbound,
1724
- z.ZodTypeDef,
1725
- DeploymentStreamPrefixMessagesFunction
1726
- > = z.object({
1727
- name: z.string().optional(),
1728
- arguments: z.string().optional(),
1729
- });
1730
-
1731
- export function deploymentStreamPrefixMessagesFunctionToJSON(
1732
- deploymentStreamPrefixMessagesFunction:
1733
- DeploymentStreamPrefixMessagesFunction,
1734
- ): string {
1735
- return JSON.stringify(
1736
- DeploymentStreamPrefixMessagesFunction$outboundSchema.parse(
1737
- deploymentStreamPrefixMessagesFunction,
1738
- ),
1739
- );
1740
- }
1741
-
1742
- /** @internal */
1743
- export type DeploymentStreamPrefixMessagesToolCalls$Outbound = {
1744
- id: string;
1745
- type: string;
1746
- function: DeploymentStreamPrefixMessagesFunction$Outbound;
1747
- thought_signature?: string | undefined;
1748
- };
1749
-
1750
- /** @internal */
1751
- export const DeploymentStreamPrefixMessagesToolCalls$outboundSchema: z.ZodType<
1752
- DeploymentStreamPrefixMessagesToolCalls$Outbound,
1753
- z.ZodTypeDef,
1754
- DeploymentStreamPrefixMessagesToolCalls
1755
- > = z.object({
1756
- id: z.string(),
1757
- type: DeploymentStreamPrefixMessagesType$outboundSchema,
1758
- function: z.lazy(() => DeploymentStreamPrefixMessagesFunction$outboundSchema),
1759
- thoughtSignature: z.string().optional(),
1760
- }).transform((v) => {
1761
- return remap$(v, {
1762
- thoughtSignature: "thought_signature",
1763
- });
1764
- });
1765
-
1766
- export function deploymentStreamPrefixMessagesToolCallsToJSON(
1767
- deploymentStreamPrefixMessagesToolCalls:
1768
- DeploymentStreamPrefixMessagesToolCalls,
1769
- ): string {
1770
- return JSON.stringify(
1771
- DeploymentStreamPrefixMessagesToolCalls$outboundSchema.parse(
1772
- deploymentStreamPrefixMessagesToolCalls,
1773
- ),
1774
- );
1775
- }
1776
-
1777
- /** @internal */
1778
- export type PrefixMessagesAssistantMessage$Outbound = {
1779
- content?:
1780
- | string
1781
- | Array<
1782
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1783
- | components.RefusalPartSchema$Outbound
1784
- | components.ReasoningPartSchema$Outbound
1785
- | components.RedactedReasoningPartSchema$Outbound
1786
- >
1787
- | null
1788
- | undefined;
1789
- refusal?: string | null | undefined;
1790
- role: "assistant";
1791
- name?: string | undefined;
1792
- audio?: PrefixMessagesAudio$Outbound | null | undefined;
1793
- tool_calls?:
1794
- | Array<DeploymentStreamPrefixMessagesToolCalls$Outbound>
1795
- | undefined;
1796
- };
1797
-
1798
- /** @internal */
1799
- export const PrefixMessagesAssistantMessage$outboundSchema: z.ZodType<
1800
- PrefixMessagesAssistantMessage$Outbound,
1801
- z.ZodTypeDef,
1802
- PrefixMessagesAssistantMessage
1803
- > = z.object({
1804
- content: z.nullable(
1805
- z.union([
1806
- z.string(),
1807
- z.array(
1808
- z.union([
1809
- components.TextContentPartSchema$outboundSchema.and(
1810
- z.object({ type: z.literal("text") }),
1811
- ),
1812
- components.RefusalPartSchema$outboundSchema,
1813
- components.ReasoningPartSchema$outboundSchema,
1814
- components.RedactedReasoningPartSchema$outboundSchema,
1815
- ]),
1816
- ),
1817
- ]),
1818
- ).optional(),
1819
- refusal: z.nullable(z.string()).optional(),
1820
- role: z.literal("assistant"),
1821
- name: z.string().optional(),
1822
- audio: z.nullable(z.lazy(() => PrefixMessagesAudio$outboundSchema))
1823
- .optional(),
1824
- toolCalls: z.array(
1825
- z.lazy(() => DeploymentStreamPrefixMessagesToolCalls$outboundSchema),
1826
- ).optional(),
1827
- }).transform((v) => {
1828
- return remap$(v, {
1829
- toolCalls: "tool_calls",
1830
- });
1831
- });
1832
-
1833
- export function prefixMessagesAssistantMessageToJSON(
1834
- prefixMessagesAssistantMessage: PrefixMessagesAssistantMessage,
1835
- ): string {
1836
- return JSON.stringify(
1837
- PrefixMessagesAssistantMessage$outboundSchema.parse(
1838
- prefixMessagesAssistantMessage,
1839
- ),
1840
- );
1841
- }
1842
-
1843
- /** @internal */
1844
- export const DeploymentStream2DeploymentsType$outboundSchema: z.ZodNativeEnum<
1845
- typeof DeploymentStream2DeploymentsType
1846
- > = z.nativeEnum(DeploymentStream2DeploymentsType);
1847
-
1848
- /** @internal */
1849
- export const DeploymentStream2Ttl$outboundSchema: z.ZodNativeEnum<
1850
- typeof DeploymentStream2Ttl
1851
- > = z.nativeEnum(DeploymentStream2Ttl);
1852
-
1853
- /** @internal */
1854
- export type DeploymentStream2CacheControl$Outbound = {
1855
- type: string;
1856
- ttl: string;
1857
- };
1858
-
1859
- /** @internal */
1860
- export const DeploymentStream2CacheControl$outboundSchema: z.ZodType<
1861
- DeploymentStream2CacheControl$Outbound,
1862
- z.ZodTypeDef,
1863
- DeploymentStream2CacheControl
1864
- > = z.object({
1865
- type: DeploymentStream2DeploymentsType$outboundSchema,
1866
- ttl: DeploymentStream2Ttl$outboundSchema.default("5m"),
1867
- });
1868
-
1869
- export function deploymentStream2CacheControlToJSON(
1870
- deploymentStream2CacheControl: DeploymentStream2CacheControl,
1871
- ): string {
1872
- return JSON.stringify(
1873
- DeploymentStream2CacheControl$outboundSchema.parse(
1874
- deploymentStream2CacheControl,
1875
- ),
1876
- );
1877
- }
1878
-
1879
- /** @internal */
1880
- export type DeploymentStream24$Outbound = {
1881
- type: "file";
1882
- cache_control?: DeploymentStream2CacheControl$Outbound | undefined;
1883
- file: components.FileContentPartSchema$Outbound;
1884
- };
1885
-
1886
- /** @internal */
1887
- export const DeploymentStream24$outboundSchema: z.ZodType<
1888
- DeploymentStream24$Outbound,
1889
- z.ZodTypeDef,
1890
- DeploymentStream24
1891
- > = z.object({
1892
- type: z.literal("file"),
1893
- cacheControl: z.lazy(() => DeploymentStream2CacheControl$outboundSchema)
1894
- .optional(),
1895
- file: components.FileContentPartSchema$outboundSchema,
1896
- }).transform((v) => {
1897
- return remap$(v, {
1898
- cacheControl: "cache_control",
1899
- });
1900
- });
1901
-
1902
- export function deploymentStream24ToJSON(
1903
- deploymentStream24: DeploymentStream24,
1904
- ): string {
1905
- return JSON.stringify(
1906
- DeploymentStream24$outboundSchema.parse(deploymentStream24),
1907
- );
1908
- }
1909
-
1910
- /** @internal */
1911
- export type DeploymentStreamContent2$Outbound =
1912
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1913
- | components.ImageContentPartSchema$Outbound
1914
- | components.AudioContentPartSchema$Outbound
1915
- | DeploymentStream24$Outbound;
1916
-
1917
- /** @internal */
1918
- export const DeploymentStreamContent2$outboundSchema: z.ZodType<
1919
- DeploymentStreamContent2$Outbound,
1920
- z.ZodTypeDef,
1921
- DeploymentStreamContent2
1922
- > = z.union([
1923
- components.TextContentPartSchema$outboundSchema.and(
1924
- z.object({ type: z.literal("text") }),
1925
- ),
1926
- components.ImageContentPartSchema$outboundSchema,
1927
- components.AudioContentPartSchema$outboundSchema,
1928
- z.lazy(() => DeploymentStream24$outboundSchema),
1929
- ]);
1930
-
1931
- export function deploymentStreamContent2ToJSON(
1932
- deploymentStreamContent2: DeploymentStreamContent2,
1933
- ): string {
1934
- return JSON.stringify(
1935
- DeploymentStreamContent2$outboundSchema.parse(deploymentStreamContent2),
1936
- );
1937
- }
1938
-
1939
- /** @internal */
1940
- export type DeploymentStreamPrefixMessagesDeploymentsRequestContent$Outbound =
1941
- | string
1942
- | Array<
1943
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1944
- | components.ImageContentPartSchema$Outbound
1945
- | components.AudioContentPartSchema$Outbound
1946
- | DeploymentStream24$Outbound
1947
- >;
1948
-
1949
- /** @internal */
1950
- export const DeploymentStreamPrefixMessagesDeploymentsRequestContent$outboundSchema:
1951
- z.ZodType<
1952
- DeploymentStreamPrefixMessagesDeploymentsRequestContent$Outbound,
1953
- z.ZodTypeDef,
1954
- DeploymentStreamPrefixMessagesDeploymentsRequestContent
1955
- > = z.union([
1956
- z.string(),
1957
- z.array(
1958
- z.union([
1959
- components.TextContentPartSchema$outboundSchema.and(
1960
- z.object({ type: z.literal("text") }),
1961
- ),
1962
- components.ImageContentPartSchema$outboundSchema,
1963
- components.AudioContentPartSchema$outboundSchema,
1964
- z.lazy(() => DeploymentStream24$outboundSchema),
1965
- ]),
1966
- ),
1967
- ]);
1968
-
1969
- export function deploymentStreamPrefixMessagesDeploymentsRequestContentToJSON(
1970
- deploymentStreamPrefixMessagesDeploymentsRequestContent:
1971
- DeploymentStreamPrefixMessagesDeploymentsRequestContent,
1972
- ): string {
1973
- return JSON.stringify(
1974
- DeploymentStreamPrefixMessagesDeploymentsRequestContent$outboundSchema
1975
- .parse(deploymentStreamPrefixMessagesDeploymentsRequestContent),
1976
- );
1977
- }
1978
-
1979
- /** @internal */
1980
- export type PrefixMessagesUserMessage$Outbound = {
1981
- role: "user";
1982
- name?: string | undefined;
1983
- content:
1984
- | string
1985
- | Array<
1986
- | (components.TextContentPartSchema$Outbound & { type: "text" })
1987
- | components.ImageContentPartSchema$Outbound
1988
- | components.AudioContentPartSchema$Outbound
1989
- | DeploymentStream24$Outbound
1990
- >;
1991
- };
1992
-
1993
- /** @internal */
1994
- export const PrefixMessagesUserMessage$outboundSchema: z.ZodType<
1995
- PrefixMessagesUserMessage$Outbound,
1996
- z.ZodTypeDef,
1997
- PrefixMessagesUserMessage
1998
- > = z.object({
1999
- role: z.literal("user"),
2000
- name: z.string().optional(),
2001
- content: z.union([
2002
- z.string(),
2003
- z.array(
2004
- z.union([
2005
- components.TextContentPartSchema$outboundSchema.and(
2006
- z.object({ type: z.literal("text") }),
2007
- ),
2008
- components.ImageContentPartSchema$outboundSchema,
2009
- components.AudioContentPartSchema$outboundSchema,
2010
- z.lazy(() => DeploymentStream24$outboundSchema),
2011
- ]),
2012
- ),
2013
- ]),
2014
- });
2015
-
2016
- export function prefixMessagesUserMessageToJSON(
2017
- prefixMessagesUserMessage: PrefixMessagesUserMessage,
2018
- ): string {
2019
- return JSON.stringify(
2020
- PrefixMessagesUserMessage$outboundSchema.parse(prefixMessagesUserMessage),
2021
- );
2022
- }
2023
-
2024
- /** @internal */
2025
- export type DeploymentStreamPrefixMessagesDeploymentsContent$Outbound =
2026
- | string
2027
- | Array<components.TextContentPartSchema$Outbound>;
2028
-
2029
- /** @internal */
2030
- export const DeploymentStreamPrefixMessagesDeploymentsContent$outboundSchema:
2031
- z.ZodType<
2032
- DeploymentStreamPrefixMessagesDeploymentsContent$Outbound,
2033
- z.ZodTypeDef,
2034
- DeploymentStreamPrefixMessagesDeploymentsContent
2035
- > = z.union([
2036
- z.string(),
2037
- z.array(components.TextContentPartSchema$outboundSchema),
2038
- ]);
2039
-
2040
- export function deploymentStreamPrefixMessagesDeploymentsContentToJSON(
2041
- deploymentStreamPrefixMessagesDeploymentsContent:
2042
- DeploymentStreamPrefixMessagesDeploymentsContent,
2043
- ): string {
2044
- return JSON.stringify(
2045
- DeploymentStreamPrefixMessagesDeploymentsContent$outboundSchema.parse(
2046
- deploymentStreamPrefixMessagesDeploymentsContent,
2047
- ),
2048
- );
2049
- }
2050
-
2051
- /** @internal */
2052
- export type PrefixMessagesDeveloperMessage$Outbound = {
2053
- role: "developer";
2054
- content: string | Array<components.TextContentPartSchema$Outbound>;
2055
- name?: string | undefined;
2056
- };
2057
-
2058
- /** @internal */
2059
- export const PrefixMessagesDeveloperMessage$outboundSchema: z.ZodType<
2060
- PrefixMessagesDeveloperMessage$Outbound,
2061
- z.ZodTypeDef,
2062
- PrefixMessagesDeveloperMessage
2063
- > = z.object({
2064
- role: z.literal("developer"),
2065
- content: z.union([
2066
- z.string(),
2067
- z.array(components.TextContentPartSchema$outboundSchema),
2068
- ]),
2069
- name: z.string().optional(),
2070
- });
2071
-
2072
- export function prefixMessagesDeveloperMessageToJSON(
2073
- prefixMessagesDeveloperMessage: PrefixMessagesDeveloperMessage,
2074
- ): string {
2075
- return JSON.stringify(
2076
- PrefixMessagesDeveloperMessage$outboundSchema.parse(
2077
- prefixMessagesDeveloperMessage,
2078
- ),
2079
- );
2080
- }
2081
-
2082
- /** @internal */
2083
- export type DeploymentStreamPrefixMessagesContent$Outbound =
2084
- | string
2085
- | Array<components.TextContentPartSchema$Outbound>;
2086
-
2087
- /** @internal */
2088
- export const DeploymentStreamPrefixMessagesContent$outboundSchema: z.ZodType<
2089
- DeploymentStreamPrefixMessagesContent$Outbound,
2090
- z.ZodTypeDef,
2091
- DeploymentStreamPrefixMessagesContent
2092
- > = z.union([
2093
- z.string(),
2094
- z.array(components.TextContentPartSchema$outboundSchema),
2095
- ]);
2096
-
2097
- export function deploymentStreamPrefixMessagesContentToJSON(
2098
- deploymentStreamPrefixMessagesContent: DeploymentStreamPrefixMessagesContent,
2099
- ): string {
2100
- return JSON.stringify(
2101
- DeploymentStreamPrefixMessagesContent$outboundSchema.parse(
2102
- deploymentStreamPrefixMessagesContent,
2103
- ),
2104
- );
2105
- }
2106
-
2107
- /** @internal */
2108
- export type PrefixMessagesSystemMessage$Outbound = {
2109
- role: "system";
2110
- content: string | Array<components.TextContentPartSchema$Outbound>;
2111
- name?: string | undefined;
2112
- };
2113
-
2114
- /** @internal */
2115
- export const PrefixMessagesSystemMessage$outboundSchema: z.ZodType<
2116
- PrefixMessagesSystemMessage$Outbound,
2117
- z.ZodTypeDef,
2118
- PrefixMessagesSystemMessage
2119
- > = z.object({
2120
- role: z.literal("system"),
2121
- content: z.union([
2122
- z.string(),
2123
- z.array(components.TextContentPartSchema$outboundSchema),
2124
- ]),
2125
- name: z.string().optional(),
2126
- });
2127
-
2128
- export function prefixMessagesSystemMessageToJSON(
2129
- prefixMessagesSystemMessage: PrefixMessagesSystemMessage,
2130
- ): string {
2131
- return JSON.stringify(
2132
- PrefixMessagesSystemMessage$outboundSchema.parse(
2133
- prefixMessagesSystemMessage,
2134
- ),
2135
- );
2136
- }
2137
-
2138
- /** @internal */
2139
- export type DeploymentStreamPrefixMessages$Outbound =
2140
- | PrefixMessagesSystemMessage$Outbound
2141
- | PrefixMessagesDeveloperMessage$Outbound
2142
- | PrefixMessagesUserMessage$Outbound
2143
- | PrefixMessagesAssistantMessage$Outbound
2144
- | PrefixMessagesToolMessage$Outbound;
2145
-
2146
- /** @internal */
2147
- export const DeploymentStreamPrefixMessages$outboundSchema: z.ZodType<
2148
- DeploymentStreamPrefixMessages$Outbound,
2149
- z.ZodTypeDef,
2150
- DeploymentStreamPrefixMessages
2151
- > = z.union([
2152
- z.lazy(() => PrefixMessagesSystemMessage$outboundSchema),
2153
- z.lazy(() => PrefixMessagesDeveloperMessage$outboundSchema),
2154
- z.lazy(() => PrefixMessagesUserMessage$outboundSchema),
2155
- z.lazy(() => PrefixMessagesAssistantMessage$outboundSchema),
2156
- z.lazy(() => PrefixMessagesToolMessage$outboundSchema),
2157
- ]);
2158
-
2159
- export function deploymentStreamPrefixMessagesToJSON(
2160
- deploymentStreamPrefixMessages: DeploymentStreamPrefixMessages,
2161
- ): string {
2162
- return JSON.stringify(
2163
- DeploymentStreamPrefixMessages$outboundSchema.parse(
2164
- deploymentStreamPrefixMessages,
2165
- ),
2166
- );
2167
- }
2168
-
2169
- /** @internal */
2170
- export type DeploymentStreamContentDeploymentsRequestRequestBodyMessages52$Outbound =
2171
- components.TextContentPartSchema$Outbound;
2172
-
2173
- /** @internal */
2174
- export const DeploymentStreamContentDeploymentsRequestRequestBodyMessages52$outboundSchema:
2175
- z.ZodType<
2176
- DeploymentStreamContentDeploymentsRequestRequestBodyMessages52$Outbound,
2177
- z.ZodTypeDef,
2178
- DeploymentStreamContentDeploymentsRequestRequestBodyMessages52
2179
- > = components.TextContentPartSchema$outboundSchema;
2180
-
2181
- export function deploymentStreamContentDeploymentsRequestRequestBodyMessages52ToJSON(
2182
- deploymentStreamContentDeploymentsRequestRequestBodyMessages52:
2183
- DeploymentStreamContentDeploymentsRequestRequestBodyMessages52,
2184
- ): string {
2185
- return JSON.stringify(
2186
- DeploymentStreamContentDeploymentsRequestRequestBodyMessages52$outboundSchema
2187
- .parse(deploymentStreamContentDeploymentsRequestRequestBodyMessages52),
2188
- );
2189
- }
2190
-
2191
- /** @internal */
2192
- export type DeploymentStreamMessagesDeploymentsRequestRequestBody5Content$Outbound =
2193
- | string
2194
- | Array<components.TextContentPartSchema$Outbound>;
2195
-
2196
- /** @internal */
2197
- export const DeploymentStreamMessagesDeploymentsRequestRequestBody5Content$outboundSchema:
2198
- z.ZodType<
2199
- DeploymentStreamMessagesDeploymentsRequestRequestBody5Content$Outbound,
2200
- z.ZodTypeDef,
2201
- DeploymentStreamMessagesDeploymentsRequestRequestBody5Content
2202
- > = z.union([
2203
- z.string(),
2204
- z.array(components.TextContentPartSchema$outboundSchema),
2205
- ]);
2206
-
2207
- export function deploymentStreamMessagesDeploymentsRequestRequestBody5ContentToJSON(
2208
- deploymentStreamMessagesDeploymentsRequestRequestBody5Content:
2209
- DeploymentStreamMessagesDeploymentsRequestRequestBody5Content,
2210
- ): string {
2211
- return JSON.stringify(
2212
- DeploymentStreamMessagesDeploymentsRequestRequestBody5Content$outboundSchema
2213
- .parse(deploymentStreamMessagesDeploymentsRequestRequestBody5Content),
2214
- );
2215
- }
2216
-
2217
- /** @internal */
2218
- export const DeploymentStreamMessagesDeploymentsType$outboundSchema:
2219
- z.ZodNativeEnum<typeof DeploymentStreamMessagesDeploymentsType> = z
2220
- .nativeEnum(DeploymentStreamMessagesDeploymentsType);
2221
-
2222
- /** @internal */
2223
- export const DeploymentStreamMessagesTtl$outboundSchema: z.ZodNativeEnum<
2224
- typeof DeploymentStreamMessagesTtl
2225
- > = z.nativeEnum(DeploymentStreamMessagesTtl);
2226
-
2227
- /** @internal */
2228
- export type DeploymentStreamMessagesCacheControl$Outbound = {
2229
- type: string;
2230
- ttl: string;
2231
- };
2232
-
2233
- /** @internal */
2234
- export const DeploymentStreamMessagesCacheControl$outboundSchema: z.ZodType<
2235
- DeploymentStreamMessagesCacheControl$Outbound,
2236
- z.ZodTypeDef,
2237
- DeploymentStreamMessagesCacheControl
2238
- > = z.object({
2239
- type: DeploymentStreamMessagesDeploymentsType$outboundSchema,
2240
- ttl: DeploymentStreamMessagesTtl$outboundSchema.default("5m"),
2241
- });
2242
-
2243
- export function deploymentStreamMessagesCacheControlToJSON(
2244
- deploymentStreamMessagesCacheControl: DeploymentStreamMessagesCacheControl,
2245
- ): string {
2246
- return JSON.stringify(
2247
- DeploymentStreamMessagesCacheControl$outboundSchema.parse(
2248
- deploymentStreamMessagesCacheControl,
2249
- ),
2250
- );
2251
- }
2252
-
2253
- /** @internal */
2254
- export type DeploymentStreamMessagesToolMessage$Outbound = {
2255
- role: "tool";
2256
- content: string | Array<components.TextContentPartSchema$Outbound>;
2257
- tool_call_id: string | null;
2258
- cache_control?: DeploymentStreamMessagesCacheControl$Outbound | undefined;
2259
- };
2260
-
2261
- /** @internal */
2262
- export const DeploymentStreamMessagesToolMessage$outboundSchema: z.ZodType<
2263
- DeploymentStreamMessagesToolMessage$Outbound,
2264
- z.ZodTypeDef,
2265
- DeploymentStreamMessagesToolMessage
2266
- > = z.object({
2267
- role: z.literal("tool"),
2268
- content: z.union([
2269
- z.string(),
2270
- z.array(components.TextContentPartSchema$outboundSchema),
2271
- ]),
2272
- toolCallId: z.nullable(z.string()),
2273
- cacheControl: z.lazy(() =>
2274
- DeploymentStreamMessagesCacheControl$outboundSchema
2275
- ).optional(),
2276
- }).transform((v) => {
2277
- return remap$(v, {
2278
- toolCallId: "tool_call_id",
2279
- cacheControl: "cache_control",
2280
- });
2281
- });
2282
-
2283
- export function deploymentStreamMessagesToolMessageToJSON(
2284
- deploymentStreamMessagesToolMessage: DeploymentStreamMessagesToolMessage,
2285
- ): string {
2286
- return JSON.stringify(
2287
- DeploymentStreamMessagesToolMessage$outboundSchema.parse(
2288
- deploymentStreamMessagesToolMessage,
2289
- ),
2290
- );
2291
- }
2292
-
2293
- /** @internal */
2294
- export type DeploymentStreamContentDeploymentsRequestRequestBodyMessages2$Outbound =
2295
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2296
- | components.RefusalPartSchema$Outbound
2297
- | components.ReasoningPartSchema$Outbound
2298
- | components.RedactedReasoningPartSchema$Outbound;
2299
-
2300
- /** @internal */
2301
- export const DeploymentStreamContentDeploymentsRequestRequestBodyMessages2$outboundSchema:
2302
- z.ZodType<
2303
- DeploymentStreamContentDeploymentsRequestRequestBodyMessages2$Outbound,
2304
- z.ZodTypeDef,
2305
- DeploymentStreamContentDeploymentsRequestRequestBodyMessages2
2306
- > = z.union([
2307
- components.TextContentPartSchema$outboundSchema.and(
2308
- z.object({ type: z.literal("text") }),
2309
- ),
2310
- components.RefusalPartSchema$outboundSchema,
2311
- components.ReasoningPartSchema$outboundSchema,
2312
- components.RedactedReasoningPartSchema$outboundSchema,
2313
- ]);
2314
-
2315
- export function deploymentStreamContentDeploymentsRequestRequestBodyMessages2ToJSON(
2316
- deploymentStreamContentDeploymentsRequestRequestBodyMessages2:
2317
- DeploymentStreamContentDeploymentsRequestRequestBodyMessages2,
2318
- ): string {
2319
- return JSON.stringify(
2320
- DeploymentStreamContentDeploymentsRequestRequestBodyMessages2$outboundSchema
2321
- .parse(deploymentStreamContentDeploymentsRequestRequestBodyMessages2),
2322
- );
2323
- }
2324
-
2325
- /** @internal */
2326
- export type DeploymentStreamMessagesDeploymentsRequestRequestBodyContent$Outbound =
2327
- | string
2328
- | Array<
2329
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2330
- | components.RefusalPartSchema$Outbound
2331
- | components.ReasoningPartSchema$Outbound
2332
- | components.RedactedReasoningPartSchema$Outbound
2333
- >;
2334
-
2335
- /** @internal */
2336
- export const DeploymentStreamMessagesDeploymentsRequestRequestBodyContent$outboundSchema:
2337
- z.ZodType<
2338
- DeploymentStreamMessagesDeploymentsRequestRequestBodyContent$Outbound,
2339
- z.ZodTypeDef,
2340
- DeploymentStreamMessagesDeploymentsRequestRequestBodyContent
2341
- > = z.union([
2342
- z.string(),
2343
- z.array(
2344
- z.union([
2345
- components.TextContentPartSchema$outboundSchema.and(
2346
- z.object({ type: z.literal("text") }),
2347
- ),
2348
- components.RefusalPartSchema$outboundSchema,
2349
- components.ReasoningPartSchema$outboundSchema,
2350
- components.RedactedReasoningPartSchema$outboundSchema,
2351
- ]),
2352
- ),
2353
- ]);
2354
-
2355
- export function deploymentStreamMessagesDeploymentsRequestRequestBodyContentToJSON(
2356
- deploymentStreamMessagesDeploymentsRequestRequestBodyContent:
2357
- DeploymentStreamMessagesDeploymentsRequestRequestBodyContent,
2358
- ): string {
2359
- return JSON.stringify(
2360
- DeploymentStreamMessagesDeploymentsRequestRequestBodyContent$outboundSchema
2361
- .parse(deploymentStreamMessagesDeploymentsRequestRequestBodyContent),
2362
- );
2363
- }
2364
-
2365
- /** @internal */
2366
- export type DeploymentStreamMessagesAudio$Outbound = {
2367
- id: string;
2368
- };
2369
-
2370
- /** @internal */
2371
- export const DeploymentStreamMessagesAudio$outboundSchema: z.ZodType<
2372
- DeploymentStreamMessagesAudio$Outbound,
2373
- z.ZodTypeDef,
2374
- DeploymentStreamMessagesAudio
2375
- > = z.object({
2376
- id: z.string(),
2377
- });
2378
-
2379
- export function deploymentStreamMessagesAudioToJSON(
2380
- deploymentStreamMessagesAudio: DeploymentStreamMessagesAudio,
2381
- ): string {
2382
- return JSON.stringify(
2383
- DeploymentStreamMessagesAudio$outboundSchema.parse(
2384
- deploymentStreamMessagesAudio,
2385
- ),
2386
- );
2387
- }
2388
-
2389
- /** @internal */
2390
- export const DeploymentStreamMessagesType$outboundSchema: z.ZodNativeEnum<
2391
- typeof DeploymentStreamMessagesType
2392
- > = z.nativeEnum(DeploymentStreamMessagesType);
2393
-
2394
- /** @internal */
2395
- export type DeploymentStreamMessagesFunction$Outbound = {
2396
- name?: string | undefined;
2397
- arguments?: string | undefined;
2398
- };
2399
-
2400
- /** @internal */
2401
- export const DeploymentStreamMessagesFunction$outboundSchema: z.ZodType<
2402
- DeploymentStreamMessagesFunction$Outbound,
2403
- z.ZodTypeDef,
2404
- DeploymentStreamMessagesFunction
2405
- > = z.object({
2406
- name: z.string().optional(),
2407
- arguments: z.string().optional(),
2408
- });
2409
-
2410
- export function deploymentStreamMessagesFunctionToJSON(
2411
- deploymentStreamMessagesFunction: DeploymentStreamMessagesFunction,
2412
- ): string {
2413
- return JSON.stringify(
2414
- DeploymentStreamMessagesFunction$outboundSchema.parse(
2415
- deploymentStreamMessagesFunction,
2416
- ),
2417
- );
2418
- }
2419
-
2420
- /** @internal */
2421
- export type DeploymentStreamMessagesToolCalls$Outbound = {
2422
- id: string;
2423
- type: string;
2424
- function: DeploymentStreamMessagesFunction$Outbound;
2425
- thought_signature?: string | undefined;
2426
- };
2427
-
2428
- /** @internal */
2429
- export const DeploymentStreamMessagesToolCalls$outboundSchema: z.ZodType<
2430
- DeploymentStreamMessagesToolCalls$Outbound,
2431
- z.ZodTypeDef,
2432
- DeploymentStreamMessagesToolCalls
2433
- > = z.object({
2434
- id: z.string(),
2435
- type: DeploymentStreamMessagesType$outboundSchema,
2436
- function: z.lazy(() => DeploymentStreamMessagesFunction$outboundSchema),
2437
- thoughtSignature: z.string().optional(),
2438
- }).transform((v) => {
2439
- return remap$(v, {
2440
- thoughtSignature: "thought_signature",
2441
- });
2442
- });
2443
-
2444
- export function deploymentStreamMessagesToolCallsToJSON(
2445
- deploymentStreamMessagesToolCalls: DeploymentStreamMessagesToolCalls,
2446
- ): string {
2447
- return JSON.stringify(
2448
- DeploymentStreamMessagesToolCalls$outboundSchema.parse(
2449
- deploymentStreamMessagesToolCalls,
2450
- ),
2451
- );
2452
- }
2453
-
2454
- /** @internal */
2455
- export type DeploymentStreamMessagesAssistantMessage$Outbound = {
2456
- content?:
2457
- | string
2458
- | Array<
2459
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2460
- | components.RefusalPartSchema$Outbound
2461
- | components.ReasoningPartSchema$Outbound
2462
- | components.RedactedReasoningPartSchema$Outbound
2463
- >
2464
- | null
2465
- | undefined;
2466
- refusal?: string | null | undefined;
2467
- role: "assistant";
2468
- name?: string | undefined;
2469
- audio?: DeploymentStreamMessagesAudio$Outbound | null | undefined;
2470
- tool_calls?: Array<DeploymentStreamMessagesToolCalls$Outbound> | undefined;
2471
- };
2472
-
2473
- /** @internal */
2474
- export const DeploymentStreamMessagesAssistantMessage$outboundSchema: z.ZodType<
2475
- DeploymentStreamMessagesAssistantMessage$Outbound,
2476
- z.ZodTypeDef,
2477
- DeploymentStreamMessagesAssistantMessage
2478
- > = z.object({
2479
- content: z.nullable(
2480
- z.union([
2481
- z.string(),
2482
- z.array(
2483
- z.union([
2484
- components.TextContentPartSchema$outboundSchema.and(
2485
- z.object({ type: z.literal("text") }),
2486
- ),
2487
- components.RefusalPartSchema$outboundSchema,
2488
- components.ReasoningPartSchema$outboundSchema,
2489
- components.RedactedReasoningPartSchema$outboundSchema,
2490
- ]),
2491
- ),
2492
- ]),
2493
- ).optional(),
2494
- refusal: z.nullable(z.string()).optional(),
2495
- role: z.literal("assistant"),
2496
- name: z.string().optional(),
2497
- audio: z.nullable(z.lazy(() => DeploymentStreamMessagesAudio$outboundSchema))
2498
- .optional(),
2499
- toolCalls: z.array(
2500
- z.lazy(() => DeploymentStreamMessagesToolCalls$outboundSchema),
2501
- ).optional(),
2502
- }).transform((v) => {
2503
- return remap$(v, {
2504
- toolCalls: "tool_calls",
2505
- });
2506
- });
2507
-
2508
- export function deploymentStreamMessagesAssistantMessageToJSON(
2509
- deploymentStreamMessagesAssistantMessage:
2510
- DeploymentStreamMessagesAssistantMessage,
2511
- ): string {
2512
- return JSON.stringify(
2513
- DeploymentStreamMessagesAssistantMessage$outboundSchema.parse(
2514
- deploymentStreamMessagesAssistantMessage,
2515
- ),
2516
- );
2517
- }
2518
-
2519
- /** @internal */
2520
- export const DeploymentStream2DeploymentsRequestRequestBodyType$outboundSchema:
2521
- z.ZodNativeEnum<typeof DeploymentStream2DeploymentsRequestRequestBodyType> = z
2522
- .nativeEnum(DeploymentStream2DeploymentsRequestRequestBodyType);
2523
-
2524
- /** @internal */
2525
- export const DeploymentStream2DeploymentsTtl$outboundSchema: z.ZodNativeEnum<
2526
- typeof DeploymentStream2DeploymentsTtl
2527
- > = z.nativeEnum(DeploymentStream2DeploymentsTtl);
2528
-
2529
- /** @internal */
2530
- export type DeploymentStream2DeploymentsCacheControl$Outbound = {
2531
- type: string;
2532
- ttl: string;
2533
- };
2534
-
2535
- /** @internal */
2536
- export const DeploymentStream2DeploymentsCacheControl$outboundSchema: z.ZodType<
2537
- DeploymentStream2DeploymentsCacheControl$Outbound,
2538
- z.ZodTypeDef,
2539
- DeploymentStream2DeploymentsCacheControl
2540
- > = z.object({
2541
- type: DeploymentStream2DeploymentsRequestRequestBodyType$outboundSchema,
2542
- ttl: DeploymentStream2DeploymentsTtl$outboundSchema.default("5m"),
2543
- });
2544
-
2545
- export function deploymentStream2DeploymentsCacheControlToJSON(
2546
- deploymentStream2DeploymentsCacheControl:
2547
- DeploymentStream2DeploymentsCacheControl,
2548
- ): string {
2549
- return JSON.stringify(
2550
- DeploymentStream2DeploymentsCacheControl$outboundSchema.parse(
2551
- deploymentStream2DeploymentsCacheControl,
2552
- ),
2553
- );
2554
- }
2555
-
2556
- /** @internal */
2557
- export type DeploymentStream2Deployments4$Outbound = {
2558
- type: "file";
2559
- cache_control?: DeploymentStream2DeploymentsCacheControl$Outbound | undefined;
2560
- file: components.FileContentPartSchema$Outbound;
2561
- };
2562
-
2563
- /** @internal */
2564
- export const DeploymentStream2Deployments4$outboundSchema: z.ZodType<
2565
- DeploymentStream2Deployments4$Outbound,
2566
- z.ZodTypeDef,
2567
- DeploymentStream2Deployments4
2568
- > = z.object({
2569
- type: z.literal("file"),
2570
- cacheControl: z.lazy(() =>
2571
- DeploymentStream2DeploymentsCacheControl$outboundSchema
2572
- ).optional(),
2573
- file: components.FileContentPartSchema$outboundSchema,
2574
- }).transform((v) => {
2575
- return remap$(v, {
2576
- cacheControl: "cache_control",
2577
- });
2578
- });
2579
-
2580
- export function deploymentStream2Deployments4ToJSON(
2581
- deploymentStream2Deployments4: DeploymentStream2Deployments4,
2582
- ): string {
2583
- return JSON.stringify(
2584
- DeploymentStream2Deployments4$outboundSchema.parse(
2585
- deploymentStream2Deployments4,
2586
- ),
2587
- );
2588
- }
2589
-
2590
- /** @internal */
2591
- export type DeploymentStreamContentDeploymentsRequestRequestBody2$Outbound =
2592
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2593
- | components.ImageContentPartSchema$Outbound
2594
- | components.AudioContentPartSchema$Outbound
2595
- | DeploymentStream2Deployments4$Outbound;
2596
-
2597
- /** @internal */
2598
- export const DeploymentStreamContentDeploymentsRequestRequestBody2$outboundSchema:
2599
- z.ZodType<
2600
- DeploymentStreamContentDeploymentsRequestRequestBody2$Outbound,
2601
- z.ZodTypeDef,
2602
- DeploymentStreamContentDeploymentsRequestRequestBody2
2603
- > = z.union([
2604
- components.TextContentPartSchema$outboundSchema.and(
2605
- z.object({ type: z.literal("text") }),
2606
- ),
2607
- components.ImageContentPartSchema$outboundSchema,
2608
- components.AudioContentPartSchema$outboundSchema,
2609
- z.lazy(() => DeploymentStream2Deployments4$outboundSchema),
2610
- ]);
2611
-
2612
- export function deploymentStreamContentDeploymentsRequestRequestBody2ToJSON(
2613
- deploymentStreamContentDeploymentsRequestRequestBody2:
2614
- DeploymentStreamContentDeploymentsRequestRequestBody2,
2615
- ): string {
2616
- return JSON.stringify(
2617
- DeploymentStreamContentDeploymentsRequestRequestBody2$outboundSchema.parse(
2618
- deploymentStreamContentDeploymentsRequestRequestBody2,
2619
- ),
2620
- );
2621
- }
2622
-
2623
- /** @internal */
2624
- export type DeploymentStreamMessagesDeploymentsRequestContent$Outbound =
2625
- | string
2626
- | Array<
2627
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2628
- | components.ImageContentPartSchema$Outbound
2629
- | components.AudioContentPartSchema$Outbound
2630
- | DeploymentStream2Deployments4$Outbound
2631
- >;
2632
-
2633
- /** @internal */
2634
- export const DeploymentStreamMessagesDeploymentsRequestContent$outboundSchema:
2635
- z.ZodType<
2636
- DeploymentStreamMessagesDeploymentsRequestContent$Outbound,
2637
- z.ZodTypeDef,
2638
- DeploymentStreamMessagesDeploymentsRequestContent
2639
- > = z.union([
2640
- z.string(),
2641
- z.array(
2642
- z.union([
2643
- components.TextContentPartSchema$outboundSchema.and(
2644
- z.object({ type: z.literal("text") }),
2645
- ),
2646
- components.ImageContentPartSchema$outboundSchema,
2647
- components.AudioContentPartSchema$outboundSchema,
2648
- z.lazy(() => DeploymentStream2Deployments4$outboundSchema),
2649
- ]),
2650
- ),
2651
- ]);
2652
-
2653
- export function deploymentStreamMessagesDeploymentsRequestContentToJSON(
2654
- deploymentStreamMessagesDeploymentsRequestContent:
2655
- DeploymentStreamMessagesDeploymentsRequestContent,
2656
- ): string {
2657
- return JSON.stringify(
2658
- DeploymentStreamMessagesDeploymentsRequestContent$outboundSchema.parse(
2659
- deploymentStreamMessagesDeploymentsRequestContent,
2660
- ),
2661
- );
2662
- }
2663
-
2664
- /** @internal */
2665
- export type DeploymentStreamMessagesUserMessage$Outbound = {
2666
- role: "user";
2667
- name?: string | undefined;
2668
- content:
2669
- | string
2670
- | Array<
2671
- | (components.TextContentPartSchema$Outbound & { type: "text" })
2672
- | components.ImageContentPartSchema$Outbound
2673
- | components.AudioContentPartSchema$Outbound
2674
- | DeploymentStream2Deployments4$Outbound
2675
- >;
2676
- };
2677
-
2678
- /** @internal */
2679
- export const DeploymentStreamMessagesUserMessage$outboundSchema: z.ZodType<
2680
- DeploymentStreamMessagesUserMessage$Outbound,
2681
- z.ZodTypeDef,
2682
- DeploymentStreamMessagesUserMessage
2683
- > = z.object({
2684
- role: z.literal("user"),
2685
- name: z.string().optional(),
2686
- content: z.union([
2687
- z.string(),
2688
- z.array(
2689
- z.union([
2690
- components.TextContentPartSchema$outboundSchema.and(
2691
- z.object({ type: z.literal("text") }),
2692
- ),
2693
- components.ImageContentPartSchema$outboundSchema,
2694
- components.AudioContentPartSchema$outboundSchema,
2695
- z.lazy(() => DeploymentStream2Deployments4$outboundSchema),
2696
- ]),
2697
- ),
2698
- ]),
2699
- });
2700
-
2701
- export function deploymentStreamMessagesUserMessageToJSON(
2702
- deploymentStreamMessagesUserMessage: DeploymentStreamMessagesUserMessage,
2703
- ): string {
2704
- return JSON.stringify(
2705
- DeploymentStreamMessagesUserMessage$outboundSchema.parse(
2706
- deploymentStreamMessagesUserMessage,
2707
- ),
2708
- );
2709
- }
2710
-
2711
- /** @internal */
2712
- export type DeploymentStreamMessagesDeploymentsContent$Outbound =
2713
- | string
2714
- | Array<components.TextContentPartSchema$Outbound>;
2715
-
2716
- /** @internal */
2717
- export const DeploymentStreamMessagesDeploymentsContent$outboundSchema:
2718
- z.ZodType<
2719
- DeploymentStreamMessagesDeploymentsContent$Outbound,
2720
- z.ZodTypeDef,
2721
- DeploymentStreamMessagesDeploymentsContent
2722
- > = z.union([
2723
- z.string(),
2724
- z.array(components.TextContentPartSchema$outboundSchema),
2725
- ]);
2726
-
2727
- export function deploymentStreamMessagesDeploymentsContentToJSON(
2728
- deploymentStreamMessagesDeploymentsContent:
2729
- DeploymentStreamMessagesDeploymentsContent,
2730
- ): string {
2731
- return JSON.stringify(
2732
- DeploymentStreamMessagesDeploymentsContent$outboundSchema.parse(
2733
- deploymentStreamMessagesDeploymentsContent,
2734
- ),
2735
- );
2736
- }
2737
-
2738
- /** @internal */
2739
- export type DeploymentStreamMessagesDeveloperMessage$Outbound = {
2740
- role: "developer";
2741
- content: string | Array<components.TextContentPartSchema$Outbound>;
2742
- name?: string | undefined;
2743
- };
2744
-
2745
- /** @internal */
2746
- export const DeploymentStreamMessagesDeveloperMessage$outboundSchema: z.ZodType<
2747
- DeploymentStreamMessagesDeveloperMessage$Outbound,
2748
- z.ZodTypeDef,
2749
- DeploymentStreamMessagesDeveloperMessage
2750
- > = z.object({
2751
- role: z.literal("developer"),
2752
- content: z.union([
2753
- z.string(),
2754
- z.array(components.TextContentPartSchema$outboundSchema),
2755
- ]),
2756
- name: z.string().optional(),
2757
- });
2758
-
2759
- export function deploymentStreamMessagesDeveloperMessageToJSON(
2760
- deploymentStreamMessagesDeveloperMessage:
2761
- DeploymentStreamMessagesDeveloperMessage,
2762
- ): string {
2763
- return JSON.stringify(
2764
- DeploymentStreamMessagesDeveloperMessage$outboundSchema.parse(
2765
- deploymentStreamMessagesDeveloperMessage,
2766
- ),
2767
- );
2768
- }
2769
-
2770
- /** @internal */
2771
- export type DeploymentStreamMessagesContent$Outbound =
2772
- | string
2773
- | Array<components.TextContentPartSchema$Outbound>;
2774
-
2775
- /** @internal */
2776
- export const DeploymentStreamMessagesContent$outboundSchema: z.ZodType<
2777
- DeploymentStreamMessagesContent$Outbound,
2778
- z.ZodTypeDef,
2779
- DeploymentStreamMessagesContent
2780
- > = z.union([
2781
- z.string(),
2782
- z.array(components.TextContentPartSchema$outboundSchema),
2783
- ]);
2784
-
2785
- export function deploymentStreamMessagesContentToJSON(
2786
- deploymentStreamMessagesContent: DeploymentStreamMessagesContent,
2787
- ): string {
2788
- return JSON.stringify(
2789
- DeploymentStreamMessagesContent$outboundSchema.parse(
2790
- deploymentStreamMessagesContent,
2791
- ),
2792
- );
2793
- }
2794
-
2795
- /** @internal */
2796
- export type DeploymentStreamMessagesSystemMessage$Outbound = {
2797
- role: "system";
2798
- content: string | Array<components.TextContentPartSchema$Outbound>;
2799
- name?: string | undefined;
2800
- };
2801
-
2802
- /** @internal */
2803
- export const DeploymentStreamMessagesSystemMessage$outboundSchema: z.ZodType<
2804
- DeploymentStreamMessagesSystemMessage$Outbound,
2805
- z.ZodTypeDef,
2806
- DeploymentStreamMessagesSystemMessage
2807
- > = z.object({
2808
- role: z.literal("system"),
2809
- content: z.union([
2810
- z.string(),
2811
- z.array(components.TextContentPartSchema$outboundSchema),
2812
- ]),
2813
- name: z.string().optional(),
2814
- });
2815
-
2816
- export function deploymentStreamMessagesSystemMessageToJSON(
2817
- deploymentStreamMessagesSystemMessage: DeploymentStreamMessagesSystemMessage,
2818
- ): string {
2819
- return JSON.stringify(
2820
- DeploymentStreamMessagesSystemMessage$outboundSchema.parse(
2821
- deploymentStreamMessagesSystemMessage,
2822
- ),
2823
- );
2824
- }
2825
-
2826
- /** @internal */
2827
- export type DeploymentStreamMessages$Outbound =
2828
- | DeploymentStreamMessagesSystemMessage$Outbound
2829
- | DeploymentStreamMessagesDeveloperMessage$Outbound
2830
- | DeploymentStreamMessagesUserMessage$Outbound
2831
- | DeploymentStreamMessagesAssistantMessage$Outbound
2832
- | DeploymentStreamMessagesToolMessage$Outbound;
2833
-
2834
- /** @internal */
2835
- export const DeploymentStreamMessages$outboundSchema: z.ZodType<
2836
- DeploymentStreamMessages$Outbound,
2837
- z.ZodTypeDef,
2838
- DeploymentStreamMessages
2839
- > = z.union([
2840
- z.lazy(() => DeploymentStreamMessagesSystemMessage$outboundSchema),
2841
- z.lazy(() => DeploymentStreamMessagesDeveloperMessage$outboundSchema),
2842
- z.lazy(() => DeploymentStreamMessagesUserMessage$outboundSchema),
2843
- z.lazy(() => DeploymentStreamMessagesAssistantMessage$outboundSchema),
2844
- z.lazy(() => DeploymentStreamMessagesToolMessage$outboundSchema),
2845
- ]);
2846
-
2847
- export function deploymentStreamMessagesToJSON(
2848
- deploymentStreamMessages: DeploymentStreamMessages,
2849
- ): string {
2850
- return JSON.stringify(
2851
- DeploymentStreamMessages$outboundSchema.parse(deploymentStreamMessages),
2852
- );
2853
- }
2854
-
2855
- /** @internal */
2856
- export type DeploymentStreamMetadata$Outbound = {
2857
- file_name?: string | undefined;
2858
- file_type?: string | undefined;
2859
- page_number?: number | undefined;
2860
- };
2861
-
2862
- /** @internal */
2863
- export const DeploymentStreamMetadata$outboundSchema: z.ZodType<
2864
- DeploymentStreamMetadata$Outbound,
2865
- z.ZodTypeDef,
2866
- DeploymentStreamMetadata
2867
- > = z.object({
2868
- fileName: z.string().optional(),
2869
- fileType: z.string().optional(),
2870
- pageNumber: z.number().optional(),
2871
- }).transform((v) => {
2872
- return remap$(v, {
2873
- fileName: "file_name",
2874
- fileType: "file_type",
2875
- pageNumber: "page_number",
2876
- });
2877
- });
2878
-
2879
- export function deploymentStreamMetadataToJSON(
2880
- deploymentStreamMetadata: DeploymentStreamMetadata,
2881
- ): string {
2882
- return JSON.stringify(
2883
- DeploymentStreamMetadata$outboundSchema.parse(deploymentStreamMetadata),
2884
- );
2885
- }
2886
-
2887
- /** @internal */
2888
- export type DeploymentStreamDocuments$Outbound = {
2889
- text: string;
2890
- metadata?: DeploymentStreamMetadata$Outbound | undefined;
2891
- };
2892
-
2893
- /** @internal */
2894
- export const DeploymentStreamDocuments$outboundSchema: z.ZodType<
2895
- DeploymentStreamDocuments$Outbound,
2896
- z.ZodTypeDef,
2897
- DeploymentStreamDocuments
2898
- > = z.object({
2899
- text: z.string(),
2900
- metadata: z.lazy(() => DeploymentStreamMetadata$outboundSchema).optional(),
2901
- });
2902
-
2903
- export function deploymentStreamDocumentsToJSON(
2904
- deploymentStreamDocuments: DeploymentStreamDocuments,
2905
- ): string {
2906
- return JSON.stringify(
2907
- DeploymentStreamDocuments$outboundSchema.parse(deploymentStreamDocuments),
2908
- );
2909
- }
2910
-
2911
- /** @internal */
2912
- export type DeploymentStreamInvokeOptions$Outbound = {
2913
- include_retrievals: boolean;
2914
- include_usage: boolean;
2915
- mock_response?: string | undefined;
2916
- };
2917
-
2918
- /** @internal */
2919
- export const DeploymentStreamInvokeOptions$outboundSchema: z.ZodType<
2920
- DeploymentStreamInvokeOptions$Outbound,
2921
- z.ZodTypeDef,
2922
- DeploymentStreamInvokeOptions
2923
- > = z.object({
2924
- includeRetrievals: z.boolean().default(false),
2925
- includeUsage: z.boolean().default(false),
2926
- mockResponse: z.string().optional(),
2927
- }).transform((v) => {
2928
- return remap$(v, {
2929
- includeRetrievals: "include_retrievals",
2930
- includeUsage: "include_usage",
2931
- mockResponse: "mock_response",
2932
- });
2933
- });
2934
-
2935
- export function deploymentStreamInvokeOptionsToJSON(
2936
- deploymentStreamInvokeOptions: DeploymentStreamInvokeOptions,
2937
- ): string {
2938
- return JSON.stringify(
2939
- DeploymentStreamInvokeOptions$outboundSchema.parse(
2940
- deploymentStreamInvokeOptions,
2941
- ),
2942
- );
2943
- }
2944
-
2945
- /** @internal */
2946
- export type DeploymentStreamThread$Outbound = {
2947
- id: string;
2948
- tags?: Array<string> | undefined;
2949
- };
2950
-
2951
- /** @internal */
2952
- export const DeploymentStreamThread$outboundSchema: z.ZodType<
2953
- DeploymentStreamThread$Outbound,
2954
- z.ZodTypeDef,
2955
- DeploymentStreamThread
2956
- > = z.object({
2957
- id: z.string(),
2958
- tags: z.array(z.string()).optional(),
2959
- });
2960
-
2961
- export function deploymentStreamThreadToJSON(
2962
- deploymentStreamThread: DeploymentStreamThread,
2963
- ): string {
2964
- return JSON.stringify(
2965
- DeploymentStreamThread$outboundSchema.parse(deploymentStreamThread),
2966
- );
2967
- }
2968
-
2969
- /** @internal */
2970
- export type DeploymentStreamOrExists$Outbound = {
2971
- exists: boolean;
2972
- };
2973
-
2974
- /** @internal */
2975
- export const DeploymentStreamOrExists$outboundSchema: z.ZodType<
2976
- DeploymentStreamOrExists$Outbound,
2977
- z.ZodTypeDef,
2978
- DeploymentStreamOrExists
2979
- > = z.object({
2980
- exists: z.boolean(),
2981
- });
2982
-
2983
- export function deploymentStreamOrExistsToJSON(
2984
- deploymentStreamOrExists: DeploymentStreamOrExists,
2985
- ): string {
2986
- return JSON.stringify(
2987
- DeploymentStreamOrExists$outboundSchema.parse(deploymentStreamOrExists),
2988
- );
2989
- }
2990
-
2991
- /** @internal */
2992
- export type DeploymentStreamOrDeploymentsNin$Outbound =
2993
- | string
2994
- | number
2995
- | boolean;
2996
-
2997
- /** @internal */
2998
- export const DeploymentStreamOrDeploymentsNin$outboundSchema: z.ZodType<
2999
- DeploymentStreamOrDeploymentsNin$Outbound,
3000
- z.ZodTypeDef,
3001
- DeploymentStreamOrDeploymentsNin
3002
- > = z.union([z.string(), z.number(), z.boolean()]);
3003
-
3004
- export function deploymentStreamOrDeploymentsNinToJSON(
3005
- deploymentStreamOrDeploymentsNin: DeploymentStreamOrDeploymentsNin,
3006
- ): string {
3007
- return JSON.stringify(
3008
- DeploymentStreamOrDeploymentsNin$outboundSchema.parse(
3009
- deploymentStreamOrDeploymentsNin,
3010
- ),
3011
- );
3012
- }
3013
-
3014
- /** @internal */
3015
- export type DeploymentStreamOrNin$Outbound = {
3016
- nin: Array<string | number | boolean>;
3017
- };
3018
-
3019
- /** @internal */
3020
- export const DeploymentStreamOrNin$outboundSchema: z.ZodType<
3021
- DeploymentStreamOrNin$Outbound,
3022
- z.ZodTypeDef,
3023
- DeploymentStreamOrNin
3024
- > = z.object({
3025
- nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
3026
- });
3027
-
3028
- export function deploymentStreamOrNinToJSON(
3029
- deploymentStreamOrNin: DeploymentStreamOrNin,
3030
- ): string {
3031
- return JSON.stringify(
3032
- DeploymentStreamOrNin$outboundSchema.parse(deploymentStreamOrNin),
3033
- );
3034
- }
3035
-
3036
- /** @internal */
3037
- export type DeploymentStreamOrDeploymentsIn$Outbound =
3038
- | string
3039
- | number
3040
- | boolean;
3041
-
3042
- /** @internal */
3043
- export const DeploymentStreamOrDeploymentsIn$outboundSchema: z.ZodType<
3044
- DeploymentStreamOrDeploymentsIn$Outbound,
3045
- z.ZodTypeDef,
3046
- DeploymentStreamOrDeploymentsIn
3047
- > = z.union([z.string(), z.number(), z.boolean()]);
3048
-
3049
- export function deploymentStreamOrDeploymentsInToJSON(
3050
- deploymentStreamOrDeploymentsIn: DeploymentStreamOrDeploymentsIn,
3051
- ): string {
3052
- return JSON.stringify(
3053
- DeploymentStreamOrDeploymentsIn$outboundSchema.parse(
3054
- deploymentStreamOrDeploymentsIn,
3055
- ),
3056
- );
3057
- }
3058
-
3059
- /** @internal */
3060
- export type DeploymentStreamOrIn$Outbound = {
3061
- in: Array<string | number | boolean>;
3062
- };
3063
-
3064
- /** @internal */
3065
- export const DeploymentStreamOrIn$outboundSchema: z.ZodType<
3066
- DeploymentStreamOrIn$Outbound,
3067
- z.ZodTypeDef,
3068
- DeploymentStreamOrIn
3069
- > = z.object({
3070
- in: z.array(z.union([z.string(), z.number(), z.boolean()])),
3071
- });
3072
-
3073
- export function deploymentStreamOrInToJSON(
3074
- deploymentStreamOrIn: DeploymentStreamOrIn,
3075
- ): string {
3076
- return JSON.stringify(
3077
- DeploymentStreamOrIn$outboundSchema.parse(deploymentStreamOrIn),
3078
- );
3079
- }
3080
-
3081
- /** @internal */
3082
- export type DeploymentStreamOrLte$Outbound = {
3083
- lte: number;
3084
- };
3085
-
3086
- /** @internal */
3087
- export const DeploymentStreamOrLte$outboundSchema: z.ZodType<
3088
- DeploymentStreamOrLte$Outbound,
3089
- z.ZodTypeDef,
3090
- DeploymentStreamOrLte
3091
- > = z.object({
3092
- lte: z.number(),
3093
- });
3094
-
3095
- export function deploymentStreamOrLteToJSON(
3096
- deploymentStreamOrLte: DeploymentStreamOrLte,
3097
- ): string {
3098
- return JSON.stringify(
3099
- DeploymentStreamOrLte$outboundSchema.parse(deploymentStreamOrLte),
3100
- );
3101
- }
3102
-
3103
- /** @internal */
3104
- export type DeploymentStreamOrLt$Outbound = {
3105
- lt: number;
3106
- };
3107
-
3108
- /** @internal */
3109
- export const DeploymentStreamOrLt$outboundSchema: z.ZodType<
3110
- DeploymentStreamOrLt$Outbound,
3111
- z.ZodTypeDef,
3112
- DeploymentStreamOrLt
3113
- > = z.object({
3114
- lt: z.number(),
3115
- });
3116
-
3117
- export function deploymentStreamOrLtToJSON(
3118
- deploymentStreamOrLt: DeploymentStreamOrLt,
3119
- ): string {
3120
- return JSON.stringify(
3121
- DeploymentStreamOrLt$outboundSchema.parse(deploymentStreamOrLt),
3122
- );
3123
- }
3124
-
3125
- /** @internal */
3126
- export type DeploymentStreamOrGte$Outbound = {
3127
- gte: number;
3128
- };
3129
-
3130
- /** @internal */
3131
- export const DeploymentStreamOrGte$outboundSchema: z.ZodType<
3132
- DeploymentStreamOrGte$Outbound,
3133
- z.ZodTypeDef,
3134
- DeploymentStreamOrGte
3135
- > = z.object({
3136
- gte: z.number(),
3137
- });
3138
-
3139
- export function deploymentStreamOrGteToJSON(
3140
- deploymentStreamOrGte: DeploymentStreamOrGte,
3141
- ): string {
3142
- return JSON.stringify(
3143
- DeploymentStreamOrGte$outboundSchema.parse(deploymentStreamOrGte),
3144
- );
3145
- }
3146
-
3147
- /** @internal */
3148
- export type DeploymentStreamOrGt$Outbound = {
3149
- gt: number;
3150
- };
3151
-
3152
- /** @internal */
3153
- export const DeploymentStreamOrGt$outboundSchema: z.ZodType<
3154
- DeploymentStreamOrGt$Outbound,
3155
- z.ZodTypeDef,
3156
- DeploymentStreamOrGt
3157
- > = z.object({
3158
- gt: z.number(),
3159
- });
3160
-
3161
- export function deploymentStreamOrGtToJSON(
3162
- deploymentStreamOrGt: DeploymentStreamOrGt,
3163
- ): string {
3164
- return JSON.stringify(
3165
- DeploymentStreamOrGt$outboundSchema.parse(deploymentStreamOrGt),
3166
- );
3167
- }
3168
-
3169
- /** @internal */
3170
- export type DeploymentStreamOrDeploymentsNe$Outbound =
3171
- | string
3172
- | number
3173
- | boolean;
3174
-
3175
- /** @internal */
3176
- export const DeploymentStreamOrDeploymentsNe$outboundSchema: z.ZodType<
3177
- DeploymentStreamOrDeploymentsNe$Outbound,
3178
- z.ZodTypeDef,
3179
- DeploymentStreamOrDeploymentsNe
3180
- > = z.union([z.string(), z.number(), z.boolean()]);
3181
-
3182
- export function deploymentStreamOrDeploymentsNeToJSON(
3183
- deploymentStreamOrDeploymentsNe: DeploymentStreamOrDeploymentsNe,
3184
- ): string {
3185
- return JSON.stringify(
3186
- DeploymentStreamOrDeploymentsNe$outboundSchema.parse(
3187
- deploymentStreamOrDeploymentsNe,
3188
- ),
3189
- );
3190
- }
3191
-
3192
- /** @internal */
3193
- export type DeploymentStreamOrNe$Outbound = {
3194
- ne: string | number | boolean;
3195
- };
3196
-
3197
- /** @internal */
3198
- export const DeploymentStreamOrNe$outboundSchema: z.ZodType<
3199
- DeploymentStreamOrNe$Outbound,
3200
- z.ZodTypeDef,
3201
- DeploymentStreamOrNe
3202
- > = z.object({
3203
- ne: z.union([z.string(), z.number(), z.boolean()]),
3204
- });
3205
-
3206
- export function deploymentStreamOrNeToJSON(
3207
- deploymentStreamOrNe: DeploymentStreamOrNe,
3208
- ): string {
3209
- return JSON.stringify(
3210
- DeploymentStreamOrNe$outboundSchema.parse(deploymentStreamOrNe),
3211
- );
3212
- }
3213
-
3214
- /** @internal */
3215
- export type DeploymentStreamOrDeploymentsEq$Outbound =
3216
- | string
3217
- | number
3218
- | boolean;
3219
-
3220
- /** @internal */
3221
- export const DeploymentStreamOrDeploymentsEq$outboundSchema: z.ZodType<
3222
- DeploymentStreamOrDeploymentsEq$Outbound,
3223
- z.ZodTypeDef,
3224
- DeploymentStreamOrDeploymentsEq
3225
- > = z.union([z.string(), z.number(), z.boolean()]);
3226
-
3227
- export function deploymentStreamOrDeploymentsEqToJSON(
3228
- deploymentStreamOrDeploymentsEq: DeploymentStreamOrDeploymentsEq,
3229
- ): string {
3230
- return JSON.stringify(
3231
- DeploymentStreamOrDeploymentsEq$outboundSchema.parse(
3232
- deploymentStreamOrDeploymentsEq,
3233
- ),
3234
- );
3235
- }
3236
-
3237
- /** @internal */
3238
- export type DeploymentStreamOrEq$Outbound = {
3239
- eq: string | number | boolean;
3240
- };
3241
-
3242
- /** @internal */
3243
- export const DeploymentStreamOrEq$outboundSchema: z.ZodType<
3244
- DeploymentStreamOrEq$Outbound,
3245
- z.ZodTypeDef,
3246
- DeploymentStreamOrEq
3247
- > = z.object({
3248
- eq: z.union([z.string(), z.number(), z.boolean()]),
3249
- });
3250
-
3251
- export function deploymentStreamOrEqToJSON(
3252
- deploymentStreamOrEq: DeploymentStreamOrEq,
3253
- ): string {
3254
- return JSON.stringify(
3255
- DeploymentStreamOrEq$outboundSchema.parse(deploymentStreamOrEq),
3256
- );
3257
- }
3258
-
3259
- /** @internal */
3260
- export type DeploymentStreamKnowledgeFilterDeploymentsOr$Outbound =
3261
- | DeploymentStreamOrEq$Outbound
3262
- | DeploymentStreamOrNe$Outbound
3263
- | DeploymentStreamOrGt$Outbound
3264
- | DeploymentStreamOrGte$Outbound
3265
- | DeploymentStreamOrLt$Outbound
3266
- | DeploymentStreamOrLte$Outbound
3267
- | DeploymentStreamOrIn$Outbound
3268
- | DeploymentStreamOrNin$Outbound
3269
- | DeploymentStreamOrExists$Outbound;
3270
-
3271
- /** @internal */
3272
- export const DeploymentStreamKnowledgeFilterDeploymentsOr$outboundSchema:
3273
- z.ZodType<
3274
- DeploymentStreamKnowledgeFilterDeploymentsOr$Outbound,
3275
- z.ZodTypeDef,
3276
- DeploymentStreamKnowledgeFilterDeploymentsOr
3277
- > = z.union([
3278
- z.lazy(() => DeploymentStreamOrEq$outboundSchema),
3279
- z.lazy(() => DeploymentStreamOrNe$outboundSchema),
3280
- z.lazy(() => DeploymentStreamOrGt$outboundSchema),
3281
- z.lazy(() => DeploymentStreamOrGte$outboundSchema),
3282
- z.lazy(() => DeploymentStreamOrLt$outboundSchema),
3283
- z.lazy(() => DeploymentStreamOrLte$outboundSchema),
3284
- z.lazy(() => DeploymentStreamOrIn$outboundSchema),
3285
- z.lazy(() => DeploymentStreamOrNin$outboundSchema),
3286
- z.lazy(() => DeploymentStreamOrExists$outboundSchema),
3287
- ]);
3288
-
3289
- export function deploymentStreamKnowledgeFilterDeploymentsOrToJSON(
3290
- deploymentStreamKnowledgeFilterDeploymentsOr:
3291
- DeploymentStreamKnowledgeFilterDeploymentsOr,
3292
- ): string {
3293
- return JSON.stringify(
3294
- DeploymentStreamKnowledgeFilterDeploymentsOr$outboundSchema.parse(
3295
- deploymentStreamKnowledgeFilterDeploymentsOr,
3296
- ),
3297
- );
3298
- }
3299
-
3300
- /** @internal */
3301
- export type DeploymentStreamKnowledgeFilterOr$Outbound = {
3302
- or: Array<
3303
- {
3304
- [k: string]:
3305
- | DeploymentStreamOrEq$Outbound
3306
- | DeploymentStreamOrNe$Outbound
3307
- | DeploymentStreamOrGt$Outbound
3308
- | DeploymentStreamOrGte$Outbound
3309
- | DeploymentStreamOrLt$Outbound
3310
- | DeploymentStreamOrLte$Outbound
3311
- | DeploymentStreamOrIn$Outbound
3312
- | DeploymentStreamOrNin$Outbound
3313
- | DeploymentStreamOrExists$Outbound;
3314
- }
3315
- >;
3316
- };
3317
-
3318
- /** @internal */
3319
- export const DeploymentStreamKnowledgeFilterOr$outboundSchema: z.ZodType<
3320
- DeploymentStreamKnowledgeFilterOr$Outbound,
3321
- z.ZodTypeDef,
3322
- DeploymentStreamKnowledgeFilterOr
3323
- > = z.object({
3324
- or: z.array(
3325
- z.record(z.union([
3326
- z.lazy(() => DeploymentStreamOrEq$outboundSchema),
3327
- z.lazy(() =>
3328
- DeploymentStreamOrNe$outboundSchema
3329
- ),
3330
- z.lazy(() => DeploymentStreamOrGt$outboundSchema),
3331
- z.lazy(() => DeploymentStreamOrGte$outboundSchema),
3332
- z.lazy(() => DeploymentStreamOrLt$outboundSchema),
3333
- z.lazy(() => DeploymentStreamOrLte$outboundSchema),
3334
- z.lazy(() => DeploymentStreamOrIn$outboundSchema),
3335
- z.lazy(() => DeploymentStreamOrNin$outboundSchema),
3336
- z.lazy(() => DeploymentStreamOrExists$outboundSchema),
3337
- ])),
3338
- ),
3339
- });
3340
-
3341
- export function deploymentStreamKnowledgeFilterOrToJSON(
3342
- deploymentStreamKnowledgeFilterOr: DeploymentStreamKnowledgeFilterOr,
3343
- ): string {
3344
- return JSON.stringify(
3345
- DeploymentStreamKnowledgeFilterOr$outboundSchema.parse(
3346
- deploymentStreamKnowledgeFilterOr,
3347
- ),
3348
- );
3349
- }
3350
-
3351
- /** @internal */
3352
- export type DeploymentStreamAndExists$Outbound = {
3353
- exists: boolean;
3354
- };
3355
-
3356
- /** @internal */
3357
- export const DeploymentStreamAndExists$outboundSchema: z.ZodType<
3358
- DeploymentStreamAndExists$Outbound,
3359
- z.ZodTypeDef,
3360
- DeploymentStreamAndExists
3361
- > = z.object({
3362
- exists: z.boolean(),
3363
- });
3364
-
3365
- export function deploymentStreamAndExistsToJSON(
3366
- deploymentStreamAndExists: DeploymentStreamAndExists,
3367
- ): string {
3368
- return JSON.stringify(
3369
- DeploymentStreamAndExists$outboundSchema.parse(deploymentStreamAndExists),
3370
- );
3371
- }
3372
-
3373
- /** @internal */
3374
- export type DeploymentStreamAndDeploymentsNin$Outbound =
3375
- | string
3376
- | number
3377
- | boolean;
3378
-
3379
- /** @internal */
3380
- export const DeploymentStreamAndDeploymentsNin$outboundSchema: z.ZodType<
3381
- DeploymentStreamAndDeploymentsNin$Outbound,
3382
- z.ZodTypeDef,
3383
- DeploymentStreamAndDeploymentsNin
3384
- > = z.union([z.string(), z.number(), z.boolean()]);
3385
-
3386
- export function deploymentStreamAndDeploymentsNinToJSON(
3387
- deploymentStreamAndDeploymentsNin: DeploymentStreamAndDeploymentsNin,
3388
- ): string {
3389
- return JSON.stringify(
3390
- DeploymentStreamAndDeploymentsNin$outboundSchema.parse(
3391
- deploymentStreamAndDeploymentsNin,
3392
- ),
3393
- );
3394
- }
3395
-
3396
- /** @internal */
3397
- export type DeploymentStreamAndNin$Outbound = {
3398
- nin: Array<string | number | boolean>;
3399
- };
3400
-
3401
- /** @internal */
3402
- export const DeploymentStreamAndNin$outboundSchema: z.ZodType<
3403
- DeploymentStreamAndNin$Outbound,
3404
- z.ZodTypeDef,
3405
- DeploymentStreamAndNin
3406
- > = z.object({
3407
- nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
3408
- });
3409
-
3410
- export function deploymentStreamAndNinToJSON(
3411
- deploymentStreamAndNin: DeploymentStreamAndNin,
3412
- ): string {
3413
- return JSON.stringify(
3414
- DeploymentStreamAndNin$outboundSchema.parse(deploymentStreamAndNin),
3415
- );
3416
- }
3417
-
3418
- /** @internal */
3419
- export type DeploymentStreamAndDeploymentsIn$Outbound =
3420
- | string
3421
- | number
3422
- | boolean;
3423
-
3424
- /** @internal */
3425
- export const DeploymentStreamAndDeploymentsIn$outboundSchema: z.ZodType<
3426
- DeploymentStreamAndDeploymentsIn$Outbound,
3427
- z.ZodTypeDef,
3428
- DeploymentStreamAndDeploymentsIn
3429
- > = z.union([z.string(), z.number(), z.boolean()]);
3430
-
3431
- export function deploymentStreamAndDeploymentsInToJSON(
3432
- deploymentStreamAndDeploymentsIn: DeploymentStreamAndDeploymentsIn,
3433
- ): string {
3434
- return JSON.stringify(
3435
- DeploymentStreamAndDeploymentsIn$outboundSchema.parse(
3436
- deploymentStreamAndDeploymentsIn,
3437
- ),
3438
- );
3439
- }
3440
-
3441
- /** @internal */
3442
- export type DeploymentStreamAndIn$Outbound = {
3443
- in: Array<string | number | boolean>;
3444
- };
3445
-
3446
- /** @internal */
3447
- export const DeploymentStreamAndIn$outboundSchema: z.ZodType<
3448
- DeploymentStreamAndIn$Outbound,
3449
- z.ZodTypeDef,
3450
- DeploymentStreamAndIn
3451
- > = z.object({
3452
- in: z.array(z.union([z.string(), z.number(), z.boolean()])),
3453
- });
3454
-
3455
- export function deploymentStreamAndInToJSON(
3456
- deploymentStreamAndIn: DeploymentStreamAndIn,
3457
- ): string {
3458
- return JSON.stringify(
3459
- DeploymentStreamAndIn$outboundSchema.parse(deploymentStreamAndIn),
3460
- );
3461
- }
3462
-
3463
- /** @internal */
3464
- export type DeploymentStreamAndLte$Outbound = {
3465
- lte: number;
3466
- };
3467
-
3468
- /** @internal */
3469
- export const DeploymentStreamAndLte$outboundSchema: z.ZodType<
3470
- DeploymentStreamAndLte$Outbound,
3471
- z.ZodTypeDef,
3472
- DeploymentStreamAndLte
3473
- > = z.object({
3474
- lte: z.number(),
3475
- });
3476
-
3477
- export function deploymentStreamAndLteToJSON(
3478
- deploymentStreamAndLte: DeploymentStreamAndLte,
3479
- ): string {
3480
- return JSON.stringify(
3481
- DeploymentStreamAndLte$outboundSchema.parse(deploymentStreamAndLte),
3482
- );
3483
- }
3484
-
3485
- /** @internal */
3486
- export type DeploymentStreamAndLt$Outbound = {
3487
- lt: number;
3488
- };
3489
-
3490
- /** @internal */
3491
- export const DeploymentStreamAndLt$outboundSchema: z.ZodType<
3492
- DeploymentStreamAndLt$Outbound,
3493
- z.ZodTypeDef,
3494
- DeploymentStreamAndLt
3495
- > = z.object({
3496
- lt: z.number(),
3497
- });
3498
-
3499
- export function deploymentStreamAndLtToJSON(
3500
- deploymentStreamAndLt: DeploymentStreamAndLt,
3501
- ): string {
3502
- return JSON.stringify(
3503
- DeploymentStreamAndLt$outboundSchema.parse(deploymentStreamAndLt),
3504
- );
3505
- }
3506
-
3507
- /** @internal */
3508
- export type DeploymentStreamAndGte$Outbound = {
3509
- gte: number;
3510
- };
3511
-
3512
- /** @internal */
3513
- export const DeploymentStreamAndGte$outboundSchema: z.ZodType<
3514
- DeploymentStreamAndGte$Outbound,
3515
- z.ZodTypeDef,
3516
- DeploymentStreamAndGte
3517
- > = z.object({
3518
- gte: z.number(),
3519
- });
3520
-
3521
- export function deploymentStreamAndGteToJSON(
3522
- deploymentStreamAndGte: DeploymentStreamAndGte,
3523
- ): string {
3524
- return JSON.stringify(
3525
- DeploymentStreamAndGte$outboundSchema.parse(deploymentStreamAndGte),
3526
- );
3527
- }
3528
-
3529
- /** @internal */
3530
- export type DeploymentStreamAndGt$Outbound = {
3531
- gt: number;
3532
- };
3533
-
3534
- /** @internal */
3535
- export const DeploymentStreamAndGt$outboundSchema: z.ZodType<
3536
- DeploymentStreamAndGt$Outbound,
3537
- z.ZodTypeDef,
3538
- DeploymentStreamAndGt
3539
- > = z.object({
3540
- gt: z.number(),
3541
- });
3542
-
3543
- export function deploymentStreamAndGtToJSON(
3544
- deploymentStreamAndGt: DeploymentStreamAndGt,
3545
- ): string {
3546
- return JSON.stringify(
3547
- DeploymentStreamAndGt$outboundSchema.parse(deploymentStreamAndGt),
3548
- );
3549
- }
3550
-
3551
- /** @internal */
3552
- export type DeploymentStreamAndDeploymentsNe$Outbound =
3553
- | string
3554
- | number
3555
- | boolean;
3556
-
3557
- /** @internal */
3558
- export const DeploymentStreamAndDeploymentsNe$outboundSchema: z.ZodType<
3559
- DeploymentStreamAndDeploymentsNe$Outbound,
3560
- z.ZodTypeDef,
3561
- DeploymentStreamAndDeploymentsNe
3562
- > = z.union([z.string(), z.number(), z.boolean()]);
3563
-
3564
- export function deploymentStreamAndDeploymentsNeToJSON(
3565
- deploymentStreamAndDeploymentsNe: DeploymentStreamAndDeploymentsNe,
3566
- ): string {
3567
- return JSON.stringify(
3568
- DeploymentStreamAndDeploymentsNe$outboundSchema.parse(
3569
- deploymentStreamAndDeploymentsNe,
3570
- ),
3571
- );
3572
- }
3573
-
3574
- /** @internal */
3575
- export type DeploymentStreamAndNe$Outbound = {
3576
- ne: string | number | boolean;
3577
- };
3578
-
3579
- /** @internal */
3580
- export const DeploymentStreamAndNe$outboundSchema: z.ZodType<
3581
- DeploymentStreamAndNe$Outbound,
3582
- z.ZodTypeDef,
3583
- DeploymentStreamAndNe
3584
- > = z.object({
3585
- ne: z.union([z.string(), z.number(), z.boolean()]),
3586
- });
3587
-
3588
- export function deploymentStreamAndNeToJSON(
3589
- deploymentStreamAndNe: DeploymentStreamAndNe,
3590
- ): string {
3591
- return JSON.stringify(
3592
- DeploymentStreamAndNe$outboundSchema.parse(deploymentStreamAndNe),
3593
- );
3594
- }
3595
-
3596
- /** @internal */
3597
- export type DeploymentStreamAndDeploymentsEq$Outbound =
3598
- | string
3599
- | number
3600
- | boolean;
3601
-
3602
- /** @internal */
3603
- export const DeploymentStreamAndDeploymentsEq$outboundSchema: z.ZodType<
3604
- DeploymentStreamAndDeploymentsEq$Outbound,
3605
- z.ZodTypeDef,
3606
- DeploymentStreamAndDeploymentsEq
3607
- > = z.union([z.string(), z.number(), z.boolean()]);
3608
-
3609
- export function deploymentStreamAndDeploymentsEqToJSON(
3610
- deploymentStreamAndDeploymentsEq: DeploymentStreamAndDeploymentsEq,
3611
- ): string {
3612
- return JSON.stringify(
3613
- DeploymentStreamAndDeploymentsEq$outboundSchema.parse(
3614
- deploymentStreamAndDeploymentsEq,
3615
- ),
3616
- );
3617
- }
3618
-
3619
- /** @internal */
3620
- export type DeploymentStreamAndEq$Outbound = {
3621
- eq: string | number | boolean;
3622
- };
3623
-
3624
- /** @internal */
3625
- export const DeploymentStreamAndEq$outboundSchema: z.ZodType<
3626
- DeploymentStreamAndEq$Outbound,
3627
- z.ZodTypeDef,
3628
- DeploymentStreamAndEq
3629
- > = z.object({
3630
- eq: z.union([z.string(), z.number(), z.boolean()]),
3631
- });
3632
-
3633
- export function deploymentStreamAndEqToJSON(
3634
- deploymentStreamAndEq: DeploymentStreamAndEq,
3635
- ): string {
3636
- return JSON.stringify(
3637
- DeploymentStreamAndEq$outboundSchema.parse(deploymentStreamAndEq),
3638
- );
3639
- }
3640
-
3641
- /** @internal */
3642
- export type DeploymentStreamKnowledgeFilterDeploymentsAnd$Outbound =
3643
- | DeploymentStreamAndEq$Outbound
3644
- | DeploymentStreamAndNe$Outbound
3645
- | DeploymentStreamAndGt$Outbound
3646
- | DeploymentStreamAndGte$Outbound
3647
- | DeploymentStreamAndLt$Outbound
3648
- | DeploymentStreamAndLte$Outbound
3649
- | DeploymentStreamAndIn$Outbound
3650
- | DeploymentStreamAndNin$Outbound
3651
- | DeploymentStreamAndExists$Outbound;
3652
-
3653
- /** @internal */
3654
- export const DeploymentStreamKnowledgeFilterDeploymentsAnd$outboundSchema:
3655
- z.ZodType<
3656
- DeploymentStreamKnowledgeFilterDeploymentsAnd$Outbound,
3657
- z.ZodTypeDef,
3658
- DeploymentStreamKnowledgeFilterDeploymentsAnd
3659
- > = z.union([
3660
- z.lazy(() => DeploymentStreamAndEq$outboundSchema),
3661
- z.lazy(() => DeploymentStreamAndNe$outboundSchema),
3662
- z.lazy(() => DeploymentStreamAndGt$outboundSchema),
3663
- z.lazy(() => DeploymentStreamAndGte$outboundSchema),
3664
- z.lazy(() => DeploymentStreamAndLt$outboundSchema),
3665
- z.lazy(() => DeploymentStreamAndLte$outboundSchema),
3666
- z.lazy(() => DeploymentStreamAndIn$outboundSchema),
3667
- z.lazy(() => DeploymentStreamAndNin$outboundSchema),
3668
- z.lazy(() => DeploymentStreamAndExists$outboundSchema),
3669
- ]);
3670
-
3671
- export function deploymentStreamKnowledgeFilterDeploymentsAndToJSON(
3672
- deploymentStreamKnowledgeFilterDeploymentsAnd:
3673
- DeploymentStreamKnowledgeFilterDeploymentsAnd,
3674
- ): string {
3675
- return JSON.stringify(
3676
- DeploymentStreamKnowledgeFilterDeploymentsAnd$outboundSchema.parse(
3677
- deploymentStreamKnowledgeFilterDeploymentsAnd,
3678
- ),
3679
- );
3680
- }
3681
-
3682
- /** @internal */
3683
- export type DeploymentStreamKnowledgeFilterAnd$Outbound = {
3684
- and: Array<
3685
- {
3686
- [k: string]:
3687
- | DeploymentStreamAndEq$Outbound
3688
- | DeploymentStreamAndNe$Outbound
3689
- | DeploymentStreamAndGt$Outbound
3690
- | DeploymentStreamAndGte$Outbound
3691
- | DeploymentStreamAndLt$Outbound
3692
- | DeploymentStreamAndLte$Outbound
3693
- | DeploymentStreamAndIn$Outbound
3694
- | DeploymentStreamAndNin$Outbound
3695
- | DeploymentStreamAndExists$Outbound;
3696
- }
3697
- >;
3698
- };
3699
-
3700
- /** @internal */
3701
- export const DeploymentStreamKnowledgeFilterAnd$outboundSchema: z.ZodType<
3702
- DeploymentStreamKnowledgeFilterAnd$Outbound,
3703
- z.ZodTypeDef,
3704
- DeploymentStreamKnowledgeFilterAnd
3705
- > = z.object({
3706
- and: z.array(
3707
- z.record(z.union([
3708
- z.lazy(() => DeploymentStreamAndEq$outboundSchema),
3709
- z.lazy(() =>
3710
- DeploymentStreamAndNe$outboundSchema
3711
- ),
3712
- z.lazy(() => DeploymentStreamAndGt$outboundSchema),
3713
- z.lazy(() => DeploymentStreamAndGte$outboundSchema),
3714
- z.lazy(() => DeploymentStreamAndLt$outboundSchema),
3715
- z.lazy(() => DeploymentStreamAndLte$outboundSchema),
3716
- z.lazy(() => DeploymentStreamAndIn$outboundSchema),
3717
- z.lazy(() => DeploymentStreamAndNin$outboundSchema),
3718
- z.lazy(() => DeploymentStreamAndExists$outboundSchema),
3719
- ])),
3720
- ),
3721
- });
3722
-
3723
- export function deploymentStreamKnowledgeFilterAndToJSON(
3724
- deploymentStreamKnowledgeFilterAnd: DeploymentStreamKnowledgeFilterAnd,
3725
- ): string {
3726
- return JSON.stringify(
3727
- DeploymentStreamKnowledgeFilterAnd$outboundSchema.parse(
3728
- deploymentStreamKnowledgeFilterAnd,
3729
- ),
3730
- );
3731
- }
3732
-
3733
- /** @internal */
3734
- export type OneExists$Outbound = {
3735
- exists: boolean;
3736
- };
3737
-
3738
- /** @internal */
3739
- export const OneExists$outboundSchema: z.ZodType<
3740
- OneExists$Outbound,
3741
- z.ZodTypeDef,
3742
- OneExists
3743
- > = z.object({
3744
- exists: z.boolean(),
3745
- });
3746
-
3747
- export function oneExistsToJSON(oneExists: OneExists): string {
3748
- return JSON.stringify(OneExists$outboundSchema.parse(oneExists));
3749
- }
3750
-
3751
- /** @internal */
3752
- export type DeploymentStream1DeploymentsNin$Outbound =
3753
- | string
3754
- | number
3755
- | boolean;
3756
-
3757
- /** @internal */
3758
- export const DeploymentStream1DeploymentsNin$outboundSchema: z.ZodType<
3759
- DeploymentStream1DeploymentsNin$Outbound,
3760
- z.ZodTypeDef,
3761
- DeploymentStream1DeploymentsNin
3762
- > = z.union([z.string(), z.number(), z.boolean()]);
3763
-
3764
- export function deploymentStream1DeploymentsNinToJSON(
3765
- deploymentStream1DeploymentsNin: DeploymentStream1DeploymentsNin,
3766
- ): string {
3767
- return JSON.stringify(
3768
- DeploymentStream1DeploymentsNin$outboundSchema.parse(
3769
- deploymentStream1DeploymentsNin,
3770
- ),
3771
- );
3772
- }
3773
-
3774
- /** @internal */
3775
- export type DeploymentStream1Nin$Outbound = {
3776
- nin: Array<string | number | boolean>;
3777
- };
3778
-
3779
- /** @internal */
3780
- export const DeploymentStream1Nin$outboundSchema: z.ZodType<
3781
- DeploymentStream1Nin$Outbound,
3782
- z.ZodTypeDef,
3783
- DeploymentStream1Nin
3784
- > = z.object({
3785
- nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
3786
- });
3787
-
3788
- export function deploymentStream1NinToJSON(
3789
- deploymentStream1Nin: DeploymentStream1Nin,
3790
- ): string {
3791
- return JSON.stringify(
3792
- DeploymentStream1Nin$outboundSchema.parse(deploymentStream1Nin),
3793
- );
3794
- }
3795
-
3796
- /** @internal */
3797
- export type DeploymentStream1DeploymentsIn$Outbound = string | number | boolean;
3798
-
3799
- /** @internal */
3800
- export const DeploymentStream1DeploymentsIn$outboundSchema: z.ZodType<
3801
- DeploymentStream1DeploymentsIn$Outbound,
3802
- z.ZodTypeDef,
3803
- DeploymentStream1DeploymentsIn
3804
- > = z.union([z.string(), z.number(), z.boolean()]);
3805
-
3806
- export function deploymentStream1DeploymentsInToJSON(
3807
- deploymentStream1DeploymentsIn: DeploymentStream1DeploymentsIn,
3808
- ): string {
3809
- return JSON.stringify(
3810
- DeploymentStream1DeploymentsIn$outboundSchema.parse(
3811
- deploymentStream1DeploymentsIn,
3812
- ),
3813
- );
3814
- }
3815
-
3816
- /** @internal */
3817
- export type DeploymentStream1In$Outbound = {
3818
- in: Array<string | number | boolean>;
3819
- };
3820
-
3821
- /** @internal */
3822
- export const DeploymentStream1In$outboundSchema: z.ZodType<
3823
- DeploymentStream1In$Outbound,
3824
- z.ZodTypeDef,
3825
- DeploymentStream1In
3826
- > = z.object({
3827
- in: z.array(z.union([z.string(), z.number(), z.boolean()])),
3828
- });
3829
-
3830
- export function deploymentStream1InToJSON(
3831
- deploymentStream1In: DeploymentStream1In,
3832
- ): string {
3833
- return JSON.stringify(
3834
- DeploymentStream1In$outboundSchema.parse(deploymentStream1In),
3835
- );
3836
- }
3837
-
3838
- /** @internal */
3839
- export type OneLte$Outbound = {
3840
- lte: number;
3841
- };
3842
-
3843
- /** @internal */
3844
- export const OneLte$outboundSchema: z.ZodType<
3845
- OneLte$Outbound,
3846
- z.ZodTypeDef,
3847
- OneLte
3848
- > = z.object({
3849
- lte: z.number(),
3850
- });
3851
-
3852
- export function oneLteToJSON(oneLte: OneLte): string {
3853
- return JSON.stringify(OneLte$outboundSchema.parse(oneLte));
3854
- }
3855
-
3856
- /** @internal */
3857
- export type OneLt$Outbound = {
3858
- lt: number;
3859
- };
3860
-
3861
- /** @internal */
3862
- export const OneLt$outboundSchema: z.ZodType<
3863
- OneLt$Outbound,
3864
- z.ZodTypeDef,
3865
- OneLt
3866
- > = z.object({
3867
- lt: z.number(),
3868
- });
3869
-
3870
- export function oneLtToJSON(oneLt: OneLt): string {
3871
- return JSON.stringify(OneLt$outboundSchema.parse(oneLt));
3872
- }
3873
-
3874
- /** @internal */
3875
- export type OneGte$Outbound = {
3876
- gte: number;
3877
- };
3878
-
3879
- /** @internal */
3880
- export const OneGte$outboundSchema: z.ZodType<
3881
- OneGte$Outbound,
3882
- z.ZodTypeDef,
3883
- OneGte
3884
- > = z.object({
3885
- gte: z.number(),
3886
- });
3887
-
3888
- export function oneGteToJSON(oneGte: OneGte): string {
3889
- return JSON.stringify(OneGte$outboundSchema.parse(oneGte));
3890
- }
3891
-
3892
- /** @internal */
3893
- export type OneGt$Outbound = {
3894
- gt: number;
3895
- };
3896
-
3897
- /** @internal */
3898
- export const OneGt$outboundSchema: z.ZodType<
3899
- OneGt$Outbound,
3900
- z.ZodTypeDef,
3901
- OneGt
3902
- > = z.object({
3903
- gt: z.number(),
3904
- });
3905
-
3906
- export function oneGtToJSON(oneGt: OneGt): string {
3907
- return JSON.stringify(OneGt$outboundSchema.parse(oneGt));
3908
- }
3909
-
3910
- /** @internal */
3911
- export type DeploymentStream1DeploymentsNe$Outbound = string | number | boolean;
3912
-
3913
- /** @internal */
3914
- export const DeploymentStream1DeploymentsNe$outboundSchema: z.ZodType<
3915
- DeploymentStream1DeploymentsNe$Outbound,
3916
- z.ZodTypeDef,
3917
- DeploymentStream1DeploymentsNe
3918
- > = z.union([z.string(), z.number(), z.boolean()]);
3919
-
3920
- export function deploymentStream1DeploymentsNeToJSON(
3921
- deploymentStream1DeploymentsNe: DeploymentStream1DeploymentsNe,
3922
- ): string {
3923
- return JSON.stringify(
3924
- DeploymentStream1DeploymentsNe$outboundSchema.parse(
3925
- deploymentStream1DeploymentsNe,
3926
- ),
3927
- );
3928
- }
3929
-
3930
- /** @internal */
3931
- export type DeploymentStream1Ne$Outbound = {
3932
- ne: string | number | boolean;
3933
- };
3934
-
3935
- /** @internal */
3936
- export const DeploymentStream1Ne$outboundSchema: z.ZodType<
3937
- DeploymentStream1Ne$Outbound,
3938
- z.ZodTypeDef,
3939
- DeploymentStream1Ne
3940
- > = z.object({
3941
- ne: z.union([z.string(), z.number(), z.boolean()]),
3942
- });
3943
-
3944
- export function deploymentStream1NeToJSON(
3945
- deploymentStream1Ne: DeploymentStream1Ne,
3946
- ): string {
3947
- return JSON.stringify(
3948
- DeploymentStream1Ne$outboundSchema.parse(deploymentStream1Ne),
3949
- );
3950
- }
3951
-
3952
- /** @internal */
3953
- export type DeploymentStream1DeploymentsEq$Outbound = string | number | boolean;
3954
-
3955
- /** @internal */
3956
- export const DeploymentStream1DeploymentsEq$outboundSchema: z.ZodType<
3957
- DeploymentStream1DeploymentsEq$Outbound,
3958
- z.ZodTypeDef,
3959
- DeploymentStream1DeploymentsEq
3960
- > = z.union([z.string(), z.number(), z.boolean()]);
3961
-
3962
- export function deploymentStream1DeploymentsEqToJSON(
3963
- deploymentStream1DeploymentsEq: DeploymentStream1DeploymentsEq,
3964
- ): string {
3965
- return JSON.stringify(
3966
- DeploymentStream1DeploymentsEq$outboundSchema.parse(
3967
- deploymentStream1DeploymentsEq,
3968
- ),
3969
- );
3970
- }
3971
-
3972
- /** @internal */
3973
- export type DeploymentStream1Eq$Outbound = {
3974
- eq: string | number | boolean;
3975
- };
3976
-
3977
- /** @internal */
3978
- export const DeploymentStream1Eq$outboundSchema: z.ZodType<
3979
- DeploymentStream1Eq$Outbound,
3980
- z.ZodTypeDef,
3981
- DeploymentStream1Eq
3982
- > = z.object({
3983
- eq: z.union([z.string(), z.number(), z.boolean()]),
3984
- });
3985
-
3986
- export function deploymentStream1EqToJSON(
3987
- deploymentStream1Eq: DeploymentStream1Eq,
3988
- ): string {
3989
- return JSON.stringify(
3990
- DeploymentStream1Eq$outboundSchema.parse(deploymentStream1Eq),
3991
- );
3992
- }
3993
-
3994
- /** @internal */
3995
- export type DeploymentStreamKnowledgeFilter1$Outbound =
3996
- | DeploymentStream1Eq$Outbound
3997
- | DeploymentStream1Ne$Outbound
3998
- | OneGt$Outbound
3999
- | OneGte$Outbound
4000
- | OneLt$Outbound
4001
- | OneLte$Outbound
4002
- | DeploymentStream1In$Outbound
4003
- | DeploymentStream1Nin$Outbound
4004
- | OneExists$Outbound;
4005
-
4006
- /** @internal */
4007
- export const DeploymentStreamKnowledgeFilter1$outboundSchema: z.ZodType<
4008
- DeploymentStreamKnowledgeFilter1$Outbound,
4009
- z.ZodTypeDef,
4010
- DeploymentStreamKnowledgeFilter1
4011
- > = z.union([
4012
- z.lazy(() => DeploymentStream1Eq$outboundSchema),
4013
- z.lazy(() => DeploymentStream1Ne$outboundSchema),
4014
- z.lazy(() => OneGt$outboundSchema),
4015
- z.lazy(() => OneGte$outboundSchema),
4016
- z.lazy(() => OneLt$outboundSchema),
4017
- z.lazy(() => OneLte$outboundSchema),
4018
- z.lazy(() => DeploymentStream1In$outboundSchema),
4019
- z.lazy(() => DeploymentStream1Nin$outboundSchema),
4020
- z.lazy(() => OneExists$outboundSchema),
4021
- ]);
4022
-
4023
- export function deploymentStreamKnowledgeFilter1ToJSON(
4024
- deploymentStreamKnowledgeFilter1: DeploymentStreamKnowledgeFilter1,
4025
- ): string {
4026
- return JSON.stringify(
4027
- DeploymentStreamKnowledgeFilter1$outboundSchema.parse(
4028
- deploymentStreamKnowledgeFilter1,
4029
- ),
4030
- );
4031
- }
4032
-
4033
- /** @internal */
4034
- export type DeploymentStreamKnowledgeFilter$Outbound =
4035
- | DeploymentStreamKnowledgeFilterAnd$Outbound
4036
- | DeploymentStreamKnowledgeFilterOr$Outbound
4037
- | {
4038
- [k: string]:
4039
- | DeploymentStream1Eq$Outbound
4040
- | DeploymentStream1Ne$Outbound
4041
- | OneGt$Outbound
4042
- | OneGte$Outbound
4043
- | OneLt$Outbound
4044
- | OneLte$Outbound
4045
- | DeploymentStream1In$Outbound
4046
- | DeploymentStream1Nin$Outbound
4047
- | OneExists$Outbound;
4048
- };
4049
-
4050
- /** @internal */
4051
- export const DeploymentStreamKnowledgeFilter$outboundSchema: z.ZodType<
4052
- DeploymentStreamKnowledgeFilter$Outbound,
4053
- z.ZodTypeDef,
4054
- DeploymentStreamKnowledgeFilter
4055
- > = z.union([
4056
- z.lazy(() => DeploymentStreamKnowledgeFilterAnd$outboundSchema),
4057
- z.lazy(() => DeploymentStreamKnowledgeFilterOr$outboundSchema),
4058
- z.record(z.union([
4059
- z.lazy(() => DeploymentStream1Eq$outboundSchema),
4060
- z.lazy(() => DeploymentStream1Ne$outboundSchema),
4061
- z.lazy(() => OneGt$outboundSchema),
4062
- z.lazy(() => OneGte$outboundSchema),
4063
- z.lazy(() => OneLt$outboundSchema),
4064
- z.lazy(() => OneLte$outboundSchema),
4065
- z.lazy(() => DeploymentStream1In$outboundSchema),
4066
- z.lazy(() => DeploymentStream1Nin$outboundSchema),
4067
- z.lazy(() => OneExists$outboundSchema),
4068
- ])),
4069
- ]);
4070
-
4071
- export function deploymentStreamKnowledgeFilterToJSON(
4072
- deploymentStreamKnowledgeFilter: DeploymentStreamKnowledgeFilter,
4073
- ): string {
4074
- return JSON.stringify(
4075
- DeploymentStreamKnowledgeFilter$outboundSchema.parse(
4076
- deploymentStreamKnowledgeFilter,
4077
- ),
4078
- );
4079
- }
4080
-
4081
- /** @internal */
4082
- export type DeploymentStreamRequestBody$Outbound = {
4083
- key: string;
4084
- inputs?: { [k: string]: any } | undefined;
4085
- context?: { [k: string]: any } | undefined;
4086
- prefix_messages?:
4087
- | Array<
4088
- | PrefixMessagesSystemMessage$Outbound
4089
- | PrefixMessagesDeveloperMessage$Outbound
4090
- | PrefixMessagesUserMessage$Outbound
4091
- | PrefixMessagesAssistantMessage$Outbound
4092
- | PrefixMessagesToolMessage$Outbound
4093
- >
4094
- | undefined;
4095
- messages?:
4096
- | Array<
4097
- | DeploymentStreamMessagesSystemMessage$Outbound
4098
- | DeploymentStreamMessagesDeveloperMessage$Outbound
4099
- | DeploymentStreamMessagesUserMessage$Outbound
4100
- | DeploymentStreamMessagesAssistantMessage$Outbound
4101
- | DeploymentStreamMessagesToolMessage$Outbound
4102
- >
4103
- | undefined;
4104
- identity?: components.PublicIdentity$Outbound | undefined;
4105
- file_ids?: Array<string> | undefined;
4106
- metadata?: { [k: string]: any } | undefined;
4107
- extra_params?: { [k: string]: any } | undefined;
4108
- documents?: Array<DeploymentStreamDocuments$Outbound> | undefined;
4109
- invoke_options?: DeploymentStreamInvokeOptions$Outbound | undefined;
4110
- thread?: DeploymentStreamThread$Outbound | undefined;
4111
- knowledge_filter?:
4112
- | DeploymentStreamKnowledgeFilterAnd$Outbound
4113
- | DeploymentStreamKnowledgeFilterOr$Outbound
4114
- | {
4115
- [k: string]:
4116
- | DeploymentStream1Eq$Outbound
4117
- | DeploymentStream1Ne$Outbound
4118
- | OneGt$Outbound
4119
- | OneGte$Outbound
4120
- | OneLt$Outbound
4121
- | OneLte$Outbound
4122
- | DeploymentStream1In$Outbound
4123
- | DeploymentStream1Nin$Outbound
4124
- | OneExists$Outbound;
4125
- }
4126
- | undefined;
4127
- };
4128
-
4129
- /** @internal */
4130
- export const DeploymentStreamRequestBody$outboundSchema: z.ZodType<
4131
- DeploymentStreamRequestBody$Outbound,
4132
- z.ZodTypeDef,
4133
- DeploymentStreamRequestBody
4134
- > = z.object({
4135
- key: z.string(),
4136
- inputs: z.record(z.any()).optional(),
4137
- context: z.record(z.any()).optional(),
4138
- prefixMessages: z.array(
4139
- z.union([
4140
- z.lazy(() => PrefixMessagesSystemMessage$outboundSchema),
4141
- z.lazy(() => PrefixMessagesDeveloperMessage$outboundSchema),
4142
- z.lazy(() => PrefixMessagesUserMessage$outboundSchema),
4143
- z.lazy(() => PrefixMessagesAssistantMessage$outboundSchema),
4144
- z.lazy(() => PrefixMessagesToolMessage$outboundSchema),
4145
- ]),
4146
- ).optional(),
4147
- messages: z.array(
4148
- z.union([
4149
- z.lazy(() => DeploymentStreamMessagesSystemMessage$outboundSchema),
4150
- z.lazy(() => DeploymentStreamMessagesDeveloperMessage$outboundSchema),
4151
- z.lazy(() => DeploymentStreamMessagesUserMessage$outboundSchema),
4152
- z.lazy(() => DeploymentStreamMessagesAssistantMessage$outboundSchema),
4153
- z.lazy(() => DeploymentStreamMessagesToolMessage$outboundSchema),
4154
- ]),
4155
- ).optional(),
4156
- identity: components.PublicIdentity$outboundSchema.optional(),
4157
- fileIds: z.array(z.string()).optional(),
4158
- metadata: z.record(z.any()).optional(),
4159
- extraParams: z.record(z.any()).optional(),
4160
- documents: z.array(z.lazy(() => DeploymentStreamDocuments$outboundSchema))
4161
- .optional(),
4162
- invokeOptions: z.lazy(() => DeploymentStreamInvokeOptions$outboundSchema)
4163
- .optional(),
4164
- thread: z.lazy(() => DeploymentStreamThread$outboundSchema).optional(),
4165
- knowledgeFilter: z.union([
4166
- z.lazy(() => DeploymentStreamKnowledgeFilterAnd$outboundSchema),
4167
- z.lazy(() => DeploymentStreamKnowledgeFilterOr$outboundSchema),
4168
- z.record(
4169
- z.union([
4170
- z.lazy(() => DeploymentStream1Eq$outboundSchema),
4171
- z.lazy(() => DeploymentStream1Ne$outboundSchema),
4172
- z.lazy(() => OneGt$outboundSchema),
4173
- z.lazy(() => OneGte$outboundSchema),
4174
- z.lazy(() => OneLt$outboundSchema),
4175
- z.lazy(() => OneLte$outboundSchema),
4176
- z.lazy(() => DeploymentStream1In$outboundSchema),
4177
- z.lazy(() => DeploymentStream1Nin$outboundSchema),
4178
- z.lazy(() => OneExists$outboundSchema),
4179
- ]),
4180
- ),
4181
- ]).optional(),
4182
- }).transform((v) => {
4183
- return remap$(v, {
4184
- prefixMessages: "prefix_messages",
4185
- fileIds: "file_ids",
4186
- extraParams: "extra_params",
4187
- invokeOptions: "invoke_options",
4188
- knowledgeFilter: "knowledge_filter",
4189
- });
4190
- });
4191
-
4192
- export function deploymentStreamRequestBodyToJSON(
4193
- deploymentStreamRequestBody: DeploymentStreamRequestBody,
4194
- ): string {
4195
- return JSON.stringify(
4196
- DeploymentStreamRequestBody$outboundSchema.parse(
4197
- deploymentStreamRequestBody,
4198
- ),
4199
- );
4200
- }
4201
-
4202
- /** @internal */
4203
- export const DeploymentStreamObject$inboundSchema: z.ZodNativeEnum<
4204
- typeof DeploymentStreamObject
4205
- > = z.nativeEnum(DeploymentStreamObject);
4206
-
4207
- /** @internal */
4208
- export const DeploymentStreamProvider$inboundSchema: z.ZodNativeEnum<
4209
- typeof DeploymentStreamProvider
4210
- > = z.nativeEnum(DeploymentStreamProvider);
4211
-
4212
- /** @internal */
4213
- export const DeploymentStreamDeploymentsMetadata$inboundSchema: z.ZodType<
4214
- DeploymentStreamDeploymentsMetadata,
4215
- z.ZodTypeDef,
4216
- unknown
4217
- > = z.object({
4218
- file_name: z.string(),
4219
- page_number: z.nullable(z.number()),
4220
- file_type: z.string(),
4221
- rerank_score: z.number().optional(),
4222
- search_score: z.number(),
4223
- }).transform((v) => {
4224
- return remap$(v, {
4225
- "file_name": "fileName",
4226
- "page_number": "pageNumber",
4227
- "file_type": "fileType",
4228
- "rerank_score": "rerankScore",
4229
- "search_score": "searchScore",
4230
- });
4231
- });
4232
-
4233
- export function deploymentStreamDeploymentsMetadataFromJSON(
4234
- jsonString: string,
4235
- ): SafeParseResult<DeploymentStreamDeploymentsMetadata, SDKValidationError> {
4236
- return safeParse(
4237
- jsonString,
4238
- (x) =>
4239
- DeploymentStreamDeploymentsMetadata$inboundSchema.parse(JSON.parse(x)),
4240
- `Failed to parse 'DeploymentStreamDeploymentsMetadata' from JSON`,
4241
- );
4242
- }
4243
-
4244
- /** @internal */
4245
- export const DeploymentStreamRetrievals$inboundSchema: z.ZodType<
4246
- DeploymentStreamRetrievals,
4247
- z.ZodTypeDef,
4248
- unknown
4249
- > = z.object({
4250
- document: z.string(),
4251
- metadata: z.lazy(() => DeploymentStreamDeploymentsMetadata$inboundSchema),
4252
- });
4253
-
4254
- export function deploymentStreamRetrievalsFromJSON(
4255
- jsonString: string,
4256
- ): SafeParseResult<DeploymentStreamRetrievals, SDKValidationError> {
4257
- return safeParse(
4258
- jsonString,
4259
- (x) => DeploymentStreamRetrievals$inboundSchema.parse(JSON.parse(x)),
4260
- `Failed to parse 'DeploymentStreamRetrievals' from JSON`,
4261
- );
4262
- }
4263
-
4264
- /** @internal */
4265
- export const DeploymentStreamPromptTokensDetails$inboundSchema: z.ZodType<
4266
- DeploymentStreamPromptTokensDetails,
4267
- z.ZodTypeDef,
4268
- unknown
4269
- > = z.object({
4270
- cached_tokens: z.nullable(z.number()).optional(),
4271
- }).transform((v) => {
4272
- return remap$(v, {
4273
- "cached_tokens": "cachedTokens",
4274
- });
4275
- });
4276
-
4277
- export function deploymentStreamPromptTokensDetailsFromJSON(
4278
- jsonString: string,
4279
- ): SafeParseResult<DeploymentStreamPromptTokensDetails, SDKValidationError> {
4280
- return safeParse(
4281
- jsonString,
4282
- (x) =>
4283
- DeploymentStreamPromptTokensDetails$inboundSchema.parse(JSON.parse(x)),
4284
- `Failed to parse 'DeploymentStreamPromptTokensDetails' from JSON`,
4285
- );
4286
- }
4287
-
4288
- /** @internal */
4289
- export const DeploymentStreamCompletionTokensDetails$inboundSchema: z.ZodType<
4290
- DeploymentStreamCompletionTokensDetails,
4291
- z.ZodTypeDef,
4292
- unknown
4293
- > = z.object({
4294
- reasoning_tokens: z.nullable(z.number()).optional(),
4295
- }).transform((v) => {
4296
- return remap$(v, {
4297
- "reasoning_tokens": "reasoningTokens",
4298
- });
4299
- });
4300
-
4301
- export function deploymentStreamCompletionTokensDetailsFromJSON(
4302
- jsonString: string,
4303
- ): SafeParseResult<
4304
- DeploymentStreamCompletionTokensDetails,
4305
- SDKValidationError
4306
- > {
4307
- return safeParse(
4308
- jsonString,
4309
- (x) =>
4310
- DeploymentStreamCompletionTokensDetails$inboundSchema.parse(
4311
- JSON.parse(x),
4312
- ),
4313
- `Failed to parse 'DeploymentStreamCompletionTokensDetails' from JSON`,
4314
- );
4315
- }
4316
-
4317
- /** @internal */
4318
- export const DeploymentStreamUsage$inboundSchema: z.ZodType<
4319
- DeploymentStreamUsage,
4320
- z.ZodTypeDef,
4321
- unknown
4322
- > = z.object({
4323
- total_tokens: z.number().optional(),
4324
- prompt_tokens: z.number().optional(),
4325
- completion_tokens: z.number().optional(),
4326
- prompt_tokens_details: z.lazy(() =>
4327
- DeploymentStreamPromptTokensDetails$inboundSchema
4328
- ).optional(),
4329
- completion_tokens_details: z.nullable(
4330
- z.lazy(() => DeploymentStreamCompletionTokensDetails$inboundSchema),
4331
- ).optional(),
4332
- }).transform((v) => {
4333
- return remap$(v, {
4334
- "total_tokens": "totalTokens",
4335
- "prompt_tokens": "promptTokens",
4336
- "completion_tokens": "completionTokens",
4337
- "prompt_tokens_details": "promptTokensDetails",
4338
- "completion_tokens_details": "completionTokensDetails",
4339
- });
4340
- });
4341
-
4342
- export function deploymentStreamUsageFromJSON(
4343
- jsonString: string,
4344
- ): SafeParseResult<DeploymentStreamUsage, SDKValidationError> {
4345
- return safeParse(
4346
- jsonString,
4347
- (x) => DeploymentStreamUsage$inboundSchema.parse(JSON.parse(x)),
4348
- `Failed to parse 'DeploymentStreamUsage' from JSON`,
4349
- );
4350
- }
4351
-
4352
- /** @internal */
4353
- export const DeploymentStreamMessageDeploymentsResponseRole$inboundSchema:
4354
- z.ZodNativeEnum<typeof DeploymentStreamMessageDeploymentsResponseRole> = z
4355
- .nativeEnum(DeploymentStreamMessageDeploymentsResponseRole);
4356
-
4357
- /** @internal */
4358
- export const DeploymentStreamMessage3$inboundSchema: z.ZodType<
4359
- DeploymentStreamMessage3,
4360
- z.ZodTypeDef,
4361
- unknown
4362
- > = z.object({
4363
- type: z.literal("image"),
4364
- role: DeploymentStreamMessageDeploymentsResponseRole$inboundSchema,
4365
- url: z.string(),
4366
- });
4367
-
4368
- export function deploymentStreamMessage3FromJSON(
4369
- jsonString: string,
4370
- ): SafeParseResult<DeploymentStreamMessage3, SDKValidationError> {
4371
- return safeParse(
4372
- jsonString,
4373
- (x) => DeploymentStreamMessage3$inboundSchema.parse(JSON.parse(x)),
4374
- `Failed to parse 'DeploymentStreamMessage3' from JSON`,
4375
- );
4376
- }
4377
-
4378
- /** @internal */
4379
- export const DeploymentStreamMessageDeploymentsRole$inboundSchema:
4380
- z.ZodNativeEnum<typeof DeploymentStreamMessageDeploymentsRole> = z.nativeEnum(
4381
- DeploymentStreamMessageDeploymentsRole,
4382
- );
4383
-
4384
- /** @internal */
4385
- export const DeploymentStreamMessage2$inboundSchema: z.ZodType<
4386
- DeploymentStreamMessage2,
4387
- z.ZodTypeDef,
4388
- unknown
4389
- > = z.object({
4390
- type: z.literal("content"),
4391
- role: DeploymentStreamMessageDeploymentsRole$inboundSchema,
4392
- content: z.nullable(z.string()),
4393
- reasoning: z.string().optional(),
4394
- reasoning_signature: z.string().optional(),
4395
- redacted_reasoning: z.string().optional(),
4396
- }).transform((v) => {
4397
- return remap$(v, {
4398
- "reasoning_signature": "reasoningSignature",
4399
- "redacted_reasoning": "redactedReasoning",
4400
- });
4401
- });
4402
-
4403
- export function deploymentStreamMessage2FromJSON(
4404
- jsonString: string,
4405
- ): SafeParseResult<DeploymentStreamMessage2, SDKValidationError> {
4406
- return safeParse(
4407
- jsonString,
4408
- (x) => DeploymentStreamMessage2$inboundSchema.parse(JSON.parse(x)),
4409
- `Failed to parse 'DeploymentStreamMessage2' from JSON`,
4410
- );
4411
- }
4412
-
4413
- /** @internal */
4414
- export const DeploymentStreamMessageRole$inboundSchema: z.ZodNativeEnum<
4415
- typeof DeploymentStreamMessageRole
4416
- > = z.nativeEnum(DeploymentStreamMessageRole);
4417
-
4418
- /** @internal */
4419
- export const DeploymentStreamMessageDeploymentsResponse200Type$inboundSchema:
4420
- z.ZodNativeEnum<typeof DeploymentStreamMessageDeploymentsResponse200Type> = z
4421
- .nativeEnum(DeploymentStreamMessageDeploymentsResponse200Type);
4422
-
4423
- /** @internal */
4424
- export const DeploymentStreamMessageFunction$inboundSchema: z.ZodType<
4425
- DeploymentStreamMessageFunction,
4426
- z.ZodTypeDef,
4427
- unknown
4428
- > = z.object({
4429
- name: z.string(),
4430
- arguments: z.string(),
4431
- });
4432
-
4433
- export function deploymentStreamMessageFunctionFromJSON(
4434
- jsonString: string,
4435
- ): SafeParseResult<DeploymentStreamMessageFunction, SDKValidationError> {
4436
- return safeParse(
4437
- jsonString,
4438
- (x) => DeploymentStreamMessageFunction$inboundSchema.parse(JSON.parse(x)),
4439
- `Failed to parse 'DeploymentStreamMessageFunction' from JSON`,
4440
- );
4441
- }
4442
-
4443
- /** @internal */
4444
- export const DeploymentStreamMessageToolCalls$inboundSchema: z.ZodType<
4445
- DeploymentStreamMessageToolCalls,
4446
- z.ZodTypeDef,
4447
- unknown
4448
- > = z.object({
4449
- id: z.string().optional(),
4450
- index: z.number().optional(),
4451
- type: DeploymentStreamMessageDeploymentsResponse200Type$inboundSchema,
4452
- function: z.lazy(() => DeploymentStreamMessageFunction$inboundSchema),
4453
- });
4454
-
4455
- export function deploymentStreamMessageToolCallsFromJSON(
4456
- jsonString: string,
4457
- ): SafeParseResult<DeploymentStreamMessageToolCalls, SDKValidationError> {
4458
- return safeParse(
4459
- jsonString,
4460
- (x) => DeploymentStreamMessageToolCalls$inboundSchema.parse(JSON.parse(x)),
4461
- `Failed to parse 'DeploymentStreamMessageToolCalls' from JSON`,
4462
- );
4463
- }
4464
-
4465
- /** @internal */
4466
- export const DeploymentStreamMessage1$inboundSchema: z.ZodType<
4467
- DeploymentStreamMessage1,
4468
- z.ZodTypeDef,
4469
- unknown
4470
- > = z.object({
4471
- type: z.literal("tool_calls"),
4472
- role: DeploymentStreamMessageRole$inboundSchema,
4473
- content: z.nullable(z.string()).optional(),
4474
- tool_calls: z.array(
4475
- z.lazy(() => DeploymentStreamMessageToolCalls$inboundSchema),
4476
- ),
4477
- reasoning: z.string().optional(),
4478
- reasoning_signature: z.string().optional(),
4479
- redacted_reasoning: z.string().optional(),
4480
- }).transform((v) => {
4481
- return remap$(v, {
4482
- "tool_calls": "toolCalls",
4483
- "reasoning_signature": "reasoningSignature",
4484
- "redacted_reasoning": "redactedReasoning",
4485
- });
4486
- });
4487
-
4488
- export function deploymentStreamMessage1FromJSON(
4489
- jsonString: string,
4490
- ): SafeParseResult<DeploymentStreamMessage1, SDKValidationError> {
4491
- return safeParse(
4492
- jsonString,
4493
- (x) => DeploymentStreamMessage1$inboundSchema.parse(JSON.parse(x)),
4494
- `Failed to parse 'DeploymentStreamMessage1' from JSON`,
4495
- );
4496
- }
4497
-
4498
- /** @internal */
4499
- export const DeploymentStreamMessage$inboundSchema: z.ZodType<
4500
- DeploymentStreamMessage,
4501
- z.ZodTypeDef,
4502
- unknown
4503
- > = z.union([
4504
- z.lazy(() => DeploymentStreamMessage1$inboundSchema),
4505
- z.lazy(() => DeploymentStreamMessage2$inboundSchema),
4506
- z.lazy(() => DeploymentStreamMessage3$inboundSchema),
4507
- ]);
4508
-
4509
- export function deploymentStreamMessageFromJSON(
4510
- jsonString: string,
4511
- ): SafeParseResult<DeploymentStreamMessage, SDKValidationError> {
4512
- return safeParse(
4513
- jsonString,
4514
- (x) => DeploymentStreamMessage$inboundSchema.parse(JSON.parse(x)),
4515
- `Failed to parse 'DeploymentStreamMessage' from JSON`,
4516
- );
4517
- }
4518
-
4519
- /** @internal */
4520
- export const DeploymentStreamChoices$inboundSchema: z.ZodType<
4521
- DeploymentStreamChoices,
4522
- z.ZodTypeDef,
4523
- unknown
4524
- > = z.object({
4525
- index: z.number(),
4526
- message: z.union([
4527
- z.lazy(() => DeploymentStreamMessage1$inboundSchema),
4528
- z.lazy(() => DeploymentStreamMessage2$inboundSchema),
4529
- z.lazy(() => DeploymentStreamMessage3$inboundSchema),
4530
- ]),
4531
- finish_reason: z.nullable(z.string()).optional(),
4532
- }).transform((v) => {
4533
- return remap$(v, {
4534
- "finish_reason": "finishReason",
4535
- });
4536
- });
4537
-
4538
- export function deploymentStreamChoicesFromJSON(
4539
- jsonString: string,
4540
- ): SafeParseResult<DeploymentStreamChoices, SDKValidationError> {
4541
- return safeParse(
4542
- jsonString,
4543
- (x) => DeploymentStreamChoices$inboundSchema.parse(JSON.parse(x)),
4544
- `Failed to parse 'DeploymentStreamChoices' from JSON`,
4545
- );
4546
- }
4547
-
4548
- /** @internal */
4549
- export const DeploymentStreamData$inboundSchema: z.ZodType<
4550
- DeploymentStreamData,
4551
- z.ZodTypeDef,
4552
- unknown
4553
- > = z.object({
4554
- id: z.string(),
4555
- created: z.string().datetime({ offset: true }).transform(v => new Date(v)),
4556
- object: DeploymentStreamObject$inboundSchema,
4557
- model: z.string(),
4558
- provider: DeploymentStreamProvider$inboundSchema,
4559
- is_final: z.boolean(),
4560
- integration_id: z.string().optional(),
4561
- finalized: z.string().datetime({ offset: true }).transform(v => new Date(v))
4562
- .optional(),
4563
- system_fingerprint: z.nullable(z.string()).optional(),
4564
- retrievals: z.array(z.lazy(() => DeploymentStreamRetrievals$inboundSchema))
4565
- .optional(),
4566
- provider_response: z.any().optional(),
4567
- usage: z.nullable(z.lazy(() => DeploymentStreamUsage$inboundSchema))
4568
- .optional(),
4569
- choices: z.array(z.lazy(() => DeploymentStreamChoices$inboundSchema)),
4570
- }).transform((v) => {
4571
- return remap$(v, {
4572
- "is_final": "isFinal",
4573
- "integration_id": "integrationId",
4574
- "system_fingerprint": "systemFingerprint",
4575
- "provider_response": "providerResponse",
4576
- });
4577
- });
4578
-
4579
- export function deploymentStreamDataFromJSON(
4580
- jsonString: string,
4581
- ): SafeParseResult<DeploymentStreamData, SDKValidationError> {
4582
- return safeParse(
4583
- jsonString,
4584
- (x) => DeploymentStreamData$inboundSchema.parse(JSON.parse(x)),
4585
- `Failed to parse 'DeploymentStreamData' from JSON`,
4586
- );
4587
- }
4588
-
4589
- /** @internal */
4590
- export const DeploymentStreamResponseBody$inboundSchema: z.ZodType<
4591
- DeploymentStreamResponseBody,
4592
- z.ZodTypeDef,
4593
- unknown
4594
- > = z.object({
4595
- data: z.string().optional().transform((v, ctx) => {
4596
- if (v === undefined) return undefined;
4597
- try {
4598
- return JSON.parse(v);
4599
- } catch (err) {
4600
- ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
4601
- return z.NEVER;
4602
- }
4603
- }).pipe(z.lazy(() => DeploymentStreamData$inboundSchema).optional()),
4604
- });
4605
-
4606
- export function deploymentStreamResponseBodyFromJSON(
4607
- jsonString: string,
4608
- ): SafeParseResult<DeploymentStreamResponseBody, SDKValidationError> {
4609
- return safeParse(
4610
- jsonString,
4611
- (x) => DeploymentStreamResponseBody$inboundSchema.parse(JSON.parse(x)),
4612
- `Failed to parse 'DeploymentStreamResponseBody' from JSON`,
4613
- );
4614
- }