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