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

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