@orq-ai/node 3.9.14 → 3.10.0-rc.10

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 (555) hide show
  1. package/README.md +91 -93
  2. package/bin/mcp-server.js +1623 -1700
  3. package/bin/mcp-server.js.map +36 -39
  4. package/docs/sdks/knowledge/README.md +0 -77
  5. package/examples/package-lock.json +5 -5
  6. package/funcs/{chunkingParse.d.ts → knowledgeBasesChunkText.d.ts} +3 -3
  7. package/funcs/knowledgeBasesChunkText.d.ts.map +1 -0
  8. package/funcs/{chunkingParse.js → knowledgeBasesChunkText.js} +8 -8
  9. package/funcs/knowledgeBasesChunkText.js.map +1 -0
  10. package/jsr.json +1 -1
  11. package/lib/config.d.ts +3 -3
  12. package/lib/config.js +3 -3
  13. package/lib/config.js.map +1 -1
  14. package/mcp-server/mcp-server.js +1 -1
  15. package/mcp-server/mcp-server.js.map +1 -1
  16. package/mcp-server/server.d.ts.map +1 -1
  17. package/mcp-server/server.js +3 -5
  18. package/mcp-server/server.js.map +1 -1
  19. package/mcp-server/tools/knowledgeBasesChunkText.d.ts +8 -0
  20. package/mcp-server/tools/knowledgeBasesChunkText.d.ts.map +1 -0
  21. package/mcp-server/tools/{chunkingParse.js → knowledgeBasesChunkText.js} +8 -8
  22. package/mcp-server/tools/knowledgeBasesChunkText.js.map +1 -0
  23. package/models/operations/{parse.d.ts → chunktext.d.ts} +83 -83
  24. package/models/operations/chunktext.d.ts.map +1 -0
  25. package/models/operations/{parse.js → chunktext.js} +117 -113
  26. package/models/operations/chunktext.js.map +1 -0
  27. package/models/operations/createcontact.js +2 -2
  28. package/models/operations/createdataset.js +2 -2
  29. package/models/operations/createdatasetitem.js +2 -2
  30. package/models/operations/createdatasource.js +2 -2
  31. package/models/operations/createeval.js +16 -16
  32. package/models/operations/fileget.js +2 -2
  33. package/models/operations/filelist.js +2 -2
  34. package/models/operations/fileupload.js +2 -2
  35. package/models/operations/getevals.d.ts +525 -4
  36. package/models/operations/getevals.d.ts.map +1 -1
  37. package/models/operations/getevals.js +582 -36
  38. package/models/operations/getevals.js.map +1 -1
  39. package/models/operations/index.d.ts +1 -2
  40. package/models/operations/index.d.ts.map +1 -1
  41. package/models/operations/index.js +1 -2
  42. package/models/operations/index.js.map +1 -1
  43. package/models/operations/invokeeval.d.ts +4 -4
  44. package/models/operations/invokeeval.d.ts.map +1 -1
  45. package/models/operations/invokeeval.js +4 -4
  46. package/models/operations/invokeeval.js.map +1 -1
  47. package/models/operations/listcontacts.js +2 -2
  48. package/models/operations/listdatasetdatapoints.js +2 -2
  49. package/models/operations/listdatasets.js +2 -2
  50. package/models/operations/listdatasources.js +2 -2
  51. package/models/operations/retrievecontact.js +2 -2
  52. package/models/operations/retrievedatapoint.js +2 -2
  53. package/models/operations/retrievedataset.js +2 -2
  54. package/models/operations/retrievedatasource.js +2 -2
  55. package/models/operations/updatecontact.js +2 -2
  56. package/models/operations/updatedatapoint.js +2 -2
  57. package/models/operations/updatedataset.js +2 -2
  58. package/models/operations/updatedatasource.js +2 -2
  59. package/models/operations/updateeval.js +16 -16
  60. package/models/operations/updateknowledge.d.ts +106 -106
  61. package/models/operations/updateknowledge.d.ts.map +1 -1
  62. package/models/operations/updateknowledge.js +129 -125
  63. package/models/operations/updateknowledge.js.map +1 -1
  64. package/package.json +4 -3
  65. package/sdk/knowledge.d.ts +0 -4
  66. package/sdk/knowledge.d.ts.map +1 -1
  67. package/sdk/knowledge.js +0 -7
  68. package/sdk/knowledge.js.map +1 -1
  69. package/sdk/{chunking.d.ts → knowledgebases.d.ts} +4 -4
  70. package/sdk/knowledgebases.d.ts.map +1 -0
  71. package/sdk/{chunking.js → knowledgebases.js} +8 -8
  72. package/sdk/knowledgebases.js.map +1 -0
  73. package/sdk/sdk.d.ts +3 -3
  74. package/sdk/sdk.d.ts.map +1 -1
  75. package/sdk/sdk.js +3 -3
  76. package/sdk/sdk.js.map +1 -1
  77. package/src/lib/config.ts +3 -3
  78. package/src/mcp-server/mcp-server.ts +1 -1
  79. package/src/mcp-server/server.ts +3 -5
  80. package/src/models/operations/createcontact.ts +2 -2
  81. package/src/models/operations/createdataset.ts +2 -2
  82. package/src/models/operations/createdatasetitem.ts +2 -2
  83. package/src/models/operations/createdatasource.ts +2 -2
  84. package/src/models/operations/createeval.ts +16 -16
  85. package/src/models/operations/fileget.ts +2 -2
  86. package/src/models/operations/filelist.ts +2 -2
  87. package/src/models/operations/fileupload.ts +2 -2
  88. package/src/models/operations/getevals.ts +1159 -32
  89. package/src/models/operations/index.ts +1 -2
  90. package/src/models/operations/invokeeval.ts +8 -8
  91. package/src/models/operations/listcontacts.ts +2 -2
  92. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  93. package/src/models/operations/listdatasets.ts +2 -2
  94. package/src/models/operations/listdatasources.ts +2 -2
  95. package/src/models/operations/retrievecontact.ts +2 -2
  96. package/src/models/operations/retrievedatapoint.ts +2 -2
  97. package/src/models/operations/retrievedataset.ts +2 -2
  98. package/src/models/operations/retrievedatasource.ts +2 -2
  99. package/src/models/operations/updatecontact.ts +2 -2
  100. package/src/models/operations/updatedatapoint.ts +2 -2
  101. package/src/models/operations/updatedataset.ts +2 -2
  102. package/src/models/operations/updatedatasource.ts +2 -2
  103. package/src/models/operations/updateeval.ts +16 -16
  104. package/src/models/operations/updateknowledge.ts +206 -266
  105. package/src/sdk/knowledge.ts +0 -15
  106. package/src/sdk/sdk.ts +4 -4
  107. package/docs/sdks/chunking/README.md +0 -94
  108. package/funcs/chunkingParse.d.ts.map +0 -1
  109. package/funcs/chunkingParse.js.map +0 -1
  110. package/funcs/knowledgeCreate.d.ts +0 -14
  111. package/funcs/knowledgeCreate.d.ts.map +0 -1
  112. package/funcs/knowledgeCreate.js +0 -111
  113. package/funcs/knowledgeCreate.js.map +0 -1
  114. package/mcp-server/tools/chunkingParse.d.ts +0 -8
  115. package/mcp-server/tools/chunkingParse.d.ts.map +0 -1
  116. package/mcp-server/tools/chunkingParse.js.map +0 -1
  117. package/mcp-server/tools/knowledgeCreate.d.ts +0 -8
  118. package/mcp-server/tools/knowledgeCreate.d.ts.map +0 -1
  119. package/mcp-server/tools/knowledgeCreate.js +0 -62
  120. package/mcp-server/tools/knowledgeCreate.js.map +0 -1
  121. package/models/operations/createknowledge.d.ts +0 -426
  122. package/models/operations/createknowledge.d.ts.map +0 -1
  123. package/models/operations/createknowledge.js +0 -431
  124. package/models/operations/createknowledge.js.map +0 -1
  125. package/models/operations/parse.d.ts.map +0 -1
  126. package/models/operations/parse.js.map +0 -1
  127. package/packages/orq-rc/FUNCTIONS.md +0 -103
  128. package/packages/orq-rc/README.md +0 -958
  129. package/packages/orq-rc/RUNTIMES.md +0 -48
  130. package/packages/orq-rc/docs/sdks/contacts/README.md +0 -445
  131. package/packages/orq-rc/docs/sdks/datasets/README.md +0 -825
  132. package/packages/orq-rc/docs/sdks/deployments/README.md +0 -310
  133. package/packages/orq-rc/docs/sdks/evals/README.md +0 -3035
  134. package/packages/orq-rc/docs/sdks/feedback/README.md +0 -88
  135. package/packages/orq-rc/docs/sdks/files/README.md +0 -297
  136. package/packages/orq-rc/docs/sdks/knowledge/README.md +0 -1150
  137. package/packages/orq-rc/docs/sdks/metrics/README.md +0 -82
  138. package/packages/orq-rc/docs/sdks/models/README.md +0 -75
  139. package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
  140. package/packages/orq-rc/docs/sdks/prompts/README.md +0 -550
  141. package/packages/orq-rc/docs/sdks/remoteconfigs/README.md +0 -76
  142. package/packages/orq-rc/examples/README.md +0 -26
  143. package/packages/orq-rc/examples/contactsCreate.example.ts +0 -40
  144. package/packages/orq-rc/examples/package-lock.json +0 -626
  145. package/packages/orq-rc/examples/package.json +0 -18
  146. package/packages/orq-rc/jsr.json +0 -28
  147. package/packages/orq-rc/package-lock.json +0 -3206
  148. package/packages/orq-rc/package.json +0 -45
  149. package/packages/orq-rc/src/core.ts +0 -13
  150. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -165
  151. package/packages/orq-rc/src/funcs/contactsDelete.ts +0 -176
  152. package/packages/orq-rc/src/funcs/contactsList.ts +0 -169
  153. package/packages/orq-rc/src/funcs/contactsRetrieve.ts +0 -175
  154. package/packages/orq-rc/src/funcs/contactsUpdate.ts +0 -176
  155. package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -167
  156. package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -165
  157. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -167
  158. package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -167
  159. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -182
  160. package/packages/orq-rc/src/funcs/datasetsList.ts +0 -167
  161. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -174
  162. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -175
  163. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -181
  164. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -176
  165. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -179
  166. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -168
  167. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -176
  168. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -176
  169. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -168
  170. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -183
  171. package/packages/orq-rc/src/funcs/evalsAgeAppropriate.ts +0 -175
  172. package/packages/orq-rc/src/funcs/evalsAll.ts +0 -173
  173. package/packages/orq-rc/src/funcs/evalsBertScore.ts +0 -175
  174. package/packages/orq-rc/src/funcs/evalsBleuScore.ts +0 -175
  175. package/packages/orq-rc/src/funcs/evalsBotDetection.ts +0 -175
  176. package/packages/orq-rc/src/funcs/evalsContains.ts +0 -175
  177. package/packages/orq-rc/src/funcs/evalsContainsAll.ts +0 -175
  178. package/packages/orq-rc/src/funcs/evalsContainsAny.ts +0 -175
  179. package/packages/orq-rc/src/funcs/evalsContainsEmail.ts +0 -175
  180. package/packages/orq-rc/src/funcs/evalsContainsNone.ts +0 -175
  181. package/packages/orq-rc/src/funcs/evalsContainsUrl.ts +0 -175
  182. package/packages/orq-rc/src/funcs/evalsContainsValidLink.ts +0 -177
  183. package/packages/orq-rc/src/funcs/evalsCreate.ts +0 -169
  184. package/packages/orq-rc/src/funcs/evalsDelete.ts +0 -173
  185. package/packages/orq-rc/src/funcs/evalsEndsWith.ts +0 -175
  186. package/packages/orq-rc/src/funcs/evalsExactMatch.ts +0 -175
  187. package/packages/orq-rc/src/funcs/evalsFactCheckingKnowledgeBase.ts +0 -183
  188. package/packages/orq-rc/src/funcs/evalsGrammar.ts +0 -173
  189. package/packages/orq-rc/src/funcs/evalsInvoke.ts +0 -177
  190. package/packages/orq-rc/src/funcs/evalsLengthBetween.ts +0 -175
  191. package/packages/orq-rc/src/funcs/evalsLengthGreaterThan.ts +0 -177
  192. package/packages/orq-rc/src/funcs/evalsLengthLessThan.ts +0 -175
  193. package/packages/orq-rc/src/funcs/evalsLocalization.ts +0 -175
  194. package/packages/orq-rc/src/funcs/evalsPii.ts +0 -173
  195. package/packages/orq-rc/src/funcs/evalsRagasCoherence.ts +0 -175
  196. package/packages/orq-rc/src/funcs/evalsRagasConciseness.ts +0 -174
  197. package/packages/orq-rc/src/funcs/evalsRagasContextEntitiesRecall.ts +0 -183
  198. package/packages/orq-rc/src/funcs/evalsRagasContextPrecision.ts +0 -180
  199. package/packages/orq-rc/src/funcs/evalsRagasContextRecall.ts +0 -177
  200. package/packages/orq-rc/src/funcs/evalsRagasCorrectness.ts +0 -174
  201. package/packages/orq-rc/src/funcs/evalsRagasFaithfulness.ts +0 -177
  202. package/packages/orq-rc/src/funcs/evalsRagasHarmfulness.ts +0 -174
  203. package/packages/orq-rc/src/funcs/evalsRagasMaliciousness.ts +0 -177
  204. package/packages/orq-rc/src/funcs/evalsRagasNoiseSensitivity.ts +0 -180
  205. package/packages/orq-rc/src/funcs/evalsRagasResponseRelevancy.ts +0 -183
  206. package/packages/orq-rc/src/funcs/evalsRagasSummarization.ts +0 -177
  207. package/packages/orq-rc/src/funcs/evalsSentimentClassification.ts +0 -183
  208. package/packages/orq-rc/src/funcs/evalsSummarization.ts +0 -175
  209. package/packages/orq-rc/src/funcs/evalsToneOfVoice.ts +0 -175
  210. package/packages/orq-rc/src/funcs/evalsTranslation.ts +0 -175
  211. package/packages/orq-rc/src/funcs/evalsUpdate.ts +0 -173
  212. package/packages/orq-rc/src/funcs/evalsValidJson.ts +0 -175
  213. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -160
  214. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -187
  215. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -164
  216. package/packages/orq-rc/src/funcs/filesGet.ts +0 -166
  217. package/packages/orq-rc/src/funcs/filesList.ts +0 -167
  218. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -171
  219. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -166
  220. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -167
  221. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -174
  222. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -173
  223. package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -169
  224. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -178
  225. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -174
  226. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -166
  227. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -173
  228. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -169
  229. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +0 -167
  230. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -164
  231. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -174
  232. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -170
  233. package/packages/orq-rc/src/funcs/modelsList.ts +0 -142
  234. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -160
  235. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -164
  236. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -181
  237. package/packages/orq-rc/src/funcs/promptsList.ts +0 -167
  238. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -173
  239. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -166
  240. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -173
  241. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -161
  242. package/packages/orq-rc/src/hooks/global.ts +0 -44
  243. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  244. package/packages/orq-rc/src/hooks/index.ts +0 -6
  245. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  246. package/packages/orq-rc/src/hooks/types.ts +0 -112
  247. package/packages/orq-rc/src/index.ts +0 -9
  248. package/packages/orq-rc/src/lib/base64.ts +0 -37
  249. package/packages/orq-rc/src/lib/config.ts +0 -74
  250. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  251. package/packages/orq-rc/src/lib/encodings.ts +0 -483
  252. package/packages/orq-rc/src/lib/env.ts +0 -73
  253. package/packages/orq-rc/src/lib/event-streams.ts +0 -147
  254. package/packages/orq-rc/src/lib/files.ts +0 -82
  255. package/packages/orq-rc/src/lib/http.ts +0 -323
  256. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  257. package/packages/orq-rc/src/lib/logger.ts +0 -9
  258. package/packages/orq-rc/src/lib/matchers.ts +0 -345
  259. package/packages/orq-rc/src/lib/primitives.ts +0 -150
  260. package/packages/orq-rc/src/lib/retries.ts +0 -218
  261. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  262. package/packages/orq-rc/src/lib/sdks.ts +0 -407
  263. package/packages/orq-rc/src/lib/security.ts +0 -261
  264. package/packages/orq-rc/src/lib/url.ts +0 -33
  265. package/packages/orq-rc/src/mcp-server/cli/start/command.ts +0 -112
  266. package/packages/orq-rc/src/mcp-server/cli/start/impl.ts +0 -136
  267. package/packages/orq-rc/src/mcp-server/cli.ts +0 -13
  268. package/packages/orq-rc/src/mcp-server/console-logger.ts +0 -71
  269. package/packages/orq-rc/src/mcp-server/extensions.ts +0 -17
  270. package/packages/orq-rc/src/mcp-server/mcp-server.ts +0 -26
  271. package/packages/orq-rc/src/mcp-server/prompts.ts +0 -117
  272. package/packages/orq-rc/src/mcp-server/resources.ts +0 -172
  273. package/packages/orq-rc/src/mcp-server/scopes.ts +0 -7
  274. package/packages/orq-rc/src/mcp-server/server.ts +0 -249
  275. package/packages/orq-rc/src/mcp-server/shared.ts +0 -75
  276. package/packages/orq-rc/src/mcp-server/tools/contactsCreate.ts +0 -37
  277. package/packages/orq-rc/src/mcp-server/tools/contactsDelete.ts +0 -35
  278. package/packages/orq-rc/src/mcp-server/tools/contactsList.ts +0 -37
  279. package/packages/orq-rc/src/mcp-server/tools/contactsRetrieve.ts +0 -37
  280. package/packages/orq-rc/src/mcp-server/tools/contactsUpdate.ts +0 -37
  281. package/packages/orq-rc/src/mcp-server/tools/datasetsClear.ts +0 -35
  282. package/packages/orq-rc/src/mcp-server/tools/datasetsCreate.ts +0 -37
  283. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoint.ts +0 -37
  284. package/packages/orq-rc/src/mcp-server/tools/datasetsDelete.ts +0 -35
  285. package/packages/orq-rc/src/mcp-server/tools/datasetsDeleteDatapoint.ts +0 -35
  286. package/packages/orq-rc/src/mcp-server/tools/datasetsList.ts +0 -37
  287. package/packages/orq-rc/src/mcp-server/tools/datasetsListDatapoints.ts +0 -37
  288. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieve.ts +0 -37
  289. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieveDatapoint.ts +0 -37
  290. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdate.ts +0 -37
  291. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdateDatapoint.ts +0 -35
  292. package/packages/orq-rc/src/mcp-server/tools/deploymentsGetConfig.ts +0 -37
  293. package/packages/orq-rc/src/mcp-server/tools/deploymentsInvoke.ts +0 -37
  294. package/packages/orq-rc/src/mcp-server/tools/deploymentsList.ts +0 -37
  295. package/packages/orq-rc/src/mcp-server/tools/deploymentsMetricsCreate.ts +0 -37
  296. package/packages/orq-rc/src/mcp-server/tools/deploymentsStream.ts +0 -37
  297. package/packages/orq-rc/src/mcp-server/tools/evalsAgeAppropriate.ts +0 -35
  298. package/packages/orq-rc/src/mcp-server/tools/evalsAll.ts +0 -35
  299. package/packages/orq-rc/src/mcp-server/tools/evalsBertScore.ts +0 -35
  300. package/packages/orq-rc/src/mcp-server/tools/evalsBleuScore.ts +0 -35
  301. package/packages/orq-rc/src/mcp-server/tools/evalsBotDetection.ts +0 -35
  302. package/packages/orq-rc/src/mcp-server/tools/evalsContains.ts +0 -35
  303. package/packages/orq-rc/src/mcp-server/tools/evalsContainsAll.ts +0 -35
  304. package/packages/orq-rc/src/mcp-server/tools/evalsContainsAny.ts +0 -35
  305. package/packages/orq-rc/src/mcp-server/tools/evalsContainsEmail.ts +0 -35
  306. package/packages/orq-rc/src/mcp-server/tools/evalsContainsNone.ts +0 -35
  307. package/packages/orq-rc/src/mcp-server/tools/evalsContainsUrl.ts +0 -35
  308. package/packages/orq-rc/src/mcp-server/tools/evalsContainsValidLink.ts +0 -36
  309. package/packages/orq-rc/src/mcp-server/tools/evalsCreate.ts +0 -35
  310. package/packages/orq-rc/src/mcp-server/tools/evalsDelete.ts +0 -33
  311. package/packages/orq-rc/src/mcp-server/tools/evalsEndsWith.ts +0 -35
  312. package/packages/orq-rc/src/mcp-server/tools/evalsExactMatch.ts +0 -35
  313. package/packages/orq-rc/src/mcp-server/tools/evalsFactCheckingKnowledgeBase.ts +0 -37
  314. package/packages/orq-rc/src/mcp-server/tools/evalsGrammar.ts +0 -35
  315. package/packages/orq-rc/src/mcp-server/tools/evalsInvoke.ts +0 -35
  316. package/packages/orq-rc/src/mcp-server/tools/evalsLengthBetween.ts +0 -35
  317. package/packages/orq-rc/src/mcp-server/tools/evalsLengthGreaterThan.ts +0 -36
  318. package/packages/orq-rc/src/mcp-server/tools/evalsLengthLessThan.ts +0 -35
  319. package/packages/orq-rc/src/mcp-server/tools/evalsLocalization.ts +0 -35
  320. package/packages/orq-rc/src/mcp-server/tools/evalsPii.ts +0 -35
  321. package/packages/orq-rc/src/mcp-server/tools/evalsRagasCoherence.ts +0 -35
  322. package/packages/orq-rc/src/mcp-server/tools/evalsRagasConciseness.ts +0 -35
  323. package/packages/orq-rc/src/mcp-server/tools/evalsRagasContextEntitiesRecall.ts +0 -37
  324. package/packages/orq-rc/src/mcp-server/tools/evalsRagasContextPrecision.ts +0 -36
  325. package/packages/orq-rc/src/mcp-server/tools/evalsRagasContextRecall.ts +0 -36
  326. package/packages/orq-rc/src/mcp-server/tools/evalsRagasCorrectness.ts +0 -35
  327. package/packages/orq-rc/src/mcp-server/tools/evalsRagasFaithfulness.ts +0 -36
  328. package/packages/orq-rc/src/mcp-server/tools/evalsRagasHarmfulness.ts +0 -35
  329. package/packages/orq-rc/src/mcp-server/tools/evalsRagasMaliciousness.ts +0 -36
  330. package/packages/orq-rc/src/mcp-server/tools/evalsRagasNoiseSensitivity.ts +0 -36
  331. package/packages/orq-rc/src/mcp-server/tools/evalsRagasResponseRelevancy.ts +0 -36
  332. package/packages/orq-rc/src/mcp-server/tools/evalsRagasSummarization.ts +0 -36
  333. package/packages/orq-rc/src/mcp-server/tools/evalsSentimentClassification.ts +0 -36
  334. package/packages/orq-rc/src/mcp-server/tools/evalsSummarization.ts +0 -35
  335. package/packages/orq-rc/src/mcp-server/tools/evalsToneOfVoice.ts +0 -35
  336. package/packages/orq-rc/src/mcp-server/tools/evalsTranslation.ts +0 -35
  337. package/packages/orq-rc/src/mcp-server/tools/evalsUpdate.ts +0 -35
  338. package/packages/orq-rc/src/mcp-server/tools/evalsValidJson.ts +0 -35
  339. package/packages/orq-rc/src/mcp-server/tools/feedbackCreate.ts +0 -37
  340. package/packages/orq-rc/src/mcp-server/tools/filesCreate.ts +0 -37
  341. package/packages/orq-rc/src/mcp-server/tools/filesDelete.ts +0 -33
  342. package/packages/orq-rc/src/mcp-server/tools/filesGet.ts +0 -37
  343. package/packages/orq-rc/src/mcp-server/tools/filesList.ts +0 -37
  344. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateChunks.ts +0 -35
  345. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateDatasource.ts +0 -35
  346. package/packages/orq-rc/src/mcp-server/tools/knowledgeDelete.ts +0 -35
  347. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunk.ts +0 -33
  348. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteDatasource.ts +0 -35
  349. package/packages/orq-rc/src/mcp-server/tools/knowledgeList.ts +0 -37
  350. package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunks.ts +0 -35
  351. package/packages/orq-rc/src/mcp-server/tools/knowledgeListDatasources.ts +0 -35
  352. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieve.ts +0 -37
  353. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveChunk.ts +0 -35
  354. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveDatasource.ts +0 -35
  355. package/packages/orq-rc/src/mcp-server/tools/knowledgeSearch.ts +0 -37
  356. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdate.ts +0 -35
  357. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateChunk.ts +0 -35
  358. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateDatasource.ts +0 -35
  359. package/packages/orq-rc/src/mcp-server/tools/modelsList.ts +0 -30
  360. package/packages/orq-rc/src/mcp-server/tools/promptsCreate.ts +0 -35
  361. package/packages/orq-rc/src/mcp-server/tools/promptsDelete.ts +0 -33
  362. package/packages/orq-rc/src/mcp-server/tools/promptsGetVersion.ts +0 -37
  363. package/packages/orq-rc/src/mcp-server/tools/promptsList.ts +0 -37
  364. package/packages/orq-rc/src/mcp-server/tools/promptsListVersions.ts +0 -37
  365. package/packages/orq-rc/src/mcp-server/tools/promptsRetrieve.ts +0 -37
  366. package/packages/orq-rc/src/mcp-server/tools/promptsUpdate.ts +0 -35
  367. package/packages/orq-rc/src/mcp-server/tools/remoteconfigsRetrieve.ts +0 -36
  368. package/packages/orq-rc/src/mcp-server/tools.ts +0 -129
  369. package/packages/orq-rc/src/models/components/deployments.ts +0 -7289
  370. package/packages/orq-rc/src/models/components/index.ts +0 -6
  371. package/packages/orq-rc/src/models/components/security.ts +0 -71
  372. package/packages/orq-rc/src/models/errors/apierror.ts +0 -40
  373. package/packages/orq-rc/src/models/errors/createeval.ts +0 -80
  374. package/packages/orq-rc/src/models/errors/deletecontact.ts +0 -91
  375. package/packages/orq-rc/src/models/errors/deleteeval.ts +0 -80
  376. package/packages/orq-rc/src/models/errors/evalsageappropriate.ts +0 -156
  377. package/packages/orq-rc/src/models/errors/evalsbertscore.ts +0 -154
  378. package/packages/orq-rc/src/models/errors/evalsbleuscore.ts +0 -154
  379. package/packages/orq-rc/src/models/errors/evalsbotdetection.ts +0 -155
  380. package/packages/orq-rc/src/models/errors/evalscontains.ts +0 -154
  381. package/packages/orq-rc/src/models/errors/evalscontainsall.ts +0 -155
  382. package/packages/orq-rc/src/models/errors/evalscontainsany.ts +0 -155
  383. package/packages/orq-rc/src/models/errors/evalscontainsemail.ts +0 -156
  384. package/packages/orq-rc/src/models/errors/evalscontainsnone.ts +0 -155
  385. package/packages/orq-rc/src/models/errors/evalscontainsurl.ts +0 -155
  386. package/packages/orq-rc/src/models/errors/evalscontainsvalidlink.ts +0 -157
  387. package/packages/orq-rc/src/models/errors/evalsendswith.ts +0 -154
  388. package/packages/orq-rc/src/models/errors/evalsexactmatch.ts +0 -154
  389. package/packages/orq-rc/src/models/errors/evalsfactcheckingknowledgebase.ts +0 -160
  390. package/packages/orq-rc/src/models/errors/evalsgrammar.ts +0 -154
  391. package/packages/orq-rc/src/models/errors/evalslengthbetween.ts +0 -156
  392. package/packages/orq-rc/src/models/errors/evalslengthgreaterthan.ts +0 -157
  393. package/packages/orq-rc/src/models/errors/evalslengthlessthan.ts +0 -156
  394. package/packages/orq-rc/src/models/errors/evalslocalization.ts +0 -155
  395. package/packages/orq-rc/src/models/errors/evalspii.ts +0 -154
  396. package/packages/orq-rc/src/models/errors/evalsragascoherence.ts +0 -156
  397. package/packages/orq-rc/src/models/errors/evalsragasconciseness.ts +0 -157
  398. package/packages/orq-rc/src/models/errors/evalsragascontextentitiesrecall.ts +0 -163
  399. package/packages/orq-rc/src/models/errors/evalsragascontextprecision.ts +0 -160
  400. package/packages/orq-rc/src/models/errors/evalsragascontextrecall.ts +0 -158
  401. package/packages/orq-rc/src/models/errors/evalsragascorrectness.ts +0 -157
  402. package/packages/orq-rc/src/models/errors/evalsragasfaithfulness.ts +0 -157
  403. package/packages/orq-rc/src/models/errors/evalsragasharmfulness.ts +0 -157
  404. package/packages/orq-rc/src/models/errors/evalsragasmaliciousness.ts +0 -158
  405. package/packages/orq-rc/src/models/errors/evalsragasnoisesensitivity.ts +0 -160
  406. package/packages/orq-rc/src/models/errors/evalsragasresponserelevancy.ts +0 -160
  407. package/packages/orq-rc/src/models/errors/evalsragassummarization.ts +0 -158
  408. package/packages/orq-rc/src/models/errors/evalssentimentclassification.ts +0 -160
  409. package/packages/orq-rc/src/models/errors/evalssummarization.ts +0 -156
  410. package/packages/orq-rc/src/models/errors/evalstoneofvoice.ts +0 -155
  411. package/packages/orq-rc/src/models/errors/evalstranslation.ts +0 -155
  412. package/packages/orq-rc/src/models/errors/evalsvalidjson.ts +0 -154
  413. package/packages/orq-rc/src/models/errors/getevals.ts +0 -80
  414. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -80
  415. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -90
  416. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  417. package/packages/orq-rc/src/models/errors/index.ts +0 -56
  418. package/packages/orq-rc/src/models/errors/invokeeval.ts +0 -154
  419. package/packages/orq-rc/src/models/errors/orqerror.ts +0 -35
  420. package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +0 -50
  421. package/packages/orq-rc/src/models/errors/retrievecontact.ts +0 -91
  422. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -109
  423. package/packages/orq-rc/src/models/errors/updatecontact.ts +0 -83
  424. package/packages/orq-rc/src/models/errors/updateeval.ts +0 -80
  425. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -80
  426. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -75
  427. package/packages/orq-rc/src/models/operations/createchunk.ts +0 -428
  428. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -267
  429. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -296
  430. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -5222
  431. package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -852
  432. package/packages/orq-rc/src/models/operations/createeval.ts +0 -3830
  433. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
  434. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -4083
  435. package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -96
  436. package/packages/orq-rc/src/models/operations/deletecontact.ts +0 -69
  437. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -81
  438. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -75
  439. package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -87
  440. package/packages/orq-rc/src/models/operations/deleteeval.ts +0 -66
  441. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -78
  442. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
  443. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -5439
  444. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -9379
  445. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1256
  446. package/packages/orq-rc/src/models/operations/deployments.ts +0 -2328
  447. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -9499
  448. package/packages/orq-rc/src/models/operations/evalsageappropriate.ts +0 -253
  449. package/packages/orq-rc/src/models/operations/evalsbertscore.ts +0 -197
  450. package/packages/orq-rc/src/models/operations/evalsbleuscore.ts +0 -131
  451. package/packages/orq-rc/src/models/operations/evalsbotdetection.ts +0 -249
  452. package/packages/orq-rc/src/models/operations/evalscontains.ts +0 -250
  453. package/packages/orq-rc/src/models/operations/evalscontainsall.ts +0 -248
  454. package/packages/orq-rc/src/models/operations/evalscontainsany.ts +0 -254
  455. package/packages/orq-rc/src/models/operations/evalscontainsemail.ts +0 -181
  456. package/packages/orq-rc/src/models/operations/evalscontainsnone.ts +0 -254
  457. package/packages/orq-rc/src/models/operations/evalscontainsurl.ts +0 -181
  458. package/packages/orq-rc/src/models/operations/evalscontainsvalidlink.ts +0 -186
  459. package/packages/orq-rc/src/models/operations/evalsendswith.ts +0 -250
  460. package/packages/orq-rc/src/models/operations/evalsexactmatch.ts +0 -183
  461. package/packages/orq-rc/src/models/operations/evalsfactcheckingknowledgebase.ts +0 -299
  462. package/packages/orq-rc/src/models/operations/evalsgrammar.ts +0 -243
  463. package/packages/orq-rc/src/models/operations/evalslengthbetween.ts +0 -268
  464. package/packages/orq-rc/src/models/operations/evalslengthgreaterthan.ts +0 -266
  465. package/packages/orq-rc/src/models/operations/evalslengthlessthan.ts +0 -259
  466. package/packages/orq-rc/src/models/operations/evalslocalization.ts +0 -253
  467. package/packages/orq-rc/src/models/operations/evalspii.ts +0 -243
  468. package/packages/orq-rc/src/models/operations/evalsragascoherence.ts +0 -152
  469. package/packages/orq-rc/src/models/operations/evalsragasconciseness.ts +0 -153
  470. package/packages/orq-rc/src/models/operations/evalsragascontextentitiesrecall.ts +0 -164
  471. package/packages/orq-rc/src/models/operations/evalsragascontextprecision.ts +0 -166
  472. package/packages/orq-rc/src/models/operations/evalsragascontextrecall.ts +0 -164
  473. package/packages/orq-rc/src/models/operations/evalsragascorrectness.ts +0 -153
  474. package/packages/orq-rc/src/models/operations/evalsragasfaithfulness.ts +0 -155
  475. package/packages/orq-rc/src/models/operations/evalsragasharmfulness.ts +0 -146
  476. package/packages/orq-rc/src/models/operations/evalsragasmaliciousness.ts +0 -157
  477. package/packages/orq-rc/src/models/operations/evalsragasnoisesensitivity.ts +0 -166
  478. package/packages/orq-rc/src/models/operations/evalsragasresponserelevancy.ts +0 -165
  479. package/packages/orq-rc/src/models/operations/evalsragassummarization.ts +0 -150
  480. package/packages/orq-rc/src/models/operations/evalssentimentclassification.ts +0 -285
  481. package/packages/orq-rc/src/models/operations/evalssummarization.ts +0 -253
  482. package/packages/orq-rc/src/models/operations/evalstoneofvoice.ts +0 -251
  483. package/packages/orq-rc/src/models/operations/evalstranslation.ts +0 -251
  484. package/packages/orq-rc/src/models/operations/evalsvalidjson.ts +0 -177
  485. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
  486. package/packages/orq-rc/src/models/operations/fileget.ts +0 -223
  487. package/packages/orq-rc/src/models/operations/filelist.ts +0 -337
  488. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -327
  489. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2296
  490. package/packages/orq-rc/src/models/operations/getevals.ts +0 -7290
  491. package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -315
  492. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -537
  493. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -2157
  494. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -2162
  495. package/packages/orq-rc/src/models/operations/index.ts +0 -97
  496. package/packages/orq-rc/src/models/operations/invokeeval.ts +0 -2520
  497. package/packages/orq-rc/src/models/operations/listchunks.ts +0 -494
  498. package/packages/orq-rc/src/models/operations/listcontacts.ts +0 -490
  499. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -2784
  500. package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -406
  501. package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -447
  502. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -663
  503. package/packages/orq-rc/src/models/operations/listmodels.ts +0 -273
  504. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2294
  505. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
  506. package/packages/orq-rc/src/models/operations/retrievecontact.ts +0 -210
  507. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -2586
  508. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -288
  509. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -273
  510. package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -3367
  511. package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -448
  512. package/packages/orq-rc/src/models/operations/updatecontact.ts +0 -325
  513. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -5155
  514. package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -393
  515. package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -345
  516. package/packages/orq-rc/src/models/operations/updateeval.ts +0 -4131
  517. package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -920
  518. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -4220
  519. package/packages/orq-rc/src/sdk/contacts.ts +0 -99
  520. package/packages/orq-rc/src/sdk/datasets.ts +0 -204
  521. package/packages/orq-rc/src/sdk/deployments.ts +0 -89
  522. package/packages/orq-rc/src/sdk/evals.ts +0 -639
  523. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  524. package/packages/orq-rc/src/sdk/files.ts +0 -78
  525. package/packages/orq-rc/src/sdk/index.ts +0 -5
  526. package/packages/orq-rc/src/sdk/knowledge.ts +0 -249
  527. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  528. package/packages/orq-rc/src/sdk/models.ts +0 -25
  529. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  530. package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
  531. package/packages/orq-rc/src/sdk/sdk.ts +0 -73
  532. package/packages/orq-rc/src/types/async.ts +0 -68
  533. package/packages/orq-rc/src/types/blobs.ts +0 -31
  534. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  535. package/packages/orq-rc/src/types/enums.ts +0 -16
  536. package/packages/orq-rc/src/types/fp.ts +0 -50
  537. package/packages/orq-rc/src/types/index.ts +0 -11
  538. package/packages/orq-rc/src/types/operations.ts +0 -105
  539. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  540. package/packages/orq-rc/src/types/streams.ts +0 -21
  541. package/packages/orq-rc/tsconfig.json +0 -41
  542. package/sdk/chunking.d.ts.map +0 -1
  543. package/sdk/chunking.js.map +0 -1
  544. package/src/funcs/chunkingParse.ts +0 -160
  545. package/src/funcs/knowledgeCreate.ts +0 -158
  546. package/src/mcp-server/tools/chunkingParse.ts +0 -37
  547. package/src/mcp-server/tools/knowledgeCreate.ts +0 -35
  548. package/src/models/operations/createknowledge.ts +0 -846
  549. package/src/models/operations/parse.ts +0 -1610
  550. package/src/sdk/chunking.ts +0 -27
  551. /package/{packages/orq-rc/docs → docs}/sdks/knowledgebases/README.md +0 -0
  552. /package/{packages/orq-rc/src → src}/funcs/knowledgeBasesChunkText.ts +0 -0
  553. /package/{packages/orq-rc/src → src}/mcp-server/tools/knowledgeBasesChunkText.ts +0 -0
  554. /package/{packages/orq-rc/src → src}/models/operations/chunktext.ts +0 -0
  555. /package/{packages/orq-rc/src → src}/sdk/knowledgebases.ts +0 -0
