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