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