@orq-ai/node 4.4.2 → 4.5.0-rc.1

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 (456) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +3 -3
  3. package/lib/config.js +3 -3
  4. package/lib/config.js.map +1 -1
  5. package/lib/event-streams.d.ts +3 -3
  6. package/lib/event-streams.d.ts.map +1 -1
  7. package/models/components/partdoneevent.js +1 -1
  8. package/models/components/reasoningpart.js +1 -1
  9. package/models/operations/createcontact.js +1 -1
  10. package/models/operations/createdataset.js +1 -1
  11. package/models/operations/createdatasetitem.js +4 -4
  12. package/models/operations/createdatasource.js +1 -1
  13. package/models/operations/createeval.js +16 -16
  14. package/models/operations/createidentity.js +1 -1
  15. package/models/operations/createtool.js +6 -6
  16. package/models/operations/fileget.js +1 -1
  17. package/models/operations/filelist.js +1 -1
  18. package/models/operations/fileupload.js +1 -1
  19. package/models/operations/getalltools.js +6 -6
  20. package/models/operations/getevals.js +16 -16
  21. package/models/operations/listdatasetdatapoints.js +4 -4
  22. package/models/operations/listdatasets.js +1 -1
  23. package/models/operations/listdatasources.js +1 -1
  24. package/models/operations/listidentities.js +1 -1
  25. package/models/operations/retrievedatapoint.js +4 -4
  26. package/models/operations/retrievedataset.js +1 -1
  27. package/models/operations/retrievedatasource.js +1 -1
  28. package/models/operations/retrieveidentity.js +1 -1
  29. package/models/operations/retrievetool.js +6 -6
  30. package/models/operations/runagent.js +1 -1
  31. package/models/operations/streamrunagent.js +1 -1
  32. package/models/operations/updatedatapoint.js +4 -4
  33. package/models/operations/updatedataset.js +1 -1
  34. package/models/operations/updatedatasource.js +1 -1
  35. package/models/operations/updateeval.js +16 -16
  36. package/models/operations/updateidentity.js +1 -1
  37. package/models/operations/updatetool.js +7 -7
  38. package/package.json +4 -3
  39. package/src/lib/config.ts +3 -3
  40. package/src/lib/event-streams.ts +3 -3
  41. package/src/models/components/partdoneevent.ts +1 -1
  42. package/src/models/components/reasoningpart.ts +1 -1
  43. package/src/models/operations/createcontact.ts +1 -1
  44. package/src/models/operations/createdataset.ts +1 -1
  45. package/src/models/operations/createdatasetitem.ts +4 -4
  46. package/src/models/operations/createdatasource.ts +1 -1
  47. package/src/models/operations/createeval.ts +16 -16
  48. package/src/models/operations/createidentity.ts +1 -1
  49. package/src/models/operations/createtool.ts +6 -6
  50. package/src/models/operations/fileget.ts +1 -1
  51. package/src/models/operations/filelist.ts +1 -1
  52. package/src/models/operations/fileupload.ts +1 -1
  53. package/src/models/operations/getalltools.ts +6 -6
  54. package/src/models/operations/getevals.ts +16 -16
  55. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  56. package/src/models/operations/listdatasets.ts +1 -1
  57. package/src/models/operations/listdatasources.ts +1 -1
  58. package/src/models/operations/listidentities.ts +1 -1
  59. package/src/models/operations/retrievedatapoint.ts +4 -4
  60. package/src/models/operations/retrievedataset.ts +1 -1
  61. package/src/models/operations/retrievedatasource.ts +1 -1
  62. package/src/models/operations/retrieveidentity.ts +1 -1
  63. package/src/models/operations/retrievetool.ts +6 -6
  64. package/src/models/operations/runagent.ts +1 -1
  65. package/src/models/operations/streamrunagent.ts +1 -1
  66. package/src/models/operations/updatedatapoint.ts +4 -4
  67. package/src/models/operations/updatedataset.ts +1 -1
  68. package/src/models/operations/updatedatasource.ts +1 -1
  69. package/src/models/operations/updateeval.ts +16 -16
  70. package/src/models/operations/updateidentity.ts +1 -1
  71. package/src/models/operations/updatetool.ts +7 -7
  72. package/_speakeasy/.github/action-inputs-config.json +0 -53
  73. package/_speakeasy/.github/action-security-config.json +0 -88
  74. package/examples/package-lock.json +0 -613
  75. package/examples/package.json +0 -18
  76. package/packages/orq-rc/examples/contactsCreate.example.ts +0 -42
  77. package/packages/orq-rc/examples/package-lock.json +0 -610
  78. package/packages/orq-rc/examples/package.json +0 -18
  79. package/packages/orq-rc/jsr.json +0 -28
  80. package/packages/orq-rc/package-lock.json +0 -1740
  81. package/packages/orq-rc/package.json +0 -30
  82. package/packages/orq-rc/src/core.ts +0 -13
  83. package/packages/orq-rc/src/funcs/agentsCreate.ts +0 -161
  84. package/packages/orq-rc/src/funcs/agentsDelete.ts +0 -180
  85. package/packages/orq-rc/src/funcs/agentsInvoke.ts +0 -177
  86. package/packages/orq-rc/src/funcs/agentsList.ts +0 -179
  87. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +0 -183
  88. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +0 -180
  89. package/packages/orq-rc/src/funcs/agentsRun.ts +0 -162
  90. package/packages/orq-rc/src/funcs/agentsStream.ts +0 -201
  91. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +0 -186
  92. package/packages/orq-rc/src/funcs/agentsUpdate.ts +0 -184
  93. package/packages/orq-rc/src/funcs/annotationsCreate.ts +0 -171
  94. package/packages/orq-rc/src/funcs/annotationsDelete.ts +0 -171
  95. package/packages/orq-rc/src/funcs/chunkingParse.ts +0 -160
  96. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -160
  97. package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -167
  98. package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -165
  99. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -171
  100. package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -167
  101. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -182
  102. package/packages/orq-rc/src/funcs/datasetsList.ts +0 -167
  103. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -174
  104. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -175
  105. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -181
  106. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -176
  107. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -179
  108. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -168
  109. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -176
  110. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -176
  111. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -168
  112. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -183
  113. package/packages/orq-rc/src/funcs/evalsAll.ts +0 -173
  114. package/packages/orq-rc/src/funcs/evalsCreate.ts +0 -169
  115. package/packages/orq-rc/src/funcs/evalsDelete.ts +0 -173
  116. package/packages/orq-rc/src/funcs/evalsInvoke.ts +0 -181
  117. package/packages/orq-rc/src/funcs/evalsUpdate.ts +0 -173
  118. package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts +0 -183
  119. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -160
  120. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -187
  121. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -164
  122. package/packages/orq-rc/src/funcs/filesGet.ts +0 -166
  123. package/packages/orq-rc/src/funcs/filesList.ts +0 -167
  124. package/packages/orq-rc/src/funcs/identitiesCreate.ts +0 -165
  125. package/packages/orq-rc/src/funcs/identitiesDelete.ts +0 -176
  126. package/packages/orq-rc/src/funcs/identitiesList.ts +0 -170
  127. package/packages/orq-rc/src/funcs/identitiesRetrieve.ts +0 -175
  128. package/packages/orq-rc/src/funcs/identitiesUpdate.ts +0 -176
  129. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +0 -158
  130. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -171
  131. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -166
  132. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -167
  133. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -174
  134. package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +0 -170
  135. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -173
  136. package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +0 -170
  137. package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -169
  138. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -178
  139. package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +0 -171
  140. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -174
  141. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -166
  142. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -173
  143. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -169
  144. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +0 -167
  145. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -164
  146. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -174
  147. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -170
  148. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +0 -162
  149. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +0 -176
  150. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +0 -170
  151. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +0 -168
  152. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +0 -185
  153. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +0 -180
  154. package/packages/orq-rc/src/funcs/memoryStoresList.ts +0 -178
  155. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +0 -184
  156. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +0 -177
  157. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +0 -177
  158. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +0 -179
  159. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +0 -174
  160. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +0 -168
  161. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +0 -180
  162. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +0 -175
  163. package/packages/orq-rc/src/funcs/modelsList.ts +0 -142
  164. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -160
  165. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -173
  166. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -181
  167. package/packages/orq-rc/src/funcs/promptsList.ts +0 -167
  168. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -173
  169. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -166
  170. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -173
  171. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -161
  172. package/packages/orq-rc/src/funcs/routerAudioSpeechCreate.ts +0 -161
  173. package/packages/orq-rc/src/funcs/routerAudioTranscriptionsCreate.ts +0 -262
  174. package/packages/orq-rc/src/funcs/routerAudioTranslationsCreate.ts +0 -252
  175. package/packages/orq-rc/src/funcs/routerChatCompletionsCreate.ts +0 -168
  176. package/packages/orq-rc/src/funcs/routerCompletionsCreate.ts +0 -168
  177. package/packages/orq-rc/src/funcs/routerEmbeddingsCreate.ts +0 -161
  178. package/packages/orq-rc/src/funcs/routerImagesEditsCreate.ts +0 -222
  179. package/packages/orq-rc/src/funcs/routerImagesGenerationsCreate.ts +0 -160
  180. package/packages/orq-rc/src/funcs/routerImagesVariationsCreate.ts +0 -218
  181. package/packages/orq-rc/src/funcs/routerModerationsCreate.ts +0 -167
  182. package/packages/orq-rc/src/funcs/routerOcr.ts +0 -158
  183. package/packages/orq-rc/src/funcs/routerRerankCreate.ts +0 -160
  184. package/packages/orq-rc/src/funcs/routerResponsesCreate.ts +0 -167
  185. package/packages/orq-rc/src/funcs/toolsCreate.ts +0 -163
  186. package/packages/orq-rc/src/funcs/toolsDelete.ts +0 -167
  187. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersions.ts +0 -183
  188. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +0 -190
  189. package/packages/orq-rc/src/funcs/toolsList.ts +0 -176
  190. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +0 -166
  191. package/packages/orq-rc/src/funcs/toolsUpdate.ts +0 -176
  192. package/packages/orq-rc/src/hooks/global.ts +0 -44
  193. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  194. package/packages/orq-rc/src/hooks/index.ts +0 -6
  195. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  196. package/packages/orq-rc/src/hooks/types.ts +0 -112
  197. package/packages/orq-rc/src/index.ts +0 -9
  198. package/packages/orq-rc/src/lib/base64.ts +0 -37
  199. package/packages/orq-rc/src/lib/config.ts +0 -74
  200. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  201. package/packages/orq-rc/src/lib/encodings.ts +0 -497
  202. package/packages/orq-rc/src/lib/env.ts +0 -89
  203. package/packages/orq-rc/src/lib/event-streams.ts +0 -152
  204. package/packages/orq-rc/src/lib/files.ts +0 -82
  205. package/packages/orq-rc/src/lib/http.ts +0 -323
  206. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  207. package/packages/orq-rc/src/lib/logger.ts +0 -9
  208. package/packages/orq-rc/src/lib/matchers.ts +0 -345
  209. package/packages/orq-rc/src/lib/primitives.ts +0 -150
  210. package/packages/orq-rc/src/lib/retries.ts +0 -218
  211. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  212. package/packages/orq-rc/src/lib/sdks.ts +0 -407
  213. package/packages/orq-rc/src/lib/security.ts +0 -264
  214. package/packages/orq-rc/src/lib/url.ts +0 -33
  215. package/packages/orq-rc/src/models/components/actionreviewedstreamingevent.ts +0 -99
  216. package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +0 -185
  217. package/packages/orq-rc/src/models/components/agenterroredstreamingevent.ts +0 -73
  218. package/packages/orq-rc/src/models/components/agentexecutionstartedstreamingevent.ts +0 -91
  219. package/packages/orq-rc/src/models/components/agenthandedoffstreamingevent.ts +0 -71
  220. package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +0 -507
  221. package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +0 -165
  222. package/packages/orq-rc/src/models/components/agentresponsemessage.ts +0 -103
  223. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +0 -517
  224. package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +0 -807
  225. package/packages/orq-rc/src/models/components/audiocontentpartschema.ts +0 -136
  226. package/packages/orq-rc/src/models/components/createagentresponse.ts +0 -299
  227. package/packages/orq-rc/src/models/components/datapart.ts +0 -38
  228. package/packages/orq-rc/src/models/components/errorpart.ts +0 -58
  229. package/packages/orq-rc/src/models/components/errorstreamingevent.ts +0 -66
  230. package/packages/orq-rc/src/models/components/executionnamedstreamingevent.ts +0 -71
  231. package/packages/orq-rc/src/models/components/executionreviewedstreamingevent.ts +0 -61
  232. package/packages/orq-rc/src/models/components/executionreviewrequiredstreamingevent.ts +0 -67
  233. package/packages/orq-rc/src/models/components/filecontentpartschema.ts +0 -87
  234. package/packages/orq-rc/src/models/components/filepart.ts +0 -218
  235. package/packages/orq-rc/src/models/components/imagecontentpartschema.ts +0 -268
  236. package/packages/orq-rc/src/models/components/index.ts +0 -56
  237. package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +0 -3450
  238. package/packages/orq-rc/src/models/components/partdelta.ts +0 -39
  239. package/packages/orq-rc/src/models/components/partdeltaevent.ts +0 -73
  240. package/packages/orq-rc/src/models/components/partdoneevent.ts +0 -139
  241. package/packages/orq-rc/src/models/components/publiccontact.ts +0 -71
  242. package/packages/orq-rc/src/models/components/publicidentity.ts +0 -69
  243. package/packages/orq-rc/src/models/components/reasoningpart.ts +0 -62
  244. package/packages/orq-rc/src/models/components/reasoningpartschema.ts +0 -71
  245. package/packages/orq-rc/src/models/components/redactedreasoningpartschema.ts +0 -66
  246. package/packages/orq-rc/src/models/components/refusalpartschema.ts +0 -64
  247. package/packages/orq-rc/src/models/components/responsedoneevent.ts +0 -318
  248. package/packages/orq-rc/src/models/components/responsefailedevent.ts +0 -72
  249. package/packages/orq-rc/src/models/components/responsestartedevent.ts +0 -91
  250. package/packages/orq-rc/src/models/components/responsestreamingevent.ts +0 -85
  251. package/packages/orq-rc/src/models/components/reviewoutcome.ts +0 -23
  252. package/packages/orq-rc/src/models/components/security.ts +0 -32
  253. package/packages/orq-rc/src/models/components/textcontentpartschema.ts +0 -207
  254. package/packages/orq-rc/src/models/components/textpart.ts +0 -54
  255. package/packages/orq-rc/src/models/components/thinkingconfigdisabledschema.ts +0 -59
  256. package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +0 -106
  257. package/packages/orq-rc/src/models/components/timeoutstreamingevent.ts +0 -64
  258. package/packages/orq-rc/src/models/components/toolcallpart.ts +0 -51
  259. package/packages/orq-rc/src/models/components/tooldoneevent.ts +0 -77
  260. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +0 -230
  261. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +0 -214
  262. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +0 -200
  263. package/packages/orq-rc/src/models/components/toolfailedevent.ts +0 -77
  264. package/packages/orq-rc/src/models/components/toolresultpart.ts +0 -71
  265. package/packages/orq-rc/src/models/components/toolreviewdoneevent.ts +0 -78
  266. package/packages/orq-rc/src/models/components/toolreviewrequestedevent.ts +0 -87
  267. package/packages/orq-rc/src/models/components/toolstartedevent.ts +0 -82
  268. package/packages/orq-rc/src/models/errors/apierror.ts +0 -40
  269. package/packages/orq-rc/src/models/errors/createeval.ts +0 -51
  270. package/packages/orq-rc/src/models/errors/createmoderation.ts +0 -84
  271. package/packages/orq-rc/src/models/errors/createtranscription.ts +0 -87
  272. package/packages/orq-rc/src/models/errors/createtranslation.ts +0 -87
  273. package/packages/orq-rc/src/models/errors/deleteagent.ts +0 -51
  274. package/packages/orq-rc/src/models/errors/deleteeval.ts +0 -51
  275. package/packages/orq-rc/src/models/errors/deleteidentity.ts +0 -62
  276. package/packages/orq-rc/src/models/errors/deleteprompt.ts +0 -51
  277. package/packages/orq-rc/src/models/errors/getevals.ts +0 -51
  278. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -51
  279. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +0 -51
  280. package/packages/orq-rc/src/models/errors/getv2toolstoolidversions.ts +0 -51
  281. package/packages/orq-rc/src/models/errors/getv2toolstoolidversionsversionid.ts +0 -52
  282. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -59
  283. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  284. package/packages/orq-rc/src/models/errors/index.ts +0 -33
  285. package/packages/orq-rc/src/models/errors/invokeeval.ts +0 -141
  286. package/packages/orq-rc/src/models/errors/orqerror.ts +0 -35
  287. package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +0 -50
  288. package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +0 -51
  289. package/packages/orq-rc/src/models/errors/retrieveidentity.ts +0 -62
  290. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -109
  291. package/packages/orq-rc/src/models/errors/streamagent.ts +0 -51
  292. package/packages/orq-rc/src/models/errors/streamrunagent.ts +0 -51
  293. package/packages/orq-rc/src/models/errors/updateagent.ts +0 -51
  294. package/packages/orq-rc/src/models/errors/updateeval.ts +0 -51
  295. package/packages/orq-rc/src/models/errors/updateidentity.ts +0 -54
  296. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -51
  297. package/packages/orq-rc/src/models/errors/updatetool.ts +0 -62
  298. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -39
  299. package/packages/orq-rc/src/models/operations/createagentrequest.ts +0 -7093
  300. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +0 -609
  301. package/packages/orq-rc/src/models/operations/createannotation.ts +0 -162
  302. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +0 -6381
  303. package/packages/orq-rc/src/models/operations/createchunk.ts +0 -222
  304. package/packages/orq-rc/src/models/operations/createcompletion.ts +0 -3413
  305. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -156
  306. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -162
  307. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -2551
  308. package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -437
  309. package/packages/orq-rc/src/models/operations/createembedding.ts +0 -947
  310. package/packages/orq-rc/src/models/operations/createeval.ts +0 -4170
  311. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -144
  312. package/packages/orq-rc/src/models/operations/createidentity.ts +0 -162
  313. package/packages/orq-rc/src/models/operations/createimage.ts +0 -1028
  314. package/packages/orq-rc/src/models/operations/createimageedit.ts +0 -1045
  315. package/packages/orq-rc/src/models/operations/createimagevariation.ts +0 -1067
  316. package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -944
  317. package/packages/orq-rc/src/models/operations/creatememory.ts +0 -142
  318. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +0 -152
  319. package/packages/orq-rc/src/models/operations/creatememorystore.ts +0 -199
  320. package/packages/orq-rc/src/models/operations/createmoderation.ts +0 -664
  321. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -5401
  322. package/packages/orq-rc/src/models/operations/creatererank.ts +0 -890
  323. package/packages/orq-rc/src/models/operations/createresponse.ts +0 -3324
  324. package/packages/orq-rc/src/models/operations/createspeech.ts +0 -700
  325. package/packages/orq-rc/src/models/operations/createtool.ts +0 -2499
  326. package/packages/orq-rc/src/models/operations/createtranscription.ts +0 -955
  327. package/packages/orq-rc/src/models/operations/createtranslation.ts +0 -930
  328. package/packages/orq-rc/src/models/operations/deleteagent.ts +0 -39
  329. package/packages/orq-rc/src/models/operations/deleteannotation.ts +0 -79
  330. package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -53
  331. package/packages/orq-rc/src/models/operations/deletechunks.ts +0 -125
  332. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -46
  333. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -39
  334. package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -46
  335. package/packages/orq-rc/src/models/operations/deleteeval.ts +0 -31
  336. package/packages/orq-rc/src/models/operations/deleteidentity.ts +0 -34
  337. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -39
  338. package/packages/orq-rc/src/models/operations/deletememory.ts +0 -46
  339. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +0 -55
  340. package/packages/orq-rc/src/models/operations/deletememorystore.ts +0 -39
  341. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -34
  342. package/packages/orq-rc/src/models/operations/deletetool.ts +0 -36
  343. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -2370
  344. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -4525
  345. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -690
  346. package/packages/orq-rc/src/models/operations/deployments.ts +0 -1268
  347. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -4614
  348. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -39
  349. package/packages/orq-rc/src/models/operations/fileget.ts +0 -116
  350. package/packages/orq-rc/src/models/operations/filelist.ts +0 -172
  351. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -170
  352. package/packages/orq-rc/src/models/operations/getallmemories.ts +0 -173
  353. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +0 -188
  354. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +0 -200
  355. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -3164
  356. package/packages/orq-rc/src/models/operations/getalltools.ts +0 -1398
  357. package/packages/orq-rc/src/models/operations/getchunkscount.ts +0 -121
  358. package/packages/orq-rc/src/models/operations/getevals.ts +0 -2842
  359. package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -171
  360. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -652
  361. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -3089
  362. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -3134
  363. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +0 -162
  364. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +0 -163
  365. package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +0 -110
  366. package/packages/orq-rc/src/models/operations/index.ts +0 -113
  367. package/packages/orq-rc/src/models/operations/invokeagent.ts +0 -733
  368. package/packages/orq-rc/src/models/operations/invokeeval.ts +0 -1253
  369. package/packages/orq-rc/src/models/operations/listagents.ts +0 -3018
  370. package/packages/orq-rc/src/models/operations/listchunks.ts +0 -260
  371. package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +0 -263
  372. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -1498
  373. package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -205
  374. package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -235
  375. package/packages/orq-rc/src/models/operations/listidentities.ts +0 -275
  376. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -642
  377. package/packages/orq-rc/src/models/operations/listmodels.ts +0 -143
  378. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -3209
  379. package/packages/orq-rc/src/models/operations/parse.ts +0 -777
  380. package/packages/orq-rc/src/models/operations/postv2routerocr.ts +0 -478
  381. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -108
  382. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +0 -3104
  383. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -1402
  384. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -150
  385. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -152
  386. package/packages/orq-rc/src/models/operations/retrieveidentity.ts +0 -117
  387. package/packages/orq-rc/src/models/operations/retrievememory.ts +0 -112
  388. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +0 -118
  389. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +0 -144
  390. package/packages/orq-rc/src/models/operations/retrievetool.ts +0 -1379
  391. package/packages/orq-rc/src/models/operations/runagent.ts +0 -5351
  392. package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -1762
  393. package/packages/orq-rc/src/models/operations/streamagent.ts +0 -629
  394. package/packages/orq-rc/src/models/operations/streamrunagent.ts +0 -5546
  395. package/packages/orq-rc/src/models/operations/updateagent.ts +0 -7447
  396. package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -236
  397. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -2555
  398. package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -206
  399. package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -186
  400. package/packages/orq-rc/src/models/operations/updateeval.ts +0 -4066
  401. package/packages/orq-rc/src/models/operations/updateidentity.ts +0 -189
  402. package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -1231
  403. package/packages/orq-rc/src/models/operations/updatememory.ts +0 -142
  404. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +0 -159
  405. package/packages/orq-rc/src/models/operations/updatememorystore.ts +0 -246
  406. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -5472
  407. package/packages/orq-rc/src/models/operations/updatetool.ts +0 -2696
  408. package/packages/orq-rc/src/sdk/agents.ts +0 -196
  409. package/packages/orq-rc/src/sdk/annotations.ts +0 -39
  410. package/packages/orq-rc/src/sdk/audio.ts +0 -25
  411. package/packages/orq-rc/src/sdk/chat.ts +0 -13
  412. package/packages/orq-rc/src/sdk/chunking.ts +0 -27
  413. package/packages/orq-rc/src/sdk/completions.ts +0 -32
  414. package/packages/orq-rc/src/sdk/contacts.ts +0 -27
  415. package/packages/orq-rc/src/sdk/datasets.ts +0 -204
  416. package/packages/orq-rc/src/sdk/deployments.ts +0 -89
  417. package/packages/orq-rc/src/sdk/edits.ts +0 -27
  418. package/packages/orq-rc/src/sdk/embeddings.ts +0 -27
  419. package/packages/orq-rc/src/sdk/evals.ts +0 -84
  420. package/packages/orq-rc/src/sdk/evaluators.ts +0 -27
  421. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  422. package/packages/orq-rc/src/sdk/files.ts +0 -78
  423. package/packages/orq-rc/src/sdk/generations.ts +0 -27
  424. package/packages/orq-rc/src/sdk/identities.ts +0 -99
  425. package/packages/orq-rc/src/sdk/images.ts +0 -25
  426. package/packages/orq-rc/src/sdk/index.ts +0 -5
  427. package/packages/orq-rc/src/sdk/knowledge.ts +0 -309
  428. package/packages/orq-rc/src/sdk/memorystores.ts +0 -286
  429. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  430. package/packages/orq-rc/src/sdk/models.ts +0 -25
  431. package/packages/orq-rc/src/sdk/moderations.ts +0 -24
  432. package/packages/orq-rc/src/sdk/orqcompletions.ts +0 -32
  433. package/packages/orq-rc/src/sdk/orqresponses.ts +0 -32
  434. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  435. package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
  436. package/packages/orq-rc/src/sdk/rerank.ts +0 -27
  437. package/packages/orq-rc/src/sdk/responses.ts +0 -34
  438. package/packages/orq-rc/src/sdk/router.ts +0 -72
  439. package/packages/orq-rc/src/sdk/sdk.ts +0 -115
  440. package/packages/orq-rc/src/sdk/speech.ts +0 -27
  441. package/packages/orq-rc/src/sdk/tools.ts +0 -135
  442. package/packages/orq-rc/src/sdk/transcriptions.ts +0 -24
  443. package/packages/orq-rc/src/sdk/translations.ts +0 -24
  444. package/packages/orq-rc/src/sdk/variations.ts +0 -27
  445. package/packages/orq-rc/src/types/async.ts +0 -68
  446. package/packages/orq-rc/src/types/blobs.ts +0 -32
  447. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  448. package/packages/orq-rc/src/types/enums.ts +0 -45
  449. package/packages/orq-rc/src/types/fp.ts +0 -50
  450. package/packages/orq-rc/src/types/index.ts +0 -11
  451. package/packages/orq-rc/src/types/operations.ts +0 -105
  452. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  453. package/packages/orq-rc/src/types/streams.ts +0 -21
  454. package/packages/orq-rc/src/types/unrecognized.ts +0 -35
  455. package/packages/orq-rc/tsconfig.json +0 -40
  456. package/tsconfig.json +0 -40
