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

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