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

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