@@ -1,4083 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
-
12
- /**
13
- * The modality of the model
14
- */
15
- export const ModelType = {
16
- Chat: "chat",
17
- Completion: "completion",
18
- Embedding: "embedding",
19
- Vision: "vision",
20
- Image: "image",
21
- Tts: "tts",
22
- Stt: "stt",
23
- Rerank: "rerank",
24
- Moderations: "moderations",
25
- } as const;
26
- /**
27
- * The modality of the model
28
- */
29
- export type ModelType = ClosedEnum<typeof ModelType>;
30
-
31
- /**
32
- * Only supported on `image` models.
33
- */
34
- export const CreatePromptFormat = {
35
- Url: "url",
36
- B64Json: "b64_json",
37
- Text: "text",
38
- JsonObject: "json_object",
39
- } as const;
40
- /**
41
- * Only supported on `image` models.
42
- */
43
- export type CreatePromptFormat = ClosedEnum<typeof CreatePromptFormat>;
44
-
45
- export const CreatePromptResponseFormatType = {
46
- JsonObject: "json_object",
47
- } as const;
48
- export type CreatePromptResponseFormatType = ClosedEnum<
49
- typeof CreatePromptResponseFormatType
50
- >;
51
-
52
- export type ResponseFormat2 = {
53
- type: CreatePromptResponseFormatType;
54
- };
55
-
56
- export const ResponseFormatType = {
57
- JsonSchema: "json_schema",
58
- } as const;
59
- export type ResponseFormatType = ClosedEnum<typeof ResponseFormatType>;
60
-
61
- export type JsonSchema = {
62
- name: string;
63
- strict?: boolean | undefined;
64
- schema: { [k: string]: any };
65
- };
66
-
67
- export type ResponseFormat1 = {
68
- type: ResponseFormatType;
69
- jsonSchema: JsonSchema;
70
- };
71
-
72
- /**
73
- * An object specifying the format that the model must output.
74
- *
75
- * @remarks
76
- *
77
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
78
- *
79
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
80
- *
81
- * 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.
82
- */
83
- export type ResponseFormat = ResponseFormat1 | ResponseFormat2;
84
-
85
- /**
86
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
87
- */
88
- export const PhotoRealVersion = {
89
- V1: "v1",
90
- V2: "v2",
91
- } as const;
92
- /**
93
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
94
- */
95
- export type PhotoRealVersion = ClosedEnum<typeof PhotoRealVersion>;
96
-
97
- /**
98
- * The format to return the embeddings
99
- */
100
- export const EncodingFormat = {
101
- Float: "float",
102
- Base64: "base64",
103
- } as const;
104
- /**
105
- * The format to return the embeddings
106
- */
107
- export type EncodingFormat = ClosedEnum<typeof EncodingFormat>;
108
-
109
- /**
110
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
111
- */
112
- export const ReasoningEffort = {
113
- Disable: "disable",
114
- Low: "low",
115
- Medium: "medium",
116
- High: "high",
117
- } as const;
118
- /**
119
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
120
- */
121
- export type ReasoningEffort = ClosedEnum<typeof ReasoningEffort>;
122
-
123
- /**
124
- * Model Parameters: Not all parameters apply to every model
125
- */
126
- export type ModelParameters = {
127
- /**
128
- * Only supported on `chat` and `completion` models.
129
- */
130
- temperature?: number | undefined;
131
- /**
132
- * Only supported on `chat` and `completion` models.
133
- */
134
- maxTokens?: number | undefined;
135
- /**
136
- * Only supported on `chat` and `completion` models.
137
- */
138
- topK?: number | undefined;
139
- /**
140
- * Only supported on `chat` and `completion` models.
141
- */
142
- topP?: number | undefined;
143
- /**
144
- * Only supported on `chat` and `completion` models.
145
- */
146
- frequencyPenalty?: number | undefined;
147
- /**
148
- * Only supported on `chat` and `completion` models.
149
- */
150
- presencePenalty?: number | undefined;
151
- /**
152
- * Only supported on `image` models.
153
- */
154
- numImages?: number | undefined;
155
- /**
156
- * Best effort deterministic seed for the model. Currently only OpenAI models support these
157
- */
158
- seed?: number | undefined;
159
- /**
160
- * Only supported on `image` models.
161
- */
162
- format?: CreatePromptFormat | undefined;
163
- /**
164
- * Only supported on `image` models.
165
- */
166
- dimensions?: string | undefined;
167
- /**
168
- * Only supported on `image` models.
169
- */
170
- quality?: string | undefined;
171
- /**
172
- * Only supported on `image` models.
173
- */
174
- style?: string | undefined;
175
- /**
176
- * An object specifying the format that the model must output.
177
- *
178
- * @remarks
179
- *
180
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
181
- *
182
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
183
- *
184
- * 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.
185
- */
186
- responseFormat?: ResponseFormat1 | ResponseFormat2 | null | undefined;
187
- /**
188
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
189
- */
190
- photoRealVersion?: PhotoRealVersion | undefined;
191
- /**
192
- * The format to return the embeddings
193
- */
194
- encodingFormat?: EncodingFormat | undefined;
195
- /**
196
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
197
- */
198
- reasoningEffort?: ReasoningEffort | undefined;
199
- /**
200
- * 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`
201
- */
202
- budgetTokens?: number | undefined;
203
- };
204
-
205
- export const Provider = {
206
- Cohere: "cohere",
207
- Openai: "openai",
208
- Anthropic: "anthropic",
209
- Huggingface: "huggingface",
210
- Replicate: "replicate",
211
- Google: "google",
212
- GoogleAi: "google-ai",
213
- Azure: "azure",
214
- Aws: "aws",
215
- Anyscale: "anyscale",
216
- Perplexity: "perplexity",
217
- Groq: "groq",
218
- Fal: "fal",
219
- Leonardoai: "leonardoai",
220
- Nvidia: "nvidia",
221
- Jina: "jina",
222
- Togetherai: "togetherai",
223
- Elevenlabs: "elevenlabs",
224
- Litellm: "litellm",
225
- } as const;
226
- export type Provider = ClosedEnum<typeof Provider>;
227
-
228
- /**
229
- * The role of the prompt message
230
- */
231
- export const CreatePromptRole = {
232
- System: "system",
233
- Assistant: "assistant",
234
- User: "user",
235
- Exception: "exception",
236
- Tool: "tool",
237
- Prompt: "prompt",
238
- Correction: "correction",
239
- ExpectedOutput: "expected_output",
240
- } as const;
241
- /**
242
- * The role of the prompt message
243
- */
244
- export type CreatePromptRole = ClosedEnum<typeof CreatePromptRole>;
245
-
246
- /**
247
- * The type of the content part. Always `file`.
248
- */
249
- export const CreatePrompt2PromptsRequestType = {
250
- File: "file",
251
- } as const;
252
- /**
253
- * The type of the content part. Always `file`.
254
- */
255
- export type CreatePrompt2PromptsRequestType = ClosedEnum<
256
- typeof CreatePrompt2PromptsRequestType
257
- >;
258
-
259
- export type CreatePrompt2File = {
260
- /**
261
- * The base64 encoded file data, used when passing the file to the model as a string.
262
- */
263
- fileData: string;
264
- /**
265
- * The name of the file, used when passing the file to the model as a string.
266
- */
267
- filename?: string | undefined;
268
- };
269
-
270
- export type CreatePrompt23 = {
271
- /**
272
- * The type of the content part. Always `file`.
273
- */
274
- type: CreatePrompt2PromptsRequestType;
275
- file: CreatePrompt2File;
276
- };
277
-
278
- export const CreatePrompt2PromptsType = {
279
- ImageUrl: "image_url",
280
- } as const;
281
- export type CreatePrompt2PromptsType = ClosedEnum<
282
- typeof CreatePrompt2PromptsType
283
- >;
284
-
285
- export type CreatePrompt2ImageUrl = {
286
- /**
287
- * Either a URL of the image or the base64 encoded data URI.
288
- */
289
- url: string;
290
- /**
291
- * Specifies the detail level of the image. Currently only supported with OpenAI models
292
- */
293
- detail?: string | undefined;
294
- };
295
-
296
- /**
297
- * The image part of the prompt message. Only supported with vision models.
298
- */
299
- export type CreatePrompt22 = {
300
- type: CreatePrompt2PromptsType;
301
- imageUrl: CreatePrompt2ImageUrl;
302
- };
303
-
304
- export const CreatePrompt2Type = {
305
- Text: "text",
306
- } as const;
307
- export type CreatePrompt2Type = ClosedEnum<typeof CreatePrompt2Type>;
308
-
309
- /**
310
- * Text content part of a prompt message
311
- */
312
- export type CreatePrompt21 = {
313
- type: CreatePrompt2Type;
314
- text: string;
315
- };
316
-
317
- export type CreatePromptContent2 =
318
- | CreatePrompt21
319
- | CreatePrompt22
320
- | CreatePrompt23;
321
-
322
- /**
323
- * 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.
324
- */
325
- export type CreatePromptContent =
326
- | string
327
- | Array<CreatePrompt21 | CreatePrompt22 | CreatePrompt23>;
328
-
329
- export const CreatePromptType = {
330
- Function: "function",
331
- } as const;
332
- export type CreatePromptType = ClosedEnum<typeof CreatePromptType>;
333
-
334
- export type CreatePromptFunction = {
335
- name: string;
336
- /**
337
- * JSON string arguments for the functions
338
- */
339
- arguments: string;
340
- };
341
-
342
- export type CreatePromptToolCalls = {
343
- id?: string | undefined;
344
- index?: number | undefined;
345
- type: CreatePromptType;
346
- function: CreatePromptFunction;
347
- };
348
-
349
- export type CreatePromptMessages = {
350
- /**
351
- * The role of the prompt message
352
- */
353
- role: CreatePromptRole;
354
- /**
355
- * 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.
356
- */
357
- content: string | Array<CreatePrompt21 | CreatePrompt22 | CreatePrompt23>;
358
- toolCalls?: Array<CreatePromptToolCalls> | undefined;
359
- toolCallId?: string | undefined;
360
- };
361
-
362
- /**
363
- * A list of messages compatible with the openAI schema
364
- */
365
- export type PromptConfig = {
366
- stream?: boolean | undefined;
367
- model?: string | undefined;
368
- /**
369
- * The modality of the model
370
- */
371
- modelType?: ModelType | null | undefined;
372
- /**
373
- * Model Parameters: Not all parameters apply to every model
374
- */
375
- modelParameters?: ModelParameters | undefined;
376
- provider?: Provider | undefined;
377
- version?: string | undefined;
378
- messages: Array<CreatePromptMessages>;
379
- };
380
-
381
- export const UseCases = {
382
- AgentsSimulations: "Agents simulations",
383
- Agents: "Agents",
384
- APIInteraction: "API interaction",
385
- AutonomousAgents: "Autonomous Agents",
386
- Chatbots: "Chatbots",
387
- Classification: "Classification",
388
- CodeUnderstanding: "Code understanding",
389
- CodeWriting: "Code writing",
390
- Conversation: "Conversation",
391
- DocumentsQA: "Documents QA",
392
- Evaluation: "Evaluation",
393
- Extraction: "Extraction",
394
- MultiModal: "Multi-modal",
395
- SelfChecking: "Self-checking",
396
- SentimentAnalysis: "Sentiment analysis",
397
- Sql: "SQL",
398
- Summarization: "Summarization",
399
- Tagging: "Tagging",
400
- TranslationDocument: "Translation (document)",
401
- TranslationSentences: "Translation (sentences)",
402
- } as const;
403
- export type UseCases = ClosedEnum<typeof UseCases>;
404
-
405
- /**
406
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
407
- */
408
- export const Language = {
409
- Chinese: "Chinese",
410
- Dutch: "Dutch",
411
- English: "English",
412
- French: "French",
413
- German: "German",
414
- Russian: "Russian",
415
- Spanish: "Spanish",
416
- } as const;
417
- /**
418
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
419
- */
420
- export type Language = ClosedEnum<typeof Language>;
421
-
422
- export type CreatePromptMetadata = {
423
- /**
424
- * 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
425
- */
426
- useCases?: Array<UseCases> | undefined;
427
- /**
428
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
429
- */
430
- language?: Language | null | undefined;
431
- };
432
-
433
- export type CreatePromptRequestBody = {
434
- /**
435
- * The prompt’s name, meant to be displayable in the UI.
436
- */
437
- displayName: string;
438
- /**
439
- * 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
440
- */
441
- description?: string | null | undefined;
442
- /**
443
- * A list of messages compatible with the openAI schema
444
- */
445
- promptConfig: PromptConfig;
446
- metadata?: CreatePromptMetadata | undefined;
447
- /**
448
- * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
449
- */
450
- path: string;
451
- };
452
-
453
- export const CreatePromptPromptsType = {
454
- Prompt: "prompt",
455
- } as const;
456
- export type CreatePromptPromptsType = ClosedEnum<
457
- typeof CreatePromptPromptsType
458
- >;
459
-
460
- /**
461
- * The modality of the model
462
- */
463
- export const CreatePromptModelType = {
464
- Chat: "chat",
465
- Completion: "completion",
466
- Embedding: "embedding",
467
- Vision: "vision",
468
- Image: "image",
469
- Tts: "tts",
470
- Stt: "stt",
471
- Rerank: "rerank",
472
- Moderations: "moderations",
473
- } as const;
474
- /**
475
- * The modality of the model
476
- */
477
- export type CreatePromptModelType = ClosedEnum<typeof CreatePromptModelType>;
478
-
479
- /**
480
- * Only supported on `image` models.
481
- */
482
- export const CreatePromptPromptsFormat = {
483
- Url: "url",
484
- B64Json: "b64_json",
485
- Text: "text",
486
- JsonObject: "json_object",
487
- } as const;
488
- /**
489
- * Only supported on `image` models.
490
- */
491
- export type CreatePromptPromptsFormat = ClosedEnum<
492
- typeof CreatePromptPromptsFormat
493
- >;
494
-
495
- export const CreatePromptResponseFormatPromptsResponseType = {
496
- JsonObject: "json_object",
497
- } as const;
498
- export type CreatePromptResponseFormatPromptsResponseType = ClosedEnum<
499
- typeof CreatePromptResponseFormatPromptsResponseType
500
- >;
501
-
502
- export type CreatePromptResponseFormat2 = {
503
- type: CreatePromptResponseFormatPromptsResponseType;
504
- };
505
-
506
- export const CreatePromptResponseFormatPromptsType = {
507
- JsonSchema: "json_schema",
508
- } as const;
509
- export type CreatePromptResponseFormatPromptsType = ClosedEnum<
510
- typeof CreatePromptResponseFormatPromptsType
511
- >;
512
-
513
- export type CreatePromptResponseFormatJsonSchema = {
514
- name: string;
515
- strict?: boolean | undefined;
516
- schema: { [k: string]: any };
517
- };
518
-
519
- export type CreatePromptResponseFormat1 = {
520
- type: CreatePromptResponseFormatPromptsType;
521
- jsonSchema: CreatePromptResponseFormatJsonSchema;
522
- };
523
-
524
- /**
525
- * An object specifying the format that the model must output.
526
- *
527
- * @remarks
528
- *
529
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
530
- *
531
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
532
- *
533
- * 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.
534
- */
535
- export type CreatePromptResponseFormat =
536
- | CreatePromptResponseFormat1
537
- | CreatePromptResponseFormat2;
538
-
539
- /**
540
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
541
- */
542
- export const CreatePromptPhotoRealVersion = {
543
- V1: "v1",
544
- V2: "v2",
545
- } as const;
546
- /**
547
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
548
- */
549
- export type CreatePromptPhotoRealVersion = ClosedEnum<
550
- typeof CreatePromptPhotoRealVersion
551
- >;
552
-
553
- /**
554
- * The format to return the embeddings
555
- */
556
- export const CreatePromptEncodingFormat = {
557
- Float: "float",
558
- Base64: "base64",
559
- } as const;
560
- /**
561
- * The format to return the embeddings
562
- */
563
- export type CreatePromptEncodingFormat = ClosedEnum<
564
- typeof CreatePromptEncodingFormat
565
- >;
566
-
567
- /**
568
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
569
- */
570
- export const CreatePromptReasoningEffort = {
571
- Disable: "disable",
572
- Low: "low",
573
- Medium: "medium",
574
- High: "high",
575
- } as const;
576
- /**
577
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
578
- */
579
- export type CreatePromptReasoningEffort = ClosedEnum<
580
- typeof CreatePromptReasoningEffort
581
- >;
582
-
583
- /**
584
- * Model Parameters: Not all parameters apply to every model
585
- */
586
- export type CreatePromptModelParameters = {
587
- /**
588
- * Only supported on `chat` and `completion` models.
589
- */
590
- temperature?: number | undefined;
591
- /**
592
- * Only supported on `chat` and `completion` models.
593
- */
594
- maxTokens?: number | undefined;
595
- /**
596
- * Only supported on `chat` and `completion` models.
597
- */
598
- topK?: number | undefined;
599
- /**
600
- * Only supported on `chat` and `completion` models.
601
- */
602
- topP?: number | undefined;
603
- /**
604
- * Only supported on `chat` and `completion` models.
605
- */
606
- frequencyPenalty?: number | undefined;
607
- /**
608
- * Only supported on `chat` and `completion` models.
609
- */
610
- presencePenalty?: number | undefined;
611
- /**
612
- * Only supported on `image` models.
613
- */
614
- numImages?: number | undefined;
615
- /**
616
- * Best effort deterministic seed for the model. Currently only OpenAI models support these
617
- */
618
- seed?: number | undefined;
619
- /**
620
- * Only supported on `image` models.
621
- */
622
- format?: CreatePromptPromptsFormat | undefined;
623
- /**
624
- * Only supported on `image` models.
625
- */
626
- dimensions?: string | undefined;
627
- /**
628
- * Only supported on `image` models.
629
- */
630
- quality?: string | undefined;
631
- /**
632
- * Only supported on `image` models.
633
- */
634
- style?: string | undefined;
635
- /**
636
- * An object specifying the format that the model must output.
637
- *
638
- * @remarks
639
- *
640
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
641
- *
642
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
643
- *
644
- * 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.
645
- */
646
- responseFormat?:
647
- | CreatePromptResponseFormat1
648
- | CreatePromptResponseFormat2
649
- | null
650
- | undefined;
651
- /**
652
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
653
- */
654
- photoRealVersion?: CreatePromptPhotoRealVersion | undefined;
655
- /**
656
- * The format to return the embeddings
657
- */
658
- encodingFormat?: CreatePromptEncodingFormat | undefined;
659
- /**
660
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
661
- */
662
- reasoningEffort?: CreatePromptReasoningEffort | undefined;
663
- /**
664
- * 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`
665
- */
666
- budgetTokens?: number | undefined;
667
- };
668
-
669
- export const CreatePromptProvider = {
670
- Cohere: "cohere",
671
- Openai: "openai",
672
- Anthropic: "anthropic",
673
- Huggingface: "huggingface",
674
- Replicate: "replicate",
675
- Google: "google",
676
- GoogleAi: "google-ai",
677
- Azure: "azure",
678
- Aws: "aws",
679
- Anyscale: "anyscale",
680
- Perplexity: "perplexity",
681
- Groq: "groq",
682
- Fal: "fal",
683
- Leonardoai: "leonardoai",
684
- Nvidia: "nvidia",
685
- Jina: "jina",
686
- Togetherai: "togetherai",
687
- Elevenlabs: "elevenlabs",
688
- Litellm: "litellm",
689
- } as const;
690
- export type CreatePromptProvider = ClosedEnum<typeof CreatePromptProvider>;
691
-
692
- /**
693
- * The role of the prompt message
694
- */
695
- export const CreatePromptPromptsRole = {
696
- System: "system",
697
- Assistant: "assistant",
698
- User: "user",
699
- Exception: "exception",
700
- Tool: "tool",
701
- Prompt: "prompt",
702
- Correction: "correction",
703
- ExpectedOutput: "expected_output",
704
- } as const;
705
- /**
706
- * The role of the prompt message
707
- */
708
- export type CreatePromptPromptsRole = ClosedEnum<
709
- typeof CreatePromptPromptsRole
710
- >;
711
-
712
- /**
713
- * The type of the content part. Always `file`.
714
- */
715
- export const CreatePrompt2PromptsResponse200ApplicationJSONType = {
716
- File: "file",
717
- } as const;
718
- /**
719
- * The type of the content part. Always `file`.
720
- */
721
- export type CreatePrompt2PromptsResponse200ApplicationJSONType = ClosedEnum<
722
- typeof CreatePrompt2PromptsResponse200ApplicationJSONType
723
- >;
724
-
725
- export type CreatePrompt2PromptsFile = {
726
- /**
727
- * The base64 encoded file data, used when passing the file to the model as a string.
728
- */
729
- fileData: string;
730
- /**
731
- * The name of the file, used when passing the file to the model as a string.
732
- */
733
- filename?: string | undefined;
734
- };
735
-
736
- export type CreatePrompt2Prompts3 = {
737
- /**
738
- * The type of the content part. Always `file`.
739
- */
740
- type: CreatePrompt2PromptsResponse200ApplicationJSONType;
741
- file: CreatePrompt2PromptsFile;
742
- };
743
-
744
- export const CreatePrompt2PromptsResponse200Type = {
745
- ImageUrl: "image_url",
746
- } as const;
747
- export type CreatePrompt2PromptsResponse200Type = ClosedEnum<
748
- typeof CreatePrompt2PromptsResponse200Type
749
- >;
750
-
751
- export type CreatePrompt2PromptsImageUrl = {
752
- /**
753
- * The orq.ai id of the image
754
- */
755
- id?: string | undefined;
756
- /**
757
- * Either a URL of the image or the base64 encoded data URI.
758
- */
759
- url: string;
760
- /**
761
- * Specifies the detail level of the image. Currently only supported with OpenAI models
762
- */
763
- detail?: string | undefined;
764
- };
765
-
766
- /**
767
- * The image part of the prompt message. Only supported with vision models.
768
- */
769
- export type CreatePrompt2Prompts2 = {
770
- type: CreatePrompt2PromptsResponse200Type;
771
- imageUrl: CreatePrompt2PromptsImageUrl;
772
- };
773
-
774
- export const CreatePrompt2PromptsResponseType = {
775
- Text: "text",
776
- } as const;
777
- export type CreatePrompt2PromptsResponseType = ClosedEnum<
778
- typeof CreatePrompt2PromptsResponseType
779
- >;
780
-
781
- /**
782
- * Text content part of a prompt message
783
- */
784
- export type CreatePrompt2Prompts1 = {
785
- type: CreatePrompt2PromptsResponseType;
786
- text: string;
787
- };
788
-
789
- export type CreatePromptContentPrompts2 =
790
- | CreatePrompt2Prompts1
791
- | CreatePrompt2Prompts2
792
- | CreatePrompt2Prompts3;
793
-
794
- /**
795
- * 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.
796
- */
797
- export type CreatePromptPromptsContent =
798
- | string
799
- | Array<
800
- CreatePrompt2Prompts1 | CreatePrompt2Prompts2 | CreatePrompt2Prompts3
801
- >;
802
-
803
- export const CreatePromptPromptsResponseType = {
804
- Function: "function",
805
- } as const;
806
- export type CreatePromptPromptsResponseType = ClosedEnum<
807
- typeof CreatePromptPromptsResponseType
808
- >;
809
-
810
- export type CreatePromptPromptsFunction = {
811
- name: string;
812
- /**
813
- * JSON string arguments for the functions
814
- */
815
- arguments: string;
816
- };
817
-
818
- export type CreatePromptPromptsToolCalls = {
819
- id?: string | undefined;
820
- index?: number | undefined;
821
- type: CreatePromptPromptsResponseType;
822
- function: CreatePromptPromptsFunction;
823
- };
824
-
825
- export type CreatePromptPromptsMessages = {
826
- /**
827
- * The role of the prompt message
828
- */
829
- role: CreatePromptPromptsRole;
830
- /**
831
- * 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.
832
- */
833
- content:
834
- | string
835
- | Array<
836
- CreatePrompt2Prompts1 | CreatePrompt2Prompts2 | CreatePrompt2Prompts3
837
- >;
838
- toolCalls?: Array<CreatePromptPromptsToolCalls> | undefined;
839
- toolCallId?: string | undefined;
840
- };
841
-
842
- /**
843
- * A list of messages compatible with the openAI schema
844
- */
845
- export type CreatePromptPromptConfig = {
846
- stream?: boolean | undefined;
847
- model?: string | undefined;
848
- /**
849
- * The id of the resource
850
- */
851
- modelDbId?: string | null | undefined;
852
- /**
853
- * The modality of the model
854
- */
855
- modelType?: CreatePromptModelType | null | undefined;
856
- /**
857
- * Model Parameters: Not all parameters apply to every model
858
- */
859
- modelParameters?: CreatePromptModelParameters | undefined;
860
- provider?: CreatePromptProvider | undefined;
861
- /**
862
- * The id of the resource
863
- */
864
- integrationId?: string | null | undefined;
865
- version?: string | undefined;
866
- messages: Array<CreatePromptPromptsMessages>;
867
- };
868
-
869
- export const CreatePromptUseCases = {
870
- AgentsSimulations: "Agents simulations",
871
- Agents: "Agents",
872
- APIInteraction: "API interaction",
873
- AutonomousAgents: "Autonomous Agents",
874
- Chatbots: "Chatbots",
875
- Classification: "Classification",
876
- CodeUnderstanding: "Code understanding",
877
- CodeWriting: "Code writing",
878
- Conversation: "Conversation",
879
- DocumentsQA: "Documents QA",
880
- Evaluation: "Evaluation",
881
- Extraction: "Extraction",
882
- MultiModal: "Multi-modal",
883
- SelfChecking: "Self-checking",
884
- SentimentAnalysis: "Sentiment analysis",
885
- Sql: "SQL",
886
- Summarization: "Summarization",
887
- Tagging: "Tagging",
888
- TranslationDocument: "Translation (document)",
889
- TranslationSentences: "Translation (sentences)",
890
- } as const;
891
- export type CreatePromptUseCases = ClosedEnum<typeof CreatePromptUseCases>;
892
-
893
- /**
894
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
895
- */
896
- export const CreatePromptLanguage = {
897
- Chinese: "Chinese",
898
- Dutch: "Dutch",
899
- English: "English",
900
- French: "French",
901
- German: "German",
902
- Russian: "Russian",
903
- Spanish: "Spanish",
904
- } as const;
905
- /**
906
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
907
- */
908
- export type CreatePromptLanguage = ClosedEnum<typeof CreatePromptLanguage>;
909
-
910
- export type CreatePromptPromptsMetadata = {
911
- /**
912
- * 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
913
- */
914
- useCases?: Array<CreatePromptUseCases> | undefined;
915
- /**
916
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
917
- */
918
- language?: CreatePromptLanguage | null | undefined;
919
- };
920
-
921
- /**
922
- * Prompt created.
923
- */
924
- export type CreatePromptResponseBody = {
925
- id: string;
926
- type: CreatePromptPromptsType;
927
- owner: string;
928
- domainId: string;
929
- created: string;
930
- updated: string;
931
- createdById?: string | null | undefined;
932
- updatedById?: string | null | undefined;
933
- /**
934
- * The prompt’s name, meant to be displayable in the UI.
935
- */
936
- displayName: string;
937
- /**
938
- * 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
939
- */
940
- description?: string | null | undefined;
941
- /**
942
- * A list of messages compatible with the openAI schema
943
- */
944
- promptConfig: CreatePromptPromptConfig;
945
- metadata?: CreatePromptPromptsMetadata | undefined;
946
- };
947
-
948
- /** @internal */
949
- export const ModelType$inboundSchema: z.ZodNativeEnum<typeof ModelType> = z
950
- .nativeEnum(ModelType);
951
-
952
- /** @internal */
953
- export const ModelType$outboundSchema: z.ZodNativeEnum<typeof ModelType> =
954
- ModelType$inboundSchema;
955
-
956
- /**
957
- * @internal
958
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
959
- */
960
- export namespace ModelType$ {
961
- /** @deprecated use `ModelType$inboundSchema` instead. */
962
- export const inboundSchema = ModelType$inboundSchema;
963
- /** @deprecated use `ModelType$outboundSchema` instead. */
964
- export const outboundSchema = ModelType$outboundSchema;
965
- }
966
-
967
- /** @internal */
968
- export const CreatePromptFormat$inboundSchema: z.ZodNativeEnum<
969
- typeof CreatePromptFormat
970
- > = z.nativeEnum(CreatePromptFormat);
971
-
972
- /** @internal */
973
- export const CreatePromptFormat$outboundSchema: z.ZodNativeEnum<
974
- typeof CreatePromptFormat
975
- > = CreatePromptFormat$inboundSchema;
976
-
977
- /**
978
- * @internal
979
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
980
- */
981
- export namespace CreatePromptFormat$ {
982
- /** @deprecated use `CreatePromptFormat$inboundSchema` instead. */
983
- export const inboundSchema = CreatePromptFormat$inboundSchema;
984
- /** @deprecated use `CreatePromptFormat$outboundSchema` instead. */
985
- export const outboundSchema = CreatePromptFormat$outboundSchema;
986
- }
987
-
988
- /** @internal */
989
- export const CreatePromptResponseFormatType$inboundSchema: z.ZodNativeEnum<
990
- typeof CreatePromptResponseFormatType
991
- > = z.nativeEnum(CreatePromptResponseFormatType);
992
-
993
- /** @internal */
994
- export const CreatePromptResponseFormatType$outboundSchema: z.ZodNativeEnum<
995
- typeof CreatePromptResponseFormatType
996
- > = CreatePromptResponseFormatType$inboundSchema;
997
-
998
- /**
999
- * @internal
1000
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1001
- */
1002
- export namespace CreatePromptResponseFormatType$ {
1003
- /** @deprecated use `CreatePromptResponseFormatType$inboundSchema` instead. */
1004
- export const inboundSchema = CreatePromptResponseFormatType$inboundSchema;
1005
- /** @deprecated use `CreatePromptResponseFormatType$outboundSchema` instead. */
1006
- export const outboundSchema = CreatePromptResponseFormatType$outboundSchema;
1007
- }
1008
-
1009
- /** @internal */
1010
- export const ResponseFormat2$inboundSchema: z.ZodType<
1011
- ResponseFormat2,
1012
- z.ZodTypeDef,
1013
- unknown
1014
- > = z.object({
1015
- type: CreatePromptResponseFormatType$inboundSchema,
1016
- });
1017
-
1018
- /** @internal */
1019
- export type ResponseFormat2$Outbound = {
1020
- type: string;
1021
- };
1022
-
1023
- /** @internal */
1024
- export const ResponseFormat2$outboundSchema: z.ZodType<
1025
- ResponseFormat2$Outbound,
1026
- z.ZodTypeDef,
1027
- ResponseFormat2
1028
- > = z.object({
1029
- type: CreatePromptResponseFormatType$outboundSchema,
1030
- });
1031
-
1032
- /**
1033
- * @internal
1034
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1035
- */
1036
- export namespace ResponseFormat2$ {
1037
- /** @deprecated use `ResponseFormat2$inboundSchema` instead. */
1038
- export const inboundSchema = ResponseFormat2$inboundSchema;
1039
- /** @deprecated use `ResponseFormat2$outboundSchema` instead. */
1040
- export const outboundSchema = ResponseFormat2$outboundSchema;
1041
- /** @deprecated use `ResponseFormat2$Outbound` instead. */
1042
- export type Outbound = ResponseFormat2$Outbound;
1043
- }
1044
-
1045
- export function responseFormat2ToJSON(
1046
- responseFormat2: ResponseFormat2,
1047
- ): string {
1048
- return JSON.stringify(ResponseFormat2$outboundSchema.parse(responseFormat2));
1049
- }
1050
-
1051
- export function responseFormat2FromJSON(
1052
- jsonString: string,
1053
- ): SafeParseResult<ResponseFormat2, SDKValidationError> {
1054
- return safeParse(
1055
- jsonString,
1056
- (x) => ResponseFormat2$inboundSchema.parse(JSON.parse(x)),
1057
- `Failed to parse 'ResponseFormat2' from JSON`,
1058
- );
1059
- }
1060
-
1061
- /** @internal */
1062
- export const ResponseFormatType$inboundSchema: z.ZodNativeEnum<
1063
- typeof ResponseFormatType
1064
- > = z.nativeEnum(ResponseFormatType);
1065
-
1066
- /** @internal */
1067
- export const ResponseFormatType$outboundSchema: z.ZodNativeEnum<
1068
- typeof ResponseFormatType
1069
- > = ResponseFormatType$inboundSchema;
1070
-
1071
- /**
1072
- * @internal
1073
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1074
- */
1075
- export namespace ResponseFormatType$ {
1076
- /** @deprecated use `ResponseFormatType$inboundSchema` instead. */
1077
- export const inboundSchema = ResponseFormatType$inboundSchema;
1078
- /** @deprecated use `ResponseFormatType$outboundSchema` instead. */
1079
- export const outboundSchema = ResponseFormatType$outboundSchema;
1080
- }
1081
-
1082
- /** @internal */
1083
- export const JsonSchema$inboundSchema: z.ZodType<
1084
- JsonSchema,
1085
- z.ZodTypeDef,
1086
- unknown
1087
- > = z.object({
1088
- name: z.string(),
1089
- strict: z.boolean().optional(),
1090
- schema: z.record(z.any()),
1091
- });
1092
-
1093
- /** @internal */
1094
- export type JsonSchema$Outbound = {
1095
- name: string;
1096
- strict?: boolean | undefined;
1097
- schema: { [k: string]: any };
1098
- };
1099
-
1100
- /** @internal */
1101
- export const JsonSchema$outboundSchema: z.ZodType<
1102
- JsonSchema$Outbound,
1103
- z.ZodTypeDef,
1104
- JsonSchema
1105
- > = z.object({
1106
- name: z.string(),
1107
- strict: z.boolean().optional(),
1108
- schema: z.record(z.any()),
1109
- });
1110
-
1111
- /**
1112
- * @internal
1113
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1114
- */
1115
- export namespace JsonSchema$ {
1116
- /** @deprecated use `JsonSchema$inboundSchema` instead. */
1117
- export const inboundSchema = JsonSchema$inboundSchema;
1118
- /** @deprecated use `JsonSchema$outboundSchema` instead. */
1119
- export const outboundSchema = JsonSchema$outboundSchema;
1120
- /** @deprecated use `JsonSchema$Outbound` instead. */
1121
- export type Outbound = JsonSchema$Outbound;
1122
- }
1123
-
1124
- export function jsonSchemaToJSON(jsonSchema: JsonSchema): string {
1125
- return JSON.stringify(JsonSchema$outboundSchema.parse(jsonSchema));
1126
- }
1127
-
1128
- export function jsonSchemaFromJSON(
1129
- jsonString: string,
1130
- ): SafeParseResult<JsonSchema, SDKValidationError> {
1131
- return safeParse(
1132
- jsonString,
1133
- (x) => JsonSchema$inboundSchema.parse(JSON.parse(x)),
1134
- `Failed to parse 'JsonSchema' from JSON`,
1135
- );
1136
- }
1137
-
1138
- /** @internal */
1139
- export const ResponseFormat1$inboundSchema: z.ZodType<
1140
- ResponseFormat1,
1141
- z.ZodTypeDef,
1142
- unknown
1143
- > = z.object({
1144
- type: ResponseFormatType$inboundSchema,
1145
- json_schema: z.lazy(() => JsonSchema$inboundSchema),
1146
- }).transform((v) => {
1147
- return remap$(v, {
1148
- "json_schema": "jsonSchema",
1149
- });
1150
- });
1151
-
1152
- /** @internal */
1153
- export type ResponseFormat1$Outbound = {
1154
- type: string;
1155
- json_schema: JsonSchema$Outbound;
1156
- };
1157
-
1158
- /** @internal */
1159
- export const ResponseFormat1$outboundSchema: z.ZodType<
1160
- ResponseFormat1$Outbound,
1161
- z.ZodTypeDef,
1162
- ResponseFormat1
1163
- > = z.object({
1164
- type: ResponseFormatType$outboundSchema,
1165
- jsonSchema: z.lazy(() => JsonSchema$outboundSchema),
1166
- }).transform((v) => {
1167
- return remap$(v, {
1168
- jsonSchema: "json_schema",
1169
- });
1170
- });
1171
-
1172
- /**
1173
- * @internal
1174
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1175
- */
1176
- export namespace ResponseFormat1$ {
1177
- /** @deprecated use `ResponseFormat1$inboundSchema` instead. */
1178
- export const inboundSchema = ResponseFormat1$inboundSchema;
1179
- /** @deprecated use `ResponseFormat1$outboundSchema` instead. */
1180
- export const outboundSchema = ResponseFormat1$outboundSchema;
1181
- /** @deprecated use `ResponseFormat1$Outbound` instead. */
1182
- export type Outbound = ResponseFormat1$Outbound;
1183
- }
1184
-
1185
- export function responseFormat1ToJSON(
1186
- responseFormat1: ResponseFormat1,
1187
- ): string {
1188
- return JSON.stringify(ResponseFormat1$outboundSchema.parse(responseFormat1));
1189
- }
1190
-
1191
- export function responseFormat1FromJSON(
1192
- jsonString: string,
1193
- ): SafeParseResult<ResponseFormat1, SDKValidationError> {
1194
- return safeParse(
1195
- jsonString,
1196
- (x) => ResponseFormat1$inboundSchema.parse(JSON.parse(x)),
1197
- `Failed to parse 'ResponseFormat1' from JSON`,
1198
- );
1199
- }
1200
-
1201
- /** @internal */
1202
- export const ResponseFormat$inboundSchema: z.ZodType<
1203
- ResponseFormat,
1204
- z.ZodTypeDef,
1205
- unknown
1206
- > = z.union([
1207
- z.lazy(() => ResponseFormat1$inboundSchema),
1208
- z.lazy(() => ResponseFormat2$inboundSchema),
1209
- ]);
1210
-
1211
- /** @internal */
1212
- export type ResponseFormat$Outbound =
1213
- | ResponseFormat1$Outbound
1214
- | ResponseFormat2$Outbound;
1215
-
1216
- /** @internal */
1217
- export const ResponseFormat$outboundSchema: z.ZodType<
1218
- ResponseFormat$Outbound,
1219
- z.ZodTypeDef,
1220
- ResponseFormat
1221
- > = z.union([
1222
- z.lazy(() => ResponseFormat1$outboundSchema),
1223
- z.lazy(() => ResponseFormat2$outboundSchema),
1224
- ]);
1225
-
1226
- /**
1227
- * @internal
1228
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1229
- */
1230
- export namespace ResponseFormat$ {
1231
- /** @deprecated use `ResponseFormat$inboundSchema` instead. */
1232
- export const inboundSchema = ResponseFormat$inboundSchema;
1233
- /** @deprecated use `ResponseFormat$outboundSchema` instead. */
1234
- export const outboundSchema = ResponseFormat$outboundSchema;
1235
- /** @deprecated use `ResponseFormat$Outbound` instead. */
1236
- export type Outbound = ResponseFormat$Outbound;
1237
- }
1238
-
1239
- export function responseFormatToJSON(responseFormat: ResponseFormat): string {
1240
- return JSON.stringify(ResponseFormat$outboundSchema.parse(responseFormat));
1241
- }
1242
-
1243
- export function responseFormatFromJSON(
1244
- jsonString: string,
1245
- ): SafeParseResult<ResponseFormat, SDKValidationError> {
1246
- return safeParse(
1247
- jsonString,
1248
- (x) => ResponseFormat$inboundSchema.parse(JSON.parse(x)),
1249
- `Failed to parse 'ResponseFormat' from JSON`,
1250
- );
1251
- }
1252
-
1253
- /** @internal */
1254
- export const PhotoRealVersion$inboundSchema: z.ZodNativeEnum<
1255
- typeof PhotoRealVersion
1256
- > = z.nativeEnum(PhotoRealVersion);
1257
-
1258
- /** @internal */
1259
- export const PhotoRealVersion$outboundSchema: z.ZodNativeEnum<
1260
- typeof PhotoRealVersion
1261
- > = PhotoRealVersion$inboundSchema;
1262
-
1263
- /**
1264
- * @internal
1265
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1266
- */
1267
- export namespace PhotoRealVersion$ {
1268
- /** @deprecated use `PhotoRealVersion$inboundSchema` instead. */
1269
- export const inboundSchema = PhotoRealVersion$inboundSchema;
1270
- /** @deprecated use `PhotoRealVersion$outboundSchema` instead. */
1271
- export const outboundSchema = PhotoRealVersion$outboundSchema;
1272
- }
1273
-
1274
- /** @internal */
1275
- export const EncodingFormat$inboundSchema: z.ZodNativeEnum<
1276
- typeof EncodingFormat
1277
- > = z.nativeEnum(EncodingFormat);
1278
-
1279
- /** @internal */
1280
- export const EncodingFormat$outboundSchema: z.ZodNativeEnum<
1281
- typeof EncodingFormat
1282
- > = EncodingFormat$inboundSchema;
1283
-
1284
- /**
1285
- * @internal
1286
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1287
- */
1288
- export namespace EncodingFormat$ {
1289
- /** @deprecated use `EncodingFormat$inboundSchema` instead. */
1290
- export const inboundSchema = EncodingFormat$inboundSchema;
1291
- /** @deprecated use `EncodingFormat$outboundSchema` instead. */
1292
- export const outboundSchema = EncodingFormat$outboundSchema;
1293
- }
1294
-
1295
- /** @internal */
1296
- export const ReasoningEffort$inboundSchema: z.ZodNativeEnum<
1297
- typeof ReasoningEffort
1298
- > = z.nativeEnum(ReasoningEffort);
1299
-
1300
- /** @internal */
1301
- export const ReasoningEffort$outboundSchema: z.ZodNativeEnum<
1302
- typeof ReasoningEffort
1303
- > = ReasoningEffort$inboundSchema;
1304
-
1305
- /**
1306
- * @internal
1307
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1308
- */
1309
- export namespace ReasoningEffort$ {
1310
- /** @deprecated use `ReasoningEffort$inboundSchema` instead. */
1311
- export const inboundSchema = ReasoningEffort$inboundSchema;
1312
- /** @deprecated use `ReasoningEffort$outboundSchema` instead. */
1313
- export const outboundSchema = ReasoningEffort$outboundSchema;
1314
- }
1315
-
1316
- /** @internal */
1317
- export const ModelParameters$inboundSchema: z.ZodType<
1318
- ModelParameters,
1319
- z.ZodTypeDef,
1320
- unknown
1321
- > = z.object({
1322
- temperature: z.number().optional(),
1323
- maxTokens: z.number().optional(),
1324
- topK: z.number().optional(),
1325
- topP: z.number().optional(),
1326
- frequencyPenalty: z.number().optional(),
1327
- presencePenalty: z.number().optional(),
1328
- numImages: z.number().optional(),
1329
- seed: z.number().optional(),
1330
- format: CreatePromptFormat$inboundSchema.optional(),
1331
- dimensions: z.string().optional(),
1332
- quality: z.string().optional(),
1333
- style: z.string().optional(),
1334
- responseFormat: z.nullable(
1335
- z.union([
1336
- z.lazy(() => ResponseFormat1$inboundSchema),
1337
- z.lazy(() => ResponseFormat2$inboundSchema),
1338
- ]),
1339
- ).optional(),
1340
- photoRealVersion: PhotoRealVersion$inboundSchema.optional(),
1341
- encoding_format: EncodingFormat$inboundSchema.optional(),
1342
- reasoningEffort: ReasoningEffort$inboundSchema.optional(),
1343
- budgetTokens: z.number().optional(),
1344
- }).transform((v) => {
1345
- return remap$(v, {
1346
- "encoding_format": "encodingFormat",
1347
- });
1348
- });
1349
-
1350
- /** @internal */
1351
- export type ModelParameters$Outbound = {
1352
- temperature?: number | undefined;
1353
- maxTokens?: number | undefined;
1354
- topK?: number | undefined;
1355
- topP?: number | undefined;
1356
- frequencyPenalty?: number | undefined;
1357
- presencePenalty?: number | undefined;
1358
- numImages?: number | undefined;
1359
- seed?: number | undefined;
1360
- format?: string | undefined;
1361
- dimensions?: string | undefined;
1362
- quality?: string | undefined;
1363
- style?: string | undefined;
1364
- responseFormat?:
1365
- | ResponseFormat1$Outbound
1366
- | ResponseFormat2$Outbound
1367
- | null
1368
- | undefined;
1369
- photoRealVersion?: string | undefined;
1370
- encoding_format?: string | undefined;
1371
- reasoningEffort?: string | undefined;
1372
- budgetTokens?: number | undefined;
1373
- };
1374
-
1375
- /** @internal */
1376
- export const ModelParameters$outboundSchema: z.ZodType<
1377
- ModelParameters$Outbound,
1378
- z.ZodTypeDef,
1379
- ModelParameters
1380
- > = z.object({
1381
- temperature: z.number().optional(),
1382
- maxTokens: z.number().optional(),
1383
- topK: z.number().optional(),
1384
- topP: z.number().optional(),
1385
- frequencyPenalty: z.number().optional(),
1386
- presencePenalty: z.number().optional(),
1387
- numImages: z.number().optional(),
1388
- seed: z.number().optional(),
1389
- format: CreatePromptFormat$outboundSchema.optional(),
1390
- dimensions: z.string().optional(),
1391
- quality: z.string().optional(),
1392
- style: z.string().optional(),
1393
- responseFormat: z.nullable(
1394
- z.union([
1395
- z.lazy(() => ResponseFormat1$outboundSchema),
1396
- z.lazy(() => ResponseFormat2$outboundSchema),
1397
- ]),
1398
- ).optional(),
1399
- photoRealVersion: PhotoRealVersion$outboundSchema.optional(),
1400
- encodingFormat: EncodingFormat$outboundSchema.optional(),
1401
- reasoningEffort: ReasoningEffort$outboundSchema.optional(),
1402
- budgetTokens: z.number().optional(),
1403
- }).transform((v) => {
1404
- return remap$(v, {
1405
- encodingFormat: "encoding_format",
1406
- });
1407
- });
1408
-
1409
- /**
1410
- * @internal
1411
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1412
- */
1413
- export namespace ModelParameters$ {
1414
- /** @deprecated use `ModelParameters$inboundSchema` instead. */
1415
- export const inboundSchema = ModelParameters$inboundSchema;
1416
- /** @deprecated use `ModelParameters$outboundSchema` instead. */
1417
- export const outboundSchema = ModelParameters$outboundSchema;
1418
- /** @deprecated use `ModelParameters$Outbound` instead. */
1419
- export type Outbound = ModelParameters$Outbound;
1420
- }
1421
-
1422
- export function modelParametersToJSON(
1423
- modelParameters: ModelParameters,
1424
- ): string {
1425
- return JSON.stringify(ModelParameters$outboundSchema.parse(modelParameters));
1426
- }
1427
-
1428
- export function modelParametersFromJSON(
1429
- jsonString: string,
1430
- ): SafeParseResult<ModelParameters, SDKValidationError> {
1431
- return safeParse(
1432
- jsonString,
1433
- (x) => ModelParameters$inboundSchema.parse(JSON.parse(x)),
1434
- `Failed to parse 'ModelParameters' from JSON`,
1435
- );
1436
- }
1437
-
1438
- /** @internal */
1439
- export const Provider$inboundSchema: z.ZodNativeEnum<typeof Provider> = z
1440
- .nativeEnum(Provider);
1441
-
1442
- /** @internal */
1443
- export const Provider$outboundSchema: z.ZodNativeEnum<typeof Provider> =
1444
- Provider$inboundSchema;
1445
-
1446
- /**
1447
- * @internal
1448
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1449
- */
1450
- export namespace Provider$ {
1451
- /** @deprecated use `Provider$inboundSchema` instead. */
1452
- export const inboundSchema = Provider$inboundSchema;
1453
- /** @deprecated use `Provider$outboundSchema` instead. */
1454
- export const outboundSchema = Provider$outboundSchema;
1455
- }
1456
-
1457
- /** @internal */
1458
- export const CreatePromptRole$inboundSchema: z.ZodNativeEnum<
1459
- typeof CreatePromptRole
1460
- > = z.nativeEnum(CreatePromptRole);
1461
-
1462
- /** @internal */
1463
- export const CreatePromptRole$outboundSchema: z.ZodNativeEnum<
1464
- typeof CreatePromptRole
1465
- > = CreatePromptRole$inboundSchema;
1466
-
1467
- /**
1468
- * @internal
1469
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1470
- */
1471
- export namespace CreatePromptRole$ {
1472
- /** @deprecated use `CreatePromptRole$inboundSchema` instead. */
1473
- export const inboundSchema = CreatePromptRole$inboundSchema;
1474
- /** @deprecated use `CreatePromptRole$outboundSchema` instead. */
1475
- export const outboundSchema = CreatePromptRole$outboundSchema;
1476
- }
1477
-
1478
- /** @internal */
1479
- export const CreatePrompt2PromptsRequestType$inboundSchema: z.ZodNativeEnum<
1480
- typeof CreatePrompt2PromptsRequestType
1481
- > = z.nativeEnum(CreatePrompt2PromptsRequestType);
1482
-
1483
- /** @internal */
1484
- export const CreatePrompt2PromptsRequestType$outboundSchema: z.ZodNativeEnum<
1485
- typeof CreatePrompt2PromptsRequestType
1486
- > = CreatePrompt2PromptsRequestType$inboundSchema;
1487
-
1488
- /**
1489
- * @internal
1490
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1491
- */
1492
- export namespace CreatePrompt2PromptsRequestType$ {
1493
- /** @deprecated use `CreatePrompt2PromptsRequestType$inboundSchema` instead. */
1494
- export const inboundSchema = CreatePrompt2PromptsRequestType$inboundSchema;
1495
- /** @deprecated use `CreatePrompt2PromptsRequestType$outboundSchema` instead. */
1496
- export const outboundSchema = CreatePrompt2PromptsRequestType$outboundSchema;
1497
- }
1498
-
1499
- /** @internal */
1500
- export const CreatePrompt2File$inboundSchema: z.ZodType<
1501
- CreatePrompt2File,
1502
- z.ZodTypeDef,
1503
- unknown
1504
- > = z.object({
1505
- file_data: z.string(),
1506
- filename: z.string().optional(),
1507
- }).transform((v) => {
1508
- return remap$(v, {
1509
- "file_data": "fileData",
1510
- });
1511
- });
1512
-
1513
- /** @internal */
1514
- export type CreatePrompt2File$Outbound = {
1515
- file_data: string;
1516
- filename?: string | undefined;
1517
- };
1518
-
1519
- /** @internal */
1520
- export const CreatePrompt2File$outboundSchema: z.ZodType<
1521
- CreatePrompt2File$Outbound,
1522
- z.ZodTypeDef,
1523
- CreatePrompt2File
1524
- > = z.object({
1525
- fileData: z.string(),
1526
- filename: z.string().optional(),
1527
- }).transform((v) => {
1528
- return remap$(v, {
1529
- fileData: "file_data",
1530
- });
1531
- });
1532
-
1533
- /**
1534
- * @internal
1535
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1536
- */
1537
- export namespace CreatePrompt2File$ {
1538
- /** @deprecated use `CreatePrompt2File$inboundSchema` instead. */
1539
- export const inboundSchema = CreatePrompt2File$inboundSchema;
1540
- /** @deprecated use `CreatePrompt2File$outboundSchema` instead. */
1541
- export const outboundSchema = CreatePrompt2File$outboundSchema;
1542
- /** @deprecated use `CreatePrompt2File$Outbound` instead. */
1543
- export type Outbound = CreatePrompt2File$Outbound;
1544
- }
1545
-
1546
- export function createPrompt2FileToJSON(
1547
- createPrompt2File: CreatePrompt2File,
1548
- ): string {
1549
- return JSON.stringify(
1550
- CreatePrompt2File$outboundSchema.parse(createPrompt2File),
1551
- );
1552
- }
1553
-
1554
- export function createPrompt2FileFromJSON(
1555
- jsonString: string,
1556
- ): SafeParseResult<CreatePrompt2File, SDKValidationError> {
1557
- return safeParse(
1558
- jsonString,
1559
- (x) => CreatePrompt2File$inboundSchema.parse(JSON.parse(x)),
1560
- `Failed to parse 'CreatePrompt2File' from JSON`,
1561
- );
1562
- }
1563
-
1564
- /** @internal */
1565
- export const CreatePrompt23$inboundSchema: z.ZodType<
1566
- CreatePrompt23,
1567
- z.ZodTypeDef,
1568
- unknown
1569
- > = z.object({
1570
- type: CreatePrompt2PromptsRequestType$inboundSchema,
1571
- file: z.lazy(() => CreatePrompt2File$inboundSchema),
1572
- });
1573
-
1574
- /** @internal */
1575
- export type CreatePrompt23$Outbound = {
1576
- type: string;
1577
- file: CreatePrompt2File$Outbound;
1578
- };
1579
-
1580
- /** @internal */
1581
- export const CreatePrompt23$outboundSchema: z.ZodType<
1582
- CreatePrompt23$Outbound,
1583
- z.ZodTypeDef,
1584
- CreatePrompt23
1585
- > = z.object({
1586
- type: CreatePrompt2PromptsRequestType$outboundSchema,
1587
- file: z.lazy(() => CreatePrompt2File$outboundSchema),
1588
- });
1589
-
1590
- /**
1591
- * @internal
1592
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1593
- */
1594
- export namespace CreatePrompt23$ {
1595
- /** @deprecated use `CreatePrompt23$inboundSchema` instead. */
1596
- export const inboundSchema = CreatePrompt23$inboundSchema;
1597
- /** @deprecated use `CreatePrompt23$outboundSchema` instead. */
1598
- export const outboundSchema = CreatePrompt23$outboundSchema;
1599
- /** @deprecated use `CreatePrompt23$Outbound` instead. */
1600
- export type Outbound = CreatePrompt23$Outbound;
1601
- }
1602
-
1603
- export function createPrompt23ToJSON(createPrompt23: CreatePrompt23): string {
1604
- return JSON.stringify(CreatePrompt23$outboundSchema.parse(createPrompt23));
1605
- }
1606
-
1607
- export function createPrompt23FromJSON(
1608
- jsonString: string,
1609
- ): SafeParseResult<CreatePrompt23, SDKValidationError> {
1610
- return safeParse(
1611
- jsonString,
1612
- (x) => CreatePrompt23$inboundSchema.parse(JSON.parse(x)),
1613
- `Failed to parse 'CreatePrompt23' from JSON`,
1614
- );
1615
- }
1616
-
1617
- /** @internal */
1618
- export const CreatePrompt2PromptsType$inboundSchema: z.ZodNativeEnum<
1619
- typeof CreatePrompt2PromptsType
1620
- > = z.nativeEnum(CreatePrompt2PromptsType);
1621
-
1622
- /** @internal */
1623
- export const CreatePrompt2PromptsType$outboundSchema: z.ZodNativeEnum<
1624
- typeof CreatePrompt2PromptsType
1625
- > = CreatePrompt2PromptsType$inboundSchema;
1626
-
1627
- /**
1628
- * @internal
1629
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1630
- */
1631
- export namespace CreatePrompt2PromptsType$ {
1632
- /** @deprecated use `CreatePrompt2PromptsType$inboundSchema` instead. */
1633
- export const inboundSchema = CreatePrompt2PromptsType$inboundSchema;
1634
- /** @deprecated use `CreatePrompt2PromptsType$outboundSchema` instead. */
1635
- export const outboundSchema = CreatePrompt2PromptsType$outboundSchema;
1636
- }
1637
-
1638
- /** @internal */
1639
- export const CreatePrompt2ImageUrl$inboundSchema: z.ZodType<
1640
- CreatePrompt2ImageUrl,
1641
- z.ZodTypeDef,
1642
- unknown
1643
- > = z.object({
1644
- url: z.string(),
1645
- detail: z.string().optional(),
1646
- });
1647
-
1648
- /** @internal */
1649
- export type CreatePrompt2ImageUrl$Outbound = {
1650
- url: string;
1651
- detail?: string | undefined;
1652
- };
1653
-
1654
- /** @internal */
1655
- export const CreatePrompt2ImageUrl$outboundSchema: z.ZodType<
1656
- CreatePrompt2ImageUrl$Outbound,
1657
- z.ZodTypeDef,
1658
- CreatePrompt2ImageUrl
1659
- > = z.object({
1660
- url: z.string(),
1661
- detail: z.string().optional(),
1662
- });
1663
-
1664
- /**
1665
- * @internal
1666
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1667
- */
1668
- export namespace CreatePrompt2ImageUrl$ {
1669
- /** @deprecated use `CreatePrompt2ImageUrl$inboundSchema` instead. */
1670
- export const inboundSchema = CreatePrompt2ImageUrl$inboundSchema;
1671
- /** @deprecated use `CreatePrompt2ImageUrl$outboundSchema` instead. */
1672
- export const outboundSchema = CreatePrompt2ImageUrl$outboundSchema;
1673
- /** @deprecated use `CreatePrompt2ImageUrl$Outbound` instead. */
1674
- export type Outbound = CreatePrompt2ImageUrl$Outbound;
1675
- }
1676
-
1677
- export function createPrompt2ImageUrlToJSON(
1678
- createPrompt2ImageUrl: CreatePrompt2ImageUrl,
1679
- ): string {
1680
- return JSON.stringify(
1681
- CreatePrompt2ImageUrl$outboundSchema.parse(createPrompt2ImageUrl),
1682
- );
1683
- }
1684
-
1685
- export function createPrompt2ImageUrlFromJSON(
1686
- jsonString: string,
1687
- ): SafeParseResult<CreatePrompt2ImageUrl, SDKValidationError> {
1688
- return safeParse(
1689
- jsonString,
1690
- (x) => CreatePrompt2ImageUrl$inboundSchema.parse(JSON.parse(x)),
1691
- `Failed to parse 'CreatePrompt2ImageUrl' from JSON`,
1692
- );
1693
- }
1694
-
1695
- /** @internal */
1696
- export const CreatePrompt22$inboundSchema: z.ZodType<
1697
- CreatePrompt22,
1698
- z.ZodTypeDef,
1699
- unknown
1700
- > = z.object({
1701
- type: CreatePrompt2PromptsType$inboundSchema,
1702
- image_url: z.lazy(() => CreatePrompt2ImageUrl$inboundSchema),
1703
- }).transform((v) => {
1704
- return remap$(v, {
1705
- "image_url": "imageUrl",
1706
- });
1707
- });
1708
-
1709
- /** @internal */
1710
- export type CreatePrompt22$Outbound = {
1711
- type: string;
1712
- image_url: CreatePrompt2ImageUrl$Outbound;
1713
- };
1714
-
1715
- /** @internal */
1716
- export const CreatePrompt22$outboundSchema: z.ZodType<
1717
- CreatePrompt22$Outbound,
1718
- z.ZodTypeDef,
1719
- CreatePrompt22
1720
- > = z.object({
1721
- type: CreatePrompt2PromptsType$outboundSchema,
1722
- imageUrl: z.lazy(() => CreatePrompt2ImageUrl$outboundSchema),
1723
- }).transform((v) => {
1724
- return remap$(v, {
1725
- imageUrl: "image_url",
1726
- });
1727
- });
1728
-
1729
- /**
1730
- * @internal
1731
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1732
- */
1733
- export namespace CreatePrompt22$ {
1734
- /** @deprecated use `CreatePrompt22$inboundSchema` instead. */
1735
- export const inboundSchema = CreatePrompt22$inboundSchema;
1736
- /** @deprecated use `CreatePrompt22$outboundSchema` instead. */
1737
- export const outboundSchema = CreatePrompt22$outboundSchema;
1738
- /** @deprecated use `CreatePrompt22$Outbound` instead. */
1739
- export type Outbound = CreatePrompt22$Outbound;
1740
- }
1741
-
1742
- export function createPrompt22ToJSON(createPrompt22: CreatePrompt22): string {
1743
- return JSON.stringify(CreatePrompt22$outboundSchema.parse(createPrompt22));
1744
- }
1745
-
1746
- export function createPrompt22FromJSON(
1747
- jsonString: string,
1748
- ): SafeParseResult<CreatePrompt22, SDKValidationError> {
1749
- return safeParse(
1750
- jsonString,
1751
- (x) => CreatePrompt22$inboundSchema.parse(JSON.parse(x)),
1752
- `Failed to parse 'CreatePrompt22' from JSON`,
1753
- );
1754
- }
1755
-
1756
- /** @internal */
1757
- export const CreatePrompt2Type$inboundSchema: z.ZodNativeEnum<
1758
- typeof CreatePrompt2Type
1759
- > = z.nativeEnum(CreatePrompt2Type);
1760
-
1761
- /** @internal */
1762
- export const CreatePrompt2Type$outboundSchema: z.ZodNativeEnum<
1763
- typeof CreatePrompt2Type
1764
- > = CreatePrompt2Type$inboundSchema;
1765
-
1766
- /**
1767
- * @internal
1768
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1769
- */
1770
- export namespace CreatePrompt2Type$ {
1771
- /** @deprecated use `CreatePrompt2Type$inboundSchema` instead. */
1772
- export const inboundSchema = CreatePrompt2Type$inboundSchema;
1773
- /** @deprecated use `CreatePrompt2Type$outboundSchema` instead. */
1774
- export const outboundSchema = CreatePrompt2Type$outboundSchema;
1775
- }
1776
-
1777
- /** @internal */
1778
- export const CreatePrompt21$inboundSchema: z.ZodType<
1779
- CreatePrompt21,
1780
- z.ZodTypeDef,
1781
- unknown
1782
- > = z.object({
1783
- type: CreatePrompt2Type$inboundSchema,
1784
- text: z.string(),
1785
- });
1786
-
1787
- /** @internal */
1788
- export type CreatePrompt21$Outbound = {
1789
- type: string;
1790
- text: string;
1791
- };
1792
-
1793
- /** @internal */
1794
- export const CreatePrompt21$outboundSchema: z.ZodType<
1795
- CreatePrompt21$Outbound,
1796
- z.ZodTypeDef,
1797
- CreatePrompt21
1798
- > = z.object({
1799
- type: CreatePrompt2Type$outboundSchema,
1800
- text: z.string(),
1801
- });
1802
-
1803
- /**
1804
- * @internal
1805
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1806
- */
1807
- export namespace CreatePrompt21$ {
1808
- /** @deprecated use `CreatePrompt21$inboundSchema` instead. */
1809
- export const inboundSchema = CreatePrompt21$inboundSchema;
1810
- /** @deprecated use `CreatePrompt21$outboundSchema` instead. */
1811
- export const outboundSchema = CreatePrompt21$outboundSchema;
1812
- /** @deprecated use `CreatePrompt21$Outbound` instead. */
1813
- export type Outbound = CreatePrompt21$Outbound;
1814
- }
1815
-
1816
- export function createPrompt21ToJSON(createPrompt21: CreatePrompt21): string {
1817
- return JSON.stringify(CreatePrompt21$outboundSchema.parse(createPrompt21));
1818
- }
1819
-
1820
- export function createPrompt21FromJSON(
1821
- jsonString: string,
1822
- ): SafeParseResult<CreatePrompt21, SDKValidationError> {
1823
- return safeParse(
1824
- jsonString,
1825
- (x) => CreatePrompt21$inboundSchema.parse(JSON.parse(x)),
1826
- `Failed to parse 'CreatePrompt21' from JSON`,
1827
- );
1828
- }
1829
-
1830
- /** @internal */
1831
- export const CreatePromptContent2$inboundSchema: z.ZodType<
1832
- CreatePromptContent2,
1833
- z.ZodTypeDef,
1834
- unknown
1835
- > = z.union([
1836
- z.lazy(() => CreatePrompt21$inboundSchema),
1837
- z.lazy(() => CreatePrompt22$inboundSchema),
1838
- z.lazy(() => CreatePrompt23$inboundSchema),
1839
- ]);
1840
-
1841
- /** @internal */
1842
- export type CreatePromptContent2$Outbound =
1843
- | CreatePrompt21$Outbound
1844
- | CreatePrompt22$Outbound
1845
- | CreatePrompt23$Outbound;
1846
-
1847
- /** @internal */
1848
- export const CreatePromptContent2$outboundSchema: z.ZodType<
1849
- CreatePromptContent2$Outbound,
1850
- z.ZodTypeDef,
1851
- CreatePromptContent2
1852
- > = z.union([
1853
- z.lazy(() => CreatePrompt21$outboundSchema),
1854
- z.lazy(() => CreatePrompt22$outboundSchema),
1855
- z.lazy(() => CreatePrompt23$outboundSchema),
1856
- ]);
1857
-
1858
- /**
1859
- * @internal
1860
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1861
- */
1862
- export namespace CreatePromptContent2$ {
1863
- /** @deprecated use `CreatePromptContent2$inboundSchema` instead. */
1864
- export const inboundSchema = CreatePromptContent2$inboundSchema;
1865
- /** @deprecated use `CreatePromptContent2$outboundSchema` instead. */
1866
- export const outboundSchema = CreatePromptContent2$outboundSchema;
1867
- /** @deprecated use `CreatePromptContent2$Outbound` instead. */
1868
- export type Outbound = CreatePromptContent2$Outbound;
1869
- }
1870
-
1871
- export function createPromptContent2ToJSON(
1872
- createPromptContent2: CreatePromptContent2,
1873
- ): string {
1874
- return JSON.stringify(
1875
- CreatePromptContent2$outboundSchema.parse(createPromptContent2),
1876
- );
1877
- }
1878
-
1879
- export function createPromptContent2FromJSON(
1880
- jsonString: string,
1881
- ): SafeParseResult<CreatePromptContent2, SDKValidationError> {
1882
- return safeParse(
1883
- jsonString,
1884
- (x) => CreatePromptContent2$inboundSchema.parse(JSON.parse(x)),
1885
- `Failed to parse 'CreatePromptContent2' from JSON`,
1886
- );
1887
- }
1888
-
1889
- /** @internal */
1890
- export const CreatePromptContent$inboundSchema: z.ZodType<
1891
- CreatePromptContent,
1892
- z.ZodTypeDef,
1893
- unknown
1894
- > = z.union([
1895
- z.string(),
1896
- z.array(z.union([
1897
- z.lazy(() => CreatePrompt21$inboundSchema),
1898
- z.lazy(() => CreatePrompt22$inboundSchema),
1899
- z.lazy(() => CreatePrompt23$inboundSchema),
1900
- ])),
1901
- ]);
1902
-
1903
- /** @internal */
1904
- export type CreatePromptContent$Outbound =
1905
- | string
1906
- | Array<
1907
- CreatePrompt21$Outbound | CreatePrompt22$Outbound | CreatePrompt23$Outbound
1908
- >;
1909
-
1910
- /** @internal */
1911
- export const CreatePromptContent$outboundSchema: z.ZodType<
1912
- CreatePromptContent$Outbound,
1913
- z.ZodTypeDef,
1914
- CreatePromptContent
1915
- > = z.union([
1916
- z.string(),
1917
- z.array(z.union([
1918
- z.lazy(() => CreatePrompt21$outboundSchema),
1919
- z.lazy(() => CreatePrompt22$outboundSchema),
1920
- z.lazy(() => CreatePrompt23$outboundSchema),
1921
- ])),
1922
- ]);
1923
-
1924
- /**
1925
- * @internal
1926
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1927
- */
1928
- export namespace CreatePromptContent$ {
1929
- /** @deprecated use `CreatePromptContent$inboundSchema` instead. */
1930
- export const inboundSchema = CreatePromptContent$inboundSchema;
1931
- /** @deprecated use `CreatePromptContent$outboundSchema` instead. */
1932
- export const outboundSchema = CreatePromptContent$outboundSchema;
1933
- /** @deprecated use `CreatePromptContent$Outbound` instead. */
1934
- export type Outbound = CreatePromptContent$Outbound;
1935
- }
1936
-
1937
- export function createPromptContentToJSON(
1938
- createPromptContent: CreatePromptContent,
1939
- ): string {
1940
- return JSON.stringify(
1941
- CreatePromptContent$outboundSchema.parse(createPromptContent),
1942
- );
1943
- }
1944
-
1945
- export function createPromptContentFromJSON(
1946
- jsonString: string,
1947
- ): SafeParseResult<CreatePromptContent, SDKValidationError> {
1948
- return safeParse(
1949
- jsonString,
1950
- (x) => CreatePromptContent$inboundSchema.parse(JSON.parse(x)),
1951
- `Failed to parse 'CreatePromptContent' from JSON`,
1952
- );
1953
- }
1954
-
1955
- /** @internal */
1956
- export const CreatePromptType$inboundSchema: z.ZodNativeEnum<
1957
- typeof CreatePromptType
1958
- > = z.nativeEnum(CreatePromptType);
1959
-
1960
- /** @internal */
1961
- export const CreatePromptType$outboundSchema: z.ZodNativeEnum<
1962
- typeof CreatePromptType
1963
- > = CreatePromptType$inboundSchema;
1964
-
1965
- /**
1966
- * @internal
1967
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1968
- */
1969
- export namespace CreatePromptType$ {
1970
- /** @deprecated use `CreatePromptType$inboundSchema` instead. */
1971
- export const inboundSchema = CreatePromptType$inboundSchema;
1972
- /** @deprecated use `CreatePromptType$outboundSchema` instead. */
1973
- export const outboundSchema = CreatePromptType$outboundSchema;
1974
- }
1975
-
1976
- /** @internal */
1977
- export const CreatePromptFunction$inboundSchema: z.ZodType<
1978
- CreatePromptFunction,
1979
- z.ZodTypeDef,
1980
- unknown
1981
- > = z.object({
1982
- name: z.string(),
1983
- arguments: z.string(),
1984
- });
1985
-
1986
- /** @internal */
1987
- export type CreatePromptFunction$Outbound = {
1988
- name: string;
1989
- arguments: string;
1990
- };
1991
-
1992
- /** @internal */
1993
- export const CreatePromptFunction$outboundSchema: z.ZodType<
1994
- CreatePromptFunction$Outbound,
1995
- z.ZodTypeDef,
1996
- CreatePromptFunction
1997
- > = z.object({
1998
- name: z.string(),
1999
- arguments: z.string(),
2000
- });
2001
-
2002
- /**
2003
- * @internal
2004
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2005
- */
2006
- export namespace CreatePromptFunction$ {
2007
- /** @deprecated use `CreatePromptFunction$inboundSchema` instead. */
2008
- export const inboundSchema = CreatePromptFunction$inboundSchema;
2009
- /** @deprecated use `CreatePromptFunction$outboundSchema` instead. */
2010
- export const outboundSchema = CreatePromptFunction$outboundSchema;
2011
- /** @deprecated use `CreatePromptFunction$Outbound` instead. */
2012
- export type Outbound = CreatePromptFunction$Outbound;
2013
- }
2014
-
2015
- export function createPromptFunctionToJSON(
2016
- createPromptFunction: CreatePromptFunction,
2017
- ): string {
2018
- return JSON.stringify(
2019
- CreatePromptFunction$outboundSchema.parse(createPromptFunction),
2020
- );
2021
- }
2022
-
2023
- export function createPromptFunctionFromJSON(
2024
- jsonString: string,
2025
- ): SafeParseResult<CreatePromptFunction, SDKValidationError> {
2026
- return safeParse(
2027
- jsonString,
2028
- (x) => CreatePromptFunction$inboundSchema.parse(JSON.parse(x)),
2029
- `Failed to parse 'CreatePromptFunction' from JSON`,
2030
- );
2031
- }
2032
-
2033
- /** @internal */
2034
- export const CreatePromptToolCalls$inboundSchema: z.ZodType<
2035
- CreatePromptToolCalls,
2036
- z.ZodTypeDef,
2037
- unknown
2038
- > = z.object({
2039
- id: z.string().optional(),
2040
- index: z.number().optional(),
2041
- type: CreatePromptType$inboundSchema,
2042
- function: z.lazy(() => CreatePromptFunction$inboundSchema),
2043
- });
2044
-
2045
- /** @internal */
2046
- export type CreatePromptToolCalls$Outbound = {
2047
- id?: string | undefined;
2048
- index?: number | undefined;
2049
- type: string;
2050
- function: CreatePromptFunction$Outbound;
2051
- };
2052
-
2053
- /** @internal */
2054
- export const CreatePromptToolCalls$outboundSchema: z.ZodType<
2055
- CreatePromptToolCalls$Outbound,
2056
- z.ZodTypeDef,
2057
- CreatePromptToolCalls
2058
- > = z.object({
2059
- id: z.string().optional(),
2060
- index: z.number().optional(),
2061
- type: CreatePromptType$outboundSchema,
2062
- function: z.lazy(() => CreatePromptFunction$outboundSchema),
2063
- });
2064
-
2065
- /**
2066
- * @internal
2067
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2068
- */
2069
- export namespace CreatePromptToolCalls$ {
2070
- /** @deprecated use `CreatePromptToolCalls$inboundSchema` instead. */
2071
- export const inboundSchema = CreatePromptToolCalls$inboundSchema;
2072
- /** @deprecated use `CreatePromptToolCalls$outboundSchema` instead. */
2073
- export const outboundSchema = CreatePromptToolCalls$outboundSchema;
2074
- /** @deprecated use `CreatePromptToolCalls$Outbound` instead. */
2075
- export type Outbound = CreatePromptToolCalls$Outbound;
2076
- }
2077
-
2078
- export function createPromptToolCallsToJSON(
2079
- createPromptToolCalls: CreatePromptToolCalls,
2080
- ): string {
2081
- return JSON.stringify(
2082
- CreatePromptToolCalls$outboundSchema.parse(createPromptToolCalls),
2083
- );
2084
- }
2085
-
2086
- export function createPromptToolCallsFromJSON(
2087
- jsonString: string,
2088
- ): SafeParseResult<CreatePromptToolCalls, SDKValidationError> {
2089
- return safeParse(
2090
- jsonString,
2091
- (x) => CreatePromptToolCalls$inboundSchema.parse(JSON.parse(x)),
2092
- `Failed to parse 'CreatePromptToolCalls' from JSON`,
2093
- );
2094
- }
2095
-
2096
- /** @internal */
2097
- export const CreatePromptMessages$inboundSchema: z.ZodType<
2098
- CreatePromptMessages,
2099
- z.ZodTypeDef,
2100
- unknown
2101
- > = z.object({
2102
- role: CreatePromptRole$inboundSchema,
2103
- content: z.union([
2104
- z.string(),
2105
- z.array(z.union([
2106
- z.lazy(() => CreatePrompt21$inboundSchema),
2107
- z.lazy(() => CreatePrompt22$inboundSchema),
2108
- z.lazy(() => CreatePrompt23$inboundSchema),
2109
- ])),
2110
- ]),
2111
- tool_calls: z.array(z.lazy(() => CreatePromptToolCalls$inboundSchema))
2112
- .optional(),
2113
- tool_call_id: z.string().optional(),
2114
- }).transform((v) => {
2115
- return remap$(v, {
2116
- "tool_calls": "toolCalls",
2117
- "tool_call_id": "toolCallId",
2118
- });
2119
- });
2120
-
2121
- /** @internal */
2122
- export type CreatePromptMessages$Outbound = {
2123
- role: string;
2124
- content:
2125
- | string
2126
- | Array<
2127
- | CreatePrompt21$Outbound
2128
- | CreatePrompt22$Outbound
2129
- | CreatePrompt23$Outbound
2130
- >;
2131
- tool_calls?: Array<CreatePromptToolCalls$Outbound> | undefined;
2132
- tool_call_id?: string | undefined;
2133
- };
2134
-
2135
- /** @internal */
2136
- export const CreatePromptMessages$outboundSchema: z.ZodType<
2137
- CreatePromptMessages$Outbound,
2138
- z.ZodTypeDef,
2139
- CreatePromptMessages
2140
- > = z.object({
2141
- role: CreatePromptRole$outboundSchema,
2142
- content: z.union([
2143
- z.string(),
2144
- z.array(z.union([
2145
- z.lazy(() => CreatePrompt21$outboundSchema),
2146
- z.lazy(() => CreatePrompt22$outboundSchema),
2147
- z.lazy(() => CreatePrompt23$outboundSchema),
2148
- ])),
2149
- ]),
2150
- toolCalls: z.array(z.lazy(() => CreatePromptToolCalls$outboundSchema))
2151
- .optional(),
2152
- toolCallId: z.string().optional(),
2153
- }).transform((v) => {
2154
- return remap$(v, {
2155
- toolCalls: "tool_calls",
2156
- toolCallId: "tool_call_id",
2157
- });
2158
- });
2159
-
2160
- /**
2161
- * @internal
2162
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2163
- */
2164
- export namespace CreatePromptMessages$ {
2165
- /** @deprecated use `CreatePromptMessages$inboundSchema` instead. */
2166
- export const inboundSchema = CreatePromptMessages$inboundSchema;
2167
- /** @deprecated use `CreatePromptMessages$outboundSchema` instead. */
2168
- export const outboundSchema = CreatePromptMessages$outboundSchema;
2169
- /** @deprecated use `CreatePromptMessages$Outbound` instead. */
2170
- export type Outbound = CreatePromptMessages$Outbound;
2171
- }
2172
-
2173
- export function createPromptMessagesToJSON(
2174
- createPromptMessages: CreatePromptMessages,
2175
- ): string {
2176
- return JSON.stringify(
2177
- CreatePromptMessages$outboundSchema.parse(createPromptMessages),
2178
- );
2179
- }
2180
-
2181
- export function createPromptMessagesFromJSON(
2182
- jsonString: string,
2183
- ): SafeParseResult<CreatePromptMessages, SDKValidationError> {
2184
- return safeParse(
2185
- jsonString,
2186
- (x) => CreatePromptMessages$inboundSchema.parse(JSON.parse(x)),
2187
- `Failed to parse 'CreatePromptMessages' from JSON`,
2188
- );
2189
- }
2190
-
2191
- /** @internal */
2192
- export const PromptConfig$inboundSchema: z.ZodType<
2193
- PromptConfig,
2194
- z.ZodTypeDef,
2195
- unknown
2196
- > = z.object({
2197
- stream: z.boolean().optional(),
2198
- model: z.string().optional(),
2199
- model_type: z.nullable(ModelType$inboundSchema).optional(),
2200
- model_parameters: z.lazy(() => ModelParameters$inboundSchema).optional(),
2201
- provider: Provider$inboundSchema.optional(),
2202
- version: z.string().optional(),
2203
- messages: z.array(z.lazy(() => CreatePromptMessages$inboundSchema)),
2204
- }).transform((v) => {
2205
- return remap$(v, {
2206
- "model_type": "modelType",
2207
- "model_parameters": "modelParameters",
2208
- });
2209
- });
2210
-
2211
- /** @internal */
2212
- export type PromptConfig$Outbound = {
2213
- stream?: boolean | undefined;
2214
- model?: string | undefined;
2215
- model_type?: string | null | undefined;
2216
- model_parameters?: ModelParameters$Outbound | undefined;
2217
- provider?: string | undefined;
2218
- version?: string | undefined;
2219
- messages: Array<CreatePromptMessages$Outbound>;
2220
- };
2221
-
2222
- /** @internal */
2223
- export const PromptConfig$outboundSchema: z.ZodType<
2224
- PromptConfig$Outbound,
2225
- z.ZodTypeDef,
2226
- PromptConfig
2227
- > = z.object({
2228
- stream: z.boolean().optional(),
2229
- model: z.string().optional(),
2230
- modelType: z.nullable(ModelType$outboundSchema).optional(),
2231
- modelParameters: z.lazy(() => ModelParameters$outboundSchema).optional(),
2232
- provider: Provider$outboundSchema.optional(),
2233
- version: z.string().optional(),
2234
- messages: z.array(z.lazy(() => CreatePromptMessages$outboundSchema)),
2235
- }).transform((v) => {
2236
- return remap$(v, {
2237
- modelType: "model_type",
2238
- modelParameters: "model_parameters",
2239
- });
2240
- });
2241
-
2242
- /**
2243
- * @internal
2244
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2245
- */
2246
- export namespace PromptConfig$ {
2247
- /** @deprecated use `PromptConfig$inboundSchema` instead. */
2248
- export const inboundSchema = PromptConfig$inboundSchema;
2249
- /** @deprecated use `PromptConfig$outboundSchema` instead. */
2250
- export const outboundSchema = PromptConfig$outboundSchema;
2251
- /** @deprecated use `PromptConfig$Outbound` instead. */
2252
- export type Outbound = PromptConfig$Outbound;
2253
- }
2254
-
2255
- export function promptConfigToJSON(promptConfig: PromptConfig): string {
2256
- return JSON.stringify(PromptConfig$outboundSchema.parse(promptConfig));
2257
- }
2258
-
2259
- export function promptConfigFromJSON(
2260
- jsonString: string,
2261
- ): SafeParseResult<PromptConfig, SDKValidationError> {
2262
- return safeParse(
2263
- jsonString,
2264
- (x) => PromptConfig$inboundSchema.parse(JSON.parse(x)),
2265
- `Failed to parse 'PromptConfig' from JSON`,
2266
- );
2267
- }
2268
-
2269
- /** @internal */
2270
- export const UseCases$inboundSchema: z.ZodNativeEnum<typeof UseCases> = z
2271
- .nativeEnum(UseCases);
2272
-
2273
- /** @internal */
2274
- export const UseCases$outboundSchema: z.ZodNativeEnum<typeof UseCases> =
2275
- UseCases$inboundSchema;
2276
-
2277
- /**
2278
- * @internal
2279
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2280
- */
2281
- export namespace UseCases$ {
2282
- /** @deprecated use `UseCases$inboundSchema` instead. */
2283
- export const inboundSchema = UseCases$inboundSchema;
2284
- /** @deprecated use `UseCases$outboundSchema` instead. */
2285
- export const outboundSchema = UseCases$outboundSchema;
2286
- }
2287
-
2288
- /** @internal */
2289
- export const Language$inboundSchema: z.ZodNativeEnum<typeof Language> = z
2290
- .nativeEnum(Language);
2291
-
2292
- /** @internal */
2293
- export const Language$outboundSchema: z.ZodNativeEnum<typeof Language> =
2294
- Language$inboundSchema;
2295
-
2296
- /**
2297
- * @internal
2298
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2299
- */
2300
- export namespace Language$ {
2301
- /** @deprecated use `Language$inboundSchema` instead. */
2302
- export const inboundSchema = Language$inboundSchema;
2303
- /** @deprecated use `Language$outboundSchema` instead. */
2304
- export const outboundSchema = Language$outboundSchema;
2305
- }
2306
-
2307
- /** @internal */
2308
- export const CreatePromptMetadata$inboundSchema: z.ZodType<
2309
- CreatePromptMetadata,
2310
- z.ZodTypeDef,
2311
- unknown
2312
- > = z.object({
2313
- use_cases: z.array(UseCases$inboundSchema).optional(),
2314
- language: z.nullable(Language$inboundSchema).optional(),
2315
- }).transform((v) => {
2316
- return remap$(v, {
2317
- "use_cases": "useCases",
2318
- });
2319
- });
2320
-
2321
- /** @internal */
2322
- export type CreatePromptMetadata$Outbound = {
2323
- use_cases?: Array<string> | undefined;
2324
- language?: string | null | undefined;
2325
- };
2326
-
2327
- /** @internal */
2328
- export const CreatePromptMetadata$outboundSchema: z.ZodType<
2329
- CreatePromptMetadata$Outbound,
2330
- z.ZodTypeDef,
2331
- CreatePromptMetadata
2332
- > = z.object({
2333
- useCases: z.array(UseCases$outboundSchema).optional(),
2334
- language: z.nullable(Language$outboundSchema).optional(),
2335
- }).transform((v) => {
2336
- return remap$(v, {
2337
- useCases: "use_cases",
2338
- });
2339
- });
2340
-
2341
- /**
2342
- * @internal
2343
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2344
- */
2345
- export namespace CreatePromptMetadata$ {
2346
- /** @deprecated use `CreatePromptMetadata$inboundSchema` instead. */
2347
- export const inboundSchema = CreatePromptMetadata$inboundSchema;
2348
- /** @deprecated use `CreatePromptMetadata$outboundSchema` instead. */
2349
- export const outboundSchema = CreatePromptMetadata$outboundSchema;
2350
- /** @deprecated use `CreatePromptMetadata$Outbound` instead. */
2351
- export type Outbound = CreatePromptMetadata$Outbound;
2352
- }
2353
-
2354
- export function createPromptMetadataToJSON(
2355
- createPromptMetadata: CreatePromptMetadata,
2356
- ): string {
2357
- return JSON.stringify(
2358
- CreatePromptMetadata$outboundSchema.parse(createPromptMetadata),
2359
- );
2360
- }
2361
-
2362
- export function createPromptMetadataFromJSON(
2363
- jsonString: string,
2364
- ): SafeParseResult<CreatePromptMetadata, SDKValidationError> {
2365
- return safeParse(
2366
- jsonString,
2367
- (x) => CreatePromptMetadata$inboundSchema.parse(JSON.parse(x)),
2368
- `Failed to parse 'CreatePromptMetadata' from JSON`,
2369
- );
2370
- }
2371
-
2372
- /** @internal */
2373
- export const CreatePromptRequestBody$inboundSchema: z.ZodType<
2374
- CreatePromptRequestBody,
2375
- z.ZodTypeDef,
2376
- unknown
2377
- > = z.object({
2378
- display_name: z.string(),
2379
- description: z.nullable(z.string()).optional(),
2380
- prompt_config: z.lazy(() => PromptConfig$inboundSchema),
2381
- metadata: z.lazy(() => CreatePromptMetadata$inboundSchema).optional(),
2382
- path: z.string(),
2383
- }).transform((v) => {
2384
- return remap$(v, {
2385
- "display_name": "displayName",
2386
- "prompt_config": "promptConfig",
2387
- });
2388
- });
2389
-
2390
- /** @internal */
2391
- export type CreatePromptRequestBody$Outbound = {
2392
- display_name: string;
2393
- description?: string | null | undefined;
2394
- prompt_config: PromptConfig$Outbound;
2395
- metadata?: CreatePromptMetadata$Outbound | undefined;
2396
- path: string;
2397
- };
2398
-
2399
- /** @internal */
2400
- export const CreatePromptRequestBody$outboundSchema: z.ZodType<
2401
- CreatePromptRequestBody$Outbound,
2402
- z.ZodTypeDef,
2403
- CreatePromptRequestBody
2404
- > = z.object({
2405
- displayName: z.string(),
2406
- description: z.nullable(z.string()).optional(),
2407
- promptConfig: z.lazy(() => PromptConfig$outboundSchema),
2408
- metadata: z.lazy(() => CreatePromptMetadata$outboundSchema).optional(),
2409
- path: z.string(),
2410
- }).transform((v) => {
2411
- return remap$(v, {
2412
- displayName: "display_name",
2413
- promptConfig: "prompt_config",
2414
- });
2415
- });
2416
-
2417
- /**
2418
- * @internal
2419
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2420
- */
2421
- export namespace CreatePromptRequestBody$ {
2422
- /** @deprecated use `CreatePromptRequestBody$inboundSchema` instead. */
2423
- export const inboundSchema = CreatePromptRequestBody$inboundSchema;
2424
- /** @deprecated use `CreatePromptRequestBody$outboundSchema` instead. */
2425
- export const outboundSchema = CreatePromptRequestBody$outboundSchema;
2426
- /** @deprecated use `CreatePromptRequestBody$Outbound` instead. */
2427
- export type Outbound = CreatePromptRequestBody$Outbound;
2428
- }
2429
-
2430
- export function createPromptRequestBodyToJSON(
2431
- createPromptRequestBody: CreatePromptRequestBody,
2432
- ): string {
2433
- return JSON.stringify(
2434
- CreatePromptRequestBody$outboundSchema.parse(createPromptRequestBody),
2435
- );
2436
- }
2437
-
2438
- export function createPromptRequestBodyFromJSON(
2439
- jsonString: string,
2440
- ): SafeParseResult<CreatePromptRequestBody, SDKValidationError> {
2441
- return safeParse(
2442
- jsonString,
2443
- (x) => CreatePromptRequestBody$inboundSchema.parse(JSON.parse(x)),
2444
- `Failed to parse 'CreatePromptRequestBody' from JSON`,
2445
- );
2446
- }
2447
-
2448
- /** @internal */
2449
- export const CreatePromptPromptsType$inboundSchema: z.ZodNativeEnum<
2450
- typeof CreatePromptPromptsType
2451
- > = z.nativeEnum(CreatePromptPromptsType);
2452
-
2453
- /** @internal */
2454
- export const CreatePromptPromptsType$outboundSchema: z.ZodNativeEnum<
2455
- typeof CreatePromptPromptsType
2456
- > = CreatePromptPromptsType$inboundSchema;
2457
-
2458
- /**
2459
- * @internal
2460
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2461
- */
2462
- export namespace CreatePromptPromptsType$ {
2463
- /** @deprecated use `CreatePromptPromptsType$inboundSchema` instead. */
2464
- export const inboundSchema = CreatePromptPromptsType$inboundSchema;
2465
- /** @deprecated use `CreatePromptPromptsType$outboundSchema` instead. */
2466
- export const outboundSchema = CreatePromptPromptsType$outboundSchema;
2467
- }
2468
-
2469
- /** @internal */
2470
- export const CreatePromptModelType$inboundSchema: z.ZodNativeEnum<
2471
- typeof CreatePromptModelType
2472
- > = z.nativeEnum(CreatePromptModelType);
2473
-
2474
- /** @internal */
2475
- export const CreatePromptModelType$outboundSchema: z.ZodNativeEnum<
2476
- typeof CreatePromptModelType
2477
- > = CreatePromptModelType$inboundSchema;
2478
-
2479
- /**
2480
- * @internal
2481
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2482
- */
2483
- export namespace CreatePromptModelType$ {
2484
- /** @deprecated use `CreatePromptModelType$inboundSchema` instead. */
2485
- export const inboundSchema = CreatePromptModelType$inboundSchema;
2486
- /** @deprecated use `CreatePromptModelType$outboundSchema` instead. */
2487
- export const outboundSchema = CreatePromptModelType$outboundSchema;
2488
- }
2489
-
2490
- /** @internal */
2491
- export const CreatePromptPromptsFormat$inboundSchema: z.ZodNativeEnum<
2492
- typeof CreatePromptPromptsFormat
2493
- > = z.nativeEnum(CreatePromptPromptsFormat);
2494
-
2495
- /** @internal */
2496
- export const CreatePromptPromptsFormat$outboundSchema: z.ZodNativeEnum<
2497
- typeof CreatePromptPromptsFormat
2498
- > = CreatePromptPromptsFormat$inboundSchema;
2499
-
2500
- /**
2501
- * @internal
2502
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2503
- */
2504
- export namespace CreatePromptPromptsFormat$ {
2505
- /** @deprecated use `CreatePromptPromptsFormat$inboundSchema` instead. */
2506
- export const inboundSchema = CreatePromptPromptsFormat$inboundSchema;
2507
- /** @deprecated use `CreatePromptPromptsFormat$outboundSchema` instead. */
2508
- export const outboundSchema = CreatePromptPromptsFormat$outboundSchema;
2509
- }
2510
-
2511
- /** @internal */
2512
- export const CreatePromptResponseFormatPromptsResponseType$inboundSchema:
2513
- z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsResponseType> = z
2514
- .nativeEnum(CreatePromptResponseFormatPromptsResponseType);
2515
-
2516
- /** @internal */
2517
- export const CreatePromptResponseFormatPromptsResponseType$outboundSchema:
2518
- z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsResponseType> =
2519
- CreatePromptResponseFormatPromptsResponseType$inboundSchema;
2520
-
2521
- /**
2522
- * @internal
2523
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2524
- */
2525
- export namespace CreatePromptResponseFormatPromptsResponseType$ {
2526
- /** @deprecated use `CreatePromptResponseFormatPromptsResponseType$inboundSchema` instead. */
2527
- export const inboundSchema =
2528
- CreatePromptResponseFormatPromptsResponseType$inboundSchema;
2529
- /** @deprecated use `CreatePromptResponseFormatPromptsResponseType$outboundSchema` instead. */
2530
- export const outboundSchema =
2531
- CreatePromptResponseFormatPromptsResponseType$outboundSchema;
2532
- }
2533
-
2534
- /** @internal */
2535
- export const CreatePromptResponseFormat2$inboundSchema: z.ZodType<
2536
- CreatePromptResponseFormat2,
2537
- z.ZodTypeDef,
2538
- unknown
2539
- > = z.object({
2540
- type: CreatePromptResponseFormatPromptsResponseType$inboundSchema,
2541
- });
2542
-
2543
- /** @internal */
2544
- export type CreatePromptResponseFormat2$Outbound = {
2545
- type: string;
2546
- };
2547
-
2548
- /** @internal */
2549
- export const CreatePromptResponseFormat2$outboundSchema: z.ZodType<
2550
- CreatePromptResponseFormat2$Outbound,
2551
- z.ZodTypeDef,
2552
- CreatePromptResponseFormat2
2553
- > = z.object({
2554
- type: CreatePromptResponseFormatPromptsResponseType$outboundSchema,
2555
- });
2556
-
2557
- /**
2558
- * @internal
2559
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2560
- */
2561
- export namespace CreatePromptResponseFormat2$ {
2562
- /** @deprecated use `CreatePromptResponseFormat2$inboundSchema` instead. */
2563
- export const inboundSchema = CreatePromptResponseFormat2$inboundSchema;
2564
- /** @deprecated use `CreatePromptResponseFormat2$outboundSchema` instead. */
2565
- export const outboundSchema = CreatePromptResponseFormat2$outboundSchema;
2566
- /** @deprecated use `CreatePromptResponseFormat2$Outbound` instead. */
2567
- export type Outbound = CreatePromptResponseFormat2$Outbound;
2568
- }
2569
-
2570
- export function createPromptResponseFormat2ToJSON(
2571
- createPromptResponseFormat2: CreatePromptResponseFormat2,
2572
- ): string {
2573
- return JSON.stringify(
2574
- CreatePromptResponseFormat2$outboundSchema.parse(
2575
- createPromptResponseFormat2,
2576
- ),
2577
- );
2578
- }
2579
-
2580
- export function createPromptResponseFormat2FromJSON(
2581
- jsonString: string,
2582
- ): SafeParseResult<CreatePromptResponseFormat2, SDKValidationError> {
2583
- return safeParse(
2584
- jsonString,
2585
- (x) => CreatePromptResponseFormat2$inboundSchema.parse(JSON.parse(x)),
2586
- `Failed to parse 'CreatePromptResponseFormat2' from JSON`,
2587
- );
2588
- }
2589
-
2590
- /** @internal */
2591
- export const CreatePromptResponseFormatPromptsType$inboundSchema:
2592
- z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsType> = z.nativeEnum(
2593
- CreatePromptResponseFormatPromptsType,
2594
- );
2595
-
2596
- /** @internal */
2597
- export const CreatePromptResponseFormatPromptsType$outboundSchema:
2598
- z.ZodNativeEnum<typeof CreatePromptResponseFormatPromptsType> =
2599
- CreatePromptResponseFormatPromptsType$inboundSchema;
2600
-
2601
- /**
2602
- * @internal
2603
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2604
- */
2605
- export namespace CreatePromptResponseFormatPromptsType$ {
2606
- /** @deprecated use `CreatePromptResponseFormatPromptsType$inboundSchema` instead. */
2607
- export const inboundSchema =
2608
- CreatePromptResponseFormatPromptsType$inboundSchema;
2609
- /** @deprecated use `CreatePromptResponseFormatPromptsType$outboundSchema` instead. */
2610
- export const outboundSchema =
2611
- CreatePromptResponseFormatPromptsType$outboundSchema;
2612
- }
2613
-
2614
- /** @internal */
2615
- export const CreatePromptResponseFormatJsonSchema$inboundSchema: z.ZodType<
2616
- CreatePromptResponseFormatJsonSchema,
2617
- z.ZodTypeDef,
2618
- unknown
2619
- > = z.object({
2620
- name: z.string(),
2621
- strict: z.boolean().optional(),
2622
- schema: z.record(z.any()),
2623
- });
2624
-
2625
- /** @internal */
2626
- export type CreatePromptResponseFormatJsonSchema$Outbound = {
2627
- name: string;
2628
- strict?: boolean | undefined;
2629
- schema: { [k: string]: any };
2630
- };
2631
-
2632
- /** @internal */
2633
- export const CreatePromptResponseFormatJsonSchema$outboundSchema: z.ZodType<
2634
- CreatePromptResponseFormatJsonSchema$Outbound,
2635
- z.ZodTypeDef,
2636
- CreatePromptResponseFormatJsonSchema
2637
- > = z.object({
2638
- name: z.string(),
2639
- strict: z.boolean().optional(),
2640
- schema: z.record(z.any()),
2641
- });
2642
-
2643
- /**
2644
- * @internal
2645
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2646
- */
2647
- export namespace CreatePromptResponseFormatJsonSchema$ {
2648
- /** @deprecated use `CreatePromptResponseFormatJsonSchema$inboundSchema` instead. */
2649
- export const inboundSchema =
2650
- CreatePromptResponseFormatJsonSchema$inboundSchema;
2651
- /** @deprecated use `CreatePromptResponseFormatJsonSchema$outboundSchema` instead. */
2652
- export const outboundSchema =
2653
- CreatePromptResponseFormatJsonSchema$outboundSchema;
2654
- /** @deprecated use `CreatePromptResponseFormatJsonSchema$Outbound` instead. */
2655
- export type Outbound = CreatePromptResponseFormatJsonSchema$Outbound;
2656
- }
2657
-
2658
- export function createPromptResponseFormatJsonSchemaToJSON(
2659
- createPromptResponseFormatJsonSchema: CreatePromptResponseFormatJsonSchema,
2660
- ): string {
2661
- return JSON.stringify(
2662
- CreatePromptResponseFormatJsonSchema$outboundSchema.parse(
2663
- createPromptResponseFormatJsonSchema,
2664
- ),
2665
- );
2666
- }
2667
-
2668
- export function createPromptResponseFormatJsonSchemaFromJSON(
2669
- jsonString: string,
2670
- ): SafeParseResult<CreatePromptResponseFormatJsonSchema, SDKValidationError> {
2671
- return safeParse(
2672
- jsonString,
2673
- (x) =>
2674
- CreatePromptResponseFormatJsonSchema$inboundSchema.parse(JSON.parse(x)),
2675
- `Failed to parse 'CreatePromptResponseFormatJsonSchema' from JSON`,
2676
- );
2677
- }
2678
-
2679
- /** @internal */
2680
- export const CreatePromptResponseFormat1$inboundSchema: z.ZodType<
2681
- CreatePromptResponseFormat1,
2682
- z.ZodTypeDef,
2683
- unknown
2684
- > = z.object({
2685
- type: CreatePromptResponseFormatPromptsType$inboundSchema,
2686
- json_schema: z.lazy(() => CreatePromptResponseFormatJsonSchema$inboundSchema),
2687
- }).transform((v) => {
2688
- return remap$(v, {
2689
- "json_schema": "jsonSchema",
2690
- });
2691
- });
2692
-
2693
- /** @internal */
2694
- export type CreatePromptResponseFormat1$Outbound = {
2695
- type: string;
2696
- json_schema: CreatePromptResponseFormatJsonSchema$Outbound;
2697
- };
2698
-
2699
- /** @internal */
2700
- export const CreatePromptResponseFormat1$outboundSchema: z.ZodType<
2701
- CreatePromptResponseFormat1$Outbound,
2702
- z.ZodTypeDef,
2703
- CreatePromptResponseFormat1
2704
- > = z.object({
2705
- type: CreatePromptResponseFormatPromptsType$outboundSchema,
2706
- jsonSchema: z.lazy(() => CreatePromptResponseFormatJsonSchema$outboundSchema),
2707
- }).transform((v) => {
2708
- return remap$(v, {
2709
- jsonSchema: "json_schema",
2710
- });
2711
- });
2712
-
2713
- /**
2714
- * @internal
2715
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2716
- */
2717
- export namespace CreatePromptResponseFormat1$ {
2718
- /** @deprecated use `CreatePromptResponseFormat1$inboundSchema` instead. */
2719
- export const inboundSchema = CreatePromptResponseFormat1$inboundSchema;
2720
- /** @deprecated use `CreatePromptResponseFormat1$outboundSchema` instead. */
2721
- export const outboundSchema = CreatePromptResponseFormat1$outboundSchema;
2722
- /** @deprecated use `CreatePromptResponseFormat1$Outbound` instead. */
2723
- export type Outbound = CreatePromptResponseFormat1$Outbound;
2724
- }
2725
-
2726
- export function createPromptResponseFormat1ToJSON(
2727
- createPromptResponseFormat1: CreatePromptResponseFormat1,
2728
- ): string {
2729
- return JSON.stringify(
2730
- CreatePromptResponseFormat1$outboundSchema.parse(
2731
- createPromptResponseFormat1,
2732
- ),
2733
- );
2734
- }
2735
-
2736
- export function createPromptResponseFormat1FromJSON(
2737
- jsonString: string,
2738
- ): SafeParseResult<CreatePromptResponseFormat1, SDKValidationError> {
2739
- return safeParse(
2740
- jsonString,
2741
- (x) => CreatePromptResponseFormat1$inboundSchema.parse(JSON.parse(x)),
2742
- `Failed to parse 'CreatePromptResponseFormat1' from JSON`,
2743
- );
2744
- }
2745
-
2746
- /** @internal */
2747
- export const CreatePromptResponseFormat$inboundSchema: z.ZodType<
2748
- CreatePromptResponseFormat,
2749
- z.ZodTypeDef,
2750
- unknown
2751
- > = z.union([
2752
- z.lazy(() => CreatePromptResponseFormat1$inboundSchema),
2753
- z.lazy(() => CreatePromptResponseFormat2$inboundSchema),
2754
- ]);
2755
-
2756
- /** @internal */
2757
- export type CreatePromptResponseFormat$Outbound =
2758
- | CreatePromptResponseFormat1$Outbound
2759
- | CreatePromptResponseFormat2$Outbound;
2760
-
2761
- /** @internal */
2762
- export const CreatePromptResponseFormat$outboundSchema: z.ZodType<
2763
- CreatePromptResponseFormat$Outbound,
2764
- z.ZodTypeDef,
2765
- CreatePromptResponseFormat
2766
- > = z.union([
2767
- z.lazy(() => CreatePromptResponseFormat1$outboundSchema),
2768
- z.lazy(() => CreatePromptResponseFormat2$outboundSchema),
2769
- ]);
2770
-
2771
- /**
2772
- * @internal
2773
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2774
- */
2775
- export namespace CreatePromptResponseFormat$ {
2776
- /** @deprecated use `CreatePromptResponseFormat$inboundSchema` instead. */
2777
- export const inboundSchema = CreatePromptResponseFormat$inboundSchema;
2778
- /** @deprecated use `CreatePromptResponseFormat$outboundSchema` instead. */
2779
- export const outboundSchema = CreatePromptResponseFormat$outboundSchema;
2780
- /** @deprecated use `CreatePromptResponseFormat$Outbound` instead. */
2781
- export type Outbound = CreatePromptResponseFormat$Outbound;
2782
- }
2783
-
2784
- export function createPromptResponseFormatToJSON(
2785
- createPromptResponseFormat: CreatePromptResponseFormat,
2786
- ): string {
2787
- return JSON.stringify(
2788
- CreatePromptResponseFormat$outboundSchema.parse(createPromptResponseFormat),
2789
- );
2790
- }
2791
-
2792
- export function createPromptResponseFormatFromJSON(
2793
- jsonString: string,
2794
- ): SafeParseResult<CreatePromptResponseFormat, SDKValidationError> {
2795
- return safeParse(
2796
- jsonString,
2797
- (x) => CreatePromptResponseFormat$inboundSchema.parse(JSON.parse(x)),
2798
- `Failed to parse 'CreatePromptResponseFormat' from JSON`,
2799
- );
2800
- }
2801
-
2802
- /** @internal */
2803
- export const CreatePromptPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
2804
- typeof CreatePromptPhotoRealVersion
2805
- > = z.nativeEnum(CreatePromptPhotoRealVersion);
2806
-
2807
- /** @internal */
2808
- export const CreatePromptPhotoRealVersion$outboundSchema: z.ZodNativeEnum<
2809
- typeof CreatePromptPhotoRealVersion
2810
- > = CreatePromptPhotoRealVersion$inboundSchema;
2811
-
2812
- /**
2813
- * @internal
2814
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2815
- */
2816
- export namespace CreatePromptPhotoRealVersion$ {
2817
- /** @deprecated use `CreatePromptPhotoRealVersion$inboundSchema` instead. */
2818
- export const inboundSchema = CreatePromptPhotoRealVersion$inboundSchema;
2819
- /** @deprecated use `CreatePromptPhotoRealVersion$outboundSchema` instead. */
2820
- export const outboundSchema = CreatePromptPhotoRealVersion$outboundSchema;
2821
- }
2822
-
2823
- /** @internal */
2824
- export const CreatePromptEncodingFormat$inboundSchema: z.ZodNativeEnum<
2825
- typeof CreatePromptEncodingFormat
2826
- > = z.nativeEnum(CreatePromptEncodingFormat);
2827
-
2828
- /** @internal */
2829
- export const CreatePromptEncodingFormat$outboundSchema: z.ZodNativeEnum<
2830
- typeof CreatePromptEncodingFormat
2831
- > = CreatePromptEncodingFormat$inboundSchema;
2832
-
2833
- /**
2834
- * @internal
2835
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2836
- */
2837
- export namespace CreatePromptEncodingFormat$ {
2838
- /** @deprecated use `CreatePromptEncodingFormat$inboundSchema` instead. */
2839
- export const inboundSchema = CreatePromptEncodingFormat$inboundSchema;
2840
- /** @deprecated use `CreatePromptEncodingFormat$outboundSchema` instead. */
2841
- export const outboundSchema = CreatePromptEncodingFormat$outboundSchema;
2842
- }
2843
-
2844
- /** @internal */
2845
- export const CreatePromptReasoningEffort$inboundSchema: z.ZodNativeEnum<
2846
- typeof CreatePromptReasoningEffort
2847
- > = z.nativeEnum(CreatePromptReasoningEffort);
2848
-
2849
- /** @internal */
2850
- export const CreatePromptReasoningEffort$outboundSchema: z.ZodNativeEnum<
2851
- typeof CreatePromptReasoningEffort
2852
- > = CreatePromptReasoningEffort$inboundSchema;
2853
-
2854
- /**
2855
- * @internal
2856
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2857
- */
2858
- export namespace CreatePromptReasoningEffort$ {
2859
- /** @deprecated use `CreatePromptReasoningEffort$inboundSchema` instead. */
2860
- export const inboundSchema = CreatePromptReasoningEffort$inboundSchema;
2861
- /** @deprecated use `CreatePromptReasoningEffort$outboundSchema` instead. */
2862
- export const outboundSchema = CreatePromptReasoningEffort$outboundSchema;
2863
- }
2864
-
2865
- /** @internal */
2866
- export const CreatePromptModelParameters$inboundSchema: z.ZodType<
2867
- CreatePromptModelParameters,
2868
- z.ZodTypeDef,
2869
- unknown
2870
- > = z.object({
2871
- temperature: z.number().optional(),
2872
- maxTokens: z.number().optional(),
2873
- topK: z.number().optional(),
2874
- topP: z.number().optional(),
2875
- frequencyPenalty: z.number().optional(),
2876
- presencePenalty: z.number().optional(),
2877
- numImages: z.number().optional(),
2878
- seed: z.number().optional(),
2879
- format: CreatePromptPromptsFormat$inboundSchema.optional(),
2880
- dimensions: z.string().optional(),
2881
- quality: z.string().optional(),
2882
- style: z.string().optional(),
2883
- responseFormat: z.nullable(
2884
- z.union([
2885
- z.lazy(() => CreatePromptResponseFormat1$inboundSchema),
2886
- z.lazy(() => CreatePromptResponseFormat2$inboundSchema),
2887
- ]),
2888
- ).optional(),
2889
- photoRealVersion: CreatePromptPhotoRealVersion$inboundSchema.optional(),
2890
- encoding_format: CreatePromptEncodingFormat$inboundSchema.optional(),
2891
- reasoningEffort: CreatePromptReasoningEffort$inboundSchema.optional(),
2892
- budgetTokens: z.number().optional(),
2893
- }).transform((v) => {
2894
- return remap$(v, {
2895
- "encoding_format": "encodingFormat",
2896
- });
2897
- });
2898
-
2899
- /** @internal */
2900
- export type CreatePromptModelParameters$Outbound = {
2901
- temperature?: number | undefined;
2902
- maxTokens?: number | undefined;
2903
- topK?: number | undefined;
2904
- topP?: number | undefined;
2905
- frequencyPenalty?: number | undefined;
2906
- presencePenalty?: number | undefined;
2907
- numImages?: number | undefined;
2908
- seed?: number | undefined;
2909
- format?: string | undefined;
2910
- dimensions?: string | undefined;
2911
- quality?: string | undefined;
2912
- style?: string | undefined;
2913
- responseFormat?:
2914
- | CreatePromptResponseFormat1$Outbound
2915
- | CreatePromptResponseFormat2$Outbound
2916
- | null
2917
- | undefined;
2918
- photoRealVersion?: string | undefined;
2919
- encoding_format?: string | undefined;
2920
- reasoningEffort?: string | undefined;
2921
- budgetTokens?: number | undefined;
2922
- };
2923
-
2924
- /** @internal */
2925
- export const CreatePromptModelParameters$outboundSchema: z.ZodType<
2926
- CreatePromptModelParameters$Outbound,
2927
- z.ZodTypeDef,
2928
- CreatePromptModelParameters
2929
- > = z.object({
2930
- temperature: z.number().optional(),
2931
- maxTokens: z.number().optional(),
2932
- topK: z.number().optional(),
2933
- topP: z.number().optional(),
2934
- frequencyPenalty: z.number().optional(),
2935
- presencePenalty: z.number().optional(),
2936
- numImages: z.number().optional(),
2937
- seed: z.number().optional(),
2938
- format: CreatePromptPromptsFormat$outboundSchema.optional(),
2939
- dimensions: z.string().optional(),
2940
- quality: z.string().optional(),
2941
- style: z.string().optional(),
2942
- responseFormat: z.nullable(
2943
- z.union([
2944
- z.lazy(() => CreatePromptResponseFormat1$outboundSchema),
2945
- z.lazy(() => CreatePromptResponseFormat2$outboundSchema),
2946
- ]),
2947
- ).optional(),
2948
- photoRealVersion: CreatePromptPhotoRealVersion$outboundSchema.optional(),
2949
- encodingFormat: CreatePromptEncodingFormat$outboundSchema.optional(),
2950
- reasoningEffort: CreatePromptReasoningEffort$outboundSchema.optional(),
2951
- budgetTokens: z.number().optional(),
2952
- }).transform((v) => {
2953
- return remap$(v, {
2954
- encodingFormat: "encoding_format",
2955
- });
2956
- });
2957
-
2958
- /**
2959
- * @internal
2960
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2961
- */
2962
- export namespace CreatePromptModelParameters$ {
2963
- /** @deprecated use `CreatePromptModelParameters$inboundSchema` instead. */
2964
- export const inboundSchema = CreatePromptModelParameters$inboundSchema;
2965
- /** @deprecated use `CreatePromptModelParameters$outboundSchema` instead. */
2966
- export const outboundSchema = CreatePromptModelParameters$outboundSchema;
2967
- /** @deprecated use `CreatePromptModelParameters$Outbound` instead. */
2968
- export type Outbound = CreatePromptModelParameters$Outbound;
2969
- }
2970
-
2971
- export function createPromptModelParametersToJSON(
2972
- createPromptModelParameters: CreatePromptModelParameters,
2973
- ): string {
2974
- return JSON.stringify(
2975
- CreatePromptModelParameters$outboundSchema.parse(
2976
- createPromptModelParameters,
2977
- ),
2978
- );
2979
- }
2980
-
2981
- export function createPromptModelParametersFromJSON(
2982
- jsonString: string,
2983
- ): SafeParseResult<CreatePromptModelParameters, SDKValidationError> {
2984
- return safeParse(
2985
- jsonString,
2986
- (x) => CreatePromptModelParameters$inboundSchema.parse(JSON.parse(x)),
2987
- `Failed to parse 'CreatePromptModelParameters' from JSON`,
2988
- );
2989
- }
2990
-
2991
- /** @internal */
2992
- export const CreatePromptProvider$inboundSchema: z.ZodNativeEnum<
2993
- typeof CreatePromptProvider
2994
- > = z.nativeEnum(CreatePromptProvider);
2995
-
2996
- /** @internal */
2997
- export const CreatePromptProvider$outboundSchema: z.ZodNativeEnum<
2998
- typeof CreatePromptProvider
2999
- > = CreatePromptProvider$inboundSchema;
3000
-
3001
- /**
3002
- * @internal
3003
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3004
- */
3005
- export namespace CreatePromptProvider$ {
3006
- /** @deprecated use `CreatePromptProvider$inboundSchema` instead. */
3007
- export const inboundSchema = CreatePromptProvider$inboundSchema;
3008
- /** @deprecated use `CreatePromptProvider$outboundSchema` instead. */
3009
- export const outboundSchema = CreatePromptProvider$outboundSchema;
3010
- }
3011
-
3012
- /** @internal */
3013
- export const CreatePromptPromptsRole$inboundSchema: z.ZodNativeEnum<
3014
- typeof CreatePromptPromptsRole
3015
- > = z.nativeEnum(CreatePromptPromptsRole);
3016
-
3017
- /** @internal */
3018
- export const CreatePromptPromptsRole$outboundSchema: z.ZodNativeEnum<
3019
- typeof CreatePromptPromptsRole
3020
- > = CreatePromptPromptsRole$inboundSchema;
3021
-
3022
- /**
3023
- * @internal
3024
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3025
- */
3026
- export namespace CreatePromptPromptsRole$ {
3027
- /** @deprecated use `CreatePromptPromptsRole$inboundSchema` instead. */
3028
- export const inboundSchema = CreatePromptPromptsRole$inboundSchema;
3029
- /** @deprecated use `CreatePromptPromptsRole$outboundSchema` instead. */
3030
- export const outboundSchema = CreatePromptPromptsRole$outboundSchema;
3031
- }
3032
-
3033
- /** @internal */
3034
- export const CreatePrompt2PromptsResponse200ApplicationJSONType$inboundSchema:
3035
- z.ZodNativeEnum<typeof CreatePrompt2PromptsResponse200ApplicationJSONType> = z
3036
- .nativeEnum(CreatePrompt2PromptsResponse200ApplicationJSONType);
3037
-
3038
- /** @internal */
3039
- export const CreatePrompt2PromptsResponse200ApplicationJSONType$outboundSchema:
3040
- z.ZodNativeEnum<typeof CreatePrompt2PromptsResponse200ApplicationJSONType> =
3041
- CreatePrompt2PromptsResponse200ApplicationJSONType$inboundSchema;
3042
-
3043
- /**
3044
- * @internal
3045
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3046
- */
3047
- export namespace CreatePrompt2PromptsResponse200ApplicationJSONType$ {
3048
- /** @deprecated use `CreatePrompt2PromptsResponse200ApplicationJSONType$inboundSchema` instead. */
3049
- export const inboundSchema =
3050
- CreatePrompt2PromptsResponse200ApplicationJSONType$inboundSchema;
3051
- /** @deprecated use `CreatePrompt2PromptsResponse200ApplicationJSONType$outboundSchema` instead. */
3052
- export const outboundSchema =
3053
- CreatePrompt2PromptsResponse200ApplicationJSONType$outboundSchema;
3054
- }
3055
-
3056
- /** @internal */
3057
- export const CreatePrompt2PromptsFile$inboundSchema: z.ZodType<
3058
- CreatePrompt2PromptsFile,
3059
- z.ZodTypeDef,
3060
- unknown
3061
- > = z.object({
3062
- file_data: z.string(),
3063
- filename: z.string().optional(),
3064
- }).transform((v) => {
3065
- return remap$(v, {
3066
- "file_data": "fileData",
3067
- });
3068
- });
3069
-
3070
- /** @internal */
3071
- export type CreatePrompt2PromptsFile$Outbound = {
3072
- file_data: string;
3073
- filename?: string | undefined;
3074
- };
3075
-
3076
- /** @internal */
3077
- export const CreatePrompt2PromptsFile$outboundSchema: z.ZodType<
3078
- CreatePrompt2PromptsFile$Outbound,
3079
- z.ZodTypeDef,
3080
- CreatePrompt2PromptsFile
3081
- > = z.object({
3082
- fileData: z.string(),
3083
- filename: z.string().optional(),
3084
- }).transform((v) => {
3085
- return remap$(v, {
3086
- fileData: "file_data",
3087
- });
3088
- });
3089
-
3090
- /**
3091
- * @internal
3092
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3093
- */
3094
- export namespace CreatePrompt2PromptsFile$ {
3095
- /** @deprecated use `CreatePrompt2PromptsFile$inboundSchema` instead. */
3096
- export const inboundSchema = CreatePrompt2PromptsFile$inboundSchema;
3097
- /** @deprecated use `CreatePrompt2PromptsFile$outboundSchema` instead. */
3098
- export const outboundSchema = CreatePrompt2PromptsFile$outboundSchema;
3099
- /** @deprecated use `CreatePrompt2PromptsFile$Outbound` instead. */
3100
- export type Outbound = CreatePrompt2PromptsFile$Outbound;
3101
- }
3102
-
3103
- export function createPrompt2PromptsFileToJSON(
3104
- createPrompt2PromptsFile: CreatePrompt2PromptsFile,
3105
- ): string {
3106
- return JSON.stringify(
3107
- CreatePrompt2PromptsFile$outboundSchema.parse(createPrompt2PromptsFile),
3108
- );
3109
- }
3110
-
3111
- export function createPrompt2PromptsFileFromJSON(
3112
- jsonString: string,
3113
- ): SafeParseResult<CreatePrompt2PromptsFile, SDKValidationError> {
3114
- return safeParse(
3115
- jsonString,
3116
- (x) => CreatePrompt2PromptsFile$inboundSchema.parse(JSON.parse(x)),
3117
- `Failed to parse 'CreatePrompt2PromptsFile' from JSON`,
3118
- );
3119
- }
3120
-
3121
- /** @internal */
3122
- export const CreatePrompt2Prompts3$inboundSchema: z.ZodType<
3123
- CreatePrompt2Prompts3,
3124
- z.ZodTypeDef,
3125
- unknown
3126
- > = z.object({
3127
- type: CreatePrompt2PromptsResponse200ApplicationJSONType$inboundSchema,
3128
- file: z.lazy(() => CreatePrompt2PromptsFile$inboundSchema),
3129
- });
3130
-
3131
- /** @internal */
3132
- export type CreatePrompt2Prompts3$Outbound = {
3133
- type: string;
3134
- file: CreatePrompt2PromptsFile$Outbound;
3135
- };
3136
-
3137
- /** @internal */
3138
- export const CreatePrompt2Prompts3$outboundSchema: z.ZodType<
3139
- CreatePrompt2Prompts3$Outbound,
3140
- z.ZodTypeDef,
3141
- CreatePrompt2Prompts3
3142
- > = z.object({
3143
- type: CreatePrompt2PromptsResponse200ApplicationJSONType$outboundSchema,
3144
- file: z.lazy(() => CreatePrompt2PromptsFile$outboundSchema),
3145
- });
3146
-
3147
- /**
3148
- * @internal
3149
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3150
- */
3151
- export namespace CreatePrompt2Prompts3$ {
3152
- /** @deprecated use `CreatePrompt2Prompts3$inboundSchema` instead. */
3153
- export const inboundSchema = CreatePrompt2Prompts3$inboundSchema;
3154
- /** @deprecated use `CreatePrompt2Prompts3$outboundSchema` instead. */
3155
- export const outboundSchema = CreatePrompt2Prompts3$outboundSchema;
3156
- /** @deprecated use `CreatePrompt2Prompts3$Outbound` instead. */
3157
- export type Outbound = CreatePrompt2Prompts3$Outbound;
3158
- }
3159
-
3160
- export function createPrompt2Prompts3ToJSON(
3161
- createPrompt2Prompts3: CreatePrompt2Prompts3,
3162
- ): string {
3163
- return JSON.stringify(
3164
- CreatePrompt2Prompts3$outboundSchema.parse(createPrompt2Prompts3),
3165
- );
3166
- }
3167
-
3168
- export function createPrompt2Prompts3FromJSON(
3169
- jsonString: string,
3170
- ): SafeParseResult<CreatePrompt2Prompts3, SDKValidationError> {
3171
- return safeParse(
3172
- jsonString,
3173
- (x) => CreatePrompt2Prompts3$inboundSchema.parse(JSON.parse(x)),
3174
- `Failed to parse 'CreatePrompt2Prompts3' from JSON`,
3175
- );
3176
- }
3177
-
3178
- /** @internal */
3179
- export const CreatePrompt2PromptsResponse200Type$inboundSchema: z.ZodNativeEnum<
3180
- typeof CreatePrompt2PromptsResponse200Type
3181
- > = z.nativeEnum(CreatePrompt2PromptsResponse200Type);
3182
-
3183
- /** @internal */
3184
- export const CreatePrompt2PromptsResponse200Type$outboundSchema:
3185
- z.ZodNativeEnum<typeof CreatePrompt2PromptsResponse200Type> =
3186
- CreatePrompt2PromptsResponse200Type$inboundSchema;
3187
-
3188
- /**
3189
- * @internal
3190
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3191
- */
3192
- export namespace CreatePrompt2PromptsResponse200Type$ {
3193
- /** @deprecated use `CreatePrompt2PromptsResponse200Type$inboundSchema` instead. */
3194
- export const inboundSchema =
3195
- CreatePrompt2PromptsResponse200Type$inboundSchema;
3196
- /** @deprecated use `CreatePrompt2PromptsResponse200Type$outboundSchema` instead. */
3197
- export const outboundSchema =
3198
- CreatePrompt2PromptsResponse200Type$outboundSchema;
3199
- }
3200
-
3201
- /** @internal */
3202
- export const CreatePrompt2PromptsImageUrl$inboundSchema: z.ZodType<
3203
- CreatePrompt2PromptsImageUrl,
3204
- z.ZodTypeDef,
3205
- unknown
3206
- > = z.object({
3207
- id: z.string().optional(),
3208
- url: z.string(),
3209
- detail: z.string().optional(),
3210
- });
3211
-
3212
- /** @internal */
3213
- export type CreatePrompt2PromptsImageUrl$Outbound = {
3214
- id?: string | undefined;
3215
- url: string;
3216
- detail?: string | undefined;
3217
- };
3218
-
3219
- /** @internal */
3220
- export const CreatePrompt2PromptsImageUrl$outboundSchema: z.ZodType<
3221
- CreatePrompt2PromptsImageUrl$Outbound,
3222
- z.ZodTypeDef,
3223
- CreatePrompt2PromptsImageUrl
3224
- > = z.object({
3225
- id: z.string().optional(),
3226
- url: z.string(),
3227
- detail: z.string().optional(),
3228
- });
3229
-
3230
- /**
3231
- * @internal
3232
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3233
- */
3234
- export namespace CreatePrompt2PromptsImageUrl$ {
3235
- /** @deprecated use `CreatePrompt2PromptsImageUrl$inboundSchema` instead. */
3236
- export const inboundSchema = CreatePrompt2PromptsImageUrl$inboundSchema;
3237
- /** @deprecated use `CreatePrompt2PromptsImageUrl$outboundSchema` instead. */
3238
- export const outboundSchema = CreatePrompt2PromptsImageUrl$outboundSchema;
3239
- /** @deprecated use `CreatePrompt2PromptsImageUrl$Outbound` instead. */
3240
- export type Outbound = CreatePrompt2PromptsImageUrl$Outbound;
3241
- }
3242
-
3243
- export function createPrompt2PromptsImageUrlToJSON(
3244
- createPrompt2PromptsImageUrl: CreatePrompt2PromptsImageUrl,
3245
- ): string {
3246
- return JSON.stringify(
3247
- CreatePrompt2PromptsImageUrl$outboundSchema.parse(
3248
- createPrompt2PromptsImageUrl,
3249
- ),
3250
- );
3251
- }
3252
-
3253
- export function createPrompt2PromptsImageUrlFromJSON(
3254
- jsonString: string,
3255
- ): SafeParseResult<CreatePrompt2PromptsImageUrl, SDKValidationError> {
3256
- return safeParse(
3257
- jsonString,
3258
- (x) => CreatePrompt2PromptsImageUrl$inboundSchema.parse(JSON.parse(x)),
3259
- `Failed to parse 'CreatePrompt2PromptsImageUrl' from JSON`,
3260
- );
3261
- }
3262
-
3263
- /** @internal */
3264
- export const CreatePrompt2Prompts2$inboundSchema: z.ZodType<
3265
- CreatePrompt2Prompts2,
3266
- z.ZodTypeDef,
3267
- unknown
3268
- > = z.object({
3269
- type: CreatePrompt2PromptsResponse200Type$inboundSchema,
3270
- image_url: z.lazy(() => CreatePrompt2PromptsImageUrl$inboundSchema),
3271
- }).transform((v) => {
3272
- return remap$(v, {
3273
- "image_url": "imageUrl",
3274
- });
3275
- });
3276
-
3277
- /** @internal */
3278
- export type CreatePrompt2Prompts2$Outbound = {
3279
- type: string;
3280
- image_url: CreatePrompt2PromptsImageUrl$Outbound;
3281
- };
3282
-
3283
- /** @internal */
3284
- export const CreatePrompt2Prompts2$outboundSchema: z.ZodType<
3285
- CreatePrompt2Prompts2$Outbound,
3286
- z.ZodTypeDef,
3287
- CreatePrompt2Prompts2
3288
- > = z.object({
3289
- type: CreatePrompt2PromptsResponse200Type$outboundSchema,
3290
- imageUrl: z.lazy(() => CreatePrompt2PromptsImageUrl$outboundSchema),
3291
- }).transform((v) => {
3292
- return remap$(v, {
3293
- imageUrl: "image_url",
3294
- });
3295
- });
3296
-
3297
- /**
3298
- * @internal
3299
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3300
- */
3301
- export namespace CreatePrompt2Prompts2$ {
3302
- /** @deprecated use `CreatePrompt2Prompts2$inboundSchema` instead. */
3303
- export const inboundSchema = CreatePrompt2Prompts2$inboundSchema;
3304
- /** @deprecated use `CreatePrompt2Prompts2$outboundSchema` instead. */
3305
- export const outboundSchema = CreatePrompt2Prompts2$outboundSchema;
3306
- /** @deprecated use `CreatePrompt2Prompts2$Outbound` instead. */
3307
- export type Outbound = CreatePrompt2Prompts2$Outbound;
3308
- }
3309
-
3310
- export function createPrompt2Prompts2ToJSON(
3311
- createPrompt2Prompts2: CreatePrompt2Prompts2,
3312
- ): string {
3313
- return JSON.stringify(
3314
- CreatePrompt2Prompts2$outboundSchema.parse(createPrompt2Prompts2),
3315
- );
3316
- }
3317
-
3318
- export function createPrompt2Prompts2FromJSON(
3319
- jsonString: string,
3320
- ): SafeParseResult<CreatePrompt2Prompts2, SDKValidationError> {
3321
- return safeParse(
3322
- jsonString,
3323
- (x) => CreatePrompt2Prompts2$inboundSchema.parse(JSON.parse(x)),
3324
- `Failed to parse 'CreatePrompt2Prompts2' from JSON`,
3325
- );
3326
- }
3327
-
3328
- /** @internal */
3329
- export const CreatePrompt2PromptsResponseType$inboundSchema: z.ZodNativeEnum<
3330
- typeof CreatePrompt2PromptsResponseType
3331
- > = z.nativeEnum(CreatePrompt2PromptsResponseType);
3332
-
3333
- /** @internal */
3334
- export const CreatePrompt2PromptsResponseType$outboundSchema: z.ZodNativeEnum<
3335
- typeof CreatePrompt2PromptsResponseType
3336
- > = CreatePrompt2PromptsResponseType$inboundSchema;
3337
-
3338
- /**
3339
- * @internal
3340
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3341
- */
3342
- export namespace CreatePrompt2PromptsResponseType$ {
3343
- /** @deprecated use `CreatePrompt2PromptsResponseType$inboundSchema` instead. */
3344
- export const inboundSchema = CreatePrompt2PromptsResponseType$inboundSchema;
3345
- /** @deprecated use `CreatePrompt2PromptsResponseType$outboundSchema` instead. */
3346
- export const outboundSchema = CreatePrompt2PromptsResponseType$outboundSchema;
3347
- }
3348
-
3349
- /** @internal */
3350
- export const CreatePrompt2Prompts1$inboundSchema: z.ZodType<
3351
- CreatePrompt2Prompts1,
3352
- z.ZodTypeDef,
3353
- unknown
3354
- > = z.object({
3355
- type: CreatePrompt2PromptsResponseType$inboundSchema,
3356
- text: z.string(),
3357
- });
3358
-
3359
- /** @internal */
3360
- export type CreatePrompt2Prompts1$Outbound = {
3361
- type: string;
3362
- text: string;
3363
- };
3364
-
3365
- /** @internal */
3366
- export const CreatePrompt2Prompts1$outboundSchema: z.ZodType<
3367
- CreatePrompt2Prompts1$Outbound,
3368
- z.ZodTypeDef,
3369
- CreatePrompt2Prompts1
3370
- > = z.object({
3371
- type: CreatePrompt2PromptsResponseType$outboundSchema,
3372
- text: z.string(),
3373
- });
3374
-
3375
- /**
3376
- * @internal
3377
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3378
- */
3379
- export namespace CreatePrompt2Prompts1$ {
3380
- /** @deprecated use `CreatePrompt2Prompts1$inboundSchema` instead. */
3381
- export const inboundSchema = CreatePrompt2Prompts1$inboundSchema;
3382
- /** @deprecated use `CreatePrompt2Prompts1$outboundSchema` instead. */
3383
- export const outboundSchema = CreatePrompt2Prompts1$outboundSchema;
3384
- /** @deprecated use `CreatePrompt2Prompts1$Outbound` instead. */
3385
- export type Outbound = CreatePrompt2Prompts1$Outbound;
3386
- }
3387
-
3388
- export function createPrompt2Prompts1ToJSON(
3389
- createPrompt2Prompts1: CreatePrompt2Prompts1,
3390
- ): string {
3391
- return JSON.stringify(
3392
- CreatePrompt2Prompts1$outboundSchema.parse(createPrompt2Prompts1),
3393
- );
3394
- }
3395
-
3396
- export function createPrompt2Prompts1FromJSON(
3397
- jsonString: string,
3398
- ): SafeParseResult<CreatePrompt2Prompts1, SDKValidationError> {
3399
- return safeParse(
3400
- jsonString,
3401
- (x) => CreatePrompt2Prompts1$inboundSchema.parse(JSON.parse(x)),
3402
- `Failed to parse 'CreatePrompt2Prompts1' from JSON`,
3403
- );
3404
- }
3405
-
3406
- /** @internal */
3407
- export const CreatePromptContentPrompts2$inboundSchema: z.ZodType<
3408
- CreatePromptContentPrompts2,
3409
- z.ZodTypeDef,
3410
- unknown
3411
- > = z.union([
3412
- z.lazy(() => CreatePrompt2Prompts1$inboundSchema),
3413
- z.lazy(() => CreatePrompt2Prompts2$inboundSchema),
3414
- z.lazy(() => CreatePrompt2Prompts3$inboundSchema),
3415
- ]);
3416
-
3417
- /** @internal */
3418
- export type CreatePromptContentPrompts2$Outbound =
3419
- | CreatePrompt2Prompts1$Outbound
3420
- | CreatePrompt2Prompts2$Outbound
3421
- | CreatePrompt2Prompts3$Outbound;
3422
-
3423
- /** @internal */
3424
- export const CreatePromptContentPrompts2$outboundSchema: z.ZodType<
3425
- CreatePromptContentPrompts2$Outbound,
3426
- z.ZodTypeDef,
3427
- CreatePromptContentPrompts2
3428
- > = z.union([
3429
- z.lazy(() => CreatePrompt2Prompts1$outboundSchema),
3430
- z.lazy(() => CreatePrompt2Prompts2$outboundSchema),
3431
- z.lazy(() => CreatePrompt2Prompts3$outboundSchema),
3432
- ]);
3433
-
3434
- /**
3435
- * @internal
3436
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3437
- */
3438
- export namespace CreatePromptContentPrompts2$ {
3439
- /** @deprecated use `CreatePromptContentPrompts2$inboundSchema` instead. */
3440
- export const inboundSchema = CreatePromptContentPrompts2$inboundSchema;
3441
- /** @deprecated use `CreatePromptContentPrompts2$outboundSchema` instead. */
3442
- export const outboundSchema = CreatePromptContentPrompts2$outboundSchema;
3443
- /** @deprecated use `CreatePromptContentPrompts2$Outbound` instead. */
3444
- export type Outbound = CreatePromptContentPrompts2$Outbound;
3445
- }
3446
-
3447
- export function createPromptContentPrompts2ToJSON(
3448
- createPromptContentPrompts2: CreatePromptContentPrompts2,
3449
- ): string {
3450
- return JSON.stringify(
3451
- CreatePromptContentPrompts2$outboundSchema.parse(
3452
- createPromptContentPrompts2,
3453
- ),
3454
- );
3455
- }
3456
-
3457
- export function createPromptContentPrompts2FromJSON(
3458
- jsonString: string,
3459
- ): SafeParseResult<CreatePromptContentPrompts2, SDKValidationError> {
3460
- return safeParse(
3461
- jsonString,
3462
- (x) => CreatePromptContentPrompts2$inboundSchema.parse(JSON.parse(x)),
3463
- `Failed to parse 'CreatePromptContentPrompts2' from JSON`,
3464
- );
3465
- }
3466
-
3467
- /** @internal */
3468
- export const CreatePromptPromptsContent$inboundSchema: z.ZodType<
3469
- CreatePromptPromptsContent,
3470
- z.ZodTypeDef,
3471
- unknown
3472
- > = z.union([
3473
- z.string(),
3474
- z.array(z.union([
3475
- z.lazy(() => CreatePrompt2Prompts1$inboundSchema),
3476
- z.lazy(() => CreatePrompt2Prompts2$inboundSchema),
3477
- z.lazy(() => CreatePrompt2Prompts3$inboundSchema),
3478
- ])),
3479
- ]);
3480
-
3481
- /** @internal */
3482
- export type CreatePromptPromptsContent$Outbound =
3483
- | string
3484
- | Array<
3485
- | CreatePrompt2Prompts1$Outbound
3486
- | CreatePrompt2Prompts2$Outbound
3487
- | CreatePrompt2Prompts3$Outbound
3488
- >;
3489
-
3490
- /** @internal */
3491
- export const CreatePromptPromptsContent$outboundSchema: z.ZodType<
3492
- CreatePromptPromptsContent$Outbound,
3493
- z.ZodTypeDef,
3494
- CreatePromptPromptsContent
3495
- > = z.union([
3496
- z.string(),
3497
- z.array(z.union([
3498
- z.lazy(() => CreatePrompt2Prompts1$outboundSchema),
3499
- z.lazy(() => CreatePrompt2Prompts2$outboundSchema),
3500
- z.lazy(() => CreatePrompt2Prompts3$outboundSchema),
3501
- ])),
3502
- ]);
3503
-
3504
- /**
3505
- * @internal
3506
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3507
- */
3508
- export namespace CreatePromptPromptsContent$ {
3509
- /** @deprecated use `CreatePromptPromptsContent$inboundSchema` instead. */
3510
- export const inboundSchema = CreatePromptPromptsContent$inboundSchema;
3511
- /** @deprecated use `CreatePromptPromptsContent$outboundSchema` instead. */
3512
- export const outboundSchema = CreatePromptPromptsContent$outboundSchema;
3513
- /** @deprecated use `CreatePromptPromptsContent$Outbound` instead. */
3514
- export type Outbound = CreatePromptPromptsContent$Outbound;
3515
- }
3516
-
3517
- export function createPromptPromptsContentToJSON(
3518
- createPromptPromptsContent: CreatePromptPromptsContent,
3519
- ): string {
3520
- return JSON.stringify(
3521
- CreatePromptPromptsContent$outboundSchema.parse(createPromptPromptsContent),
3522
- );
3523
- }
3524
-
3525
- export function createPromptPromptsContentFromJSON(
3526
- jsonString: string,
3527
- ): SafeParseResult<CreatePromptPromptsContent, SDKValidationError> {
3528
- return safeParse(
3529
- jsonString,
3530
- (x) => CreatePromptPromptsContent$inboundSchema.parse(JSON.parse(x)),
3531
- `Failed to parse 'CreatePromptPromptsContent' from JSON`,
3532
- );
3533
- }
3534
-
3535
- /** @internal */
3536
- export const CreatePromptPromptsResponseType$inboundSchema: z.ZodNativeEnum<
3537
- typeof CreatePromptPromptsResponseType
3538
- > = z.nativeEnum(CreatePromptPromptsResponseType);
3539
-
3540
- /** @internal */
3541
- export const CreatePromptPromptsResponseType$outboundSchema: z.ZodNativeEnum<
3542
- typeof CreatePromptPromptsResponseType
3543
- > = CreatePromptPromptsResponseType$inboundSchema;
3544
-
3545
- /**
3546
- * @internal
3547
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3548
- */
3549
- export namespace CreatePromptPromptsResponseType$ {
3550
- /** @deprecated use `CreatePromptPromptsResponseType$inboundSchema` instead. */
3551
- export const inboundSchema = CreatePromptPromptsResponseType$inboundSchema;
3552
- /** @deprecated use `CreatePromptPromptsResponseType$outboundSchema` instead. */
3553
- export const outboundSchema = CreatePromptPromptsResponseType$outboundSchema;
3554
- }
3555
-
3556
- /** @internal */
3557
- export const CreatePromptPromptsFunction$inboundSchema: z.ZodType<
3558
- CreatePromptPromptsFunction,
3559
- z.ZodTypeDef,
3560
- unknown
3561
- > = z.object({
3562
- name: z.string(),
3563
- arguments: z.string(),
3564
- });
3565
-
3566
- /** @internal */
3567
- export type CreatePromptPromptsFunction$Outbound = {
3568
- name: string;
3569
- arguments: string;
3570
- };
3571
-
3572
- /** @internal */
3573
- export const CreatePromptPromptsFunction$outboundSchema: z.ZodType<
3574
- CreatePromptPromptsFunction$Outbound,
3575
- z.ZodTypeDef,
3576
- CreatePromptPromptsFunction
3577
- > = z.object({
3578
- name: z.string(),
3579
- arguments: z.string(),
3580
- });
3581
-
3582
- /**
3583
- * @internal
3584
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3585
- */
3586
- export namespace CreatePromptPromptsFunction$ {
3587
- /** @deprecated use `CreatePromptPromptsFunction$inboundSchema` instead. */
3588
- export const inboundSchema = CreatePromptPromptsFunction$inboundSchema;
3589
- /** @deprecated use `CreatePromptPromptsFunction$outboundSchema` instead. */
3590
- export const outboundSchema = CreatePromptPromptsFunction$outboundSchema;
3591
- /** @deprecated use `CreatePromptPromptsFunction$Outbound` instead. */
3592
- export type Outbound = CreatePromptPromptsFunction$Outbound;
3593
- }
3594
-
3595
- export function createPromptPromptsFunctionToJSON(
3596
- createPromptPromptsFunction: CreatePromptPromptsFunction,
3597
- ): string {
3598
- return JSON.stringify(
3599
- CreatePromptPromptsFunction$outboundSchema.parse(
3600
- createPromptPromptsFunction,
3601
- ),
3602
- );
3603
- }
3604
-
3605
- export function createPromptPromptsFunctionFromJSON(
3606
- jsonString: string,
3607
- ): SafeParseResult<CreatePromptPromptsFunction, SDKValidationError> {
3608
- return safeParse(
3609
- jsonString,
3610
- (x) => CreatePromptPromptsFunction$inboundSchema.parse(JSON.parse(x)),
3611
- `Failed to parse 'CreatePromptPromptsFunction' from JSON`,
3612
- );
3613
- }
3614
-
3615
- /** @internal */
3616
- export const CreatePromptPromptsToolCalls$inboundSchema: z.ZodType<
3617
- CreatePromptPromptsToolCalls,
3618
- z.ZodTypeDef,
3619
- unknown
3620
- > = z.object({
3621
- id: z.string().optional(),
3622
- index: z.number().optional(),
3623
- type: CreatePromptPromptsResponseType$inboundSchema,
3624
- function: z.lazy(() => CreatePromptPromptsFunction$inboundSchema),
3625
- });
3626
-
3627
- /** @internal */
3628
- export type CreatePromptPromptsToolCalls$Outbound = {
3629
- id?: string | undefined;
3630
- index?: number | undefined;
3631
- type: string;
3632
- function: CreatePromptPromptsFunction$Outbound;
3633
- };
3634
-
3635
- /** @internal */
3636
- export const CreatePromptPromptsToolCalls$outboundSchema: z.ZodType<
3637
- CreatePromptPromptsToolCalls$Outbound,
3638
- z.ZodTypeDef,
3639
- CreatePromptPromptsToolCalls
3640
- > = z.object({
3641
- id: z.string().optional(),
3642
- index: z.number().optional(),
3643
- type: CreatePromptPromptsResponseType$outboundSchema,
3644
- function: z.lazy(() => CreatePromptPromptsFunction$outboundSchema),
3645
- });
3646
-
3647
- /**
3648
- * @internal
3649
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3650
- */
3651
- export namespace CreatePromptPromptsToolCalls$ {
3652
- /** @deprecated use `CreatePromptPromptsToolCalls$inboundSchema` instead. */
3653
- export const inboundSchema = CreatePromptPromptsToolCalls$inboundSchema;
3654
- /** @deprecated use `CreatePromptPromptsToolCalls$outboundSchema` instead. */
3655
- export const outboundSchema = CreatePromptPromptsToolCalls$outboundSchema;
3656
- /** @deprecated use `CreatePromptPromptsToolCalls$Outbound` instead. */
3657
- export type Outbound = CreatePromptPromptsToolCalls$Outbound;
3658
- }
3659
-
3660
- export function createPromptPromptsToolCallsToJSON(
3661
- createPromptPromptsToolCalls: CreatePromptPromptsToolCalls,
3662
- ): string {
3663
- return JSON.stringify(
3664
- CreatePromptPromptsToolCalls$outboundSchema.parse(
3665
- createPromptPromptsToolCalls,
3666
- ),
3667
- );
3668
- }
3669
-
3670
- export function createPromptPromptsToolCallsFromJSON(
3671
- jsonString: string,
3672
- ): SafeParseResult<CreatePromptPromptsToolCalls, SDKValidationError> {
3673
- return safeParse(
3674
- jsonString,
3675
- (x) => CreatePromptPromptsToolCalls$inboundSchema.parse(JSON.parse(x)),
3676
- `Failed to parse 'CreatePromptPromptsToolCalls' from JSON`,
3677
- );
3678
- }
3679
-
3680
- /** @internal */
3681
- export const CreatePromptPromptsMessages$inboundSchema: z.ZodType<
3682
- CreatePromptPromptsMessages,
3683
- z.ZodTypeDef,
3684
- unknown
3685
- > = z.object({
3686
- role: CreatePromptPromptsRole$inboundSchema,
3687
- content: z.union([
3688
- z.string(),
3689
- z.array(z.union([
3690
- z.lazy(() => CreatePrompt2Prompts1$inboundSchema),
3691
- z.lazy(() => CreatePrompt2Prompts2$inboundSchema),
3692
- z.lazy(() => CreatePrompt2Prompts3$inboundSchema),
3693
- ])),
3694
- ]),
3695
- tool_calls: z.array(z.lazy(() => CreatePromptPromptsToolCalls$inboundSchema))
3696
- .optional(),
3697
- tool_call_id: z.string().optional(),
3698
- }).transform((v) => {
3699
- return remap$(v, {
3700
- "tool_calls": "toolCalls",
3701
- "tool_call_id": "toolCallId",
3702
- });
3703
- });
3704
-
3705
- /** @internal */
3706
- export type CreatePromptPromptsMessages$Outbound = {
3707
- role: string;
3708
- content:
3709
- | string
3710
- | Array<
3711
- | CreatePrompt2Prompts1$Outbound
3712
- | CreatePrompt2Prompts2$Outbound
3713
- | CreatePrompt2Prompts3$Outbound
3714
- >;
3715
- tool_calls?: Array<CreatePromptPromptsToolCalls$Outbound> | undefined;
3716
- tool_call_id?: string | undefined;
3717
- };
3718
-
3719
- /** @internal */
3720
- export const CreatePromptPromptsMessages$outboundSchema: z.ZodType<
3721
- CreatePromptPromptsMessages$Outbound,
3722
- z.ZodTypeDef,
3723
- CreatePromptPromptsMessages
3724
- > = z.object({
3725
- role: CreatePromptPromptsRole$outboundSchema,
3726
- content: z.union([
3727
- z.string(),
3728
- z.array(z.union([
3729
- z.lazy(() => CreatePrompt2Prompts1$outboundSchema),
3730
- z.lazy(() => CreatePrompt2Prompts2$outboundSchema),
3731
- z.lazy(() => CreatePrompt2Prompts3$outboundSchema),
3732
- ])),
3733
- ]),
3734
- toolCalls: z.array(z.lazy(() => CreatePromptPromptsToolCalls$outboundSchema))
3735
- .optional(),
3736
- toolCallId: z.string().optional(),
3737
- }).transform((v) => {
3738
- return remap$(v, {
3739
- toolCalls: "tool_calls",
3740
- toolCallId: "tool_call_id",
3741
- });
3742
- });
3743
-
3744
- /**
3745
- * @internal
3746
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3747
- */
3748
- export namespace CreatePromptPromptsMessages$ {
3749
- /** @deprecated use `CreatePromptPromptsMessages$inboundSchema` instead. */
3750
- export const inboundSchema = CreatePromptPromptsMessages$inboundSchema;
3751
- /** @deprecated use `CreatePromptPromptsMessages$outboundSchema` instead. */
3752
- export const outboundSchema = CreatePromptPromptsMessages$outboundSchema;
3753
- /** @deprecated use `CreatePromptPromptsMessages$Outbound` instead. */
3754
- export type Outbound = CreatePromptPromptsMessages$Outbound;
3755
- }
3756
-
3757
- export function createPromptPromptsMessagesToJSON(
3758
- createPromptPromptsMessages: CreatePromptPromptsMessages,
3759
- ): string {
3760
- return JSON.stringify(
3761
- CreatePromptPromptsMessages$outboundSchema.parse(
3762
- createPromptPromptsMessages,
3763
- ),
3764
- );
3765
- }
3766
-
3767
- export function createPromptPromptsMessagesFromJSON(
3768
- jsonString: string,
3769
- ): SafeParseResult<CreatePromptPromptsMessages, SDKValidationError> {
3770
- return safeParse(
3771
- jsonString,
3772
- (x) => CreatePromptPromptsMessages$inboundSchema.parse(JSON.parse(x)),
3773
- `Failed to parse 'CreatePromptPromptsMessages' from JSON`,
3774
- );
3775
- }
3776
-
3777
- /** @internal */
3778
- export const CreatePromptPromptConfig$inboundSchema: z.ZodType<
3779
- CreatePromptPromptConfig,
3780
- z.ZodTypeDef,
3781
- unknown
3782
- > = z.object({
3783
- stream: z.boolean().optional(),
3784
- model: z.string().optional(),
3785
- model_db_id: z.nullable(z.string()).optional(),
3786
- model_type: z.nullable(CreatePromptModelType$inboundSchema).optional(),
3787
- model_parameters: z.lazy(() => CreatePromptModelParameters$inboundSchema)
3788
- .optional(),
3789
- provider: CreatePromptProvider$inboundSchema.optional(),
3790
- integration_id: z.nullable(z.string()).optional(),
3791
- version: z.string().optional(),
3792
- messages: z.array(z.lazy(() => CreatePromptPromptsMessages$inboundSchema)),
3793
- }).transform((v) => {
3794
- return remap$(v, {
3795
- "model_db_id": "modelDbId",
3796
- "model_type": "modelType",
3797
- "model_parameters": "modelParameters",
3798
- "integration_id": "integrationId",
3799
- });
3800
- });
3801
-
3802
- /** @internal */
3803
- export type CreatePromptPromptConfig$Outbound = {
3804
- stream?: boolean | undefined;
3805
- model?: string | undefined;
3806
- model_db_id?: string | null | undefined;
3807
- model_type?: string | null | undefined;
3808
- model_parameters?: CreatePromptModelParameters$Outbound | undefined;
3809
- provider?: string | undefined;
3810
- integration_id?: string | null | undefined;
3811
- version?: string | undefined;
3812
- messages: Array<CreatePromptPromptsMessages$Outbound>;
3813
- };
3814
-
3815
- /** @internal */
3816
- export const CreatePromptPromptConfig$outboundSchema: z.ZodType<
3817
- CreatePromptPromptConfig$Outbound,
3818
- z.ZodTypeDef,
3819
- CreatePromptPromptConfig
3820
- > = z.object({
3821
- stream: z.boolean().optional(),
3822
- model: z.string().optional(),
3823
- modelDbId: z.nullable(z.string()).optional(),
3824
- modelType: z.nullable(CreatePromptModelType$outboundSchema).optional(),
3825
- modelParameters: z.lazy(() => CreatePromptModelParameters$outboundSchema)
3826
- .optional(),
3827
- provider: CreatePromptProvider$outboundSchema.optional(),
3828
- integrationId: z.nullable(z.string()).optional(),
3829
- version: z.string().optional(),
3830
- messages: z.array(z.lazy(() => CreatePromptPromptsMessages$outboundSchema)),
3831
- }).transform((v) => {
3832
- return remap$(v, {
3833
- modelDbId: "model_db_id",
3834
- modelType: "model_type",
3835
- modelParameters: "model_parameters",
3836
- integrationId: "integration_id",
3837
- });
3838
- });
3839
-
3840
- /**
3841
- * @internal
3842
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3843
- */
3844
- export namespace CreatePromptPromptConfig$ {
3845
- /** @deprecated use `CreatePromptPromptConfig$inboundSchema` instead. */
3846
- export const inboundSchema = CreatePromptPromptConfig$inboundSchema;
3847
- /** @deprecated use `CreatePromptPromptConfig$outboundSchema` instead. */
3848
- export const outboundSchema = CreatePromptPromptConfig$outboundSchema;
3849
- /** @deprecated use `CreatePromptPromptConfig$Outbound` instead. */
3850
- export type Outbound = CreatePromptPromptConfig$Outbound;
3851
- }
3852
-
3853
- export function createPromptPromptConfigToJSON(
3854
- createPromptPromptConfig: CreatePromptPromptConfig,
3855
- ): string {
3856
- return JSON.stringify(
3857
- CreatePromptPromptConfig$outboundSchema.parse(createPromptPromptConfig),
3858
- );
3859
- }
3860
-
3861
- export function createPromptPromptConfigFromJSON(
3862
- jsonString: string,
3863
- ): SafeParseResult<CreatePromptPromptConfig, SDKValidationError> {
3864
- return safeParse(
3865
- jsonString,
3866
- (x) => CreatePromptPromptConfig$inboundSchema.parse(JSON.parse(x)),
3867
- `Failed to parse 'CreatePromptPromptConfig' from JSON`,
3868
- );
3869
- }
3870
-
3871
- /** @internal */
3872
- export const CreatePromptUseCases$inboundSchema: z.ZodNativeEnum<
3873
- typeof CreatePromptUseCases
3874
- > = z.nativeEnum(CreatePromptUseCases);
3875
-
3876
- /** @internal */
3877
- export const CreatePromptUseCases$outboundSchema: z.ZodNativeEnum<
3878
- typeof CreatePromptUseCases
3879
- > = CreatePromptUseCases$inboundSchema;
3880
-
3881
- /**
3882
- * @internal
3883
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3884
- */
3885
- export namespace CreatePromptUseCases$ {
3886
- /** @deprecated use `CreatePromptUseCases$inboundSchema` instead. */
3887
- export const inboundSchema = CreatePromptUseCases$inboundSchema;
3888
- /** @deprecated use `CreatePromptUseCases$outboundSchema` instead. */
3889
- export const outboundSchema = CreatePromptUseCases$outboundSchema;
3890
- }
3891
-
3892
- /** @internal */
3893
- export const CreatePromptLanguage$inboundSchema: z.ZodNativeEnum<
3894
- typeof CreatePromptLanguage
3895
- > = z.nativeEnum(CreatePromptLanguage);
3896
-
3897
- /** @internal */
3898
- export const CreatePromptLanguage$outboundSchema: z.ZodNativeEnum<
3899
- typeof CreatePromptLanguage
3900
- > = CreatePromptLanguage$inboundSchema;
3901
-
3902
- /**
3903
- * @internal
3904
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3905
- */
3906
- export namespace CreatePromptLanguage$ {
3907
- /** @deprecated use `CreatePromptLanguage$inboundSchema` instead. */
3908
- export const inboundSchema = CreatePromptLanguage$inboundSchema;
3909
- /** @deprecated use `CreatePromptLanguage$outboundSchema` instead. */
3910
- export const outboundSchema = CreatePromptLanguage$outboundSchema;
3911
- }
3912
-
3913
- /** @internal */
3914
- export const CreatePromptPromptsMetadata$inboundSchema: z.ZodType<
3915
- CreatePromptPromptsMetadata,
3916
- z.ZodTypeDef,
3917
- unknown
3918
- > = z.object({
3919
- use_cases: z.array(CreatePromptUseCases$inboundSchema).optional(),
3920
- language: z.nullable(CreatePromptLanguage$inboundSchema).optional(),
3921
- }).transform((v) => {
3922
- return remap$(v, {
3923
- "use_cases": "useCases",
3924
- });
3925
- });
3926
-
3927
- /** @internal */
3928
- export type CreatePromptPromptsMetadata$Outbound = {
3929
- use_cases?: Array<string> | undefined;
3930
- language?: string | null | undefined;
3931
- };
3932
-
3933
- /** @internal */
3934
- export const CreatePromptPromptsMetadata$outboundSchema: z.ZodType<
3935
- CreatePromptPromptsMetadata$Outbound,
3936
- z.ZodTypeDef,
3937
- CreatePromptPromptsMetadata
3938
- > = z.object({
3939
- useCases: z.array(CreatePromptUseCases$outboundSchema).optional(),
3940
- language: z.nullable(CreatePromptLanguage$outboundSchema).optional(),
3941
- }).transform((v) => {
3942
- return remap$(v, {
3943
- useCases: "use_cases",
3944
- });
3945
- });
3946
-
3947
- /**
3948
- * @internal
3949
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3950
- */
3951
- export namespace CreatePromptPromptsMetadata$ {
3952
- /** @deprecated use `CreatePromptPromptsMetadata$inboundSchema` instead. */
3953
- export const inboundSchema = CreatePromptPromptsMetadata$inboundSchema;
3954
- /** @deprecated use `CreatePromptPromptsMetadata$outboundSchema` instead. */
3955
- export const outboundSchema = CreatePromptPromptsMetadata$outboundSchema;
3956
- /** @deprecated use `CreatePromptPromptsMetadata$Outbound` instead. */
3957
- export type Outbound = CreatePromptPromptsMetadata$Outbound;
3958
- }
3959
-
3960
- export function createPromptPromptsMetadataToJSON(
3961
- createPromptPromptsMetadata: CreatePromptPromptsMetadata,
3962
- ): string {
3963
- return JSON.stringify(
3964
- CreatePromptPromptsMetadata$outboundSchema.parse(
3965
- createPromptPromptsMetadata,
3966
- ),
3967
- );
3968
- }
3969
-
3970
- export function createPromptPromptsMetadataFromJSON(
3971
- jsonString: string,
3972
- ): SafeParseResult<CreatePromptPromptsMetadata, SDKValidationError> {
3973
- return safeParse(
3974
- jsonString,
3975
- (x) => CreatePromptPromptsMetadata$inboundSchema.parse(JSON.parse(x)),
3976
- `Failed to parse 'CreatePromptPromptsMetadata' from JSON`,
3977
- );
3978
- }
3979
-
3980
- /** @internal */
3981
- export const CreatePromptResponseBody$inboundSchema: z.ZodType<
3982
- CreatePromptResponseBody,
3983
- z.ZodTypeDef,
3984
- unknown
3985
- > = z.object({
3986
- _id: z.string(),
3987
- type: CreatePromptPromptsType$inboundSchema,
3988
- owner: z.string(),
3989
- domain_id: z.string(),
3990
- created: z.string(),
3991
- updated: z.string(),
3992
- created_by_id: z.nullable(z.string()).optional(),
3993
- updated_by_id: z.nullable(z.string()).optional(),
3994
- display_name: z.string(),
3995
- description: z.nullable(z.string()).optional(),
3996
- prompt_config: z.lazy(() => CreatePromptPromptConfig$inboundSchema),
3997
- metadata: z.lazy(() => CreatePromptPromptsMetadata$inboundSchema).optional(),
3998
- }).transform((v) => {
3999
- return remap$(v, {
4000
- "_id": "id",
4001
- "domain_id": "domainId",
4002
- "created_by_id": "createdById",
4003
- "updated_by_id": "updatedById",
4004
- "display_name": "displayName",
4005
- "prompt_config": "promptConfig",
4006
- });
4007
- });
4008
-
4009
- /** @internal */
4010
- export type CreatePromptResponseBody$Outbound = {
4011
- _id: string;
4012
- type: string;
4013
- owner: string;
4014
- domain_id: string;
4015
- created: string;
4016
- updated: string;
4017
- created_by_id?: string | null | undefined;
4018
- updated_by_id?: string | null | undefined;
4019
- display_name: string;
4020
- description?: string | null | undefined;
4021
- prompt_config: CreatePromptPromptConfig$Outbound;
4022
- metadata?: CreatePromptPromptsMetadata$Outbound | undefined;
4023
- };
4024
-
4025
- /** @internal */
4026
- export const CreatePromptResponseBody$outboundSchema: z.ZodType<
4027
- CreatePromptResponseBody$Outbound,
4028
- z.ZodTypeDef,
4029
- CreatePromptResponseBody
4030
- > = z.object({
4031
- id: z.string(),
4032
- type: CreatePromptPromptsType$outboundSchema,
4033
- owner: z.string(),
4034
- domainId: z.string(),
4035
- created: z.string(),
4036
- updated: z.string(),
4037
- createdById: z.nullable(z.string()).optional(),
4038
- updatedById: z.nullable(z.string()).optional(),
4039
- displayName: z.string(),
4040
- description: z.nullable(z.string()).optional(),
4041
- promptConfig: z.lazy(() => CreatePromptPromptConfig$outboundSchema),
4042
- metadata: z.lazy(() => CreatePromptPromptsMetadata$outboundSchema).optional(),
4043
- }).transform((v) => {
4044
- return remap$(v, {
4045
- id: "_id",
4046
- domainId: "domain_id",
4047
- createdById: "created_by_id",
4048
- updatedById: "updated_by_id",
4049
- displayName: "display_name",
4050
- promptConfig: "prompt_config",
4051
- });
4052
- });
4053
-
4054
- /**
4055
- * @internal
4056
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
4057
- */
4058
- export namespace CreatePromptResponseBody$ {
4059
- /** @deprecated use `CreatePromptResponseBody$inboundSchema` instead. */
4060
- export const inboundSchema = CreatePromptResponseBody$inboundSchema;
4061
- /** @deprecated use `CreatePromptResponseBody$outboundSchema` instead. */
4062
- export const outboundSchema = CreatePromptResponseBody$outboundSchema;
4063
- /** @deprecated use `CreatePromptResponseBody$Outbound` instead. */
4064
- export type Outbound = CreatePromptResponseBody$Outbound;
4065
- }
4066
-
4067
- export function createPromptResponseBodyToJSON(
4068
- createPromptResponseBody: CreatePromptResponseBody,
4069
- ): string {
4070
- return JSON.stringify(
4071
- CreatePromptResponseBody$outboundSchema.parse(createPromptResponseBody),
4072
- );
4073
- }
4074
-
4075
- export function createPromptResponseBodyFromJSON(
4076
- jsonString: string,
4077
- ): SafeParseResult<CreatePromptResponseBody, SDKValidationError> {
4078
- return safeParse(
4079
- jsonString,
4080
- (x) => CreatePromptResponseBody$inboundSchema.parse(JSON.parse(x)),
4081
- `Failed to parse 'CreatePromptResponseBody' from JSON`,
4082
- );
4083
- }