@@ -1,3209 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { ClosedEnum } from "../../types/enums.js";
9
- import { Result as SafeParseResult } from "../../types/fp.js";
10
- import * as components from "../components/index.js";
11
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
-
13
- export type ListPromptVersionsRequest = {
14
- promptId: string;
15
- /**
16
- * A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
17
- */
18
- limit?: number | undefined;
19
- /**
20
- * A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, ending with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `after=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the next page of the list.
21
- */
22
- startingAfter?: string | undefined;
23
- /**
24
- * A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, starting with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `before=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the previous page of the list.
25
- */
26
- endingBefore?: string | undefined;
27
- };
28
-
29
- export const ListPromptVersionsObject = {
30
- List: "list",
31
- } as const;
32
- export type ListPromptVersionsObject = ClosedEnum<
33
- typeof ListPromptVersionsObject
34
- >;
35
-
36
- /**
37
- * The modality of the model
38
- */
39
- export const ListPromptVersionsModelType = {
40
- Chat: "chat",
41
- Completion: "completion",
42
- Embedding: "embedding",
43
- Image: "image",
44
- Tts: "tts",
45
- Stt: "stt",
46
- Rerank: "rerank",
47
- Ocr: "ocr",
48
- Moderation: "moderation",
49
- Vision: "vision",
50
- } as const;
51
- /**
52
- * The modality of the model
53
- */
54
- export type ListPromptVersionsModelType = ClosedEnum<
55
- typeof ListPromptVersionsModelType
56
- >;
57
-
58
- /**
59
- * Only supported on `image` models.
60
- */
61
- export const ListPromptVersionsFormat = {
62
- Url: "url",
63
- B64Json: "b64_json",
64
- Text: "text",
65
- JsonObject: "json_object",
66
- } as const;
67
- /**
68
- * Only supported on `image` models.
69
- */
70
- export type ListPromptVersionsFormat = ClosedEnum<
71
- typeof ListPromptVersionsFormat
72
- >;
73
-
74
- export const ListPromptVersionsResponseFormat6 = {
75
- Json: "json",
76
- Text: "text",
77
- Srt: "srt",
78
- VerboseJson: "verbose_json",
79
- Vtt: "vtt",
80
- } as const;
81
- export type ListPromptVersionsResponseFormat6 = ClosedEnum<
82
- typeof ListPromptVersionsResponseFormat6
83
- >;
84
-
85
- export const ListPromptVersionsResponseFormat5 = {
86
- Url: "url",
87
- Base64Json: "base64_json",
88
- } as const;
89
- export type ListPromptVersionsResponseFormat5 = ClosedEnum<
90
- typeof ListPromptVersionsResponseFormat5
91
- >;
92
-
93
- export const ListPromptVersionsResponseFormat4 = {
94
- Mp3: "mp3",
95
- Opus: "opus",
96
- Aac: "aac",
97
- Flac: "flac",
98
- Wav: "wav",
99
- Pcm: "pcm",
100
- } as const;
101
- export type ListPromptVersionsResponseFormat4 = ClosedEnum<
102
- typeof ListPromptVersionsResponseFormat4
103
- >;
104
-
105
- export const ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType =
106
- {
107
- Text: "text",
108
- } as const;
109
- export type ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType =
110
- ClosedEnum<
111
- typeof ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType
112
- >;
113
-
114
- export type ListPromptVersionsResponseFormat3 = {
115
- type:
116
- ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType;
117
- };
118
-
119
- export const ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType =
120
- {
121
- JsonObject: "json_object",
122
- } as const;
123
- export type ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType =
124
- ClosedEnum<
125
- typeof ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType
126
- >;
127
-
128
- export type ListPromptVersionsResponseFormat2 = {
129
- type: ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType;
130
- };
131
-
132
- export const ListPromptVersionsResponseFormatPromptsResponse200Type = {
133
- JsonSchema: "json_schema",
134
- } as const;
135
- export type ListPromptVersionsResponseFormatPromptsResponse200Type = ClosedEnum<
136
- typeof ListPromptVersionsResponseFormatPromptsResponse200Type
137
- >;
138
-
139
- export type ListPromptVersionsResponseFormatPromptsResponseJsonSchema = {
140
- name: string;
141
- description?: string | undefined;
142
- strict?: boolean | undefined;
143
- schema: { [k: string]: any };
144
- };
145
-
146
- export type ListPromptVersionsResponseFormat1 = {
147
- type: ListPromptVersionsResponseFormatPromptsResponse200Type;
148
- displayName?: string | undefined;
149
- jsonSchema: ListPromptVersionsResponseFormatPromptsResponseJsonSchema;
150
- };
151
-
152
- /**
153
- * An object specifying the format that the model must output.
154
- *
155
- * @remarks
156
- *
157
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
158
- *
159
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
160
- *
161
- * Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
162
- */
163
- export type ListPromptVersionsPromptsResponseFormat =
164
- | ListPromptVersionsResponseFormat1
165
- | ListPromptVersionsResponseFormat2
166
- | ListPromptVersionsResponseFormat3
167
- | ListPromptVersionsResponseFormat4
168
- | ListPromptVersionsResponseFormat5
169
- | ListPromptVersionsResponseFormat6;
170
-
171
- /**
172
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
173
- */
174
- export const ListPromptVersionsPhotoRealVersion = {
175
- V1: "v1",
176
- V2: "v2",
177
- } as const;
178
- /**
179
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
180
- */
181
- export type ListPromptVersionsPhotoRealVersion = ClosedEnum<
182
- typeof ListPromptVersionsPhotoRealVersion
183
- >;
184
-
185
- /**
186
- * The format to return the embeddings
187
- */
188
- export const ListPromptVersionsEncodingFormat = {
189
- Float: "float",
190
- Base64: "base64",
191
- } as const;
192
- /**
193
- * The format to return the embeddings
194
- */
195
- export type ListPromptVersionsEncodingFormat = ClosedEnum<
196
- typeof ListPromptVersionsEncodingFormat
197
- >;
198
-
199
- /**
200
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
201
- */
202
- export const ListPromptVersionsPromptsReasoningEffort = {
203
- None: "none",
204
- Disable: "disable",
205
- Minimal: "minimal",
206
- Low: "low",
207
- Medium: "medium",
208
- High: "high",
209
- } as const;
210
- /**
211
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
212
- */
213
- export type ListPromptVersionsPromptsReasoningEffort = ClosedEnum<
214
- typeof ListPromptVersionsPromptsReasoningEffort
215
- >;
216
-
217
- /**
218
- * Controls the verbosity of the model output.
219
- */
220
- export const ListPromptVersionsVerbosity = {
221
- Low: "low",
222
- Medium: "medium",
223
- High: "high",
224
- } as const;
225
- /**
226
- * Controls the verbosity of the model output.
227
- */
228
- export type ListPromptVersionsVerbosity = ClosedEnum<
229
- typeof ListPromptVersionsVerbosity
230
- >;
231
-
232
- /**
233
- * The level of thinking to use for the model. Only supported by `Google AI`
234
- */
235
- export const ListPromptVersionsThinkingLevel = {
236
- Low: "low",
237
- High: "high",
238
- } as const;
239
- /**
240
- * The level of thinking to use for the model. Only supported by `Google AI`
241
- */
242
- export type ListPromptVersionsThinkingLevel = ClosedEnum<
243
- typeof ListPromptVersionsThinkingLevel
244
- >;
245
-
246
- /**
247
- * Model Parameters: Not all parameters apply to every model
248
- */
249
- export type ListPromptVersionsModelParameters = {
250
- /**
251
- * Only supported on `chat` and `completion` models.
252
- */
253
- temperature?: number | undefined;
254
- /**
255
- * Only supported on `chat` and `completion` models.
256
- */
257
- maxTokens?: number | undefined;
258
- /**
259
- * Only supported on `chat` and `completion` models.
260
- */
261
- topK?: number | undefined;
262
- /**
263
- * Only supported on `chat` and `completion` models.
264
- */
265
- topP?: number | undefined;
266
- /**
267
- * Only supported on `chat` and `completion` models.
268
- */
269
- frequencyPenalty?: number | undefined;
270
- /**
271
- * Only supported on `chat` and `completion` models.
272
- */
273
- presencePenalty?: number | undefined;
274
- /**
275
- * Only supported on `image` models.
276
- */
277
- numImages?: number | undefined;
278
- /**
279
- * Best effort deterministic seed for the model. Currently only OpenAI models support these
280
- */
281
- seed?: number | undefined;
282
- /**
283
- * Only supported on `image` models.
284
- */
285
- format?: ListPromptVersionsFormat | undefined;
286
- /**
287
- * Only supported on `image` models.
288
- */
289
- dimensions?: string | undefined;
290
- /**
291
- * Only supported on `image` models.
292
- */
293
- quality?: string | undefined;
294
- /**
295
- * Only supported on `image` models.
296
- */
297
- style?: string | undefined;
298
- /**
299
- * An object specifying the format that the model must output.
300
- *
301
- * @remarks
302
- *
303
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
304
- *
305
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
306
- *
307
- * Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
308
- */
309
- responseFormat?:
310
- | ListPromptVersionsResponseFormat1
311
- | ListPromptVersionsResponseFormat2
312
- | ListPromptVersionsResponseFormat3
313
- | ListPromptVersionsResponseFormat4
314
- | ListPromptVersionsResponseFormat5
315
- | ListPromptVersionsResponseFormat6
316
- | null
317
- | undefined;
318
- /**
319
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
320
- */
321
- photoRealVersion?: ListPromptVersionsPhotoRealVersion | undefined;
322
- /**
323
- * The format to return the embeddings
324
- */
325
- encodingFormat?: ListPromptVersionsEncodingFormat | undefined;
326
- /**
327
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
328
- */
329
- reasoningEffort?: ListPromptVersionsPromptsReasoningEffort | undefined;
330
- /**
331
- * Gives the model enhanced reasoning capabilities for complex tasks. A value of 0 disables thinking. The minimum budget tokens for thinking are 1024. The Budget Tokens should never exceed the Max Tokens parameter. Only supported by `Anthropic`
332
- */
333
- budgetTokens?: number | undefined;
334
- /**
335
- * Controls the verbosity of the model output.
336
- */
337
- verbosity?: ListPromptVersionsVerbosity | undefined;
338
- /**
339
- * The level of thinking to use for the model. Only supported by `Google AI`
340
- */
341
- thinkingLevel?: ListPromptVersionsThinkingLevel | undefined;
342
- };
343
-
344
- export const ListPromptVersionsProvider = {
345
- Openai: "openai",
346
- Groq: "groq",
347
- Cohere: "cohere",
348
- Azure: "azure",
349
- Aws: "aws",
350
- Google: "google",
351
- GoogleAi: "google-ai",
352
- Huggingface: "huggingface",
353
- Togetherai: "togetherai",
354
- Perplexity: "perplexity",
355
- Anthropic: "anthropic",
356
- Leonardoai: "leonardoai",
357
- Fal: "fal",
358
- Nvidia: "nvidia",
359
- Jina: "jina",
360
- Elevenlabs: "elevenlabs",
361
- Litellm: "litellm",
362
- Cerebras: "cerebras",
363
- Openailike: "openailike",
364
- Bytedance: "bytedance",
365
- Mistral: "mistral",
366
- Deepseek: "deepseek",
367
- Contextualai: "contextualai",
368
- Moonshotai: "moonshotai",
369
- Zai: "zai",
370
- Minimax: "minimax",
371
- Alibaba: "alibaba",
372
- Slack: "slack",
373
- } as const;
374
- export type ListPromptVersionsProvider = ClosedEnum<
375
- typeof ListPromptVersionsProvider
376
- >;
377
-
378
- /**
379
- * The role of the prompt message
380
- */
381
- export const ListPromptVersionsRole = {
382
- System: "system",
383
- Assistant: "assistant",
384
- User: "user",
385
- Exception: "exception",
386
- Tool: "tool",
387
- Prompt: "prompt",
388
- Correction: "correction",
389
- ExpectedOutput: "expected_output",
390
- } as const;
391
- /**
392
- * The role of the prompt message
393
- */
394
- export type ListPromptVersionsRole = ClosedEnum<typeof ListPromptVersionsRole>;
395
-
396
- export type ListPromptVersions2File = {
397
- /**
398
- * The file data as a data URI string in the format 'data:<mime-type>;base64,<base64-encoded-data>'. Example: 'data:image/png;base64,iVBORw0KGgoAAAANS...'
399
- */
400
- fileData?: string | undefined;
401
- /**
402
- * URL to the file. Only supported by Anthropic Claude models for PDF files.
403
- */
404
- uri?: string | undefined;
405
- /**
406
- * MIME type of the file (e.g., application/pdf, image/png)
407
- */
408
- mimeType?: string | undefined;
409
- /**
410
- * The name of the file, used when passing the file to the model as a string.
411
- */
412
- filename?: string | undefined;
413
- };
414
-
415
- export type ListPromptVersions23 = {
416
- /**
417
- * The type of the content part. Always `file`.
418
- */
419
- type: "file";
420
- file: ListPromptVersions2File;
421
- };
422
-
423
- export type ListPromptVersions2ImageUrl = {
424
- /**
425
- * The orq.ai id of the image
426
- */
427
- id?: string | undefined;
428
- /**
429
- * Either a URL of the image or the base64 encoded data URI.
430
- */
431
- url: string;
432
- /**
433
- * Specifies the detail level of the image. Currently only supported with OpenAI models
434
- */
435
- detail?: string | undefined;
436
- };
437
-
438
- /**
439
- * The image part of the prompt message. Only supported with vision models.
440
- */
441
- export type ListPromptVersions22 = {
442
- type: "image_url";
443
- imageUrl: ListPromptVersions2ImageUrl;
444
- };
445
-
446
- /**
447
- * Text content part of a prompt message
448
- */
449
- export type ListPromptVersions21 = {
450
- type: "text";
451
- text: string;
452
- };
453
-
454
- export type ListPromptVersionsContent2 =
455
- | ListPromptVersions21
456
- | ListPromptVersions22
457
- | ListPromptVersions23;
458
-
459
- /**
460
- * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Can be null for tool messages in certain scenarios.
461
- */
462
- export type ListPromptVersionsContent =
463
- | string
464
- | Array<ListPromptVersions21 | ListPromptVersions22 | ListPromptVersions23>;
465
-
466
- export const ListPromptVersionsPromptsType = {
467
- Function: "function",
468
- } as const;
469
- export type ListPromptVersionsPromptsType = ClosedEnum<
470
- typeof ListPromptVersionsPromptsType
471
- >;
472
-
473
- export type ListPromptVersionsFunction = {
474
- name: string;
475
- /**
476
- * JSON string arguments for the functions
477
- */
478
- arguments: string;
479
- };
480
-
481
- export type ListPromptVersionsToolCalls = {
482
- id?: string | undefined;
483
- index?: number | undefined;
484
- type: ListPromptVersionsPromptsType;
485
- function: ListPromptVersionsFunction;
486
- };
487
-
488
- export type ListPromptVersionsMessages = {
489
- /**
490
- * The role of the prompt message
491
- */
492
- role: ListPromptVersionsRole;
493
- /**
494
- * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Can be null for tool messages in certain scenarios.
495
- */
496
- content:
497
- | string
498
- | Array<ListPromptVersions21 | ListPromptVersions22 | ListPromptVersions23>
499
- | null;
500
- toolCalls?: Array<ListPromptVersionsToolCalls> | undefined;
501
- toolCallId?: string | null | undefined;
502
- };
503
-
504
- /**
505
- * [DEPRECATED] Use the `prompt` property instead. A list of messages compatible with the openAI schema.
506
- *
507
- * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
508
- */
509
- export type ListPromptVersionsPromptConfig = {
510
- stream?: boolean | undefined;
511
- model?: string | null | undefined;
512
- /**
513
- * The id of the resource
514
- */
515
- modelDbId?: string | null | undefined;
516
- /**
517
- * The modality of the model
518
- */
519
- modelType?: ListPromptVersionsModelType | null | undefined;
520
- /**
521
- * Model Parameters: Not all parameters apply to every model
522
- */
523
- modelParameters?: ListPromptVersionsModelParameters | undefined;
524
- provider?: ListPromptVersionsProvider | null | undefined;
525
- /**
526
- * The ID of the integration to use
527
- */
528
- integrationId?: string | null | undefined;
529
- version?: string | undefined;
530
- messages: Array<ListPromptVersionsMessages>;
531
- };
532
-
533
- /**
534
- * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
535
- */
536
- export const ListPromptVersionsVoice = {
537
- Alloy: "alloy",
538
- Echo: "echo",
539
- Fable: "fable",
540
- Onyx: "onyx",
541
- Nova: "nova",
542
- Shimmer: "shimmer",
543
- } as const;
544
- /**
545
- * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
546
- */
547
- export type ListPromptVersionsVoice = ClosedEnum<
548
- typeof ListPromptVersionsVoice
549
- >;
550
-
551
- /**
552
- * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
553
- */
554
- export const ListPromptVersionsPromptsFormat = {
555
- Wav: "wav",
556
- Mp3: "mp3",
557
- Flac: "flac",
558
- Opus: "opus",
559
- Pcm16: "pcm16",
560
- } as const;
561
- /**
562
- * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
563
- */
564
- export type ListPromptVersionsPromptsFormat = ClosedEnum<
565
- typeof ListPromptVersionsPromptsFormat
566
- >;
567
-
568
- /**
569
- * Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
570
- */
571
- export type ListPromptVersionsAudio = {
572
- /**
573
- * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
574
- */
575
- voice: ListPromptVersionsVoice;
576
- /**
577
- * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
578
- */
579
- format: ListPromptVersionsPromptsFormat;
580
- };
581
-
582
- export type ListPromptVersionsResponseFormatJsonSchema = {
583
- /**
584
- * A description of what the response format is for, used by the model to determine how to respond in the format.
585
- */
586
- description?: string | undefined;
587
- /**
588
- * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
589
- */
590
- name: string;
591
- /**
592
- * The schema for the response format, described as a JSON Schema object.
593
- */
594
- schema?: any | undefined;
595
- /**
596
- * Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when strict is true.
597
- */
598
- strict: boolean;
599
- };
600
-
601
- /**
602
- * @remarks
603
- *
604
- * JSON Schema response format. Used to generate structured JSON responses
605
- */
606
- export type ListPromptVersionsResponseFormatPromptsJSONSchema = {
607
- type: "json_schema";
608
- jsonSchema: ListPromptVersionsResponseFormatJsonSchema;
609
- };
610
-
611
- /**
612
- * @remarks
613
- *
614
- * JSON object response format. An older method of generating JSON responses. Using `json_schema` is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.
615
- */
616
- export type ListPromptVersionsResponseFormatJSONObject = {
617
- type: "json_object";
618
- };
619
-
620
- /**
621
- * @remarks
622
- *
623
- * Default response format. Used to generate text responses
624
- */
625
- export type ListPromptVersionsResponseFormatText = {
626
- type: "text";
627
- };
628
-
629
- /**
630
- * An object specifying the format that the model must output
631
- */
632
- export type ListPromptVersionsResponseFormat =
633
- | ListPromptVersionsResponseFormatText
634
- | ListPromptVersionsResponseFormatJSONObject
635
- | ListPromptVersionsResponseFormatPromptsJSONSchema;
636
-
637
- /**
638
- * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
639
- *
640
- * @remarks
641
- *
642
- * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
643
- * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
644
- * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
645
- * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
646
- *
647
- * Any of "none", "minimal", "low", "medium", "high", "xhigh".
648
- */
649
- export const ListPromptVersionsReasoningEffort = {
650
- None: "none",
651
- Minimal: "minimal",
652
- Low: "low",
653
- Medium: "medium",
654
- High: "high",
655
- Xhigh: "xhigh",
656
- } as const;
657
- /**
658
- * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
659
- *
660
- * @remarks
661
- *
662
- * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
663
- * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
664
- * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
665
- * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
666
- *
667
- * Any of "none", "minimal", "low", "medium", "high", "xhigh".
668
- */
669
- export type ListPromptVersionsReasoningEffort = ClosedEnum<
670
- typeof ListPromptVersionsReasoningEffort
671
- >;
672
-
673
- /**
674
- * Up to 4 sequences where the API will stop generating further tokens.
675
- */
676
- export type ListPromptVersionsStop = string | Array<string>;
677
-
678
- /**
679
- * Options for streaming response. Only set this when you set stream: true.
680
- */
681
- export type ListPromptVersionsStreamOptions = {
682
- /**
683
- * If set, an additional chunk will be streamed before the data: [DONE] message. The usage field on this chunk shows the token usage statistics for the entire request, and the choices field will always be an empty array. All other chunks will also include a usage field, but with a null value.
684
- */
685
- includeUsage?: boolean | undefined;
686
- };
687
-
688
- export type ListPromptVersionsThinking =
689
- | components.ThinkingConfigDisabledSchema
690
- | components.ThinkingConfigEnabledSchema;
691
-
692
- /**
693
- * The type of the tool. Currently, only function is supported.
694
- */
695
- export const ListPromptVersionsToolChoiceType = {
696
- Function: "function",
697
- } as const;
698
- /**
699
- * The type of the tool. Currently, only function is supported.
700
- */
701
- export type ListPromptVersionsToolChoiceType = ClosedEnum<
702
- typeof ListPromptVersionsToolChoiceType
703
- >;
704
-
705
- export type ListPromptVersionsToolChoiceFunction = {
706
- /**
707
- * The name of the function to call.
708
- */
709
- name: string;
710
- };
711
-
712
- export type ListPromptVersionsToolChoice2 = {
713
- /**
714
- * The type of the tool. Currently, only function is supported.
715
- */
716
- type?: ListPromptVersionsToolChoiceType | undefined;
717
- function: ListPromptVersionsToolChoiceFunction;
718
- };
719
-
720
- export const ListPromptVersionsToolChoice1 = {
721
- None: "none",
722
- Auto: "auto",
723
- Required: "required",
724
- } as const;
725
- export type ListPromptVersionsToolChoice1 = ClosedEnum<
726
- typeof ListPromptVersionsToolChoice1
727
- >;
728
-
729
- /**
730
- * Controls which (if any) tool is called by the model.
731
- */
732
- export type ListPromptVersionsToolChoice =
733
- | ListPromptVersionsToolChoice2
734
- | ListPromptVersionsToolChoice1;
735
-
736
- export const ListPromptVersionsModalities = {
737
- Text: "text",
738
- Audio: "audio",
739
- } as const;
740
- export type ListPromptVersionsModalities = ClosedEnum<
741
- typeof ListPromptVersionsModalities
742
- >;
743
-
744
- /**
745
- * The key of the guardrail.
746
- */
747
- export const ListPromptVersionsId1 = {
748
- OrqPiiDetection: "orq_pii_detection",
749
- OrqSexualModeration: "orq_sexual_moderation",
750
- OrqHarmfulModeration: "orq_harmful_moderation",
751
- } as const;
752
- /**
753
- * The key of the guardrail.
754
- */
755
- export type ListPromptVersionsId1 = ClosedEnum<typeof ListPromptVersionsId1>;
756
-
757
- export type ListPromptVersionsId = ListPromptVersionsId1 | string;
758
-
759
- /**
760
- * Determines whether the guardrail runs on the input (user message) or output (model response).
761
- */
762
- export const ListPromptVersionsExecuteOn = {
763
- Input: "input",
764
- Output: "output",
765
- } as const;
766
- /**
767
- * Determines whether the guardrail runs on the input (user message) or output (model response).
768
- */
769
- export type ListPromptVersionsExecuteOn = ClosedEnum<
770
- typeof ListPromptVersionsExecuteOn
771
- >;
772
-
773
- export type ListPromptVersionsGuardrails = {
774
- id: ListPromptVersionsId1 | string;
775
- /**
776
- * Determines whether the guardrail runs on the input (user message) or output (model response).
777
- */
778
- executeOn: ListPromptVersionsExecuteOn;
779
- };
780
-
781
- export type ListPromptVersionsFallbacks = {
782
- /**
783
- * Fallback model identifier
784
- */
785
- model: string;
786
- };
787
-
788
- /**
789
- * Retry configuration for the request
790
- */
791
- export type ListPromptVersionsRetry = {
792
- /**
793
- * Number of retry attempts (1-5)
794
- */
795
- count: number;
796
- /**
797
- * HTTP status codes that trigger retry logic
798
- */
799
- onCodes?: Array<number> | undefined;
800
- };
801
-
802
- export const ListPromptVersionsType = {
803
- ExactMatch: "exact_match",
804
- } as const;
805
- export type ListPromptVersionsType = ClosedEnum<typeof ListPromptVersionsType>;
806
-
807
- /**
808
- * Cache configuration for the request.
809
- */
810
- export type ListPromptVersionsCache = {
811
- /**
812
- * Time to live for cached responses in seconds. Maximum 259200 seconds (3 days).
813
- */
814
- ttl: number;
815
- type: ListPromptVersionsType;
816
- };
817
-
818
- export const ListPromptVersionsLoadBalancerType = {
819
- WeightBased: "weight_based",
820
- } as const;
821
- export type ListPromptVersionsLoadBalancerType = ClosedEnum<
822
- typeof ListPromptVersionsLoadBalancerType
823
- >;
824
-
825
- export type ListPromptVersionsLoadBalancerModels = {
826
- /**
827
- * Model identifier for load balancing
828
- */
829
- model: string;
830
- /**
831
- * Weight assigned to this model for load balancing
832
- */
833
- weight: number;
834
- };
835
-
836
- export type ListPromptVersionsLoadBalancer1 = {
837
- type: ListPromptVersionsLoadBalancerType;
838
- models: Array<ListPromptVersionsLoadBalancerModels>;
839
- };
840
-
841
- /**
842
- * Load balancer configuration for the request.
843
- */
844
- export type ListPromptVersionsLoadBalancer = ListPromptVersionsLoadBalancer1;
845
-
846
- /**
847
- * Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
848
- */
849
- export type ListPromptVersionsTimeout = {
850
- /**
851
- * Timeout value in milliseconds
852
- */
853
- callTimeout: number;
854
- };
855
-
856
- export type ListPromptVersionsContentPromptsResponse2002 =
857
- components.TextContentPartSchema;
858
-
859
- /**
860
- * The contents of the tool message.
861
- */
862
- export type ListPromptVersionsMessagesPromptsResponse200Content =
863
- | string
864
- | Array<components.TextContentPartSchema>;
865
-
866
- /**
867
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
868
- */
869
- export const ListPromptVersionsMessagesPromptsType = {
870
- Ephemeral: "ephemeral",
871
- } as const;
872
- /**
873
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
874
- */
875
- export type ListPromptVersionsMessagesPromptsType = ClosedEnum<
876
- typeof ListPromptVersionsMessagesPromptsType
877
- >;
878
-
879
- /**
880
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
881
- *
882
- * @remarks
883
- *
884
- * - `5m`: 5 minutes
885
- * - `1h`: 1 hour
886
- *
887
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
888
- */
889
- export const ListPromptVersionsMessagesTtl = {
890
- Fivem: "5m",
891
- Oneh: "1h",
892
- } as const;
893
- /**
894
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
895
- *
896
- * @remarks
897
- *
898
- * - `5m`: 5 minutes
899
- * - `1h`: 1 hour
900
- *
901
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
902
- */
903
- export type ListPromptVersionsMessagesTtl = ClosedEnum<
904
- typeof ListPromptVersionsMessagesTtl
905
- >;
906
-
907
- export type ListPromptVersionsMessagesCacheControl = {
908
- /**
909
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
910
- */
911
- type: ListPromptVersionsMessagesPromptsType;
912
- /**
913
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
914
- *
915
- * @remarks
916
- *
917
- * - `5m`: 5 minutes
918
- * - `1h`: 1 hour
919
- *
920
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
921
- */
922
- ttl: ListPromptVersionsMessagesTtl;
923
- };
924
-
925
- export type ListPromptVersionsMessagesToolMessage = {
926
- /**
927
- * The role of the messages author, in this case tool.
928
- */
929
- role: "tool";
930
- /**
931
- * The contents of the tool message.
932
- */
933
- content: string | Array<components.TextContentPartSchema>;
934
- /**
935
- * Tool call that this message is responding to.
936
- */
937
- toolCallId: string | null;
938
- cacheControl?: ListPromptVersionsMessagesCacheControl | undefined;
939
- };
940
-
941
- export type ListPromptVersionsContentPromptsResponse2 =
942
- | (components.TextContentPartSchema & { type: "text" })
943
- | components.RefusalPartSchema
944
- | components.ReasoningPartSchema
945
- | components.RedactedReasoningPartSchema;
946
-
947
- /**
948
- * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
949
- */
950
- export type ListPromptVersionsMessagesPromptsResponseContent =
951
- | string
952
- | Array<
953
- | (components.TextContentPartSchema & { type: "text" })
954
- | components.RefusalPartSchema
955
- | components.ReasoningPartSchema
956
- | components.RedactedReasoningPartSchema
957
- >;
958
-
959
- /**
960
- * Data about a previous audio response from the model.
961
- */
962
- export type ListPromptVersionsMessagesAudio = {
963
- /**
964
- * Unique identifier for a previous audio response from the model.
965
- */
966
- id: string;
967
- };
968
-
969
- /**
970
- * The type of the tool. Currently, only `function` is supported.
971
- */
972
- export const ListPromptVersionsMessagesType = {
973
- Function: "function",
974
- } as const;
975
- /**
976
- * The type of the tool. Currently, only `function` is supported.
977
- */
978
- export type ListPromptVersionsMessagesType = ClosedEnum<
979
- typeof ListPromptVersionsMessagesType
980
- >;
981
-
982
- export type ListPromptVersionsMessagesFunction = {
983
- /**
984
- * The name of the function to call.
985
- */
986
- name?: string | undefined;
987
- /**
988
- * 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.
989
- */
990
- arguments?: string | undefined;
991
- };
992
-
993
- export type ListPromptVersionsMessagesToolCalls = {
994
- /**
995
- * The ID of the tool call.
996
- */
997
- id: string;
998
- /**
999
- * The type of the tool. Currently, only `function` is supported.
1000
- */
1001
- type: ListPromptVersionsMessagesType;
1002
- function: ListPromptVersionsMessagesFunction;
1003
- /**
1004
- * Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call.
1005
- */
1006
- thoughtSignature?: string | undefined;
1007
- };
1008
-
1009
- export type ListPromptVersionsMessagesAssistantMessage = {
1010
- /**
1011
- * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
1012
- */
1013
- content?:
1014
- | string
1015
- | Array<
1016
- | (components.TextContentPartSchema & { type: "text" })
1017
- | components.RefusalPartSchema
1018
- | components.ReasoningPartSchema
1019
- | components.RedactedReasoningPartSchema
1020
- >
1021
- | null
1022
- | undefined;
1023
- /**
1024
- * The refusal message by the assistant.
1025
- */
1026
- refusal?: string | null | undefined;
1027
- /**
1028
- * The role of the messages author, in this case `assistant`.
1029
- */
1030
- role: "assistant";
1031
- /**
1032
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
1033
- */
1034
- name?: string | undefined;
1035
- /**
1036
- * Data about a previous audio response from the model.
1037
- */
1038
- audio?: ListPromptVersionsMessagesAudio | null | undefined;
1039
- /**
1040
- * The tool calls generated by the model, such as function calls.
1041
- */
1042
- toolCalls?: Array<ListPromptVersionsMessagesToolCalls> | undefined;
1043
- };
1044
-
1045
- /**
1046
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1047
- */
1048
- export const ListPromptVersions2PromptsResponse200ApplicationJSONType = {
1049
- Ephemeral: "ephemeral",
1050
- } as const;
1051
- /**
1052
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1053
- */
1054
- export type ListPromptVersions2PromptsResponse200ApplicationJSONType =
1055
- ClosedEnum<typeof ListPromptVersions2PromptsResponse200ApplicationJSONType>;
1056
-
1057
- /**
1058
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
1059
- *
1060
- * @remarks
1061
- *
1062
- * - `5m`: 5 minutes
1063
- * - `1h`: 1 hour
1064
- *
1065
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1066
- */
1067
- export const ListPromptVersions2Ttl = {
1068
- Fivem: "5m",
1069
- Oneh: "1h",
1070
- } as const;
1071
- /**
1072
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
1073
- *
1074
- * @remarks
1075
- *
1076
- * - `5m`: 5 minutes
1077
- * - `1h`: 1 hour
1078
- *
1079
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1080
- */
1081
- export type ListPromptVersions2Ttl = ClosedEnum<typeof ListPromptVersions2Ttl>;
1082
-
1083
- export type ListPromptVersions2CacheControl = {
1084
- /**
1085
- * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
1086
- */
1087
- type: ListPromptVersions2PromptsResponse200ApplicationJSONType;
1088
- /**
1089
- * The time-to-live for the cache control breakpoint. This may be one of the following values:
1090
- *
1091
- * @remarks
1092
- *
1093
- * - `5m`: 5 minutes
1094
- * - `1h`: 1 hour
1095
- *
1096
- * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1097
- */
1098
- ttl: ListPromptVersions2Ttl;
1099
- };
1100
-
1101
- export type ListPromptVersions24 = {
1102
- /**
1103
- * The type of the content part. Always `file`.
1104
- */
1105
- type: "file";
1106
- cacheControl?: ListPromptVersions2CacheControl | undefined;
1107
- /**
1108
- * File data for the content part. Must contain either file_data or uri, but not both.
1109
- */
1110
- file: components.FileContentPartSchema;
1111
- };
1112
-
1113
- export type ListPromptVersionsContentPrompts2 =
1114
- | (components.TextContentPartSchema & { type: "text" })
1115
- | components.ImageContentPartSchema
1116
- | components.AudioContentPartSchema
1117
- | ListPromptVersions24;
1118
-
1119
- /**
1120
- * The contents of the user message.
1121
- */
1122
- export type ListPromptVersionsMessagesPromptsContent =
1123
- | string
1124
- | Array<
1125
- | (components.TextContentPartSchema & { type: "text" })
1126
- | components.ImageContentPartSchema
1127
- | components.AudioContentPartSchema
1128
- | ListPromptVersions24
1129
- >;
1130
-
1131
- export type ListPromptVersionsMessagesUserMessage = {
1132
- /**
1133
- * The role of the messages author, in this case `user`.
1134
- */
1135
- role: "user";
1136
- /**
1137
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
1138
- */
1139
- name?: string | undefined;
1140
- /**
1141
- * The contents of the user message.
1142
- */
1143
- content:
1144
- | string
1145
- | Array<
1146
- | (components.TextContentPartSchema & { type: "text" })
1147
- | components.ImageContentPartSchema
1148
- | components.AudioContentPartSchema
1149
- | ListPromptVersions24
1150
- >;
1151
- };
1152
-
1153
- /**
1154
- * The contents of the system message.
1155
- */
1156
- export type ListPromptVersionsMessagesContent =
1157
- | string
1158
- | Array<components.TextContentPartSchema>;
1159
-
1160
- /**
1161
- * Developer-provided instructions that the model should follow, regardless of messages sent by the user.
1162
- */
1163
- export type ListPromptVersionsMessagesSystemMessage = {
1164
- /**
1165
- * The role of the messages author, in this case `system`.
1166
- */
1167
- role: "system";
1168
- /**
1169
- * The contents of the system message.
1170
- */
1171
- content: string | Array<components.TextContentPartSchema>;
1172
- /**
1173
- * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
1174
- */
1175
- name?: string | undefined;
1176
- };
1177
-
1178
- export type ListPromptVersionsPromptsMessages =
1179
- | ListPromptVersionsMessagesSystemMessage
1180
- | ListPromptVersionsMessagesUserMessage
1181
- | ListPromptVersionsMessagesAssistantMessage
1182
- | ListPromptVersionsMessagesToolMessage;
1183
-
1184
- /**
1185
- * Prompt configuration with model and messages. Use this instead of prompt_config.
1186
- */
1187
- export type ListPromptVersionsPromptField = {
1188
- /**
1189
- * The name to display on the trace. If not specified, the default system name will be used.
1190
- */
1191
- name?: string | undefined;
1192
- /**
1193
- * Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
1194
- */
1195
- audio?: ListPromptVersionsAudio | null | undefined;
1196
- /**
1197
- * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
1198
- */
1199
- frequencyPenalty?: number | null | undefined;
1200
- /**
1201
- * `[Deprecated]`. The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API.
1202
- *
1203
- * @remarks
1204
- *
1205
- * This value is now `deprecated` in favor of `max_completion_tokens`, and is not compatible with o1 series models.
1206
- */
1207
- maxTokens?: number | null | undefined;
1208
- /**
1209
- * An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens
1210
- */
1211
- maxCompletionTokens?: number | null | undefined;
1212
- /**
1213
- * Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message.
1214
- */
1215
- logprobs?: boolean | null | undefined;
1216
- /**
1217
- * An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.
1218
- */
1219
- topLogprobs?: number | null | undefined;
1220
- /**
1221
- * How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs.
1222
- */
1223
- n?: number | null | undefined;
1224
- /**
1225
- * Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
1226
- */
1227
- presencePenalty?: number | null | undefined;
1228
- /**
1229
- * An object specifying the format that the model must output
1230
- */
1231
- responseFormat?:
1232
- | ListPromptVersionsResponseFormatText
1233
- | ListPromptVersionsResponseFormatJSONObject
1234
- | ListPromptVersionsResponseFormatPromptsJSONSchema
1235
- | undefined;
1236
- /**
1237
- * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
1238
- *
1239
- * @remarks
1240
- *
1241
- * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
1242
- * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
1243
- * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1244
- * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
1245
- *
1246
- * Any of "none", "minimal", "low", "medium", "high", "xhigh".
1247
- */
1248
- reasoningEffort?: ListPromptVersionsReasoningEffort | undefined;
1249
- /**
1250
- * Adjusts response verbosity. Lower levels yield shorter answers.
1251
- */
1252
- verbosity?: string | undefined;
1253
- /**
1254
- * If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.
1255
- */
1256
- seed?: number | null | undefined;
1257
- /**
1258
- * Up to 4 sequences where the API will stop generating further tokens.
1259
- */
1260
- stop?: string | Array<string> | null | undefined;
1261
- /**
1262
- * Options for streaming response. Only set this when you set stream: true.
1263
- */
1264
- streamOptions?: ListPromptVersionsStreamOptions | null | undefined;
1265
- thinking?:
1266
- | components.ThinkingConfigDisabledSchema
1267
- | components.ThinkingConfigEnabledSchema
1268
- | undefined;
1269
- /**
1270
- * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
1271
- */
1272
- temperature?: number | null | undefined;
1273
- /**
1274
- * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
1275
- */
1276
- topP?: number | null | undefined;
1277
- /**
1278
- * Limits the model to consider only the top k most likely tokens at each step.
1279
- */
1280
- topK?: number | null | undefined;
1281
- /**
1282
- * Controls which (if any) tool is called by the model.
1283
- */
1284
- toolChoice?:
1285
- | ListPromptVersionsToolChoice2
1286
- | ListPromptVersionsToolChoice1
1287
- | undefined;
1288
- /**
1289
- * Whether to enable parallel function calling during tool use.
1290
- */
1291
- parallelToolCalls?: boolean | undefined;
1292
- /**
1293
- * Output types that you would like the model to generate. Most models are capable of generating text, which is the default: ["text"]. The gpt-4o-audio-preview model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: ["text", "audio"].
1294
- */
1295
- modalities?: Array<ListPromptVersionsModalities> | null | undefined;
1296
- /**
1297
- * A list of guardrails to apply to the request.
1298
- */
1299
- guardrails?: Array<ListPromptVersionsGuardrails> | undefined;
1300
- /**
1301
- * Array of fallback models to use if primary model fails
1302
- */
1303
- fallbacks?: Array<ListPromptVersionsFallbacks> | undefined;
1304
- /**
1305
- * Retry configuration for the request
1306
- */
1307
- retry?: ListPromptVersionsRetry | undefined;
1308
- /**
1309
- * Cache configuration for the request.
1310
- */
1311
- cache?: ListPromptVersionsCache | undefined;
1312
- /**
1313
- * Load balancer configuration for the request.
1314
- */
1315
- loadBalancer?: ListPromptVersionsLoadBalancer1 | undefined;
1316
- /**
1317
- * Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
1318
- */
1319
- timeout?: ListPromptVersionsTimeout | undefined;
1320
- /**
1321
- * Array of messages that make up the conversation. Each message has a role (system, user, assistant, or tool) and content.
1322
- */
1323
- messages?:
1324
- | Array<
1325
- | ListPromptVersionsMessagesSystemMessage
1326
- | ListPromptVersionsMessagesUserMessage
1327
- | ListPromptVersionsMessagesAssistantMessage
1328
- | ListPromptVersionsMessagesToolMessage
1329
- >
1330
- | undefined;
1331
- /**
1332
- * Model ID used to generate the response, like `openai/gpt-4o` or `anthropic/claude-3-5-sonnet-20241022`. For private models, use format: `{workspaceKey}@{provider}/{model}`.
1333
- */
1334
- model?: string | null | undefined;
1335
- version?: string | undefined;
1336
- };
1337
-
1338
- export const ListPromptVersionsUseCases = {
1339
- AgentsSimulations: "Agents simulations",
1340
- Agents: "Agents",
1341
- APIInteraction: "API interaction",
1342
- AutonomousAgents: "Autonomous Agents",
1343
- Chatbots: "Chatbots",
1344
- Classification: "Classification",
1345
- CodeUnderstanding: "Code understanding",
1346
- CodeWriting: "Code writing",
1347
- Conversation: "Conversation",
1348
- DocumentsQA: "Documents QA",
1349
- Evaluation: "Evaluation",
1350
- Extraction: "Extraction",
1351
- MultiModal: "Multi-modal",
1352
- SelfChecking: "Self-checking",
1353
- SentimentAnalysis: "Sentiment analysis",
1354
- Sql: "SQL",
1355
- Summarization: "Summarization",
1356
- Tagging: "Tagging",
1357
- TranslationDocument: "Translation (document)",
1358
- TranslationSentences: "Translation (sentences)",
1359
- } as const;
1360
- export type ListPromptVersionsUseCases = ClosedEnum<
1361
- typeof ListPromptVersionsUseCases
1362
- >;
1363
-
1364
- /**
1365
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
1366
- */
1367
- export const ListPromptVersionsLanguage = {
1368
- Chinese: "Chinese",
1369
- Dutch: "Dutch",
1370
- English: "English",
1371
- French: "French",
1372
- German: "German",
1373
- Russian: "Russian",
1374
- Spanish: "Spanish",
1375
- } as const;
1376
- /**
1377
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
1378
- */
1379
- export type ListPromptVersionsLanguage = ClosedEnum<
1380
- typeof ListPromptVersionsLanguage
1381
- >;
1382
-
1383
- export type ListPromptVersionsMetadata = {
1384
- /**
1385
- * A list of use cases that the prompt is meant to be used for. Use this field to categorize the prompt for your own purpose
1386
- */
1387
- useCases?: Array<ListPromptVersionsUseCases> | undefined;
1388
- /**
1389
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
1390
- */
1391
- language?: ListPromptVersionsLanguage | null | undefined;
1392
- };
1393
-
1394
- export type ListPromptVersionsData = {
1395
- id: string;
1396
- createdById?: string | null | undefined;
1397
- updatedById?: string | null | undefined;
1398
- /**
1399
- * The prompt’s description, meant to be displayable in the UI. Use this field to optionally store a long form explanation of the prompt for your own purpose
1400
- */
1401
- description?: string | null | undefined;
1402
- /**
1403
- * [DEPRECATED] Use the `prompt` property instead. A list of messages compatible with the openAI schema.
1404
- *
1405
- * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
1406
- */
1407
- promptConfig?: ListPromptVersionsPromptConfig | undefined;
1408
- /**
1409
- * Prompt configuration with model and messages. Use this instead of prompt_config.
1410
- */
1411
- prompt: ListPromptVersionsPromptField;
1412
- metadata?: ListPromptVersionsMetadata | undefined;
1413
- timestamp: string;
1414
- };
1415
-
1416
- /**
1417
- * Prompt versions retrieved.
1418
- */
1419
- export type ListPromptVersionsResponseBody = {
1420
- object: ListPromptVersionsObject;
1421
- data: Array<ListPromptVersionsData>;
1422
- hasMore: boolean;
1423
- };
1424
-
1425
- /** @internal */
1426
- export type ListPromptVersionsRequest$Outbound = {
1427
- prompt_id: string;
1428
- limit: number;
1429
- starting_after?: string | undefined;
1430
- ending_before?: string | undefined;
1431
- };
1432
-
1433
- /** @internal */
1434
- export const ListPromptVersionsRequest$outboundSchema: z.ZodType<
1435
- ListPromptVersionsRequest$Outbound,
1436
- z.ZodTypeDef,
1437
- ListPromptVersionsRequest
1438
- > = z.object({
1439
- promptId: z.string(),
1440
- limit: z.number().int().default(10),
1441
- startingAfter: z.string().optional(),
1442
- endingBefore: z.string().optional(),
1443
- }).transform((v) => {
1444
- return remap$(v, {
1445
- promptId: "prompt_id",
1446
- startingAfter: "starting_after",
1447
- endingBefore: "ending_before",
1448
- });
1449
- });
1450
-
1451
- export function listPromptVersionsRequestToJSON(
1452
- listPromptVersionsRequest: ListPromptVersionsRequest,
1453
- ): string {
1454
- return JSON.stringify(
1455
- ListPromptVersionsRequest$outboundSchema.parse(listPromptVersionsRequest),
1456
- );
1457
- }
1458
-
1459
- /** @internal */
1460
- export const ListPromptVersionsObject$inboundSchema: z.ZodNativeEnum<
1461
- typeof ListPromptVersionsObject
1462
- > = z.nativeEnum(ListPromptVersionsObject);
1463
-
1464
- /** @internal */
1465
- export const ListPromptVersionsModelType$inboundSchema: z.ZodNativeEnum<
1466
- typeof ListPromptVersionsModelType
1467
- > = z.nativeEnum(ListPromptVersionsModelType);
1468
-
1469
- /** @internal */
1470
- export const ListPromptVersionsFormat$inboundSchema: z.ZodNativeEnum<
1471
- typeof ListPromptVersionsFormat
1472
- > = z.nativeEnum(ListPromptVersionsFormat);
1473
-
1474
- /** @internal */
1475
- export const ListPromptVersionsResponseFormat6$inboundSchema: z.ZodNativeEnum<
1476
- typeof ListPromptVersionsResponseFormat6
1477
- > = z.nativeEnum(ListPromptVersionsResponseFormat6);
1478
-
1479
- /** @internal */
1480
- export const ListPromptVersionsResponseFormat5$inboundSchema: z.ZodNativeEnum<
1481
- typeof ListPromptVersionsResponseFormat5
1482
- > = z.nativeEnum(ListPromptVersionsResponseFormat5);
1483
-
1484
- /** @internal */
1485
- export const ListPromptVersionsResponseFormat4$inboundSchema: z.ZodNativeEnum<
1486
- typeof ListPromptVersionsResponseFormat4
1487
- > = z.nativeEnum(ListPromptVersionsResponseFormat4);
1488
-
1489
- /** @internal */
1490
- export const ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType$inboundSchema:
1491
- z.ZodNativeEnum<
1492
- typeof ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType
1493
- > = z.nativeEnum(
1494
- ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType,
1495
- );
1496
-
1497
- /** @internal */
1498
- export const ListPromptVersionsResponseFormat3$inboundSchema: z.ZodType<
1499
- ListPromptVersionsResponseFormat3,
1500
- z.ZodTypeDef,
1501
- unknown
1502
- > = z.object({
1503
- type:
1504
- ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType$inboundSchema,
1505
- });
1506
-
1507
- export function listPromptVersionsResponseFormat3FromJSON(
1508
- jsonString: string,
1509
- ): SafeParseResult<ListPromptVersionsResponseFormat3, SDKValidationError> {
1510
- return safeParse(
1511
- jsonString,
1512
- (x) => ListPromptVersionsResponseFormat3$inboundSchema.parse(JSON.parse(x)),
1513
- `Failed to parse 'ListPromptVersionsResponseFormat3' from JSON`,
1514
- );
1515
- }
1516
-
1517
- /** @internal */
1518
- export const ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType$inboundSchema:
1519
- z.ZodNativeEnum<
1520
- typeof ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType
1521
- > = z.nativeEnum(
1522
- ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType,
1523
- );
1524
-
1525
- /** @internal */
1526
- export const ListPromptVersionsResponseFormat2$inboundSchema: z.ZodType<
1527
- ListPromptVersionsResponseFormat2,
1528
- z.ZodTypeDef,
1529
- unknown
1530
- > = z.object({
1531
- type:
1532
- ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType$inboundSchema,
1533
- });
1534
-
1535
- export function listPromptVersionsResponseFormat2FromJSON(
1536
- jsonString: string,
1537
- ): SafeParseResult<ListPromptVersionsResponseFormat2, SDKValidationError> {
1538
- return safeParse(
1539
- jsonString,
1540
- (x) => ListPromptVersionsResponseFormat2$inboundSchema.parse(JSON.parse(x)),
1541
- `Failed to parse 'ListPromptVersionsResponseFormat2' from JSON`,
1542
- );
1543
- }
1544
-
1545
- /** @internal */
1546
- export const ListPromptVersionsResponseFormatPromptsResponse200Type$inboundSchema:
1547
- z.ZodNativeEnum<
1548
- typeof ListPromptVersionsResponseFormatPromptsResponse200Type
1549
- > = z.nativeEnum(ListPromptVersionsResponseFormatPromptsResponse200Type);
1550
-
1551
- /** @internal */
1552
- export const ListPromptVersionsResponseFormatPromptsResponseJsonSchema$inboundSchema:
1553
- z.ZodType<
1554
- ListPromptVersionsResponseFormatPromptsResponseJsonSchema,
1555
- z.ZodTypeDef,
1556
- unknown
1557
- > = z.object({
1558
- name: z.string(),
1559
- description: z.string().optional(),
1560
- strict: z.boolean().optional(),
1561
- schema: z.record(z.any()),
1562
- });
1563
-
1564
- export function listPromptVersionsResponseFormatPromptsResponseJsonSchemaFromJSON(
1565
- jsonString: string,
1566
- ): SafeParseResult<
1567
- ListPromptVersionsResponseFormatPromptsResponseJsonSchema,
1568
- SDKValidationError
1569
- > {
1570
- return safeParse(
1571
- jsonString,
1572
- (x) =>
1573
- ListPromptVersionsResponseFormatPromptsResponseJsonSchema$inboundSchema
1574
- .parse(JSON.parse(x)),
1575
- `Failed to parse 'ListPromptVersionsResponseFormatPromptsResponseJsonSchema' from JSON`,
1576
- );
1577
- }
1578
-
1579
- /** @internal */
1580
- export const ListPromptVersionsResponseFormat1$inboundSchema: z.ZodType<
1581
- ListPromptVersionsResponseFormat1,
1582
- z.ZodTypeDef,
1583
- unknown
1584
- > = z.object({
1585
- type: ListPromptVersionsResponseFormatPromptsResponse200Type$inboundSchema,
1586
- display_name: z.string().optional(),
1587
- json_schema: z.lazy(() =>
1588
- ListPromptVersionsResponseFormatPromptsResponseJsonSchema$inboundSchema
1589
- ),
1590
- }).transform((v) => {
1591
- return remap$(v, {
1592
- "display_name": "displayName",
1593
- "json_schema": "jsonSchema",
1594
- });
1595
- });
1596
-
1597
- export function listPromptVersionsResponseFormat1FromJSON(
1598
- jsonString: string,
1599
- ): SafeParseResult<ListPromptVersionsResponseFormat1, SDKValidationError> {
1600
- return safeParse(
1601
- jsonString,
1602
- (x) => ListPromptVersionsResponseFormat1$inboundSchema.parse(JSON.parse(x)),
1603
- `Failed to parse 'ListPromptVersionsResponseFormat1' from JSON`,
1604
- );
1605
- }
1606
-
1607
- /** @internal */
1608
- export const ListPromptVersionsPromptsResponseFormat$inboundSchema: z.ZodType<
1609
- ListPromptVersionsPromptsResponseFormat,
1610
- z.ZodTypeDef,
1611
- unknown
1612
- > = z.union([
1613
- z.lazy(() => ListPromptVersionsResponseFormat1$inboundSchema),
1614
- z.lazy(() => ListPromptVersionsResponseFormat2$inboundSchema),
1615
- z.lazy(() => ListPromptVersionsResponseFormat3$inboundSchema),
1616
- ListPromptVersionsResponseFormat4$inboundSchema,
1617
- ListPromptVersionsResponseFormat5$inboundSchema,
1618
- ListPromptVersionsResponseFormat6$inboundSchema,
1619
- ]);
1620
-
1621
- export function listPromptVersionsPromptsResponseFormatFromJSON(
1622
- jsonString: string,
1623
- ): SafeParseResult<
1624
- ListPromptVersionsPromptsResponseFormat,
1625
- SDKValidationError
1626
- > {
1627
- return safeParse(
1628
- jsonString,
1629
- (x) =>
1630
- ListPromptVersionsPromptsResponseFormat$inboundSchema.parse(
1631
- JSON.parse(x),
1632
- ),
1633
- `Failed to parse 'ListPromptVersionsPromptsResponseFormat' from JSON`,
1634
- );
1635
- }
1636
-
1637
- /** @internal */
1638
- export const ListPromptVersionsPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
1639
- typeof ListPromptVersionsPhotoRealVersion
1640
- > = z.nativeEnum(ListPromptVersionsPhotoRealVersion);
1641
-
1642
- /** @internal */
1643
- export const ListPromptVersionsEncodingFormat$inboundSchema: z.ZodNativeEnum<
1644
- typeof ListPromptVersionsEncodingFormat
1645
- > = z.nativeEnum(ListPromptVersionsEncodingFormat);
1646
-
1647
- /** @internal */
1648
- export const ListPromptVersionsPromptsReasoningEffort$inboundSchema:
1649
- z.ZodNativeEnum<typeof ListPromptVersionsPromptsReasoningEffort> = z
1650
- .nativeEnum(ListPromptVersionsPromptsReasoningEffort);
1651
-
1652
- /** @internal */
1653
- export const ListPromptVersionsVerbosity$inboundSchema: z.ZodNativeEnum<
1654
- typeof ListPromptVersionsVerbosity
1655
- > = z.nativeEnum(ListPromptVersionsVerbosity);
1656
-
1657
- /** @internal */
1658
- export const ListPromptVersionsThinkingLevel$inboundSchema: z.ZodNativeEnum<
1659
- typeof ListPromptVersionsThinkingLevel
1660
- > = z.nativeEnum(ListPromptVersionsThinkingLevel);
1661
-
1662
- /** @internal */
1663
- export const ListPromptVersionsModelParameters$inboundSchema: z.ZodType<
1664
- ListPromptVersionsModelParameters,
1665
- z.ZodTypeDef,
1666
- unknown
1667
- > = z.object({
1668
- temperature: z.number().optional(),
1669
- maxTokens: z.number().optional(),
1670
- topK: z.number().optional(),
1671
- topP: z.number().optional(),
1672
- frequencyPenalty: z.number().optional(),
1673
- presencePenalty: z.number().optional(),
1674
- numImages: z.number().optional(),
1675
- seed: z.number().optional(),
1676
- format: ListPromptVersionsFormat$inboundSchema.optional(),
1677
- dimensions: z.string().optional(),
1678
- quality: z.string().optional(),
1679
- style: z.string().optional(),
1680
- responseFormat: z.nullable(
1681
- z.union([
1682
- z.lazy(() => ListPromptVersionsResponseFormat1$inboundSchema),
1683
- z.lazy(() => ListPromptVersionsResponseFormat2$inboundSchema),
1684
- z.lazy(() => ListPromptVersionsResponseFormat3$inboundSchema),
1685
- ListPromptVersionsResponseFormat4$inboundSchema,
1686
- ListPromptVersionsResponseFormat5$inboundSchema,
1687
- ListPromptVersionsResponseFormat6$inboundSchema,
1688
- ]),
1689
- ).optional(),
1690
- photoRealVersion: ListPromptVersionsPhotoRealVersion$inboundSchema.optional(),
1691
- encoding_format: ListPromptVersionsEncodingFormat$inboundSchema.optional(),
1692
- reasoningEffort: ListPromptVersionsPromptsReasoningEffort$inboundSchema
1693
- .optional(),
1694
- budgetTokens: z.number().optional(),
1695
- verbosity: ListPromptVersionsVerbosity$inboundSchema.optional(),
1696
- thinkingLevel: ListPromptVersionsThinkingLevel$inboundSchema.optional(),
1697
- }).transform((v) => {
1698
- return remap$(v, {
1699
- "encoding_format": "encodingFormat",
1700
- });
1701
- });
1702
-
1703
- export function listPromptVersionsModelParametersFromJSON(
1704
- jsonString: string,
1705
- ): SafeParseResult<ListPromptVersionsModelParameters, SDKValidationError> {
1706
- return safeParse(
1707
- jsonString,
1708
- (x) => ListPromptVersionsModelParameters$inboundSchema.parse(JSON.parse(x)),
1709
- `Failed to parse 'ListPromptVersionsModelParameters' from JSON`,
1710
- );
1711
- }
1712
-
1713
- /** @internal */
1714
- export const ListPromptVersionsProvider$inboundSchema: z.ZodNativeEnum<
1715
- typeof ListPromptVersionsProvider
1716
- > = z.nativeEnum(ListPromptVersionsProvider);
1717
-
1718
- /** @internal */
1719
- export const ListPromptVersionsRole$inboundSchema: z.ZodNativeEnum<
1720
- typeof ListPromptVersionsRole
1721
- > = z.nativeEnum(ListPromptVersionsRole);
1722
-
1723
- /** @internal */
1724
- export const ListPromptVersions2File$inboundSchema: z.ZodType<
1725
- ListPromptVersions2File,
1726
- z.ZodTypeDef,
1727
- unknown
1728
- > = z.object({
1729
- file_data: z.string().optional(),
1730
- uri: z.string().optional(),
1731
- mimeType: z.string().optional(),
1732
- filename: z.string().optional(),
1733
- }).transform((v) => {
1734
- return remap$(v, {
1735
- "file_data": "fileData",
1736
- });
1737
- });
1738
-
1739
- export function listPromptVersions2FileFromJSON(
1740
- jsonString: string,
1741
- ): SafeParseResult<ListPromptVersions2File, SDKValidationError> {
1742
- return safeParse(
1743
- jsonString,
1744
- (x) => ListPromptVersions2File$inboundSchema.parse(JSON.parse(x)),
1745
- `Failed to parse 'ListPromptVersions2File' from JSON`,
1746
- );
1747
- }
1748
-
1749
- /** @internal */
1750
- export const ListPromptVersions23$inboundSchema: z.ZodType<
1751
- ListPromptVersions23,
1752
- z.ZodTypeDef,
1753
- unknown
1754
- > = z.object({
1755
- type: z.literal("file"),
1756
- file: z.lazy(() => ListPromptVersions2File$inboundSchema),
1757
- });
1758
-
1759
- export function listPromptVersions23FromJSON(
1760
- jsonString: string,
1761
- ): SafeParseResult<ListPromptVersions23, SDKValidationError> {
1762
- return safeParse(
1763
- jsonString,
1764
- (x) => ListPromptVersions23$inboundSchema.parse(JSON.parse(x)),
1765
- `Failed to parse 'ListPromptVersions23' from JSON`,
1766
- );
1767
- }
1768
-
1769
- /** @internal */
1770
- export const ListPromptVersions2ImageUrl$inboundSchema: z.ZodType<
1771
- ListPromptVersions2ImageUrl,
1772
- z.ZodTypeDef,
1773
- unknown
1774
- > = z.object({
1775
- id: z.string().optional(),
1776
- url: z.string(),
1777
- detail: z.string().optional(),
1778
- });
1779
-
1780
- export function listPromptVersions2ImageUrlFromJSON(
1781
- jsonString: string,
1782
- ): SafeParseResult<ListPromptVersions2ImageUrl, SDKValidationError> {
1783
- return safeParse(
1784
- jsonString,
1785
- (x) => ListPromptVersions2ImageUrl$inboundSchema.parse(JSON.parse(x)),
1786
- `Failed to parse 'ListPromptVersions2ImageUrl' from JSON`,
1787
- );
1788
- }
1789
-
1790
- /** @internal */
1791
- export const ListPromptVersions22$inboundSchema: z.ZodType<
1792
- ListPromptVersions22,
1793
- z.ZodTypeDef,
1794
- unknown
1795
- > = z.object({
1796
- type: z.literal("image_url"),
1797
- image_url: z.lazy(() => ListPromptVersions2ImageUrl$inboundSchema),
1798
- }).transform((v) => {
1799
- return remap$(v, {
1800
- "image_url": "imageUrl",
1801
- });
1802
- });
1803
-
1804
- export function listPromptVersions22FromJSON(
1805
- jsonString: string,
1806
- ): SafeParseResult<ListPromptVersions22, SDKValidationError> {
1807
- return safeParse(
1808
- jsonString,
1809
- (x) => ListPromptVersions22$inboundSchema.parse(JSON.parse(x)),
1810
- `Failed to parse 'ListPromptVersions22' from JSON`,
1811
- );
1812
- }
1813
-
1814
- /** @internal */
1815
- export const ListPromptVersions21$inboundSchema: z.ZodType<
1816
- ListPromptVersions21,
1817
- z.ZodTypeDef,
1818
- unknown
1819
- > = z.object({
1820
- type: z.literal("text"),
1821
- text: z.string(),
1822
- });
1823
-
1824
- export function listPromptVersions21FromJSON(
1825
- jsonString: string,
1826
- ): SafeParseResult<ListPromptVersions21, SDKValidationError> {
1827
- return safeParse(
1828
- jsonString,
1829
- (x) => ListPromptVersions21$inboundSchema.parse(JSON.parse(x)),
1830
- `Failed to parse 'ListPromptVersions21' from JSON`,
1831
- );
1832
- }
1833
-
1834
- /** @internal */
1835
- export const ListPromptVersionsContent2$inboundSchema: z.ZodType<
1836
- ListPromptVersionsContent2,
1837
- z.ZodTypeDef,
1838
- unknown
1839
- > = z.union([
1840
- z.lazy(() => ListPromptVersions21$inboundSchema),
1841
- z.lazy(() => ListPromptVersions22$inboundSchema),
1842
- z.lazy(() => ListPromptVersions23$inboundSchema),
1843
- ]);
1844
-
1845
- export function listPromptVersionsContent2FromJSON(
1846
- jsonString: string,
1847
- ): SafeParseResult<ListPromptVersionsContent2, SDKValidationError> {
1848
- return safeParse(
1849
- jsonString,
1850
- (x) => ListPromptVersionsContent2$inboundSchema.parse(JSON.parse(x)),
1851
- `Failed to parse 'ListPromptVersionsContent2' from JSON`,
1852
- );
1853
- }
1854
-
1855
- /** @internal */
1856
- export const ListPromptVersionsContent$inboundSchema: z.ZodType<
1857
- ListPromptVersionsContent,
1858
- z.ZodTypeDef,
1859
- unknown
1860
- > = z.union([
1861
- z.string(),
1862
- z.array(z.union([
1863
- z.lazy(() => ListPromptVersions21$inboundSchema),
1864
- z.lazy(() => ListPromptVersions22$inboundSchema),
1865
- z.lazy(() => ListPromptVersions23$inboundSchema),
1866
- ])),
1867
- ]);
1868
-
1869
- export function listPromptVersionsContentFromJSON(
1870
- jsonString: string,
1871
- ): SafeParseResult<ListPromptVersionsContent, SDKValidationError> {
1872
- return safeParse(
1873
- jsonString,
1874
- (x) => ListPromptVersionsContent$inboundSchema.parse(JSON.parse(x)),
1875
- `Failed to parse 'ListPromptVersionsContent' from JSON`,
1876
- );
1877
- }
1878
-
1879
- /** @internal */
1880
- export const ListPromptVersionsPromptsType$inboundSchema: z.ZodNativeEnum<
1881
- typeof ListPromptVersionsPromptsType
1882
- > = z.nativeEnum(ListPromptVersionsPromptsType);
1883
-
1884
- /** @internal */
1885
- export const ListPromptVersionsFunction$inboundSchema: z.ZodType<
1886
- ListPromptVersionsFunction,
1887
- z.ZodTypeDef,
1888
- unknown
1889
- > = z.object({
1890
- name: z.string(),
1891
- arguments: z.string(),
1892
- });
1893
-
1894
- export function listPromptVersionsFunctionFromJSON(
1895
- jsonString: string,
1896
- ): SafeParseResult<ListPromptVersionsFunction, SDKValidationError> {
1897
- return safeParse(
1898
- jsonString,
1899
- (x) => ListPromptVersionsFunction$inboundSchema.parse(JSON.parse(x)),
1900
- `Failed to parse 'ListPromptVersionsFunction' from JSON`,
1901
- );
1902
- }
1903
-
1904
- /** @internal */
1905
- export const ListPromptVersionsToolCalls$inboundSchema: z.ZodType<
1906
- ListPromptVersionsToolCalls,
1907
- z.ZodTypeDef,
1908
- unknown
1909
- > = z.object({
1910
- id: z.string().optional(),
1911
- index: z.number().optional(),
1912
- type: ListPromptVersionsPromptsType$inboundSchema,
1913
- function: z.lazy(() => ListPromptVersionsFunction$inboundSchema),
1914
- });
1915
-
1916
- export function listPromptVersionsToolCallsFromJSON(
1917
- jsonString: string,
1918
- ): SafeParseResult<ListPromptVersionsToolCalls, SDKValidationError> {
1919
- return safeParse(
1920
- jsonString,
1921
- (x) => ListPromptVersionsToolCalls$inboundSchema.parse(JSON.parse(x)),
1922
- `Failed to parse 'ListPromptVersionsToolCalls' from JSON`,
1923
- );
1924
- }
1925
-
1926
- /** @internal */
1927
- export const ListPromptVersionsMessages$inboundSchema: z.ZodType<
1928
- ListPromptVersionsMessages,
1929
- z.ZodTypeDef,
1930
- unknown
1931
- > = z.object({
1932
- role: ListPromptVersionsRole$inboundSchema,
1933
- content: z.nullable(
1934
- z.union([
1935
- z.string(),
1936
- z.array(
1937
- z.union([
1938
- z.lazy(() => ListPromptVersions21$inboundSchema),
1939
- z.lazy(() => ListPromptVersions22$inboundSchema),
1940
- z.lazy(() => ListPromptVersions23$inboundSchema),
1941
- ]),
1942
- ),
1943
- ]),
1944
- ),
1945
- tool_calls: z.array(z.lazy(() => ListPromptVersionsToolCalls$inboundSchema))
1946
- .optional(),
1947
- tool_call_id: z.nullable(z.string()).optional(),
1948
- }).transform((v) => {
1949
- return remap$(v, {
1950
- "tool_calls": "toolCalls",
1951
- "tool_call_id": "toolCallId",
1952
- });
1953
- });
1954
-
1955
- export function listPromptVersionsMessagesFromJSON(
1956
- jsonString: string,
1957
- ): SafeParseResult<ListPromptVersionsMessages, SDKValidationError> {
1958
- return safeParse(
1959
- jsonString,
1960
- (x) => ListPromptVersionsMessages$inboundSchema.parse(JSON.parse(x)),
1961
- `Failed to parse 'ListPromptVersionsMessages' from JSON`,
1962
- );
1963
- }
1964
-
1965
- /** @internal */
1966
- export const ListPromptVersionsPromptConfig$inboundSchema: z.ZodType<
1967
- ListPromptVersionsPromptConfig,
1968
- z.ZodTypeDef,
1969
- unknown
1970
- > = z.object({
1971
- stream: z.boolean().optional(),
1972
- model: z.nullable(z.string()).optional(),
1973
- model_db_id: z.nullable(z.string()).optional(),
1974
- model_type: z.nullable(ListPromptVersionsModelType$inboundSchema).optional(),
1975
- model_parameters: z.lazy(() =>
1976
- ListPromptVersionsModelParameters$inboundSchema
1977
- ).optional(),
1978
- provider: z.nullable(ListPromptVersionsProvider$inboundSchema).optional(),
1979
- integration_id: z.nullable(z.string()).optional(),
1980
- version: z.string().optional(),
1981
- messages: z.array(z.lazy(() => ListPromptVersionsMessages$inboundSchema)),
1982
- }).transform((v) => {
1983
- return remap$(v, {
1984
- "model_db_id": "modelDbId",
1985
- "model_type": "modelType",
1986
- "model_parameters": "modelParameters",
1987
- "integration_id": "integrationId",
1988
- });
1989
- });
1990
-
1991
- export function listPromptVersionsPromptConfigFromJSON(
1992
- jsonString: string,
1993
- ): SafeParseResult<ListPromptVersionsPromptConfig, SDKValidationError> {
1994
- return safeParse(
1995
- jsonString,
1996
- (x) => ListPromptVersionsPromptConfig$inboundSchema.parse(JSON.parse(x)),
1997
- `Failed to parse 'ListPromptVersionsPromptConfig' from JSON`,
1998
- );
1999
- }
2000
-
2001
- /** @internal */
2002
- export const ListPromptVersionsVoice$inboundSchema: z.ZodNativeEnum<
2003
- typeof ListPromptVersionsVoice
2004
- > = z.nativeEnum(ListPromptVersionsVoice);
2005
-
2006
- /** @internal */
2007
- export const ListPromptVersionsPromptsFormat$inboundSchema: z.ZodNativeEnum<
2008
- typeof ListPromptVersionsPromptsFormat
2009
- > = z.nativeEnum(ListPromptVersionsPromptsFormat);
2010
-
2011
- /** @internal */
2012
- export const ListPromptVersionsAudio$inboundSchema: z.ZodType<
2013
- ListPromptVersionsAudio,
2014
- z.ZodTypeDef,
2015
- unknown
2016
- > = z.object({
2017
- voice: ListPromptVersionsVoice$inboundSchema,
2018
- format: ListPromptVersionsPromptsFormat$inboundSchema,
2019
- });
2020
-
2021
- export function listPromptVersionsAudioFromJSON(
2022
- jsonString: string,
2023
- ): SafeParseResult<ListPromptVersionsAudio, SDKValidationError> {
2024
- return safeParse(
2025
- jsonString,
2026
- (x) => ListPromptVersionsAudio$inboundSchema.parse(JSON.parse(x)),
2027
- `Failed to parse 'ListPromptVersionsAudio' from JSON`,
2028
- );
2029
- }
2030
-
2031
- /** @internal */
2032
- export const ListPromptVersionsResponseFormatJsonSchema$inboundSchema:
2033
- z.ZodType<ListPromptVersionsResponseFormatJsonSchema, z.ZodTypeDef, unknown> =
2034
- z.object({
2035
- description: z.string().optional(),
2036
- name: z.string(),
2037
- schema: z.any().optional(),
2038
- strict: z.boolean().default(false),
2039
- });
2040
-
2041
- export function listPromptVersionsResponseFormatJsonSchemaFromJSON(
2042
- jsonString: string,
2043
- ): SafeParseResult<
2044
- ListPromptVersionsResponseFormatJsonSchema,
2045
- SDKValidationError
2046
- > {
2047
- return safeParse(
2048
- jsonString,
2049
- (x) =>
2050
- ListPromptVersionsResponseFormatJsonSchema$inboundSchema.parse(
2051
- JSON.parse(x),
2052
- ),
2053
- `Failed to parse 'ListPromptVersionsResponseFormatJsonSchema' from JSON`,
2054
- );
2055
- }
2056
-
2057
- /** @internal */
2058
- export const ListPromptVersionsResponseFormatPromptsJSONSchema$inboundSchema:
2059
- z.ZodType<
2060
- ListPromptVersionsResponseFormatPromptsJSONSchema,
2061
- z.ZodTypeDef,
2062
- unknown
2063
- > = z.object({
2064
- type: z.literal("json_schema"),
2065
- json_schema: z.lazy(() =>
2066
- ListPromptVersionsResponseFormatJsonSchema$inboundSchema
2067
- ),
2068
- }).transform((v) => {
2069
- return remap$(v, {
2070
- "json_schema": "jsonSchema",
2071
- });
2072
- });
2073
-
2074
- export function listPromptVersionsResponseFormatPromptsJSONSchemaFromJSON(
2075
- jsonString: string,
2076
- ): SafeParseResult<
2077
- ListPromptVersionsResponseFormatPromptsJSONSchema,
2078
- SDKValidationError
2079
- > {
2080
- return safeParse(
2081
- jsonString,
2082
- (x) =>
2083
- ListPromptVersionsResponseFormatPromptsJSONSchema$inboundSchema.parse(
2084
- JSON.parse(x),
2085
- ),
2086
- `Failed to parse 'ListPromptVersionsResponseFormatPromptsJSONSchema' from JSON`,
2087
- );
2088
- }
2089
-
2090
- /** @internal */
2091
- export const ListPromptVersionsResponseFormatJSONObject$inboundSchema:
2092
- z.ZodType<ListPromptVersionsResponseFormatJSONObject, z.ZodTypeDef, unknown> =
2093
- z.object({
2094
- type: z.literal("json_object"),
2095
- });
2096
-
2097
- export function listPromptVersionsResponseFormatJSONObjectFromJSON(
2098
- jsonString: string,
2099
- ): SafeParseResult<
2100
- ListPromptVersionsResponseFormatJSONObject,
2101
- SDKValidationError
2102
- > {
2103
- return safeParse(
2104
- jsonString,
2105
- (x) =>
2106
- ListPromptVersionsResponseFormatJSONObject$inboundSchema.parse(
2107
- JSON.parse(x),
2108
- ),
2109
- `Failed to parse 'ListPromptVersionsResponseFormatJSONObject' from JSON`,
2110
- );
2111
- }
2112
-
2113
- /** @internal */
2114
- export const ListPromptVersionsResponseFormatText$inboundSchema: z.ZodType<
2115
- ListPromptVersionsResponseFormatText,
2116
- z.ZodTypeDef,
2117
- unknown
2118
- > = z.object({
2119
- type: z.literal("text"),
2120
- });
2121
-
2122
- export function listPromptVersionsResponseFormatTextFromJSON(
2123
- jsonString: string,
2124
- ): SafeParseResult<ListPromptVersionsResponseFormatText, SDKValidationError> {
2125
- return safeParse(
2126
- jsonString,
2127
- (x) =>
2128
- ListPromptVersionsResponseFormatText$inboundSchema.parse(JSON.parse(x)),
2129
- `Failed to parse 'ListPromptVersionsResponseFormatText' from JSON`,
2130
- );
2131
- }
2132
-
2133
- /** @internal */
2134
- export const ListPromptVersionsResponseFormat$inboundSchema: z.ZodType<
2135
- ListPromptVersionsResponseFormat,
2136
- z.ZodTypeDef,
2137
- unknown
2138
- > = z.union([
2139
- z.lazy(() => ListPromptVersionsResponseFormatText$inboundSchema),
2140
- z.lazy(() => ListPromptVersionsResponseFormatJSONObject$inboundSchema),
2141
- z.lazy(() => ListPromptVersionsResponseFormatPromptsJSONSchema$inboundSchema),
2142
- ]);
2143
-
2144
- export function listPromptVersionsResponseFormatFromJSON(
2145
- jsonString: string,
2146
- ): SafeParseResult<ListPromptVersionsResponseFormat, SDKValidationError> {
2147
- return safeParse(
2148
- jsonString,
2149
- (x) => ListPromptVersionsResponseFormat$inboundSchema.parse(JSON.parse(x)),
2150
- `Failed to parse 'ListPromptVersionsResponseFormat' from JSON`,
2151
- );
2152
- }
2153
-
2154
- /** @internal */
2155
- export const ListPromptVersionsReasoningEffort$inboundSchema: z.ZodNativeEnum<
2156
- typeof ListPromptVersionsReasoningEffort
2157
- > = z.nativeEnum(ListPromptVersionsReasoningEffort);
2158
-
2159
- /** @internal */
2160
- export const ListPromptVersionsStop$inboundSchema: z.ZodType<
2161
- ListPromptVersionsStop,
2162
- z.ZodTypeDef,
2163
- unknown
2164
- > = z.union([z.string(), z.array(z.string())]);
2165
-
2166
- export function listPromptVersionsStopFromJSON(
2167
- jsonString: string,
2168
- ): SafeParseResult<ListPromptVersionsStop, SDKValidationError> {
2169
- return safeParse(
2170
- jsonString,
2171
- (x) => ListPromptVersionsStop$inboundSchema.parse(JSON.parse(x)),
2172
- `Failed to parse 'ListPromptVersionsStop' from JSON`,
2173
- );
2174
- }
2175
-
2176
- /** @internal */
2177
- export const ListPromptVersionsStreamOptions$inboundSchema: z.ZodType<
2178
- ListPromptVersionsStreamOptions,
2179
- z.ZodTypeDef,
2180
- unknown
2181
- > = z.object({
2182
- include_usage: z.boolean().optional(),
2183
- }).transform((v) => {
2184
- return remap$(v, {
2185
- "include_usage": "includeUsage",
2186
- });
2187
- });
2188
-
2189
- export function listPromptVersionsStreamOptionsFromJSON(
2190
- jsonString: string,
2191
- ): SafeParseResult<ListPromptVersionsStreamOptions, SDKValidationError> {
2192
- return safeParse(
2193
- jsonString,
2194
- (x) => ListPromptVersionsStreamOptions$inboundSchema.parse(JSON.parse(x)),
2195
- `Failed to parse 'ListPromptVersionsStreamOptions' from JSON`,
2196
- );
2197
- }
2198
-
2199
- /** @internal */
2200
- export const ListPromptVersionsThinking$inboundSchema: z.ZodType<
2201
- ListPromptVersionsThinking,
2202
- z.ZodTypeDef,
2203
- unknown
2204
- > = z.union([
2205
- components.ThinkingConfigDisabledSchema$inboundSchema,
2206
- components.ThinkingConfigEnabledSchema$inboundSchema,
2207
- ]);
2208
-
2209
- export function listPromptVersionsThinkingFromJSON(
2210
- jsonString: string,
2211
- ): SafeParseResult<ListPromptVersionsThinking, SDKValidationError> {
2212
- return safeParse(
2213
- jsonString,
2214
- (x) => ListPromptVersionsThinking$inboundSchema.parse(JSON.parse(x)),
2215
- `Failed to parse 'ListPromptVersionsThinking' from JSON`,
2216
- );
2217
- }
2218
-
2219
- /** @internal */
2220
- export const ListPromptVersionsToolChoiceType$inboundSchema: z.ZodNativeEnum<
2221
- typeof ListPromptVersionsToolChoiceType
2222
- > = z.nativeEnum(ListPromptVersionsToolChoiceType);
2223
-
2224
- /** @internal */
2225
- export const ListPromptVersionsToolChoiceFunction$inboundSchema: z.ZodType<
2226
- ListPromptVersionsToolChoiceFunction,
2227
- z.ZodTypeDef,
2228
- unknown
2229
- > = z.object({
2230
- name: z.string(),
2231
- });
2232
-
2233
- export function listPromptVersionsToolChoiceFunctionFromJSON(
2234
- jsonString: string,
2235
- ): SafeParseResult<ListPromptVersionsToolChoiceFunction, SDKValidationError> {
2236
- return safeParse(
2237
- jsonString,
2238
- (x) =>
2239
- ListPromptVersionsToolChoiceFunction$inboundSchema.parse(JSON.parse(x)),
2240
- `Failed to parse 'ListPromptVersionsToolChoiceFunction' from JSON`,
2241
- );
2242
- }
2243
-
2244
- /** @internal */
2245
- export const ListPromptVersionsToolChoice2$inboundSchema: z.ZodType<
2246
- ListPromptVersionsToolChoice2,
2247
- z.ZodTypeDef,
2248
- unknown
2249
- > = z.object({
2250
- type: ListPromptVersionsToolChoiceType$inboundSchema.optional(),
2251
- function: z.lazy(() => ListPromptVersionsToolChoiceFunction$inboundSchema),
2252
- });
2253
-
2254
- export function listPromptVersionsToolChoice2FromJSON(
2255
- jsonString: string,
2256
- ): SafeParseResult<ListPromptVersionsToolChoice2, SDKValidationError> {
2257
- return safeParse(
2258
- jsonString,
2259
- (x) => ListPromptVersionsToolChoice2$inboundSchema.parse(JSON.parse(x)),
2260
- `Failed to parse 'ListPromptVersionsToolChoice2' from JSON`,
2261
- );
2262
- }
2263
-
2264
- /** @internal */
2265
- export const ListPromptVersionsToolChoice1$inboundSchema: z.ZodNativeEnum<
2266
- typeof ListPromptVersionsToolChoice1
2267
- > = z.nativeEnum(ListPromptVersionsToolChoice1);
2268
-
2269
- /** @internal */
2270
- export const ListPromptVersionsToolChoice$inboundSchema: z.ZodType<
2271
- ListPromptVersionsToolChoice,
2272
- z.ZodTypeDef,
2273
- unknown
2274
- > = z.union([
2275
- z.lazy(() => ListPromptVersionsToolChoice2$inboundSchema),
2276
- ListPromptVersionsToolChoice1$inboundSchema,
2277
- ]);
2278
-
2279
- export function listPromptVersionsToolChoiceFromJSON(
2280
- jsonString: string,
2281
- ): SafeParseResult<ListPromptVersionsToolChoice, SDKValidationError> {
2282
- return safeParse(
2283
- jsonString,
2284
- (x) => ListPromptVersionsToolChoice$inboundSchema.parse(JSON.parse(x)),
2285
- `Failed to parse 'ListPromptVersionsToolChoice' from JSON`,
2286
- );
2287
- }
2288
-
2289
- /** @internal */
2290
- export const ListPromptVersionsModalities$inboundSchema: z.ZodNativeEnum<
2291
- typeof ListPromptVersionsModalities
2292
- > = z.nativeEnum(ListPromptVersionsModalities);
2293
-
2294
- /** @internal */
2295
- export const ListPromptVersionsId1$inboundSchema: z.ZodNativeEnum<
2296
- typeof ListPromptVersionsId1
2297
- > = z.nativeEnum(ListPromptVersionsId1);
2298
-
2299
- /** @internal */
2300
- export const ListPromptVersionsId$inboundSchema: z.ZodType<
2301
- ListPromptVersionsId,
2302
- z.ZodTypeDef,
2303
- unknown
2304
- > = z.union([ListPromptVersionsId1$inboundSchema, z.string()]);
2305
-
2306
- export function listPromptVersionsIdFromJSON(
2307
- jsonString: string,
2308
- ): SafeParseResult<ListPromptVersionsId, SDKValidationError> {
2309
- return safeParse(
2310
- jsonString,
2311
- (x) => ListPromptVersionsId$inboundSchema.parse(JSON.parse(x)),
2312
- `Failed to parse 'ListPromptVersionsId' from JSON`,
2313
- );
2314
- }
2315
-
2316
- /** @internal */
2317
- export const ListPromptVersionsExecuteOn$inboundSchema: z.ZodNativeEnum<
2318
- typeof ListPromptVersionsExecuteOn
2319
- > = z.nativeEnum(ListPromptVersionsExecuteOn);
2320
-
2321
- /** @internal */
2322
- export const ListPromptVersionsGuardrails$inboundSchema: z.ZodType<
2323
- ListPromptVersionsGuardrails,
2324
- z.ZodTypeDef,
2325
- unknown
2326
- > = z.object({
2327
- id: z.union([ListPromptVersionsId1$inboundSchema, z.string()]),
2328
- execute_on: ListPromptVersionsExecuteOn$inboundSchema,
2329
- }).transform((v) => {
2330
- return remap$(v, {
2331
- "execute_on": "executeOn",
2332
- });
2333
- });
2334
-
2335
- export function listPromptVersionsGuardrailsFromJSON(
2336
- jsonString: string,
2337
- ): SafeParseResult<ListPromptVersionsGuardrails, SDKValidationError> {
2338
- return safeParse(
2339
- jsonString,
2340
- (x) => ListPromptVersionsGuardrails$inboundSchema.parse(JSON.parse(x)),
2341
- `Failed to parse 'ListPromptVersionsGuardrails' from JSON`,
2342
- );
2343
- }
2344
-
2345
- /** @internal */
2346
- export const ListPromptVersionsFallbacks$inboundSchema: z.ZodType<
2347
- ListPromptVersionsFallbacks,
2348
- z.ZodTypeDef,
2349
- unknown
2350
- > = z.object({
2351
- model: z.string(),
2352
- });
2353
-
2354
- export function listPromptVersionsFallbacksFromJSON(
2355
- jsonString: string,
2356
- ): SafeParseResult<ListPromptVersionsFallbacks, SDKValidationError> {
2357
- return safeParse(
2358
- jsonString,
2359
- (x) => ListPromptVersionsFallbacks$inboundSchema.parse(JSON.parse(x)),
2360
- `Failed to parse 'ListPromptVersionsFallbacks' from JSON`,
2361
- );
2362
- }
2363
-
2364
- /** @internal */
2365
- export const ListPromptVersionsRetry$inboundSchema: z.ZodType<
2366
- ListPromptVersionsRetry,
2367
- z.ZodTypeDef,
2368
- unknown
2369
- > = z.object({
2370
- count: z.number().default(3),
2371
- on_codes: z.array(z.number()).optional(),
2372
- }).transform((v) => {
2373
- return remap$(v, {
2374
- "on_codes": "onCodes",
2375
- });
2376
- });
2377
-
2378
- export function listPromptVersionsRetryFromJSON(
2379
- jsonString: string,
2380
- ): SafeParseResult<ListPromptVersionsRetry, SDKValidationError> {
2381
- return safeParse(
2382
- jsonString,
2383
- (x) => ListPromptVersionsRetry$inboundSchema.parse(JSON.parse(x)),
2384
- `Failed to parse 'ListPromptVersionsRetry' from JSON`,
2385
- );
2386
- }
2387
-
2388
- /** @internal */
2389
- export const ListPromptVersionsType$inboundSchema: z.ZodNativeEnum<
2390
- typeof ListPromptVersionsType
2391
- > = z.nativeEnum(ListPromptVersionsType);
2392
-
2393
- /** @internal */
2394
- export const ListPromptVersionsCache$inboundSchema: z.ZodType<
2395
- ListPromptVersionsCache,
2396
- z.ZodTypeDef,
2397
- unknown
2398
- > = z.object({
2399
- ttl: z.number().default(1800),
2400
- type: ListPromptVersionsType$inboundSchema,
2401
- });
2402
-
2403
- export function listPromptVersionsCacheFromJSON(
2404
- jsonString: string,
2405
- ): SafeParseResult<ListPromptVersionsCache, SDKValidationError> {
2406
- return safeParse(
2407
- jsonString,
2408
- (x) => ListPromptVersionsCache$inboundSchema.parse(JSON.parse(x)),
2409
- `Failed to parse 'ListPromptVersionsCache' from JSON`,
2410
- );
2411
- }
2412
-
2413
- /** @internal */
2414
- export const ListPromptVersionsLoadBalancerType$inboundSchema: z.ZodNativeEnum<
2415
- typeof ListPromptVersionsLoadBalancerType
2416
- > = z.nativeEnum(ListPromptVersionsLoadBalancerType);
2417
-
2418
- /** @internal */
2419
- export const ListPromptVersionsLoadBalancerModels$inboundSchema: z.ZodType<
2420
- ListPromptVersionsLoadBalancerModels,
2421
- z.ZodTypeDef,
2422
- unknown
2423
- > = z.object({
2424
- model: z.string(),
2425
- weight: z.number().default(0.5),
2426
- });
2427
-
2428
- export function listPromptVersionsLoadBalancerModelsFromJSON(
2429
- jsonString: string,
2430
- ): SafeParseResult<ListPromptVersionsLoadBalancerModels, SDKValidationError> {
2431
- return safeParse(
2432
- jsonString,
2433
- (x) =>
2434
- ListPromptVersionsLoadBalancerModels$inboundSchema.parse(JSON.parse(x)),
2435
- `Failed to parse 'ListPromptVersionsLoadBalancerModels' from JSON`,
2436
- );
2437
- }
2438
-
2439
- /** @internal */
2440
- export const ListPromptVersionsLoadBalancer1$inboundSchema: z.ZodType<
2441
- ListPromptVersionsLoadBalancer1,
2442
- z.ZodTypeDef,
2443
- unknown
2444
- > = z.object({
2445
- type: ListPromptVersionsLoadBalancerType$inboundSchema,
2446
- models: z.array(
2447
- z.lazy(() => ListPromptVersionsLoadBalancerModels$inboundSchema),
2448
- ),
2449
- });
2450
-
2451
- export function listPromptVersionsLoadBalancer1FromJSON(
2452
- jsonString: string,
2453
- ): SafeParseResult<ListPromptVersionsLoadBalancer1, SDKValidationError> {
2454
- return safeParse(
2455
- jsonString,
2456
- (x) => ListPromptVersionsLoadBalancer1$inboundSchema.parse(JSON.parse(x)),
2457
- `Failed to parse 'ListPromptVersionsLoadBalancer1' from JSON`,
2458
- );
2459
- }
2460
-
2461
- /** @internal */
2462
- export const ListPromptVersionsLoadBalancer$inboundSchema: z.ZodType<
2463
- ListPromptVersionsLoadBalancer,
2464
- z.ZodTypeDef,
2465
- unknown
2466
- > = z.lazy(() => ListPromptVersionsLoadBalancer1$inboundSchema);
2467
-
2468
- export function listPromptVersionsLoadBalancerFromJSON(
2469
- jsonString: string,
2470
- ): SafeParseResult<ListPromptVersionsLoadBalancer, SDKValidationError> {
2471
- return safeParse(
2472
- jsonString,
2473
- (x) => ListPromptVersionsLoadBalancer$inboundSchema.parse(JSON.parse(x)),
2474
- `Failed to parse 'ListPromptVersionsLoadBalancer' from JSON`,
2475
- );
2476
- }
2477
-
2478
- /** @internal */
2479
- export const ListPromptVersionsTimeout$inboundSchema: z.ZodType<
2480
- ListPromptVersionsTimeout,
2481
- z.ZodTypeDef,
2482
- unknown
2483
- > = z.object({
2484
- call_timeout: z.number(),
2485
- }).transform((v) => {
2486
- return remap$(v, {
2487
- "call_timeout": "callTimeout",
2488
- });
2489
- });
2490
-
2491
- export function listPromptVersionsTimeoutFromJSON(
2492
- jsonString: string,
2493
- ): SafeParseResult<ListPromptVersionsTimeout, SDKValidationError> {
2494
- return safeParse(
2495
- jsonString,
2496
- (x) => ListPromptVersionsTimeout$inboundSchema.parse(JSON.parse(x)),
2497
- `Failed to parse 'ListPromptVersionsTimeout' from JSON`,
2498
- );
2499
- }
2500
-
2501
- /** @internal */
2502
- export const ListPromptVersionsContentPromptsResponse2002$inboundSchema:
2503
- z.ZodType<
2504
- ListPromptVersionsContentPromptsResponse2002,
2505
- z.ZodTypeDef,
2506
- unknown
2507
- > = components.TextContentPartSchema$inboundSchema;
2508
-
2509
- export function listPromptVersionsContentPromptsResponse2002FromJSON(
2510
- jsonString: string,
2511
- ): SafeParseResult<
2512
- ListPromptVersionsContentPromptsResponse2002,
2513
- SDKValidationError
2514
- > {
2515
- return safeParse(
2516
- jsonString,
2517
- (x) =>
2518
- ListPromptVersionsContentPromptsResponse2002$inboundSchema.parse(
2519
- JSON.parse(x),
2520
- ),
2521
- `Failed to parse 'ListPromptVersionsContentPromptsResponse2002' from JSON`,
2522
- );
2523
- }
2524
-
2525
- /** @internal */
2526
- export const ListPromptVersionsMessagesPromptsResponse200Content$inboundSchema:
2527
- z.ZodType<
2528
- ListPromptVersionsMessagesPromptsResponse200Content,
2529
- z.ZodTypeDef,
2530
- unknown
2531
- > = z.union([
2532
- z.string(),
2533
- z.array(components.TextContentPartSchema$inboundSchema),
2534
- ]);
2535
-
2536
- export function listPromptVersionsMessagesPromptsResponse200ContentFromJSON(
2537
- jsonString: string,
2538
- ): SafeParseResult<
2539
- ListPromptVersionsMessagesPromptsResponse200Content,
2540
- SDKValidationError
2541
- > {
2542
- return safeParse(
2543
- jsonString,
2544
- (x) =>
2545
- ListPromptVersionsMessagesPromptsResponse200Content$inboundSchema.parse(
2546
- JSON.parse(x),
2547
- ),
2548
- `Failed to parse 'ListPromptVersionsMessagesPromptsResponse200Content' from JSON`,
2549
- );
2550
- }
2551
-
2552
- /** @internal */
2553
- export const ListPromptVersionsMessagesPromptsType$inboundSchema:
2554
- z.ZodNativeEnum<typeof ListPromptVersionsMessagesPromptsType> = z.nativeEnum(
2555
- ListPromptVersionsMessagesPromptsType,
2556
- );
2557
-
2558
- /** @internal */
2559
- export const ListPromptVersionsMessagesTtl$inboundSchema: z.ZodNativeEnum<
2560
- typeof ListPromptVersionsMessagesTtl
2561
- > = z.nativeEnum(ListPromptVersionsMessagesTtl);
2562
-
2563
- /** @internal */
2564
- export const ListPromptVersionsMessagesCacheControl$inboundSchema: z.ZodType<
2565
- ListPromptVersionsMessagesCacheControl,
2566
- z.ZodTypeDef,
2567
- unknown
2568
- > = z.object({
2569
- type: ListPromptVersionsMessagesPromptsType$inboundSchema,
2570
- ttl: ListPromptVersionsMessagesTtl$inboundSchema.default("5m"),
2571
- });
2572
-
2573
- export function listPromptVersionsMessagesCacheControlFromJSON(
2574
- jsonString: string,
2575
- ): SafeParseResult<ListPromptVersionsMessagesCacheControl, SDKValidationError> {
2576
- return safeParse(
2577
- jsonString,
2578
- (x) =>
2579
- ListPromptVersionsMessagesCacheControl$inboundSchema.parse(JSON.parse(x)),
2580
- `Failed to parse 'ListPromptVersionsMessagesCacheControl' from JSON`,
2581
- );
2582
- }
2583
-
2584
- /** @internal */
2585
- export const ListPromptVersionsMessagesToolMessage$inboundSchema: z.ZodType<
2586
- ListPromptVersionsMessagesToolMessage,
2587
- z.ZodTypeDef,
2588
- unknown
2589
- > = z.object({
2590
- role: z.literal("tool"),
2591
- content: z.union([
2592
- z.string(),
2593
- z.array(components.TextContentPartSchema$inboundSchema),
2594
- ]),
2595
- tool_call_id: z.nullable(z.string()),
2596
- cache_control: z.lazy(() =>
2597
- ListPromptVersionsMessagesCacheControl$inboundSchema
2598
- ).optional(),
2599
- }).transform((v) => {
2600
- return remap$(v, {
2601
- "tool_call_id": "toolCallId",
2602
- "cache_control": "cacheControl",
2603
- });
2604
- });
2605
-
2606
- export function listPromptVersionsMessagesToolMessageFromJSON(
2607
- jsonString: string,
2608
- ): SafeParseResult<ListPromptVersionsMessagesToolMessage, SDKValidationError> {
2609
- return safeParse(
2610
- jsonString,
2611
- (x) =>
2612
- ListPromptVersionsMessagesToolMessage$inboundSchema.parse(JSON.parse(x)),
2613
- `Failed to parse 'ListPromptVersionsMessagesToolMessage' from JSON`,
2614
- );
2615
- }
2616
-
2617
- /** @internal */
2618
- export const ListPromptVersionsContentPromptsResponse2$inboundSchema: z.ZodType<
2619
- ListPromptVersionsContentPromptsResponse2,
2620
- z.ZodTypeDef,
2621
- unknown
2622
- > = z.union([
2623
- components.TextContentPartSchema$inboundSchema.and(
2624
- z.object({ type: z.literal("text") }),
2625
- ),
2626
- components.RefusalPartSchema$inboundSchema,
2627
- components.ReasoningPartSchema$inboundSchema,
2628
- components.RedactedReasoningPartSchema$inboundSchema,
2629
- ]);
2630
-
2631
- export function listPromptVersionsContentPromptsResponse2FromJSON(
2632
- jsonString: string,
2633
- ): SafeParseResult<
2634
- ListPromptVersionsContentPromptsResponse2,
2635
- SDKValidationError
2636
- > {
2637
- return safeParse(
2638
- jsonString,
2639
- (x) =>
2640
- ListPromptVersionsContentPromptsResponse2$inboundSchema.parse(
2641
- JSON.parse(x),
2642
- ),
2643
- `Failed to parse 'ListPromptVersionsContentPromptsResponse2' from JSON`,
2644
- );
2645
- }
2646
-
2647
- /** @internal */
2648
- export const ListPromptVersionsMessagesPromptsResponseContent$inboundSchema:
2649
- z.ZodType<
2650
- ListPromptVersionsMessagesPromptsResponseContent,
2651
- z.ZodTypeDef,
2652
- unknown
2653
- > = z.union([
2654
- z.string(),
2655
- z.array(
2656
- z.union([
2657
- components.TextContentPartSchema$inboundSchema.and(
2658
- z.object({ type: z.literal("text") }),
2659
- ),
2660
- components.RefusalPartSchema$inboundSchema,
2661
- components.ReasoningPartSchema$inboundSchema,
2662
- components.RedactedReasoningPartSchema$inboundSchema,
2663
- ]),
2664
- ),
2665
- ]);
2666
-
2667
- export function listPromptVersionsMessagesPromptsResponseContentFromJSON(
2668
- jsonString: string,
2669
- ): SafeParseResult<
2670
- ListPromptVersionsMessagesPromptsResponseContent,
2671
- SDKValidationError
2672
- > {
2673
- return safeParse(
2674
- jsonString,
2675
- (x) =>
2676
- ListPromptVersionsMessagesPromptsResponseContent$inboundSchema.parse(
2677
- JSON.parse(x),
2678
- ),
2679
- `Failed to parse 'ListPromptVersionsMessagesPromptsResponseContent' from JSON`,
2680
- );
2681
- }
2682
-
2683
- /** @internal */
2684
- export const ListPromptVersionsMessagesAudio$inboundSchema: z.ZodType<
2685
- ListPromptVersionsMessagesAudio,
2686
- z.ZodTypeDef,
2687
- unknown
2688
- > = z.object({
2689
- id: z.string(),
2690
- });
2691
-
2692
- export function listPromptVersionsMessagesAudioFromJSON(
2693
- jsonString: string,
2694
- ): SafeParseResult<ListPromptVersionsMessagesAudio, SDKValidationError> {
2695
- return safeParse(
2696
- jsonString,
2697
- (x) => ListPromptVersionsMessagesAudio$inboundSchema.parse(JSON.parse(x)),
2698
- `Failed to parse 'ListPromptVersionsMessagesAudio' from JSON`,
2699
- );
2700
- }
2701
-
2702
- /** @internal */
2703
- export const ListPromptVersionsMessagesType$inboundSchema: z.ZodNativeEnum<
2704
- typeof ListPromptVersionsMessagesType
2705
- > = z.nativeEnum(ListPromptVersionsMessagesType);
2706
-
2707
- /** @internal */
2708
- export const ListPromptVersionsMessagesFunction$inboundSchema: z.ZodType<
2709
- ListPromptVersionsMessagesFunction,
2710
- z.ZodTypeDef,
2711
- unknown
2712
- > = z.object({
2713
- name: z.string().optional(),
2714
- arguments: z.string().optional(),
2715
- });
2716
-
2717
- export function listPromptVersionsMessagesFunctionFromJSON(
2718
- jsonString: string,
2719
- ): SafeParseResult<ListPromptVersionsMessagesFunction, SDKValidationError> {
2720
- return safeParse(
2721
- jsonString,
2722
- (x) =>
2723
- ListPromptVersionsMessagesFunction$inboundSchema.parse(JSON.parse(x)),
2724
- `Failed to parse 'ListPromptVersionsMessagesFunction' from JSON`,
2725
- );
2726
- }
2727
-
2728
- /** @internal */
2729
- export const ListPromptVersionsMessagesToolCalls$inboundSchema: z.ZodType<
2730
- ListPromptVersionsMessagesToolCalls,
2731
- z.ZodTypeDef,
2732
- unknown
2733
- > = z.object({
2734
- id: z.string(),
2735
- type: ListPromptVersionsMessagesType$inboundSchema,
2736
- function: z.lazy(() => ListPromptVersionsMessagesFunction$inboundSchema),
2737
- thought_signature: z.string().optional(),
2738
- }).transform((v) => {
2739
- return remap$(v, {
2740
- "thought_signature": "thoughtSignature",
2741
- });
2742
- });
2743
-
2744
- export function listPromptVersionsMessagesToolCallsFromJSON(
2745
- jsonString: string,
2746
- ): SafeParseResult<ListPromptVersionsMessagesToolCalls, SDKValidationError> {
2747
- return safeParse(
2748
- jsonString,
2749
- (x) =>
2750
- ListPromptVersionsMessagesToolCalls$inboundSchema.parse(JSON.parse(x)),
2751
- `Failed to parse 'ListPromptVersionsMessagesToolCalls' from JSON`,
2752
- );
2753
- }
2754
-
2755
- /** @internal */
2756
- export const ListPromptVersionsMessagesAssistantMessage$inboundSchema:
2757
- z.ZodType<ListPromptVersionsMessagesAssistantMessage, z.ZodTypeDef, unknown> =
2758
- z.object({
2759
- content: z.nullable(
2760
- z.union([
2761
- z.string(),
2762
- z.array(
2763
- z.union([
2764
- components.TextContentPartSchema$inboundSchema.and(
2765
- z.object({ type: z.literal("text") }),
2766
- ),
2767
- components.RefusalPartSchema$inboundSchema,
2768
- components.ReasoningPartSchema$inboundSchema,
2769
- components.RedactedReasoningPartSchema$inboundSchema,
2770
- ]),
2771
- ),
2772
- ]),
2773
- ).optional(),
2774
- refusal: z.nullable(z.string()).optional(),
2775
- role: z.literal("assistant"),
2776
- name: z.string().optional(),
2777
- audio: z.nullable(
2778
- z.lazy(() => ListPromptVersionsMessagesAudio$inboundSchema),
2779
- ).optional(),
2780
- tool_calls: z.array(
2781
- z.lazy(() => ListPromptVersionsMessagesToolCalls$inboundSchema),
2782
- ).optional(),
2783
- }).transform((v) => {
2784
- return remap$(v, {
2785
- "tool_calls": "toolCalls",
2786
- });
2787
- });
2788
-
2789
- export function listPromptVersionsMessagesAssistantMessageFromJSON(
2790
- jsonString: string,
2791
- ): SafeParseResult<
2792
- ListPromptVersionsMessagesAssistantMessage,
2793
- SDKValidationError
2794
- > {
2795
- return safeParse(
2796
- jsonString,
2797
- (x) =>
2798
- ListPromptVersionsMessagesAssistantMessage$inboundSchema.parse(
2799
- JSON.parse(x),
2800
- ),
2801
- `Failed to parse 'ListPromptVersionsMessagesAssistantMessage' from JSON`,
2802
- );
2803
- }
2804
-
2805
- /** @internal */
2806
- export const ListPromptVersions2PromptsResponse200ApplicationJSONType$inboundSchema:
2807
- z.ZodNativeEnum<
2808
- typeof ListPromptVersions2PromptsResponse200ApplicationJSONType
2809
- > = z.nativeEnum(ListPromptVersions2PromptsResponse200ApplicationJSONType);
2810
-
2811
- /** @internal */
2812
- export const ListPromptVersions2Ttl$inboundSchema: z.ZodNativeEnum<
2813
- typeof ListPromptVersions2Ttl
2814
- > = z.nativeEnum(ListPromptVersions2Ttl);
2815
-
2816
- /** @internal */
2817
- export const ListPromptVersions2CacheControl$inboundSchema: z.ZodType<
2818
- ListPromptVersions2CacheControl,
2819
- z.ZodTypeDef,
2820
- unknown
2821
- > = z.object({
2822
- type: ListPromptVersions2PromptsResponse200ApplicationJSONType$inboundSchema,
2823
- ttl: ListPromptVersions2Ttl$inboundSchema.default("5m"),
2824
- });
2825
-
2826
- export function listPromptVersions2CacheControlFromJSON(
2827
- jsonString: string,
2828
- ): SafeParseResult<ListPromptVersions2CacheControl, SDKValidationError> {
2829
- return safeParse(
2830
- jsonString,
2831
- (x) => ListPromptVersions2CacheControl$inboundSchema.parse(JSON.parse(x)),
2832
- `Failed to parse 'ListPromptVersions2CacheControl' from JSON`,
2833
- );
2834
- }
2835
-
2836
- /** @internal */
2837
- export const ListPromptVersions24$inboundSchema: z.ZodType<
2838
- ListPromptVersions24,
2839
- z.ZodTypeDef,
2840
- unknown
2841
- > = z.object({
2842
- type: z.literal("file"),
2843
- cache_control: z.lazy(() => ListPromptVersions2CacheControl$inboundSchema)
2844
- .optional(),
2845
- file: components.FileContentPartSchema$inboundSchema,
2846
- }).transform((v) => {
2847
- return remap$(v, {
2848
- "cache_control": "cacheControl",
2849
- });
2850
- });
2851
-
2852
- export function listPromptVersions24FromJSON(
2853
- jsonString: string,
2854
- ): SafeParseResult<ListPromptVersions24, SDKValidationError> {
2855
- return safeParse(
2856
- jsonString,
2857
- (x) => ListPromptVersions24$inboundSchema.parse(JSON.parse(x)),
2858
- `Failed to parse 'ListPromptVersions24' from JSON`,
2859
- );
2860
- }
2861
-
2862
- /** @internal */
2863
- export const ListPromptVersionsContentPrompts2$inboundSchema: z.ZodType<
2864
- ListPromptVersionsContentPrompts2,
2865
- z.ZodTypeDef,
2866
- unknown
2867
- > = z.union([
2868
- components.TextContentPartSchema$inboundSchema.and(
2869
- z.object({ type: z.literal("text") }),
2870
- ),
2871
- components.ImageContentPartSchema$inboundSchema,
2872
- components.AudioContentPartSchema$inboundSchema,
2873
- z.lazy(() => ListPromptVersions24$inboundSchema),
2874
- ]);
2875
-
2876
- export function listPromptVersionsContentPrompts2FromJSON(
2877
- jsonString: string,
2878
- ): SafeParseResult<ListPromptVersionsContentPrompts2, SDKValidationError> {
2879
- return safeParse(
2880
- jsonString,
2881
- (x) => ListPromptVersionsContentPrompts2$inboundSchema.parse(JSON.parse(x)),
2882
- `Failed to parse 'ListPromptVersionsContentPrompts2' from JSON`,
2883
- );
2884
- }
2885
-
2886
- /** @internal */
2887
- export const ListPromptVersionsMessagesPromptsContent$inboundSchema: z.ZodType<
2888
- ListPromptVersionsMessagesPromptsContent,
2889
- z.ZodTypeDef,
2890
- unknown
2891
- > = z.union([
2892
- z.string(),
2893
- z.array(
2894
- z.union([
2895
- components.TextContentPartSchema$inboundSchema.and(
2896
- z.object({ type: z.literal("text") }),
2897
- ),
2898
- components.ImageContentPartSchema$inboundSchema,
2899
- components.AudioContentPartSchema$inboundSchema,
2900
- z.lazy(() => ListPromptVersions24$inboundSchema),
2901
- ]),
2902
- ),
2903
- ]);
2904
-
2905
- export function listPromptVersionsMessagesPromptsContentFromJSON(
2906
- jsonString: string,
2907
- ): SafeParseResult<
2908
- ListPromptVersionsMessagesPromptsContent,
2909
- SDKValidationError
2910
- > {
2911
- return safeParse(
2912
- jsonString,
2913
- (x) =>
2914
- ListPromptVersionsMessagesPromptsContent$inboundSchema.parse(
2915
- JSON.parse(x),
2916
- ),
2917
- `Failed to parse 'ListPromptVersionsMessagesPromptsContent' from JSON`,
2918
- );
2919
- }
2920
-
2921
- /** @internal */
2922
- export const ListPromptVersionsMessagesUserMessage$inboundSchema: z.ZodType<
2923
- ListPromptVersionsMessagesUserMessage,
2924
- z.ZodTypeDef,
2925
- unknown
2926
- > = z.object({
2927
- role: z.literal("user"),
2928
- name: z.string().optional(),
2929
- content: z.union([
2930
- z.string(),
2931
- z.array(
2932
- z.union([
2933
- components.TextContentPartSchema$inboundSchema.and(
2934
- z.object({ type: z.literal("text") }),
2935
- ),
2936
- components.ImageContentPartSchema$inboundSchema,
2937
- components.AudioContentPartSchema$inboundSchema,
2938
- z.lazy(() => ListPromptVersions24$inboundSchema),
2939
- ]),
2940
- ),
2941
- ]),
2942
- });
2943
-
2944
- export function listPromptVersionsMessagesUserMessageFromJSON(
2945
- jsonString: string,
2946
- ): SafeParseResult<ListPromptVersionsMessagesUserMessage, SDKValidationError> {
2947
- return safeParse(
2948
- jsonString,
2949
- (x) =>
2950
- ListPromptVersionsMessagesUserMessage$inboundSchema.parse(JSON.parse(x)),
2951
- `Failed to parse 'ListPromptVersionsMessagesUserMessage' from JSON`,
2952
- );
2953
- }
2954
-
2955
- /** @internal */
2956
- export const ListPromptVersionsMessagesContent$inboundSchema: z.ZodType<
2957
- ListPromptVersionsMessagesContent,
2958
- z.ZodTypeDef,
2959
- unknown
2960
- > = z.union([
2961
- z.string(),
2962
- z.array(components.TextContentPartSchema$inboundSchema),
2963
- ]);
2964
-
2965
- export function listPromptVersionsMessagesContentFromJSON(
2966
- jsonString: string,
2967
- ): SafeParseResult<ListPromptVersionsMessagesContent, SDKValidationError> {
2968
- return safeParse(
2969
- jsonString,
2970
- (x) => ListPromptVersionsMessagesContent$inboundSchema.parse(JSON.parse(x)),
2971
- `Failed to parse 'ListPromptVersionsMessagesContent' from JSON`,
2972
- );
2973
- }
2974
-
2975
- /** @internal */
2976
- export const ListPromptVersionsMessagesSystemMessage$inboundSchema: z.ZodType<
2977
- ListPromptVersionsMessagesSystemMessage,
2978
- z.ZodTypeDef,
2979
- unknown
2980
- > = z.object({
2981
- role: z.literal("system"),
2982
- content: z.union([
2983
- z.string(),
2984
- z.array(components.TextContentPartSchema$inboundSchema),
2985
- ]),
2986
- name: z.string().optional(),
2987
- });
2988
-
2989
- export function listPromptVersionsMessagesSystemMessageFromJSON(
2990
- jsonString: string,
2991
- ): SafeParseResult<
2992
- ListPromptVersionsMessagesSystemMessage,
2993
- SDKValidationError
2994
- > {
2995
- return safeParse(
2996
- jsonString,
2997
- (x) =>
2998
- ListPromptVersionsMessagesSystemMessage$inboundSchema.parse(
2999
- JSON.parse(x),
3000
- ),
3001
- `Failed to parse 'ListPromptVersionsMessagesSystemMessage' from JSON`,
3002
- );
3003
- }
3004
-
3005
- /** @internal */
3006
- export const ListPromptVersionsPromptsMessages$inboundSchema: z.ZodType<
3007
- ListPromptVersionsPromptsMessages,
3008
- z.ZodTypeDef,
3009
- unknown
3010
- > = z.union([
3011
- z.lazy(() => ListPromptVersionsMessagesSystemMessage$inboundSchema),
3012
- z.lazy(() => ListPromptVersionsMessagesUserMessage$inboundSchema),
3013
- z.lazy(() => ListPromptVersionsMessagesAssistantMessage$inboundSchema),
3014
- z.lazy(() => ListPromptVersionsMessagesToolMessage$inboundSchema),
3015
- ]);
3016
-
3017
- export function listPromptVersionsPromptsMessagesFromJSON(
3018
- jsonString: string,
3019
- ): SafeParseResult<ListPromptVersionsPromptsMessages, SDKValidationError> {
3020
- return safeParse(
3021
- jsonString,
3022
- (x) => ListPromptVersionsPromptsMessages$inboundSchema.parse(JSON.parse(x)),
3023
- `Failed to parse 'ListPromptVersionsPromptsMessages' from JSON`,
3024
- );
3025
- }
3026
-
3027
- /** @internal */
3028
- export const ListPromptVersionsPromptField$inboundSchema: z.ZodType<
3029
- ListPromptVersionsPromptField,
3030
- z.ZodTypeDef,
3031
- unknown
3032
- > = z.object({
3033
- name: z.string().optional(),
3034
- audio: z.nullable(z.lazy(() => ListPromptVersionsAudio$inboundSchema))
3035
- .optional(),
3036
- frequency_penalty: z.nullable(z.number()).optional(),
3037
- max_tokens: z.nullable(z.number().int()).optional(),
3038
- max_completion_tokens: z.nullable(z.number().int()).optional(),
3039
- logprobs: z.nullable(z.boolean()).optional(),
3040
- top_logprobs: z.nullable(z.number().int()).optional(),
3041
- n: z.nullable(z.number().int()).optional(),
3042
- presence_penalty: z.nullable(z.number()).optional(),
3043
- response_format: z.union([
3044
- z.lazy(() => ListPromptVersionsResponseFormatText$inboundSchema),
3045
- z.lazy(() => ListPromptVersionsResponseFormatJSONObject$inboundSchema),
3046
- z.lazy(() =>
3047
- ListPromptVersionsResponseFormatPromptsJSONSchema$inboundSchema
3048
- ),
3049
- ]).optional(),
3050
- reasoning_effort: ListPromptVersionsReasoningEffort$inboundSchema.optional(),
3051
- verbosity: z.string().optional(),
3052
- seed: z.nullable(z.number()).optional(),
3053
- stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
3054
- stream_options: z.nullable(
3055
- z.lazy(() => ListPromptVersionsStreamOptions$inboundSchema),
3056
- ).optional(),
3057
- thinking: z.union([
3058
- components.ThinkingConfigDisabledSchema$inboundSchema,
3059
- components.ThinkingConfigEnabledSchema$inboundSchema,
3060
- ]).optional(),
3061
- temperature: z.nullable(z.number()).optional(),
3062
- top_p: z.nullable(z.number()).optional(),
3063
- top_k: z.nullable(z.number()).optional(),
3064
- tool_choice: z.union([
3065
- z.lazy(() => ListPromptVersionsToolChoice2$inboundSchema),
3066
- ListPromptVersionsToolChoice1$inboundSchema,
3067
- ]).optional(),
3068
- parallel_tool_calls: z.boolean().optional(),
3069
- modalities: z.nullable(z.array(ListPromptVersionsModalities$inboundSchema))
3070
- .optional(),
3071
- guardrails: z.array(z.lazy(() => ListPromptVersionsGuardrails$inboundSchema))
3072
- .optional(),
3073
- fallbacks: z.array(z.lazy(() => ListPromptVersionsFallbacks$inboundSchema))
3074
- .optional(),
3075
- retry: z.lazy(() => ListPromptVersionsRetry$inboundSchema).optional(),
3076
- cache: z.lazy(() => ListPromptVersionsCache$inboundSchema).optional(),
3077
- load_balancer: z.lazy(() => ListPromptVersionsLoadBalancer1$inboundSchema)
3078
- .optional(),
3079
- timeout: z.lazy(() => ListPromptVersionsTimeout$inboundSchema).optional(),
3080
- messages: z.array(
3081
- z.union([
3082
- z.lazy(() => ListPromptVersionsMessagesSystemMessage$inboundSchema),
3083
- z.lazy(() => ListPromptVersionsMessagesUserMessage$inboundSchema),
3084
- z.lazy(() => ListPromptVersionsMessagesAssistantMessage$inboundSchema),
3085
- z.lazy(() => ListPromptVersionsMessagesToolMessage$inboundSchema),
3086
- ]),
3087
- ).optional(),
3088
- model: z.nullable(z.string()).optional(),
3089
- version: z.string().optional(),
3090
- }).transform((v) => {
3091
- return remap$(v, {
3092
- "frequency_penalty": "frequencyPenalty",
3093
- "max_tokens": "maxTokens",
3094
- "max_completion_tokens": "maxCompletionTokens",
3095
- "top_logprobs": "topLogprobs",
3096
- "presence_penalty": "presencePenalty",
3097
- "response_format": "responseFormat",
3098
- "reasoning_effort": "reasoningEffort",
3099
- "stream_options": "streamOptions",
3100
- "top_p": "topP",
3101
- "top_k": "topK",
3102
- "tool_choice": "toolChoice",
3103
- "parallel_tool_calls": "parallelToolCalls",
3104
- "load_balancer": "loadBalancer",
3105
- });
3106
- });
3107
-
3108
- export function listPromptVersionsPromptFieldFromJSON(
3109
- jsonString: string,
3110
- ): SafeParseResult<ListPromptVersionsPromptField, SDKValidationError> {
3111
- return safeParse(
3112
- jsonString,
3113
- (x) => ListPromptVersionsPromptField$inboundSchema.parse(JSON.parse(x)),
3114
- `Failed to parse 'ListPromptVersionsPromptField' from JSON`,
3115
- );
3116
- }
3117
-
3118
- /** @internal */
3119
- export const ListPromptVersionsUseCases$inboundSchema: z.ZodNativeEnum<
3120
- typeof ListPromptVersionsUseCases
3121
- > = z.nativeEnum(ListPromptVersionsUseCases);
3122
-
3123
- /** @internal */
3124
- export const ListPromptVersionsLanguage$inboundSchema: z.ZodNativeEnum<
3125
- typeof ListPromptVersionsLanguage
3126
- > = z.nativeEnum(ListPromptVersionsLanguage);
3127
-
3128
- /** @internal */
3129
- export const ListPromptVersionsMetadata$inboundSchema: z.ZodType<
3130
- ListPromptVersionsMetadata,
3131
- z.ZodTypeDef,
3132
- unknown
3133
- > = z.object({
3134
- use_cases: z.array(ListPromptVersionsUseCases$inboundSchema).optional(),
3135
- language: z.nullable(ListPromptVersionsLanguage$inboundSchema).optional(),
3136
- }).transform((v) => {
3137
- return remap$(v, {
3138
- "use_cases": "useCases",
3139
- });
3140
- });
3141
-
3142
- export function listPromptVersionsMetadataFromJSON(
3143
- jsonString: string,
3144
- ): SafeParseResult<ListPromptVersionsMetadata, SDKValidationError> {
3145
- return safeParse(
3146
- jsonString,
3147
- (x) => ListPromptVersionsMetadata$inboundSchema.parse(JSON.parse(x)),
3148
- `Failed to parse 'ListPromptVersionsMetadata' from JSON`,
3149
- );
3150
- }
3151
-
3152
- /** @internal */
3153
- export const ListPromptVersionsData$inboundSchema: z.ZodType<
3154
- ListPromptVersionsData,
3155
- z.ZodTypeDef,
3156
- unknown
3157
- > = z.object({
3158
- _id: z.string(),
3159
- created_by_id: z.nullable(z.string()).optional(),
3160
- updated_by_id: z.nullable(z.string()).optional(),
3161
- description: z.nullable(z.string()).optional(),
3162
- prompt_config: z.lazy(() => ListPromptVersionsPromptConfig$inboundSchema)
3163
- .optional(),
3164
- prompt: z.lazy(() => ListPromptVersionsPromptField$inboundSchema),
3165
- metadata: z.lazy(() => ListPromptVersionsMetadata$inboundSchema).optional(),
3166
- timestamp: z.string(),
3167
- }).transform((v) => {
3168
- return remap$(v, {
3169
- "_id": "id",
3170
- "created_by_id": "createdById",
3171
- "updated_by_id": "updatedById",
3172
- "prompt_config": "promptConfig",
3173
- });
3174
- });
3175
-
3176
- export function listPromptVersionsDataFromJSON(
3177
- jsonString: string,
3178
- ): SafeParseResult<ListPromptVersionsData, SDKValidationError> {
3179
- return safeParse(
3180
- jsonString,
3181
- (x) => ListPromptVersionsData$inboundSchema.parse(JSON.parse(x)),
3182
- `Failed to parse 'ListPromptVersionsData' from JSON`,
3183
- );
3184
- }
3185
-
3186
- /** @internal */
3187
- export const ListPromptVersionsResponseBody$inboundSchema: z.ZodType<
3188
- ListPromptVersionsResponseBody,
3189
- z.ZodTypeDef,
3190
- unknown
3191
- > = z.object({
3192
- object: ListPromptVersionsObject$inboundSchema,
3193
- data: z.array(z.lazy(() => ListPromptVersionsData$inboundSchema)),
3194
- has_more: z.boolean(),
3195
- }).transform((v) => {
3196
- return remap$(v, {
3197
- "has_more": "hasMore",
3198
- });
3199
- });
3200
-
3201
- export function listPromptVersionsResponseBodyFromJSON(
3202
- jsonString: string,
3203
- ): SafeParseResult<ListPromptVersionsResponseBody, SDKValidationError> {
3204
- return safeParse(
3205
- jsonString,
3206
- (x) => ListPromptVersionsResponseBody$inboundSchema.parse(JSON.parse(x)),
3207
- `Failed to parse 'ListPromptVersionsResponseBody' from JSON`,
3208
- );
3209
- }