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