@orq-ai/node 3.0.1 → 3.1.0-rc.7

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 (300) hide show
  1. package/README.md +11 -9
  2. package/docs/sdks/deployments/README.md +195 -5
  3. package/docs/sdks/files/README.md +8 -4
  4. package/funcs/contactsCreate.d.ts.map +1 -1
  5. package/funcs/contactsCreate.js +1 -1
  6. package/funcs/contactsCreate.js.map +1 -1
  7. package/funcs/deploymentsGetConfig.d.ts.map +1 -1
  8. package/funcs/deploymentsGetConfig.js +1 -1
  9. package/funcs/deploymentsGetConfig.js.map +1 -1
  10. package/funcs/deploymentsGetLogs.d.ts +15 -0
  11. package/funcs/deploymentsGetLogs.d.ts.map +1 -0
  12. package/funcs/deploymentsGetLogs.js +113 -0
  13. package/funcs/deploymentsGetLogs.js.map +1 -0
  14. package/funcs/deploymentsInvalidate.d.ts +15 -0
  15. package/funcs/deploymentsInvalidate.d.ts.map +1 -0
  16. package/funcs/deploymentsInvalidate.js +113 -0
  17. package/funcs/deploymentsInvalidate.js.map +1 -0
  18. package/funcs/deploymentsInvoke.d.ts.map +1 -1
  19. package/funcs/deploymentsInvoke.js +1 -1
  20. package/funcs/deploymentsInvoke.js.map +1 -1
  21. package/funcs/{deploymentsAll.d.ts → deploymentsList.d.ts} +2 -2
  22. package/funcs/deploymentsList.d.ts.map +1 -0
  23. package/funcs/{deploymentsAll.js → deploymentsList.js} +6 -5
  24. package/funcs/deploymentsList.js.map +1 -0
  25. package/funcs/deploymentsMetricsCreate.d.ts.map +1 -1
  26. package/funcs/deploymentsMetricsCreate.js +1 -1
  27. package/funcs/deploymentsMetricsCreate.js.map +1 -1
  28. package/funcs/feedbackCreate.d.ts.map +1 -1
  29. package/funcs/feedbackCreate.js +1 -1
  30. package/funcs/feedbackCreate.js.map +1 -1
  31. package/funcs/filesBulkUpload.d.ts.map +1 -1
  32. package/funcs/filesBulkUpload.js +1 -1
  33. package/funcs/filesBulkUpload.js.map +1 -1
  34. package/funcs/filesDelete.d.ts.map +1 -1
  35. package/funcs/filesDelete.js +1 -1
  36. package/funcs/filesDelete.js.map +1 -1
  37. package/funcs/filesGet.d.ts.map +1 -1
  38. package/funcs/filesGet.js +1 -1
  39. package/funcs/filesGet.js.map +1 -1
  40. package/funcs/filesList.d.ts.map +1 -1
  41. package/funcs/filesList.js +1 -1
  42. package/funcs/filesList.js.map +1 -1
  43. package/funcs/filesUpdate.d.ts.map +1 -1
  44. package/funcs/filesUpdate.js +1 -1
  45. package/funcs/filesUpdate.js.map +1 -1
  46. package/funcs/filesUpload.d.ts.map +1 -1
  47. package/funcs/filesUpload.js +1 -1
  48. package/funcs/filesUpload.js.map +1 -1
  49. package/funcs/promptSnippetsFindOne.d.ts.map +1 -1
  50. package/funcs/promptSnippetsFindOne.js +1 -1
  51. package/funcs/promptSnippetsFindOne.js.map +1 -1
  52. package/funcs/promptTemplatesGetAll.d.ts.map +1 -1
  53. package/funcs/promptTemplatesGetAll.js +1 -1
  54. package/funcs/promptTemplatesGetAll.js.map +1 -1
  55. package/funcs/promptsCreate.d.ts.map +1 -1
  56. package/funcs/promptsCreate.js +1 -1
  57. package/funcs/promptsCreate.js.map +1 -1
  58. package/funcs/promptsCreateVersion.d.ts.map +1 -1
  59. package/funcs/promptsCreateVersion.js +1 -1
  60. package/funcs/promptsCreateVersion.js.map +1 -1
  61. package/funcs/promptsDelete.d.ts.map +1 -1
  62. package/funcs/promptsDelete.js +1 -1
  63. package/funcs/promptsDelete.js.map +1 -1
  64. package/funcs/promptsDuplicate.d.ts.map +1 -1
  65. package/funcs/promptsDuplicate.js +1 -1
  66. package/funcs/promptsDuplicate.js.map +1 -1
  67. package/funcs/promptsGetAll.d.ts.map +1 -1
  68. package/funcs/promptsGetAll.js +1 -1
  69. package/funcs/promptsGetAll.js.map +1 -1
  70. package/funcs/promptsGetOne.d.ts.map +1 -1
  71. package/funcs/promptsGetOne.js +1 -1
  72. package/funcs/promptsGetOne.js.map +1 -1
  73. package/funcs/promptsUpdate.d.ts.map +1 -1
  74. package/funcs/promptsUpdate.js +1 -1
  75. package/funcs/promptsUpdate.js.map +1 -1
  76. package/funcs/remoteconfigGetConfig.d.ts.map +1 -1
  77. package/funcs/remoteconfigGetConfig.js +1 -1
  78. package/funcs/remoteconfigGetConfig.js.map +1 -1
  79. package/jsr.json +28 -0
  80. package/lib/config.d.ts +3 -3
  81. package/lib/config.js +3 -3
  82. package/lib/config.js.map +1 -1
  83. package/lib/schemas.d.ts +1 -1
  84. package/lib/schemas.d.ts.map +1 -1
  85. package/lib/schemas.js +4 -1
  86. package/lib/schemas.js.map +1 -1
  87. package/models/operations/bulkfileupload.js +2 -2
  88. package/models/operations/createcontact.js +2 -2
  89. package/models/operations/createprompt.d.ts +12 -0
  90. package/models/operations/createprompt.d.ts.map +1 -1
  91. package/models/operations/createprompt.js +4 -0
  92. package/models/operations/createprompt.js.map +1 -1
  93. package/models/operations/createpromptversion.d.ts +12 -0
  94. package/models/operations/createpromptversion.d.ts.map +1 -1
  95. package/models/operations/createpromptversion.js +4 -0
  96. package/models/operations/createpromptversion.js.map +1 -1
  97. package/models/operations/deploymentgetlogs.d.ts +52406 -0
  98. package/models/operations/deploymentgetlogs.d.ts.map +1 -0
  99. package/models/operations/deploymentgetlogs.js +53803 -0
  100. package/models/operations/deploymentgetlogs.js.map +1 -0
  101. package/models/operations/deploymentinvoke.d.ts +6 -0
  102. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  103. package/models/operations/deploymentinvoke.js +2 -0
  104. package/models/operations/deploymentinvoke.js.map +1 -1
  105. package/models/operations/deployments.d.ts +15 -8
  106. package/models/operations/deployments.d.ts.map +1 -1
  107. package/models/operations/deployments.js +16 -10
  108. package/models/operations/deployments.js.map +1 -1
  109. package/models/operations/fileget.js +2 -2
  110. package/models/operations/filelist.d.ts +1 -5
  111. package/models/operations/filelist.d.ts.map +1 -1
  112. package/models/operations/filelist.js +4 -12
  113. package/models/operations/filelist.js.map +1 -1
  114. package/models/operations/fileupdate.js +2 -2
  115. package/models/operations/fileupload.js +2 -2
  116. package/models/operations/findonepromptsnippet.d.ts +36 -0
  117. package/models/operations/findonepromptsnippet.d.ts.map +1 -1
  118. package/models/operations/findonepromptsnippet.js +18 -6
  119. package/models/operations/findonepromptsnippet.js.map +1 -1
  120. package/models/operations/getallprompts.d.ts +944 -912
  121. package/models/operations/getallprompts.d.ts.map +1 -1
  122. package/models/operations/getallprompts.js +1372 -1362
  123. package/models/operations/getallprompts.js.map +1 -1
  124. package/models/operations/getallprompttemplates.d.ts +151 -115
  125. package/models/operations/getallprompttemplates.d.ts.map +1 -1
  126. package/models/operations/getallprompttemplates.js +182 -173
  127. package/models/operations/getallprompttemplates.js.map +1 -1
  128. package/models/operations/index.d.ts +2 -0
  129. package/models/operations/index.d.ts.map +1 -1
  130. package/models/operations/index.js +2 -0
  131. package/models/operations/index.js.map +1 -1
  132. package/models/operations/invaliddeployment.d.ts +29 -0
  133. package/models/operations/invaliddeployment.d.ts.map +1 -0
  134. package/models/operations/invaliddeployment.js +78 -0
  135. package/models/operations/invaliddeployment.js.map +1 -0
  136. package/models/operations/updateprompt.d.ts +42 -0
  137. package/models/operations/updateprompt.d.ts.map +1 -1
  138. package/models/operations/updateprompt.js +20 -6
  139. package/models/operations/updateprompt.js.map +1 -1
  140. package/package.json +3 -2
  141. package/sdk/deployments.d.ts +15 -1
  142. package/sdk/deployments.d.ts.map +1 -1
  143. package/sdk/deployments.js +23 -3
  144. package/sdk/deployments.js.map +1 -1
  145. package/src/funcs/contactsCreate.ts +2 -1
  146. package/src/funcs/deploymentsGetConfig.ts +2 -1
  147. package/{packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts → src/funcs/deploymentsGetLogs.ts} +17 -16
  148. package/{packages/orq-rc/src/funcs/promptsDelete.ts → src/funcs/deploymentsInvalidate.ts} +18 -11
  149. package/src/funcs/deploymentsInvoke.ts +2 -1
  150. package/src/funcs/{deploymentsAll.ts → deploymentsList.ts} +5 -3
  151. package/src/funcs/deploymentsMetricsCreate.ts +2 -1
  152. package/src/funcs/feedbackCreate.ts +2 -1
  153. package/src/funcs/filesBulkUpload.ts +2 -1
  154. package/src/funcs/filesDelete.ts +2 -1
  155. package/src/funcs/filesGet.ts +2 -1
  156. package/src/funcs/filesList.ts +2 -1
  157. package/src/funcs/filesUpdate.ts +2 -1
  158. package/src/funcs/filesUpload.ts +2 -1
  159. package/src/funcs/promptSnippetsFindOne.ts +2 -1
  160. package/src/funcs/promptTemplatesGetAll.ts +2 -1
  161. package/src/funcs/promptsCreate.ts +2 -1
  162. package/src/funcs/promptsCreateVersion.ts +2 -1
  163. package/src/funcs/promptsDelete.ts +2 -1
  164. package/src/funcs/promptsDuplicate.ts +2 -1
  165. package/src/funcs/promptsGetAll.ts +2 -1
  166. package/src/funcs/promptsGetOne.ts +2 -1
  167. package/src/funcs/promptsUpdate.ts +2 -1
  168. package/src/funcs/remoteconfigGetConfig.ts +2 -1
  169. package/src/lib/config.ts +3 -3
  170. package/src/lib/schemas.ts +5 -0
  171. package/src/models/operations/bulkfileupload.ts +2 -2
  172. package/src/models/operations/createcontact.ts +2 -2
  173. package/src/models/operations/createprompt.ts +4 -0
  174. package/src/models/operations/createpromptversion.ts +4 -0
  175. package/src/models/operations/deploymentgetlogs.ts +119430 -0
  176. package/src/models/operations/deploymentinvoke.ts +2 -0
  177. package/src/models/operations/deployments.ts +25 -18
  178. package/src/models/operations/fileget.ts +2 -2
  179. package/src/models/operations/filelist.ts +5 -17
  180. package/src/models/operations/fileupdate.ts +2 -2
  181. package/src/models/operations/fileupload.ts +2 -2
  182. package/src/models/operations/findonepromptsnippet.ts +18 -6
  183. package/src/models/operations/getallprompts.ts +2464 -2159
  184. package/src/models/operations/getallprompttemplates.ts +321 -232
  185. package/src/models/operations/index.ts +2 -0
  186. package/src/models/operations/invaliddeployment.ts +75 -0
  187. package/src/models/operations/updateprompt.ts +20 -6
  188. package/src/sdk/deployments.ts +39 -3
  189. package/tsconfig.json +41 -0
  190. package/funcs/deploymentsAll.d.ts.map +0 -1
  191. package/funcs/deploymentsAll.js.map +0 -1
  192. package/packages/orq-rc/FUNCTIONS.md +0 -106
  193. package/packages/orq-rc/README.md +0 -564
  194. package/packages/orq-rc/RUNTIMES.md +0 -22
  195. package/packages/orq-rc/docs/sdks/contacts/README.md +0 -84
  196. package/packages/orq-rc/docs/sdks/deployments/README.md +0 -239
  197. package/packages/orq-rc/docs/sdks/feedback/README.md +0 -92
  198. package/packages/orq-rc/docs/sdks/files/README.md +0 -473
  199. package/packages/orq-rc/docs/sdks/metrics/README.md +0 -86
  200. package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
  201. package/packages/orq-rc/docs/sdks/prompt/README.md +0 -6
  202. package/packages/orq-rc/docs/sdks/prompts/README.md +0 -533
  203. package/packages/orq-rc/docs/sdks/remoteconfig/README.md +0 -80
  204. package/packages/orq-rc/docs/sdks/snippets/README.md +0 -84
  205. package/packages/orq-rc/docs/sdks/templates/README.md +0 -80
  206. package/packages/orq-rc/src/core.ts +0 -13
  207. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -124
  208. package/packages/orq-rc/src/funcs/deploymentsAll.ts +0 -138
  209. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -132
  210. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -135
  211. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -124
  212. package/packages/orq-rc/src/funcs/filesBulkUpload.ts +0 -126
  213. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -128
  214. package/packages/orq-rc/src/funcs/filesGet.ts +0 -127
  215. package/packages/orq-rc/src/funcs/filesList.ts +0 -129
  216. package/packages/orq-rc/src/funcs/filesUpdate.ts +0 -128
  217. package/packages/orq-rc/src/funcs/filesUpload.ts +0 -145
  218. package/packages/orq-rc/src/funcs/promptSnippetsFindOne.ts +0 -128
  219. package/packages/orq-rc/src/funcs/promptTemplatesGetAll.ts +0 -130
  220. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -124
  221. package/packages/orq-rc/src/funcs/promptsCreateVersion.ts +0 -129
  222. package/packages/orq-rc/src/funcs/promptsDuplicate.ts +0 -128
  223. package/packages/orq-rc/src/funcs/promptsGetAll.ts +0 -126
  224. package/packages/orq-rc/src/funcs/promptsGetOne.ts +0 -128
  225. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -136
  226. package/packages/orq-rc/src/funcs/remoteconfigGetConfig.ts +0 -125
  227. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  228. package/packages/orq-rc/src/hooks/index.ts +0 -6
  229. package/packages/orq-rc/src/hooks/registration.ts +0 -14
  230. package/packages/orq-rc/src/hooks/types.ts +0 -109
  231. package/packages/orq-rc/src/index.ts +0 -7
  232. package/packages/orq-rc/src/lib/base64.ts +0 -37
  233. package/packages/orq-rc/src/lib/config.ts +0 -60
  234. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  235. package/packages/orq-rc/src/lib/encodings.ts +0 -449
  236. package/packages/orq-rc/src/lib/env.ts +0 -41
  237. package/packages/orq-rc/src/lib/event-streams.ts +0 -264
  238. package/packages/orq-rc/src/lib/files.ts +0 -40
  239. package/packages/orq-rc/src/lib/http.ts +0 -323
  240. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  241. package/packages/orq-rc/src/lib/logger.ts +0 -9
  242. package/packages/orq-rc/src/lib/matchers.ts +0 -325
  243. package/packages/orq-rc/src/lib/primitives.ts +0 -122
  244. package/packages/orq-rc/src/lib/retries.ts +0 -219
  245. package/packages/orq-rc/src/lib/schemas.ts +0 -86
  246. package/packages/orq-rc/src/lib/sdks.ts +0 -397
  247. package/packages/orq-rc/src/lib/security.ts +0 -254
  248. package/packages/orq-rc/src/lib/url.ts +0 -33
  249. package/packages/orq-rc/src/models/components/deployments.ts +0 -1673
  250. package/packages/orq-rc/src/models/components/index.ts +0 -6
  251. package/packages/orq-rc/src/models/components/security.ts +0 -71
  252. package/packages/orq-rc/src/models/errors/apierror.ts +0 -27
  253. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -82
  254. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  255. package/packages/orq-rc/src/models/errors/index.ts +0 -9
  256. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -97
  257. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -71
  258. package/packages/orq-rc/src/models/operations/bulkfileupload.ts +0 -315
  259. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -256
  260. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
  261. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -3461
  262. package/packages/orq-rc/src/models/operations/createpromptversion.ts +0 -3703
  263. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
  264. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -1790
  265. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -3483
  266. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -2385
  267. package/packages/orq-rc/src/models/operations/deployments.ts +0 -2098
  268. package/packages/orq-rc/src/models/operations/duplicateprompt.ts +0 -69
  269. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
  270. package/packages/orq-rc/src/models/operations/fileget.ts +0 -222
  271. package/packages/orq-rc/src/models/operations/filelist.ts +0 -333
  272. package/packages/orq-rc/src/models/operations/fileupdate.ts +0 -298
  273. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -322
  274. package/packages/orq-rc/src/models/operations/findonepromptsnippet.ts +0 -13629
  275. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -18640
  276. package/packages/orq-rc/src/models/operations/getallprompttemplates.ts +0 -13690
  277. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -69
  278. package/packages/orq-rc/src/models/operations/index.ts +0 -26
  279. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
  280. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -14407
  281. package/packages/orq-rc/src/sdk/contacts.ts +0 -27
  282. package/packages/orq-rc/src/sdk/deployments.ts +0 -75
  283. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  284. package/packages/orq-rc/src/sdk/files.ts +0 -105
  285. package/packages/orq-rc/src/sdk/index.ts +0 -5
  286. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  287. package/packages/orq-rc/src/sdk/prompt.ts +0 -19
  288. package/packages/orq-rc/src/sdk/prompts.ts +0 -114
  289. package/packages/orq-rc/src/sdk/remoteconfig.ts +0 -24
  290. package/packages/orq-rc/src/sdk/sdk.ts +0 -49
  291. package/packages/orq-rc/src/sdk/snippets.ts +0 -24
  292. package/packages/orq-rc/src/sdk/templates.ts +0 -24
  293. package/packages/orq-rc/src/types/blobs.ts +0 -31
  294. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  295. package/packages/orq-rc/src/types/enums.ts +0 -16
  296. package/packages/orq-rc/src/types/fp.ts +0 -50
  297. package/packages/orq-rc/src/types/index.ts +0 -11
  298. package/packages/orq-rc/src/types/operations.ts +0 -105
  299. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  300. package/packages/orq-rc/src/types/streams.ts +0 -21
@@ -1,2098 +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
- export type DeploymentsRequest = {
13
- /**
14
- * A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
15
- */
16
- limit?: number | undefined;
17
- /**
18
- * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, ending with `ed33dade-ae32-4959-8c5c-7ae4aad748b5`, your subsequent call can include `after=ed33dade-ae32-4959-8c5c-7ae4aad748b5` in order to fetch the next page of the list.
19
- */
20
- after?: string | undefined;
21
- };
22
-
23
- export const ObjectT = {
24
- List: "list",
25
- } as const;
26
- export type ObjectT = ClosedEnum<typeof ObjectT>;
27
-
28
- /**
29
- * The type of the tool. Currently, only `function` is supported.
30
- */
31
- export const DeploymentsType = {
32
- Function: "function",
33
- } as const;
34
- /**
35
- * The type of the tool. Currently, only `function` is supported.
36
- */
37
- export type DeploymentsType = ClosedEnum<typeof DeploymentsType>;
38
-
39
- export const DeploymentsDeploymentsResponseType = {
40
- Object: "object",
41
- } as const;
42
- export type DeploymentsDeploymentsResponseType = ClosedEnum<
43
- typeof DeploymentsDeploymentsResponseType
44
- >;
45
-
46
- /**
47
- * The parameters the functions accepts, described as a JSON Schema object.
48
- *
49
- * @remarks
50
- *
51
- * Omitting `parameters` defines a function with an empty parameter list.
52
- */
53
- export type DeploymentsParameters = {
54
- type: DeploymentsDeploymentsResponseType;
55
- properties: { [k: string]: any };
56
- required?: Array<string> | undefined;
57
- additionalProperties?: boolean | undefined;
58
- };
59
-
60
- export type DeploymentsFunction = {
61
- /**
62
- * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
63
- */
64
- name: string;
65
- /**
66
- * A description of what the function does, used by the model to choose when and how to call the function.
67
- */
68
- description?: string | undefined;
69
- strict?: boolean | undefined;
70
- /**
71
- * The parameters the functions accepts, described as a JSON Schema object.
72
- *
73
- * @remarks
74
- *
75
- * Omitting `parameters` defines a function with an empty parameter list.
76
- */
77
- parameters: DeploymentsParameters;
78
- };
79
-
80
- export type DeploymentsTools = {
81
- /**
82
- * The type of the tool. Currently, only `function` is supported.
83
- */
84
- type: DeploymentsType;
85
- function: DeploymentsFunction;
86
- id?: number | undefined;
87
- };
88
-
89
- /**
90
- * The type of the model
91
- */
92
- export const DeploymentsModelType = {
93
- Chat: "chat",
94
- Completion: "completion",
95
- Embedding: "embedding",
96
- Vision: "vision",
97
- Image: "image",
98
- Tts: "tts",
99
- Stt: "stt",
100
- Rerank: "rerank",
101
- Moderations: "moderations",
102
- } as const;
103
- /**
104
- * The type of the model
105
- */
106
- export type DeploymentsModelType = ClosedEnum<typeof DeploymentsModelType>;
107
-
108
- /**
109
- * Only supported on `image` models.
110
- */
111
- export const DeploymentsFormat = {
112
- Url: "url",
113
- B64Json: "b64_json",
114
- Text: "text",
115
- JsonObject: "json_object",
116
- } as const;
117
- /**
118
- * Only supported on `image` models.
119
- */
120
- export type DeploymentsFormat = ClosedEnum<typeof DeploymentsFormat>;
121
-
122
- /**
123
- * Only supported on `image` models.
124
- */
125
- export const DeploymentsQuality = {
126
- Standard: "standard",
127
- Hd: "hd",
128
- } as const;
129
- /**
130
- * Only supported on `image` models.
131
- */
132
- export type DeploymentsQuality = ClosedEnum<typeof DeploymentsQuality>;
133
-
134
- export const DeploymentsResponseFormatType = {
135
- JsonObject: "json_object",
136
- } as const;
137
- export type DeploymentsResponseFormatType = ClosedEnum<
138
- typeof DeploymentsResponseFormatType
139
- >;
140
-
141
- export type DeploymentsResponseFormat2 = {
142
- type: DeploymentsResponseFormatType;
143
- };
144
-
145
- export const DeploymentsResponseFormatDeploymentsType = {
146
- JsonSchema: "json_schema",
147
- } as const;
148
- export type DeploymentsResponseFormatDeploymentsType = ClosedEnum<
149
- typeof DeploymentsResponseFormatDeploymentsType
150
- >;
151
-
152
- export type DeploymentsResponseFormatJsonSchema = {
153
- name: string;
154
- strict: boolean;
155
- schema: { [k: string]: any };
156
- };
157
-
158
- export type DeploymentsResponseFormat1 = {
159
- type: DeploymentsResponseFormatDeploymentsType;
160
- jsonSchema: DeploymentsResponseFormatJsonSchema;
161
- };
162
-
163
- /**
164
- * An object specifying the format that the model must output.
165
- *
166
- * @remarks
167
- *
168
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
169
- *
170
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
171
- *
172
- * 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.
173
- */
174
- export type DeploymentsResponseFormat =
175
- | DeploymentsResponseFormat2
176
- | DeploymentsResponseFormat1;
177
-
178
- /**
179
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
180
- */
181
- export const DeploymentsPhotoRealVersion = {
182
- V1: "v1",
183
- V2: "v2",
184
- } as const;
185
- /**
186
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
187
- */
188
- export type DeploymentsPhotoRealVersion = ClosedEnum<
189
- typeof DeploymentsPhotoRealVersion
190
- >;
191
-
192
- /**
193
- * The format to return the embeddings
194
- */
195
- export const DeploymentsEncodingFormat = {
196
- Float: "float",
197
- Base64: "base64",
198
- } as const;
199
- /**
200
- * The format to return the embeddings
201
- */
202
- export type DeploymentsEncodingFormat = ClosedEnum<
203
- typeof DeploymentsEncodingFormat
204
- >;
205
-
206
- /**
207
- * Model Parameters: Not all parameters apply to every model
208
- */
209
- export type DeploymentsModelParameters = {
210
- /**
211
- * Only supported on `chat` and `completion` models.
212
- */
213
- temperature?: number | undefined;
214
- /**
215
- * Only supported on `chat` and `completion` models.
216
- */
217
- maxTokens?: number | undefined;
218
- /**
219
- * Only supported on `chat` and `completion` models.
220
- */
221
- topK?: number | undefined;
222
- /**
223
- * Only supported on `chat` and `completion` models.
224
- */
225
- topP?: number | undefined;
226
- /**
227
- * Only supported on `chat` and `completion` models.
228
- */
229
- frequencyPenalty?: number | undefined;
230
- /**
231
- * Only supported on `chat` and `completion` models.
232
- */
233
- presencePenalty?: number | undefined;
234
- /**
235
- * Only supported on `image` models.
236
- */
237
- numImages?: number | undefined;
238
- /**
239
- * Best effort deterministic seed for the model. Currently only OpenAI models support these
240
- */
241
- seed?: number | undefined;
242
- /**
243
- * Only supported on `image` models.
244
- */
245
- format?: DeploymentsFormat | undefined;
246
- /**
247
- * Only supported on `image` models.
248
- */
249
- dimensions?: string | undefined;
250
- /**
251
- * Only supported on `image` models.
252
- */
253
- quality?: DeploymentsQuality | undefined;
254
- /**
255
- * Only supported on `image` models.
256
- */
257
- style?: string | undefined;
258
- /**
259
- * An object specifying the format that the model must output.
260
- *
261
- * @remarks
262
- *
263
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
264
- *
265
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
266
- *
267
- * 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.
268
- */
269
- responseFormat?:
270
- | DeploymentsResponseFormat2
271
- | DeploymentsResponseFormat1
272
- | null
273
- | undefined;
274
- /**
275
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
276
- */
277
- photoRealVersion?: DeploymentsPhotoRealVersion | undefined;
278
- /**
279
- * The format to return the embeddings
280
- */
281
- encodingFormat?: DeploymentsEncodingFormat | undefined;
282
- };
283
-
284
- export const DeploymentsProvider = {
285
- Cohere: "cohere",
286
- Openai: "openai",
287
- Anthropic: "anthropic",
288
- Huggingface: "huggingface",
289
- Replicate: "replicate",
290
- Google: "google",
291
- GoogleAi: "google-ai",
292
- Azure: "azure",
293
- Aws: "aws",
294
- Anyscale: "anyscale",
295
- Perplexity: "perplexity",
296
- Groq: "groq",
297
- Fal: "fal",
298
- Leonardoai: "leonardoai",
299
- Nvidia: "nvidia",
300
- Jina: "jina",
301
- } as const;
302
- export type DeploymentsProvider = ClosedEnum<typeof DeploymentsProvider>;
303
-
304
- /**
305
- * The role of the prompt message
306
- */
307
- export const DeploymentsRole = {
308
- System: "system",
309
- Assistant: "assistant",
310
- User: "user",
311
- Exception: "exception",
312
- Tool: "tool",
313
- Prompt: "prompt",
314
- Correction: "correction",
315
- ExpectedOutput: "expected_output",
316
- } as const;
317
- /**
318
- * The role of the prompt message
319
- */
320
- export type DeploymentsRole = ClosedEnum<typeof DeploymentsRole>;
321
-
322
- export const Deployments2Type = {
323
- ImageUrl: "image_url",
324
- } as const;
325
- export type Deployments2Type = ClosedEnum<typeof Deployments2Type>;
326
-
327
- export type Deployments2ImageUrl = {
328
- /**
329
- * The orq.ai id of the image
330
- */
331
- id?: string | undefined;
332
- /**
333
- * Either a URL of the image or the base64 encoded data URI.
334
- */
335
- url: string;
336
- /**
337
- * Specifies the detail level of the image. Currently only supported with OpenAI models
338
- */
339
- detail?: string | undefined;
340
- };
341
-
342
- /**
343
- * The image part of the prompt message. Only supported with vision models.
344
- */
345
- export type Deployments22 = {
346
- type: Deployments2Type;
347
- imageUrl: Deployments2ImageUrl;
348
- };
349
-
350
- export const Deployments2DeploymentsType = {
351
- Text: "text",
352
- } as const;
353
- export type Deployments2DeploymentsType = ClosedEnum<
354
- typeof Deployments2DeploymentsType
355
- >;
356
-
357
- /**
358
- * Text content part of a prompt message
359
- */
360
- export type Deployments21 = {
361
- type: Deployments2DeploymentsType;
362
- text: string;
363
- };
364
-
365
- export type DeploymentsContent2 = Deployments21 | Deployments22;
366
-
367
- /**
368
- * 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.
369
- */
370
- export type DeploymentsContent = string | Array<Deployments21 | Deployments22>;
371
-
372
- export const DeploymentsDeploymentsType = {
373
- Function: "function",
374
- } as const;
375
- export type DeploymentsDeploymentsType = ClosedEnum<
376
- typeof DeploymentsDeploymentsType
377
- >;
378
-
379
- export type DeploymentsDeploymentsFunction = {
380
- name: string;
381
- /**
382
- * JSON string arguments for the functions
383
- */
384
- arguments: string;
385
- };
386
-
387
- export type DeploymentsToolCalls = {
388
- id?: string | undefined;
389
- index?: number | undefined;
390
- type: DeploymentsDeploymentsType;
391
- function: DeploymentsDeploymentsFunction;
392
- };
393
-
394
- export type DeploymentsMessages = {
395
- /**
396
- * The role of the prompt message
397
- */
398
- role: DeploymentsRole;
399
- /**
400
- * 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.
401
- */
402
- content: string | Array<Deployments21 | Deployments22>;
403
- toolCalls?: Array<DeploymentsToolCalls> | undefined;
404
- };
405
-
406
- export type DeploymentsPromptConfig = {
407
- tools: Array<DeploymentsTools>;
408
- model: string;
409
- /**
410
- * The type of the model
411
- */
412
- modelType: DeploymentsModelType;
413
- /**
414
- * Model Parameters: Not all parameters apply to every model
415
- */
416
- modelParameters: DeploymentsModelParameters;
417
- provider: DeploymentsProvider;
418
- messages: Array<DeploymentsMessages>;
419
- };
420
-
421
- export type Data = {
422
- /**
423
- * Unique identifier for the object.
424
- */
425
- id: string;
426
- /**
427
- * Date in ISO 8601 format at which the object was created.
428
- */
429
- created: string;
430
- /**
431
- * Date in ISO 8601 format at which the object was last updated.
432
- */
433
- updated: string;
434
- /**
435
- * The deployment unique key
436
- */
437
- key: string;
438
- /**
439
- * An arbitrary string attached to the object. Often useful for displaying to users.
440
- */
441
- description: string;
442
- promptConfig: DeploymentsPromptConfig;
443
- /**
444
- * THe version of the deployment
445
- */
446
- version: string;
447
- };
448
-
449
- /**
450
- * List of deployments
451
- */
452
- export type DeploymentsResponseBody = {
453
- object: ObjectT;
454
- data: Array<Data>;
455
- hasMore: boolean;
456
- firstId: string | null;
457
- lastId: string | null;
458
- };
459
-
460
- /** @internal */
461
- export const DeploymentsRequest$inboundSchema: z.ZodType<
462
- DeploymentsRequest,
463
- z.ZodTypeDef,
464
- unknown
465
- > = z.object({
466
- limit: z.number().default(10),
467
- after: z.string().optional(),
468
- });
469
-
470
- /** @internal */
471
- export type DeploymentsRequest$Outbound = {
472
- limit: number;
473
- after?: string | undefined;
474
- };
475
-
476
- /** @internal */
477
- export const DeploymentsRequest$outboundSchema: z.ZodType<
478
- DeploymentsRequest$Outbound,
479
- z.ZodTypeDef,
480
- DeploymentsRequest
481
- > = z.object({
482
- limit: z.number().default(10),
483
- after: z.string().optional(),
484
- });
485
-
486
- /**
487
- * @internal
488
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
489
- */
490
- export namespace DeploymentsRequest$ {
491
- /** @deprecated use `DeploymentsRequest$inboundSchema` instead. */
492
- export const inboundSchema = DeploymentsRequest$inboundSchema;
493
- /** @deprecated use `DeploymentsRequest$outboundSchema` instead. */
494
- export const outboundSchema = DeploymentsRequest$outboundSchema;
495
- /** @deprecated use `DeploymentsRequest$Outbound` instead. */
496
- export type Outbound = DeploymentsRequest$Outbound;
497
- }
498
-
499
- export function deploymentsRequestToJSON(
500
- deploymentsRequest: DeploymentsRequest,
501
- ): string {
502
- return JSON.stringify(
503
- DeploymentsRequest$outboundSchema.parse(deploymentsRequest),
504
- );
505
- }
506
-
507
- export function deploymentsRequestFromJSON(
508
- jsonString: string,
509
- ): SafeParseResult<DeploymentsRequest, SDKValidationError> {
510
- return safeParse(
511
- jsonString,
512
- (x) => DeploymentsRequest$inboundSchema.parse(JSON.parse(x)),
513
- `Failed to parse 'DeploymentsRequest' from JSON`,
514
- );
515
- }
516
-
517
- /** @internal */
518
- export const ObjectT$inboundSchema: z.ZodNativeEnum<typeof ObjectT> = z
519
- .nativeEnum(ObjectT);
520
-
521
- /** @internal */
522
- export const ObjectT$outboundSchema: z.ZodNativeEnum<typeof ObjectT> =
523
- ObjectT$inboundSchema;
524
-
525
- /**
526
- * @internal
527
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
528
- */
529
- export namespace ObjectT$ {
530
- /** @deprecated use `ObjectT$inboundSchema` instead. */
531
- export const inboundSchema = ObjectT$inboundSchema;
532
- /** @deprecated use `ObjectT$outboundSchema` instead. */
533
- export const outboundSchema = ObjectT$outboundSchema;
534
- }
535
-
536
- /** @internal */
537
- export const DeploymentsType$inboundSchema: z.ZodNativeEnum<
538
- typeof DeploymentsType
539
- > = z.nativeEnum(DeploymentsType);
540
-
541
- /** @internal */
542
- export const DeploymentsType$outboundSchema: z.ZodNativeEnum<
543
- typeof DeploymentsType
544
- > = DeploymentsType$inboundSchema;
545
-
546
- /**
547
- * @internal
548
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
549
- */
550
- export namespace DeploymentsType$ {
551
- /** @deprecated use `DeploymentsType$inboundSchema` instead. */
552
- export const inboundSchema = DeploymentsType$inboundSchema;
553
- /** @deprecated use `DeploymentsType$outboundSchema` instead. */
554
- export const outboundSchema = DeploymentsType$outboundSchema;
555
- }
556
-
557
- /** @internal */
558
- export const DeploymentsDeploymentsResponseType$inboundSchema: z.ZodNativeEnum<
559
- typeof DeploymentsDeploymentsResponseType
560
- > = z.nativeEnum(DeploymentsDeploymentsResponseType);
561
-
562
- /** @internal */
563
- export const DeploymentsDeploymentsResponseType$outboundSchema: z.ZodNativeEnum<
564
- typeof DeploymentsDeploymentsResponseType
565
- > = DeploymentsDeploymentsResponseType$inboundSchema;
566
-
567
- /**
568
- * @internal
569
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
570
- */
571
- export namespace DeploymentsDeploymentsResponseType$ {
572
- /** @deprecated use `DeploymentsDeploymentsResponseType$inboundSchema` instead. */
573
- export const inboundSchema = DeploymentsDeploymentsResponseType$inboundSchema;
574
- /** @deprecated use `DeploymentsDeploymentsResponseType$outboundSchema` instead. */
575
- export const outboundSchema =
576
- DeploymentsDeploymentsResponseType$outboundSchema;
577
- }
578
-
579
- /** @internal */
580
- export const DeploymentsParameters$inboundSchema: z.ZodType<
581
- DeploymentsParameters,
582
- z.ZodTypeDef,
583
- unknown
584
- > = z.object({
585
- type: DeploymentsDeploymentsResponseType$inboundSchema,
586
- properties: z.record(z.any()),
587
- required: z.array(z.string()).optional(),
588
- additionalProperties: z.boolean().optional(),
589
- });
590
-
591
- /** @internal */
592
- export type DeploymentsParameters$Outbound = {
593
- type: string;
594
- properties: { [k: string]: any };
595
- required?: Array<string> | undefined;
596
- additionalProperties?: boolean | undefined;
597
- };
598
-
599
- /** @internal */
600
- export const DeploymentsParameters$outboundSchema: z.ZodType<
601
- DeploymentsParameters$Outbound,
602
- z.ZodTypeDef,
603
- DeploymentsParameters
604
- > = z.object({
605
- type: DeploymentsDeploymentsResponseType$outboundSchema,
606
- properties: z.record(z.any()),
607
- required: z.array(z.string()).optional(),
608
- additionalProperties: z.boolean().optional(),
609
- });
610
-
611
- /**
612
- * @internal
613
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
614
- */
615
- export namespace DeploymentsParameters$ {
616
- /** @deprecated use `DeploymentsParameters$inboundSchema` instead. */
617
- export const inboundSchema = DeploymentsParameters$inboundSchema;
618
- /** @deprecated use `DeploymentsParameters$outboundSchema` instead. */
619
- export const outboundSchema = DeploymentsParameters$outboundSchema;
620
- /** @deprecated use `DeploymentsParameters$Outbound` instead. */
621
- export type Outbound = DeploymentsParameters$Outbound;
622
- }
623
-
624
- export function deploymentsParametersToJSON(
625
- deploymentsParameters: DeploymentsParameters,
626
- ): string {
627
- return JSON.stringify(
628
- DeploymentsParameters$outboundSchema.parse(deploymentsParameters),
629
- );
630
- }
631
-
632
- export function deploymentsParametersFromJSON(
633
- jsonString: string,
634
- ): SafeParseResult<DeploymentsParameters, SDKValidationError> {
635
- return safeParse(
636
- jsonString,
637
- (x) => DeploymentsParameters$inboundSchema.parse(JSON.parse(x)),
638
- `Failed to parse 'DeploymentsParameters' from JSON`,
639
- );
640
- }
641
-
642
- /** @internal */
643
- export const DeploymentsFunction$inboundSchema: z.ZodType<
644
- DeploymentsFunction,
645
- z.ZodTypeDef,
646
- unknown
647
- > = z.object({
648
- name: z.string(),
649
- description: z.string().optional(),
650
- strict: z.boolean().optional(),
651
- parameters: z.lazy(() => DeploymentsParameters$inboundSchema),
652
- });
653
-
654
- /** @internal */
655
- export type DeploymentsFunction$Outbound = {
656
- name: string;
657
- description?: string | undefined;
658
- strict?: boolean | undefined;
659
- parameters: DeploymentsParameters$Outbound;
660
- };
661
-
662
- /** @internal */
663
- export const DeploymentsFunction$outboundSchema: z.ZodType<
664
- DeploymentsFunction$Outbound,
665
- z.ZodTypeDef,
666
- DeploymentsFunction
667
- > = z.object({
668
- name: z.string(),
669
- description: z.string().optional(),
670
- strict: z.boolean().optional(),
671
- parameters: z.lazy(() => DeploymentsParameters$outboundSchema),
672
- });
673
-
674
- /**
675
- * @internal
676
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
677
- */
678
- export namespace DeploymentsFunction$ {
679
- /** @deprecated use `DeploymentsFunction$inboundSchema` instead. */
680
- export const inboundSchema = DeploymentsFunction$inboundSchema;
681
- /** @deprecated use `DeploymentsFunction$outboundSchema` instead. */
682
- export const outboundSchema = DeploymentsFunction$outboundSchema;
683
- /** @deprecated use `DeploymentsFunction$Outbound` instead. */
684
- export type Outbound = DeploymentsFunction$Outbound;
685
- }
686
-
687
- export function deploymentsFunctionToJSON(
688
- deploymentsFunction: DeploymentsFunction,
689
- ): string {
690
- return JSON.stringify(
691
- DeploymentsFunction$outboundSchema.parse(deploymentsFunction),
692
- );
693
- }
694
-
695
- export function deploymentsFunctionFromJSON(
696
- jsonString: string,
697
- ): SafeParseResult<DeploymentsFunction, SDKValidationError> {
698
- return safeParse(
699
- jsonString,
700
- (x) => DeploymentsFunction$inboundSchema.parse(JSON.parse(x)),
701
- `Failed to parse 'DeploymentsFunction' from JSON`,
702
- );
703
- }
704
-
705
- /** @internal */
706
- export const DeploymentsTools$inboundSchema: z.ZodType<
707
- DeploymentsTools,
708
- z.ZodTypeDef,
709
- unknown
710
- > = z.object({
711
- type: DeploymentsType$inboundSchema,
712
- function: z.lazy(() => DeploymentsFunction$inboundSchema),
713
- id: z.number().optional(),
714
- });
715
-
716
- /** @internal */
717
- export type DeploymentsTools$Outbound = {
718
- type: string;
719
- function: DeploymentsFunction$Outbound;
720
- id?: number | undefined;
721
- };
722
-
723
- /** @internal */
724
- export const DeploymentsTools$outboundSchema: z.ZodType<
725
- DeploymentsTools$Outbound,
726
- z.ZodTypeDef,
727
- DeploymentsTools
728
- > = z.object({
729
- type: DeploymentsType$outboundSchema,
730
- function: z.lazy(() => DeploymentsFunction$outboundSchema),
731
- id: z.number().optional(),
732
- });
733
-
734
- /**
735
- * @internal
736
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
737
- */
738
- export namespace DeploymentsTools$ {
739
- /** @deprecated use `DeploymentsTools$inboundSchema` instead. */
740
- export const inboundSchema = DeploymentsTools$inboundSchema;
741
- /** @deprecated use `DeploymentsTools$outboundSchema` instead. */
742
- export const outboundSchema = DeploymentsTools$outboundSchema;
743
- /** @deprecated use `DeploymentsTools$Outbound` instead. */
744
- export type Outbound = DeploymentsTools$Outbound;
745
- }
746
-
747
- export function deploymentsToolsToJSON(
748
- deploymentsTools: DeploymentsTools,
749
- ): string {
750
- return JSON.stringify(
751
- DeploymentsTools$outboundSchema.parse(deploymentsTools),
752
- );
753
- }
754
-
755
- export function deploymentsToolsFromJSON(
756
- jsonString: string,
757
- ): SafeParseResult<DeploymentsTools, SDKValidationError> {
758
- return safeParse(
759
- jsonString,
760
- (x) => DeploymentsTools$inboundSchema.parse(JSON.parse(x)),
761
- `Failed to parse 'DeploymentsTools' from JSON`,
762
- );
763
- }
764
-
765
- /** @internal */
766
- export const DeploymentsModelType$inboundSchema: z.ZodNativeEnum<
767
- typeof DeploymentsModelType
768
- > = z.nativeEnum(DeploymentsModelType);
769
-
770
- /** @internal */
771
- export const DeploymentsModelType$outboundSchema: z.ZodNativeEnum<
772
- typeof DeploymentsModelType
773
- > = DeploymentsModelType$inboundSchema;
774
-
775
- /**
776
- * @internal
777
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
778
- */
779
- export namespace DeploymentsModelType$ {
780
- /** @deprecated use `DeploymentsModelType$inboundSchema` instead. */
781
- export const inboundSchema = DeploymentsModelType$inboundSchema;
782
- /** @deprecated use `DeploymentsModelType$outboundSchema` instead. */
783
- export const outboundSchema = DeploymentsModelType$outboundSchema;
784
- }
785
-
786
- /** @internal */
787
- export const DeploymentsFormat$inboundSchema: z.ZodNativeEnum<
788
- typeof DeploymentsFormat
789
- > = z.nativeEnum(DeploymentsFormat);
790
-
791
- /** @internal */
792
- export const DeploymentsFormat$outboundSchema: z.ZodNativeEnum<
793
- typeof DeploymentsFormat
794
- > = DeploymentsFormat$inboundSchema;
795
-
796
- /**
797
- * @internal
798
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
799
- */
800
- export namespace DeploymentsFormat$ {
801
- /** @deprecated use `DeploymentsFormat$inboundSchema` instead. */
802
- export const inboundSchema = DeploymentsFormat$inboundSchema;
803
- /** @deprecated use `DeploymentsFormat$outboundSchema` instead. */
804
- export const outboundSchema = DeploymentsFormat$outboundSchema;
805
- }
806
-
807
- /** @internal */
808
- export const DeploymentsQuality$inboundSchema: z.ZodNativeEnum<
809
- typeof DeploymentsQuality
810
- > = z.nativeEnum(DeploymentsQuality);
811
-
812
- /** @internal */
813
- export const DeploymentsQuality$outboundSchema: z.ZodNativeEnum<
814
- typeof DeploymentsQuality
815
- > = DeploymentsQuality$inboundSchema;
816
-
817
- /**
818
- * @internal
819
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
820
- */
821
- export namespace DeploymentsQuality$ {
822
- /** @deprecated use `DeploymentsQuality$inboundSchema` instead. */
823
- export const inboundSchema = DeploymentsQuality$inboundSchema;
824
- /** @deprecated use `DeploymentsQuality$outboundSchema` instead. */
825
- export const outboundSchema = DeploymentsQuality$outboundSchema;
826
- }
827
-
828
- /** @internal */
829
- export const DeploymentsResponseFormatType$inboundSchema: z.ZodNativeEnum<
830
- typeof DeploymentsResponseFormatType
831
- > = z.nativeEnum(DeploymentsResponseFormatType);
832
-
833
- /** @internal */
834
- export const DeploymentsResponseFormatType$outboundSchema: z.ZodNativeEnum<
835
- typeof DeploymentsResponseFormatType
836
- > = DeploymentsResponseFormatType$inboundSchema;
837
-
838
- /**
839
- * @internal
840
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
841
- */
842
- export namespace DeploymentsResponseFormatType$ {
843
- /** @deprecated use `DeploymentsResponseFormatType$inboundSchema` instead. */
844
- export const inboundSchema = DeploymentsResponseFormatType$inboundSchema;
845
- /** @deprecated use `DeploymentsResponseFormatType$outboundSchema` instead. */
846
- export const outboundSchema = DeploymentsResponseFormatType$outboundSchema;
847
- }
848
-
849
- /** @internal */
850
- export const DeploymentsResponseFormat2$inboundSchema: z.ZodType<
851
- DeploymentsResponseFormat2,
852
- z.ZodTypeDef,
853
- unknown
854
- > = z.object({
855
- type: DeploymentsResponseFormatType$inboundSchema,
856
- });
857
-
858
- /** @internal */
859
- export type DeploymentsResponseFormat2$Outbound = {
860
- type: string;
861
- };
862
-
863
- /** @internal */
864
- export const DeploymentsResponseFormat2$outboundSchema: z.ZodType<
865
- DeploymentsResponseFormat2$Outbound,
866
- z.ZodTypeDef,
867
- DeploymentsResponseFormat2
868
- > = z.object({
869
- type: DeploymentsResponseFormatType$outboundSchema,
870
- });
871
-
872
- /**
873
- * @internal
874
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
875
- */
876
- export namespace DeploymentsResponseFormat2$ {
877
- /** @deprecated use `DeploymentsResponseFormat2$inboundSchema` instead. */
878
- export const inboundSchema = DeploymentsResponseFormat2$inboundSchema;
879
- /** @deprecated use `DeploymentsResponseFormat2$outboundSchema` instead. */
880
- export const outboundSchema = DeploymentsResponseFormat2$outboundSchema;
881
- /** @deprecated use `DeploymentsResponseFormat2$Outbound` instead. */
882
- export type Outbound = DeploymentsResponseFormat2$Outbound;
883
- }
884
-
885
- export function deploymentsResponseFormat2ToJSON(
886
- deploymentsResponseFormat2: DeploymentsResponseFormat2,
887
- ): string {
888
- return JSON.stringify(
889
- DeploymentsResponseFormat2$outboundSchema.parse(deploymentsResponseFormat2),
890
- );
891
- }
892
-
893
- export function deploymentsResponseFormat2FromJSON(
894
- jsonString: string,
895
- ): SafeParseResult<DeploymentsResponseFormat2, SDKValidationError> {
896
- return safeParse(
897
- jsonString,
898
- (x) => DeploymentsResponseFormat2$inboundSchema.parse(JSON.parse(x)),
899
- `Failed to parse 'DeploymentsResponseFormat2' from JSON`,
900
- );
901
- }
902
-
903
- /** @internal */
904
- export const DeploymentsResponseFormatDeploymentsType$inboundSchema:
905
- z.ZodNativeEnum<typeof DeploymentsResponseFormatDeploymentsType> = z
906
- .nativeEnum(DeploymentsResponseFormatDeploymentsType);
907
-
908
- /** @internal */
909
- export const DeploymentsResponseFormatDeploymentsType$outboundSchema:
910
- z.ZodNativeEnum<typeof DeploymentsResponseFormatDeploymentsType> =
911
- DeploymentsResponseFormatDeploymentsType$inboundSchema;
912
-
913
- /**
914
- * @internal
915
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
916
- */
917
- export namespace DeploymentsResponseFormatDeploymentsType$ {
918
- /** @deprecated use `DeploymentsResponseFormatDeploymentsType$inboundSchema` instead. */
919
- export const inboundSchema =
920
- DeploymentsResponseFormatDeploymentsType$inboundSchema;
921
- /** @deprecated use `DeploymentsResponseFormatDeploymentsType$outboundSchema` instead. */
922
- export const outboundSchema =
923
- DeploymentsResponseFormatDeploymentsType$outboundSchema;
924
- }
925
-
926
- /** @internal */
927
- export const DeploymentsResponseFormatJsonSchema$inboundSchema: z.ZodType<
928
- DeploymentsResponseFormatJsonSchema,
929
- z.ZodTypeDef,
930
- unknown
931
- > = z.object({
932
- name: z.string(),
933
- strict: z.boolean(),
934
- schema: z.record(z.any()),
935
- });
936
-
937
- /** @internal */
938
- export type DeploymentsResponseFormatJsonSchema$Outbound = {
939
- name: string;
940
- strict: boolean;
941
- schema: { [k: string]: any };
942
- };
943
-
944
- /** @internal */
945
- export const DeploymentsResponseFormatJsonSchema$outboundSchema: z.ZodType<
946
- DeploymentsResponseFormatJsonSchema$Outbound,
947
- z.ZodTypeDef,
948
- DeploymentsResponseFormatJsonSchema
949
- > = z.object({
950
- name: z.string(),
951
- strict: z.boolean(),
952
- schema: z.record(z.any()),
953
- });
954
-
955
- /**
956
- * @internal
957
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
958
- */
959
- export namespace DeploymentsResponseFormatJsonSchema$ {
960
- /** @deprecated use `DeploymentsResponseFormatJsonSchema$inboundSchema` instead. */
961
- export const inboundSchema =
962
- DeploymentsResponseFormatJsonSchema$inboundSchema;
963
- /** @deprecated use `DeploymentsResponseFormatJsonSchema$outboundSchema` instead. */
964
- export const outboundSchema =
965
- DeploymentsResponseFormatJsonSchema$outboundSchema;
966
- /** @deprecated use `DeploymentsResponseFormatJsonSchema$Outbound` instead. */
967
- export type Outbound = DeploymentsResponseFormatJsonSchema$Outbound;
968
- }
969
-
970
- export function deploymentsResponseFormatJsonSchemaToJSON(
971
- deploymentsResponseFormatJsonSchema: DeploymentsResponseFormatJsonSchema,
972
- ): string {
973
- return JSON.stringify(
974
- DeploymentsResponseFormatJsonSchema$outboundSchema.parse(
975
- deploymentsResponseFormatJsonSchema,
976
- ),
977
- );
978
- }
979
-
980
- export function deploymentsResponseFormatJsonSchemaFromJSON(
981
- jsonString: string,
982
- ): SafeParseResult<DeploymentsResponseFormatJsonSchema, SDKValidationError> {
983
- return safeParse(
984
- jsonString,
985
- (x) =>
986
- DeploymentsResponseFormatJsonSchema$inboundSchema.parse(JSON.parse(x)),
987
- `Failed to parse 'DeploymentsResponseFormatJsonSchema' from JSON`,
988
- );
989
- }
990
-
991
- /** @internal */
992
- export const DeploymentsResponseFormat1$inboundSchema: z.ZodType<
993
- DeploymentsResponseFormat1,
994
- z.ZodTypeDef,
995
- unknown
996
- > = z.object({
997
- type: DeploymentsResponseFormatDeploymentsType$inboundSchema,
998
- json_schema: z.lazy(() => DeploymentsResponseFormatJsonSchema$inboundSchema),
999
- }).transform((v) => {
1000
- return remap$(v, {
1001
- "json_schema": "jsonSchema",
1002
- });
1003
- });
1004
-
1005
- /** @internal */
1006
- export type DeploymentsResponseFormat1$Outbound = {
1007
- type: string;
1008
- json_schema: DeploymentsResponseFormatJsonSchema$Outbound;
1009
- };
1010
-
1011
- /** @internal */
1012
- export const DeploymentsResponseFormat1$outboundSchema: z.ZodType<
1013
- DeploymentsResponseFormat1$Outbound,
1014
- z.ZodTypeDef,
1015
- DeploymentsResponseFormat1
1016
- > = z.object({
1017
- type: DeploymentsResponseFormatDeploymentsType$outboundSchema,
1018
- jsonSchema: z.lazy(() => DeploymentsResponseFormatJsonSchema$outboundSchema),
1019
- }).transform((v) => {
1020
- return remap$(v, {
1021
- jsonSchema: "json_schema",
1022
- });
1023
- });
1024
-
1025
- /**
1026
- * @internal
1027
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1028
- */
1029
- export namespace DeploymentsResponseFormat1$ {
1030
- /** @deprecated use `DeploymentsResponseFormat1$inboundSchema` instead. */
1031
- export const inboundSchema = DeploymentsResponseFormat1$inboundSchema;
1032
- /** @deprecated use `DeploymentsResponseFormat1$outboundSchema` instead. */
1033
- export const outboundSchema = DeploymentsResponseFormat1$outboundSchema;
1034
- /** @deprecated use `DeploymentsResponseFormat1$Outbound` instead. */
1035
- export type Outbound = DeploymentsResponseFormat1$Outbound;
1036
- }
1037
-
1038
- export function deploymentsResponseFormat1ToJSON(
1039
- deploymentsResponseFormat1: DeploymentsResponseFormat1,
1040
- ): string {
1041
- return JSON.stringify(
1042
- DeploymentsResponseFormat1$outboundSchema.parse(deploymentsResponseFormat1),
1043
- );
1044
- }
1045
-
1046
- export function deploymentsResponseFormat1FromJSON(
1047
- jsonString: string,
1048
- ): SafeParseResult<DeploymentsResponseFormat1, SDKValidationError> {
1049
- return safeParse(
1050
- jsonString,
1051
- (x) => DeploymentsResponseFormat1$inboundSchema.parse(JSON.parse(x)),
1052
- `Failed to parse 'DeploymentsResponseFormat1' from JSON`,
1053
- );
1054
- }
1055
-
1056
- /** @internal */
1057
- export const DeploymentsResponseFormat$inboundSchema: z.ZodType<
1058
- DeploymentsResponseFormat,
1059
- z.ZodTypeDef,
1060
- unknown
1061
- > = z.union([
1062
- z.lazy(() => DeploymentsResponseFormat2$inboundSchema),
1063
- z.lazy(() => DeploymentsResponseFormat1$inboundSchema),
1064
- ]);
1065
-
1066
- /** @internal */
1067
- export type DeploymentsResponseFormat$Outbound =
1068
- | DeploymentsResponseFormat2$Outbound
1069
- | DeploymentsResponseFormat1$Outbound;
1070
-
1071
- /** @internal */
1072
- export const DeploymentsResponseFormat$outboundSchema: z.ZodType<
1073
- DeploymentsResponseFormat$Outbound,
1074
- z.ZodTypeDef,
1075
- DeploymentsResponseFormat
1076
- > = z.union([
1077
- z.lazy(() => DeploymentsResponseFormat2$outboundSchema),
1078
- z.lazy(() => DeploymentsResponseFormat1$outboundSchema),
1079
- ]);
1080
-
1081
- /**
1082
- * @internal
1083
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1084
- */
1085
- export namespace DeploymentsResponseFormat$ {
1086
- /** @deprecated use `DeploymentsResponseFormat$inboundSchema` instead. */
1087
- export const inboundSchema = DeploymentsResponseFormat$inboundSchema;
1088
- /** @deprecated use `DeploymentsResponseFormat$outboundSchema` instead. */
1089
- export const outboundSchema = DeploymentsResponseFormat$outboundSchema;
1090
- /** @deprecated use `DeploymentsResponseFormat$Outbound` instead. */
1091
- export type Outbound = DeploymentsResponseFormat$Outbound;
1092
- }
1093
-
1094
- export function deploymentsResponseFormatToJSON(
1095
- deploymentsResponseFormat: DeploymentsResponseFormat,
1096
- ): string {
1097
- return JSON.stringify(
1098
- DeploymentsResponseFormat$outboundSchema.parse(deploymentsResponseFormat),
1099
- );
1100
- }
1101
-
1102
- export function deploymentsResponseFormatFromJSON(
1103
- jsonString: string,
1104
- ): SafeParseResult<DeploymentsResponseFormat, SDKValidationError> {
1105
- return safeParse(
1106
- jsonString,
1107
- (x) => DeploymentsResponseFormat$inboundSchema.parse(JSON.parse(x)),
1108
- `Failed to parse 'DeploymentsResponseFormat' from JSON`,
1109
- );
1110
- }
1111
-
1112
- /** @internal */
1113
- export const DeploymentsPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
1114
- typeof DeploymentsPhotoRealVersion
1115
- > = z.nativeEnum(DeploymentsPhotoRealVersion);
1116
-
1117
- /** @internal */
1118
- export const DeploymentsPhotoRealVersion$outboundSchema: z.ZodNativeEnum<
1119
- typeof DeploymentsPhotoRealVersion
1120
- > = DeploymentsPhotoRealVersion$inboundSchema;
1121
-
1122
- /**
1123
- * @internal
1124
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1125
- */
1126
- export namespace DeploymentsPhotoRealVersion$ {
1127
- /** @deprecated use `DeploymentsPhotoRealVersion$inboundSchema` instead. */
1128
- export const inboundSchema = DeploymentsPhotoRealVersion$inboundSchema;
1129
- /** @deprecated use `DeploymentsPhotoRealVersion$outboundSchema` instead. */
1130
- export const outboundSchema = DeploymentsPhotoRealVersion$outboundSchema;
1131
- }
1132
-
1133
- /** @internal */
1134
- export const DeploymentsEncodingFormat$inboundSchema: z.ZodNativeEnum<
1135
- typeof DeploymentsEncodingFormat
1136
- > = z.nativeEnum(DeploymentsEncodingFormat);
1137
-
1138
- /** @internal */
1139
- export const DeploymentsEncodingFormat$outboundSchema: z.ZodNativeEnum<
1140
- typeof DeploymentsEncodingFormat
1141
- > = DeploymentsEncodingFormat$inboundSchema;
1142
-
1143
- /**
1144
- * @internal
1145
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1146
- */
1147
- export namespace DeploymentsEncodingFormat$ {
1148
- /** @deprecated use `DeploymentsEncodingFormat$inboundSchema` instead. */
1149
- export const inboundSchema = DeploymentsEncodingFormat$inboundSchema;
1150
- /** @deprecated use `DeploymentsEncodingFormat$outboundSchema` instead. */
1151
- export const outboundSchema = DeploymentsEncodingFormat$outboundSchema;
1152
- }
1153
-
1154
- /** @internal */
1155
- export const DeploymentsModelParameters$inboundSchema: z.ZodType<
1156
- DeploymentsModelParameters,
1157
- z.ZodTypeDef,
1158
- unknown
1159
- > = z.object({
1160
- temperature: z.number().optional(),
1161
- maxTokens: z.number().optional(),
1162
- topK: z.number().optional(),
1163
- topP: z.number().optional(),
1164
- frequencyPenalty: z.number().optional(),
1165
- presencePenalty: z.number().optional(),
1166
- numImages: z.number().optional(),
1167
- seed: z.number().optional(),
1168
- format: DeploymentsFormat$inboundSchema.optional(),
1169
- dimensions: z.string().optional(),
1170
- quality: DeploymentsQuality$inboundSchema.optional(),
1171
- style: z.string().optional(),
1172
- responseFormat: z.nullable(
1173
- z.union([
1174
- z.lazy(() => DeploymentsResponseFormat2$inboundSchema),
1175
- z.lazy(() => DeploymentsResponseFormat1$inboundSchema),
1176
- ]),
1177
- ).optional(),
1178
- photoRealVersion: DeploymentsPhotoRealVersion$inboundSchema.optional(),
1179
- encoding_format: DeploymentsEncodingFormat$inboundSchema.optional(),
1180
- }).transform((v) => {
1181
- return remap$(v, {
1182
- "encoding_format": "encodingFormat",
1183
- });
1184
- });
1185
-
1186
- /** @internal */
1187
- export type DeploymentsModelParameters$Outbound = {
1188
- temperature?: number | undefined;
1189
- maxTokens?: number | undefined;
1190
- topK?: number | undefined;
1191
- topP?: number | undefined;
1192
- frequencyPenalty?: number | undefined;
1193
- presencePenalty?: number | undefined;
1194
- numImages?: number | undefined;
1195
- seed?: number | undefined;
1196
- format?: string | undefined;
1197
- dimensions?: string | undefined;
1198
- quality?: string | undefined;
1199
- style?: string | undefined;
1200
- responseFormat?:
1201
- | DeploymentsResponseFormat2$Outbound
1202
- | DeploymentsResponseFormat1$Outbound
1203
- | null
1204
- | undefined;
1205
- photoRealVersion?: string | undefined;
1206
- encoding_format?: string | undefined;
1207
- };
1208
-
1209
- /** @internal */
1210
- export const DeploymentsModelParameters$outboundSchema: z.ZodType<
1211
- DeploymentsModelParameters$Outbound,
1212
- z.ZodTypeDef,
1213
- DeploymentsModelParameters
1214
- > = z.object({
1215
- temperature: z.number().optional(),
1216
- maxTokens: z.number().optional(),
1217
- topK: z.number().optional(),
1218
- topP: z.number().optional(),
1219
- frequencyPenalty: z.number().optional(),
1220
- presencePenalty: z.number().optional(),
1221
- numImages: z.number().optional(),
1222
- seed: z.number().optional(),
1223
- format: DeploymentsFormat$outboundSchema.optional(),
1224
- dimensions: z.string().optional(),
1225
- quality: DeploymentsQuality$outboundSchema.optional(),
1226
- style: z.string().optional(),
1227
- responseFormat: z.nullable(
1228
- z.union([
1229
- z.lazy(() => DeploymentsResponseFormat2$outboundSchema),
1230
- z.lazy(() => DeploymentsResponseFormat1$outboundSchema),
1231
- ]),
1232
- ).optional(),
1233
- photoRealVersion: DeploymentsPhotoRealVersion$outboundSchema.optional(),
1234
- encodingFormat: DeploymentsEncodingFormat$outboundSchema.optional(),
1235
- }).transform((v) => {
1236
- return remap$(v, {
1237
- encodingFormat: "encoding_format",
1238
- });
1239
- });
1240
-
1241
- /**
1242
- * @internal
1243
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1244
- */
1245
- export namespace DeploymentsModelParameters$ {
1246
- /** @deprecated use `DeploymentsModelParameters$inboundSchema` instead. */
1247
- export const inboundSchema = DeploymentsModelParameters$inboundSchema;
1248
- /** @deprecated use `DeploymentsModelParameters$outboundSchema` instead. */
1249
- export const outboundSchema = DeploymentsModelParameters$outboundSchema;
1250
- /** @deprecated use `DeploymentsModelParameters$Outbound` instead. */
1251
- export type Outbound = DeploymentsModelParameters$Outbound;
1252
- }
1253
-
1254
- export function deploymentsModelParametersToJSON(
1255
- deploymentsModelParameters: DeploymentsModelParameters,
1256
- ): string {
1257
- return JSON.stringify(
1258
- DeploymentsModelParameters$outboundSchema.parse(deploymentsModelParameters),
1259
- );
1260
- }
1261
-
1262
- export function deploymentsModelParametersFromJSON(
1263
- jsonString: string,
1264
- ): SafeParseResult<DeploymentsModelParameters, SDKValidationError> {
1265
- return safeParse(
1266
- jsonString,
1267
- (x) => DeploymentsModelParameters$inboundSchema.parse(JSON.parse(x)),
1268
- `Failed to parse 'DeploymentsModelParameters' from JSON`,
1269
- );
1270
- }
1271
-
1272
- /** @internal */
1273
- export const DeploymentsProvider$inboundSchema: z.ZodNativeEnum<
1274
- typeof DeploymentsProvider
1275
- > = z.nativeEnum(DeploymentsProvider);
1276
-
1277
- /** @internal */
1278
- export const DeploymentsProvider$outboundSchema: z.ZodNativeEnum<
1279
- typeof DeploymentsProvider
1280
- > = DeploymentsProvider$inboundSchema;
1281
-
1282
- /**
1283
- * @internal
1284
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1285
- */
1286
- export namespace DeploymentsProvider$ {
1287
- /** @deprecated use `DeploymentsProvider$inboundSchema` instead. */
1288
- export const inboundSchema = DeploymentsProvider$inboundSchema;
1289
- /** @deprecated use `DeploymentsProvider$outboundSchema` instead. */
1290
- export const outboundSchema = DeploymentsProvider$outboundSchema;
1291
- }
1292
-
1293
- /** @internal */
1294
- export const DeploymentsRole$inboundSchema: z.ZodNativeEnum<
1295
- typeof DeploymentsRole
1296
- > = z.nativeEnum(DeploymentsRole);
1297
-
1298
- /** @internal */
1299
- export const DeploymentsRole$outboundSchema: z.ZodNativeEnum<
1300
- typeof DeploymentsRole
1301
- > = DeploymentsRole$inboundSchema;
1302
-
1303
- /**
1304
- * @internal
1305
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1306
- */
1307
- export namespace DeploymentsRole$ {
1308
- /** @deprecated use `DeploymentsRole$inboundSchema` instead. */
1309
- export const inboundSchema = DeploymentsRole$inboundSchema;
1310
- /** @deprecated use `DeploymentsRole$outboundSchema` instead. */
1311
- export const outboundSchema = DeploymentsRole$outboundSchema;
1312
- }
1313
-
1314
- /** @internal */
1315
- export const Deployments2Type$inboundSchema: z.ZodNativeEnum<
1316
- typeof Deployments2Type
1317
- > = z.nativeEnum(Deployments2Type);
1318
-
1319
- /** @internal */
1320
- export const Deployments2Type$outboundSchema: z.ZodNativeEnum<
1321
- typeof Deployments2Type
1322
- > = Deployments2Type$inboundSchema;
1323
-
1324
- /**
1325
- * @internal
1326
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1327
- */
1328
- export namespace Deployments2Type$ {
1329
- /** @deprecated use `Deployments2Type$inboundSchema` instead. */
1330
- export const inboundSchema = Deployments2Type$inboundSchema;
1331
- /** @deprecated use `Deployments2Type$outboundSchema` instead. */
1332
- export const outboundSchema = Deployments2Type$outboundSchema;
1333
- }
1334
-
1335
- /** @internal */
1336
- export const Deployments2ImageUrl$inboundSchema: z.ZodType<
1337
- Deployments2ImageUrl,
1338
- z.ZodTypeDef,
1339
- unknown
1340
- > = z.object({
1341
- id: z.string().optional(),
1342
- url: z.string(),
1343
- detail: z.string().optional(),
1344
- });
1345
-
1346
- /** @internal */
1347
- export type Deployments2ImageUrl$Outbound = {
1348
- id?: string | undefined;
1349
- url: string;
1350
- detail?: string | undefined;
1351
- };
1352
-
1353
- /** @internal */
1354
- export const Deployments2ImageUrl$outboundSchema: z.ZodType<
1355
- Deployments2ImageUrl$Outbound,
1356
- z.ZodTypeDef,
1357
- Deployments2ImageUrl
1358
- > = z.object({
1359
- id: z.string().optional(),
1360
- url: z.string(),
1361
- detail: z.string().optional(),
1362
- });
1363
-
1364
- /**
1365
- * @internal
1366
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1367
- */
1368
- export namespace Deployments2ImageUrl$ {
1369
- /** @deprecated use `Deployments2ImageUrl$inboundSchema` instead. */
1370
- export const inboundSchema = Deployments2ImageUrl$inboundSchema;
1371
- /** @deprecated use `Deployments2ImageUrl$outboundSchema` instead. */
1372
- export const outboundSchema = Deployments2ImageUrl$outboundSchema;
1373
- /** @deprecated use `Deployments2ImageUrl$Outbound` instead. */
1374
- export type Outbound = Deployments2ImageUrl$Outbound;
1375
- }
1376
-
1377
- export function deployments2ImageUrlToJSON(
1378
- deployments2ImageUrl: Deployments2ImageUrl,
1379
- ): string {
1380
- return JSON.stringify(
1381
- Deployments2ImageUrl$outboundSchema.parse(deployments2ImageUrl),
1382
- );
1383
- }
1384
-
1385
- export function deployments2ImageUrlFromJSON(
1386
- jsonString: string,
1387
- ): SafeParseResult<Deployments2ImageUrl, SDKValidationError> {
1388
- return safeParse(
1389
- jsonString,
1390
- (x) => Deployments2ImageUrl$inboundSchema.parse(JSON.parse(x)),
1391
- `Failed to parse 'Deployments2ImageUrl' from JSON`,
1392
- );
1393
- }
1394
-
1395
- /** @internal */
1396
- export const Deployments22$inboundSchema: z.ZodType<
1397
- Deployments22,
1398
- z.ZodTypeDef,
1399
- unknown
1400
- > = z.object({
1401
- type: Deployments2Type$inboundSchema,
1402
- image_url: z.lazy(() => Deployments2ImageUrl$inboundSchema),
1403
- }).transform((v) => {
1404
- return remap$(v, {
1405
- "image_url": "imageUrl",
1406
- });
1407
- });
1408
-
1409
- /** @internal */
1410
- export type Deployments22$Outbound = {
1411
- type: string;
1412
- image_url: Deployments2ImageUrl$Outbound;
1413
- };
1414
-
1415
- /** @internal */
1416
- export const Deployments22$outboundSchema: z.ZodType<
1417
- Deployments22$Outbound,
1418
- z.ZodTypeDef,
1419
- Deployments22
1420
- > = z.object({
1421
- type: Deployments2Type$outboundSchema,
1422
- imageUrl: z.lazy(() => Deployments2ImageUrl$outboundSchema),
1423
- }).transform((v) => {
1424
- return remap$(v, {
1425
- imageUrl: "image_url",
1426
- });
1427
- });
1428
-
1429
- /**
1430
- * @internal
1431
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1432
- */
1433
- export namespace Deployments22$ {
1434
- /** @deprecated use `Deployments22$inboundSchema` instead. */
1435
- export const inboundSchema = Deployments22$inboundSchema;
1436
- /** @deprecated use `Deployments22$outboundSchema` instead. */
1437
- export const outboundSchema = Deployments22$outboundSchema;
1438
- /** @deprecated use `Deployments22$Outbound` instead. */
1439
- export type Outbound = Deployments22$Outbound;
1440
- }
1441
-
1442
- export function deployments22ToJSON(deployments22: Deployments22): string {
1443
- return JSON.stringify(Deployments22$outboundSchema.parse(deployments22));
1444
- }
1445
-
1446
- export function deployments22FromJSON(
1447
- jsonString: string,
1448
- ): SafeParseResult<Deployments22, SDKValidationError> {
1449
- return safeParse(
1450
- jsonString,
1451
- (x) => Deployments22$inboundSchema.parse(JSON.parse(x)),
1452
- `Failed to parse 'Deployments22' from JSON`,
1453
- );
1454
- }
1455
-
1456
- /** @internal */
1457
- export const Deployments2DeploymentsType$inboundSchema: z.ZodNativeEnum<
1458
- typeof Deployments2DeploymentsType
1459
- > = z.nativeEnum(Deployments2DeploymentsType);
1460
-
1461
- /** @internal */
1462
- export const Deployments2DeploymentsType$outboundSchema: z.ZodNativeEnum<
1463
- typeof Deployments2DeploymentsType
1464
- > = Deployments2DeploymentsType$inboundSchema;
1465
-
1466
- /**
1467
- * @internal
1468
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1469
- */
1470
- export namespace Deployments2DeploymentsType$ {
1471
- /** @deprecated use `Deployments2DeploymentsType$inboundSchema` instead. */
1472
- export const inboundSchema = Deployments2DeploymentsType$inboundSchema;
1473
- /** @deprecated use `Deployments2DeploymentsType$outboundSchema` instead. */
1474
- export const outboundSchema = Deployments2DeploymentsType$outboundSchema;
1475
- }
1476
-
1477
- /** @internal */
1478
- export const Deployments21$inboundSchema: z.ZodType<
1479
- Deployments21,
1480
- z.ZodTypeDef,
1481
- unknown
1482
- > = z.object({
1483
- type: Deployments2DeploymentsType$inboundSchema,
1484
- text: z.string(),
1485
- });
1486
-
1487
- /** @internal */
1488
- export type Deployments21$Outbound = {
1489
- type: string;
1490
- text: string;
1491
- };
1492
-
1493
- /** @internal */
1494
- export const Deployments21$outboundSchema: z.ZodType<
1495
- Deployments21$Outbound,
1496
- z.ZodTypeDef,
1497
- Deployments21
1498
- > = z.object({
1499
- type: Deployments2DeploymentsType$outboundSchema,
1500
- text: z.string(),
1501
- });
1502
-
1503
- /**
1504
- * @internal
1505
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1506
- */
1507
- export namespace Deployments21$ {
1508
- /** @deprecated use `Deployments21$inboundSchema` instead. */
1509
- export const inboundSchema = Deployments21$inboundSchema;
1510
- /** @deprecated use `Deployments21$outboundSchema` instead. */
1511
- export const outboundSchema = Deployments21$outboundSchema;
1512
- /** @deprecated use `Deployments21$Outbound` instead. */
1513
- export type Outbound = Deployments21$Outbound;
1514
- }
1515
-
1516
- export function deployments21ToJSON(deployments21: Deployments21): string {
1517
- return JSON.stringify(Deployments21$outboundSchema.parse(deployments21));
1518
- }
1519
-
1520
- export function deployments21FromJSON(
1521
- jsonString: string,
1522
- ): SafeParseResult<Deployments21, SDKValidationError> {
1523
- return safeParse(
1524
- jsonString,
1525
- (x) => Deployments21$inboundSchema.parse(JSON.parse(x)),
1526
- `Failed to parse 'Deployments21' from JSON`,
1527
- );
1528
- }
1529
-
1530
- /** @internal */
1531
- export const DeploymentsContent2$inboundSchema: z.ZodType<
1532
- DeploymentsContent2,
1533
- z.ZodTypeDef,
1534
- unknown
1535
- > = z.union([
1536
- z.lazy(() => Deployments21$inboundSchema),
1537
- z.lazy(() => Deployments22$inboundSchema),
1538
- ]);
1539
-
1540
- /** @internal */
1541
- export type DeploymentsContent2$Outbound =
1542
- | Deployments21$Outbound
1543
- | Deployments22$Outbound;
1544
-
1545
- /** @internal */
1546
- export const DeploymentsContent2$outboundSchema: z.ZodType<
1547
- DeploymentsContent2$Outbound,
1548
- z.ZodTypeDef,
1549
- DeploymentsContent2
1550
- > = z.union([
1551
- z.lazy(() => Deployments21$outboundSchema),
1552
- z.lazy(() => Deployments22$outboundSchema),
1553
- ]);
1554
-
1555
- /**
1556
- * @internal
1557
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1558
- */
1559
- export namespace DeploymentsContent2$ {
1560
- /** @deprecated use `DeploymentsContent2$inboundSchema` instead. */
1561
- export const inboundSchema = DeploymentsContent2$inboundSchema;
1562
- /** @deprecated use `DeploymentsContent2$outboundSchema` instead. */
1563
- export const outboundSchema = DeploymentsContent2$outboundSchema;
1564
- /** @deprecated use `DeploymentsContent2$Outbound` instead. */
1565
- export type Outbound = DeploymentsContent2$Outbound;
1566
- }
1567
-
1568
- export function deploymentsContent2ToJSON(
1569
- deploymentsContent2: DeploymentsContent2,
1570
- ): string {
1571
- return JSON.stringify(
1572
- DeploymentsContent2$outboundSchema.parse(deploymentsContent2),
1573
- );
1574
- }
1575
-
1576
- export function deploymentsContent2FromJSON(
1577
- jsonString: string,
1578
- ): SafeParseResult<DeploymentsContent2, SDKValidationError> {
1579
- return safeParse(
1580
- jsonString,
1581
- (x) => DeploymentsContent2$inboundSchema.parse(JSON.parse(x)),
1582
- `Failed to parse 'DeploymentsContent2' from JSON`,
1583
- );
1584
- }
1585
-
1586
- /** @internal */
1587
- export const DeploymentsContent$inboundSchema: z.ZodType<
1588
- DeploymentsContent,
1589
- z.ZodTypeDef,
1590
- unknown
1591
- > = z.union([
1592
- z.string(),
1593
- z.array(z.union([
1594
- z.lazy(() => Deployments21$inboundSchema),
1595
- z.lazy(() => Deployments22$inboundSchema),
1596
- ])),
1597
- ]);
1598
-
1599
- /** @internal */
1600
- export type DeploymentsContent$Outbound =
1601
- | string
1602
- | Array<Deployments21$Outbound | Deployments22$Outbound>;
1603
-
1604
- /** @internal */
1605
- export const DeploymentsContent$outboundSchema: z.ZodType<
1606
- DeploymentsContent$Outbound,
1607
- z.ZodTypeDef,
1608
- DeploymentsContent
1609
- > = z.union([
1610
- z.string(),
1611
- z.array(z.union([
1612
- z.lazy(() => Deployments21$outboundSchema),
1613
- z.lazy(() => Deployments22$outboundSchema),
1614
- ])),
1615
- ]);
1616
-
1617
- /**
1618
- * @internal
1619
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1620
- */
1621
- export namespace DeploymentsContent$ {
1622
- /** @deprecated use `DeploymentsContent$inboundSchema` instead. */
1623
- export const inboundSchema = DeploymentsContent$inboundSchema;
1624
- /** @deprecated use `DeploymentsContent$outboundSchema` instead. */
1625
- export const outboundSchema = DeploymentsContent$outboundSchema;
1626
- /** @deprecated use `DeploymentsContent$Outbound` instead. */
1627
- export type Outbound = DeploymentsContent$Outbound;
1628
- }
1629
-
1630
- export function deploymentsContentToJSON(
1631
- deploymentsContent: DeploymentsContent,
1632
- ): string {
1633
- return JSON.stringify(
1634
- DeploymentsContent$outboundSchema.parse(deploymentsContent),
1635
- );
1636
- }
1637
-
1638
- export function deploymentsContentFromJSON(
1639
- jsonString: string,
1640
- ): SafeParseResult<DeploymentsContent, SDKValidationError> {
1641
- return safeParse(
1642
- jsonString,
1643
- (x) => DeploymentsContent$inboundSchema.parse(JSON.parse(x)),
1644
- `Failed to parse 'DeploymentsContent' from JSON`,
1645
- );
1646
- }
1647
-
1648
- /** @internal */
1649
- export const DeploymentsDeploymentsType$inboundSchema: z.ZodNativeEnum<
1650
- typeof DeploymentsDeploymentsType
1651
- > = z.nativeEnum(DeploymentsDeploymentsType);
1652
-
1653
- /** @internal */
1654
- export const DeploymentsDeploymentsType$outboundSchema: z.ZodNativeEnum<
1655
- typeof DeploymentsDeploymentsType
1656
- > = DeploymentsDeploymentsType$inboundSchema;
1657
-
1658
- /**
1659
- * @internal
1660
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1661
- */
1662
- export namespace DeploymentsDeploymentsType$ {
1663
- /** @deprecated use `DeploymentsDeploymentsType$inboundSchema` instead. */
1664
- export const inboundSchema = DeploymentsDeploymentsType$inboundSchema;
1665
- /** @deprecated use `DeploymentsDeploymentsType$outboundSchema` instead. */
1666
- export const outboundSchema = DeploymentsDeploymentsType$outboundSchema;
1667
- }
1668
-
1669
- /** @internal */
1670
- export const DeploymentsDeploymentsFunction$inboundSchema: z.ZodType<
1671
- DeploymentsDeploymentsFunction,
1672
- z.ZodTypeDef,
1673
- unknown
1674
- > = z.object({
1675
- name: z.string(),
1676
- arguments: z.string(),
1677
- });
1678
-
1679
- /** @internal */
1680
- export type DeploymentsDeploymentsFunction$Outbound = {
1681
- name: string;
1682
- arguments: string;
1683
- };
1684
-
1685
- /** @internal */
1686
- export const DeploymentsDeploymentsFunction$outboundSchema: z.ZodType<
1687
- DeploymentsDeploymentsFunction$Outbound,
1688
- z.ZodTypeDef,
1689
- DeploymentsDeploymentsFunction
1690
- > = z.object({
1691
- name: z.string(),
1692
- arguments: z.string(),
1693
- });
1694
-
1695
- /**
1696
- * @internal
1697
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1698
- */
1699
- export namespace DeploymentsDeploymentsFunction$ {
1700
- /** @deprecated use `DeploymentsDeploymentsFunction$inboundSchema` instead. */
1701
- export const inboundSchema = DeploymentsDeploymentsFunction$inboundSchema;
1702
- /** @deprecated use `DeploymentsDeploymentsFunction$outboundSchema` instead. */
1703
- export const outboundSchema = DeploymentsDeploymentsFunction$outboundSchema;
1704
- /** @deprecated use `DeploymentsDeploymentsFunction$Outbound` instead. */
1705
- export type Outbound = DeploymentsDeploymentsFunction$Outbound;
1706
- }
1707
-
1708
- export function deploymentsDeploymentsFunctionToJSON(
1709
- deploymentsDeploymentsFunction: DeploymentsDeploymentsFunction,
1710
- ): string {
1711
- return JSON.stringify(
1712
- DeploymentsDeploymentsFunction$outboundSchema.parse(
1713
- deploymentsDeploymentsFunction,
1714
- ),
1715
- );
1716
- }
1717
-
1718
- export function deploymentsDeploymentsFunctionFromJSON(
1719
- jsonString: string,
1720
- ): SafeParseResult<DeploymentsDeploymentsFunction, SDKValidationError> {
1721
- return safeParse(
1722
- jsonString,
1723
- (x) => DeploymentsDeploymentsFunction$inboundSchema.parse(JSON.parse(x)),
1724
- `Failed to parse 'DeploymentsDeploymentsFunction' from JSON`,
1725
- );
1726
- }
1727
-
1728
- /** @internal */
1729
- export const DeploymentsToolCalls$inboundSchema: z.ZodType<
1730
- DeploymentsToolCalls,
1731
- z.ZodTypeDef,
1732
- unknown
1733
- > = z.object({
1734
- id: z.string().optional(),
1735
- index: z.number().optional(),
1736
- type: DeploymentsDeploymentsType$inboundSchema,
1737
- function: z.lazy(() => DeploymentsDeploymentsFunction$inboundSchema),
1738
- });
1739
-
1740
- /** @internal */
1741
- export type DeploymentsToolCalls$Outbound = {
1742
- id?: string | undefined;
1743
- index?: number | undefined;
1744
- type: string;
1745
- function: DeploymentsDeploymentsFunction$Outbound;
1746
- };
1747
-
1748
- /** @internal */
1749
- export const DeploymentsToolCalls$outboundSchema: z.ZodType<
1750
- DeploymentsToolCalls$Outbound,
1751
- z.ZodTypeDef,
1752
- DeploymentsToolCalls
1753
- > = z.object({
1754
- id: z.string().optional(),
1755
- index: z.number().optional(),
1756
- type: DeploymentsDeploymentsType$outboundSchema,
1757
- function: z.lazy(() => DeploymentsDeploymentsFunction$outboundSchema),
1758
- });
1759
-
1760
- /**
1761
- * @internal
1762
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1763
- */
1764
- export namespace DeploymentsToolCalls$ {
1765
- /** @deprecated use `DeploymentsToolCalls$inboundSchema` instead. */
1766
- export const inboundSchema = DeploymentsToolCalls$inboundSchema;
1767
- /** @deprecated use `DeploymentsToolCalls$outboundSchema` instead. */
1768
- export const outboundSchema = DeploymentsToolCalls$outboundSchema;
1769
- /** @deprecated use `DeploymentsToolCalls$Outbound` instead. */
1770
- export type Outbound = DeploymentsToolCalls$Outbound;
1771
- }
1772
-
1773
- export function deploymentsToolCallsToJSON(
1774
- deploymentsToolCalls: DeploymentsToolCalls,
1775
- ): string {
1776
- return JSON.stringify(
1777
- DeploymentsToolCalls$outboundSchema.parse(deploymentsToolCalls),
1778
- );
1779
- }
1780
-
1781
- export function deploymentsToolCallsFromJSON(
1782
- jsonString: string,
1783
- ): SafeParseResult<DeploymentsToolCalls, SDKValidationError> {
1784
- return safeParse(
1785
- jsonString,
1786
- (x) => DeploymentsToolCalls$inboundSchema.parse(JSON.parse(x)),
1787
- `Failed to parse 'DeploymentsToolCalls' from JSON`,
1788
- );
1789
- }
1790
-
1791
- /** @internal */
1792
- export const DeploymentsMessages$inboundSchema: z.ZodType<
1793
- DeploymentsMessages,
1794
- z.ZodTypeDef,
1795
- unknown
1796
- > = z.object({
1797
- role: DeploymentsRole$inboundSchema,
1798
- content: z.union([
1799
- z.string(),
1800
- z.array(z.union([
1801
- z.lazy(() => Deployments21$inboundSchema),
1802
- z.lazy(() => Deployments22$inboundSchema),
1803
- ])),
1804
- ]),
1805
- tool_calls: z.array(z.lazy(() => DeploymentsToolCalls$inboundSchema))
1806
- .optional(),
1807
- }).transform((v) => {
1808
- return remap$(v, {
1809
- "tool_calls": "toolCalls",
1810
- });
1811
- });
1812
-
1813
- /** @internal */
1814
- export type DeploymentsMessages$Outbound = {
1815
- role: string;
1816
- content: string | Array<Deployments21$Outbound | Deployments22$Outbound>;
1817
- tool_calls?: Array<DeploymentsToolCalls$Outbound> | undefined;
1818
- };
1819
-
1820
- /** @internal */
1821
- export const DeploymentsMessages$outboundSchema: z.ZodType<
1822
- DeploymentsMessages$Outbound,
1823
- z.ZodTypeDef,
1824
- DeploymentsMessages
1825
- > = z.object({
1826
- role: DeploymentsRole$outboundSchema,
1827
- content: z.union([
1828
- z.string(),
1829
- z.array(z.union([
1830
- z.lazy(() => Deployments21$outboundSchema),
1831
- z.lazy(() => Deployments22$outboundSchema),
1832
- ])),
1833
- ]),
1834
- toolCalls: z.array(z.lazy(() => DeploymentsToolCalls$outboundSchema))
1835
- .optional(),
1836
- }).transform((v) => {
1837
- return remap$(v, {
1838
- toolCalls: "tool_calls",
1839
- });
1840
- });
1841
-
1842
- /**
1843
- * @internal
1844
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1845
- */
1846
- export namespace DeploymentsMessages$ {
1847
- /** @deprecated use `DeploymentsMessages$inboundSchema` instead. */
1848
- export const inboundSchema = DeploymentsMessages$inboundSchema;
1849
- /** @deprecated use `DeploymentsMessages$outboundSchema` instead. */
1850
- export const outboundSchema = DeploymentsMessages$outboundSchema;
1851
- /** @deprecated use `DeploymentsMessages$Outbound` instead. */
1852
- export type Outbound = DeploymentsMessages$Outbound;
1853
- }
1854
-
1855
- export function deploymentsMessagesToJSON(
1856
- deploymentsMessages: DeploymentsMessages,
1857
- ): string {
1858
- return JSON.stringify(
1859
- DeploymentsMessages$outboundSchema.parse(deploymentsMessages),
1860
- );
1861
- }
1862
-
1863
- export function deploymentsMessagesFromJSON(
1864
- jsonString: string,
1865
- ): SafeParseResult<DeploymentsMessages, SDKValidationError> {
1866
- return safeParse(
1867
- jsonString,
1868
- (x) => DeploymentsMessages$inboundSchema.parse(JSON.parse(x)),
1869
- `Failed to parse 'DeploymentsMessages' from JSON`,
1870
- );
1871
- }
1872
-
1873
- /** @internal */
1874
- export const DeploymentsPromptConfig$inboundSchema: z.ZodType<
1875
- DeploymentsPromptConfig,
1876
- z.ZodTypeDef,
1877
- unknown
1878
- > = z.object({
1879
- tools: z.array(z.lazy(() => DeploymentsTools$inboundSchema)),
1880
- model: z.string(),
1881
- model_type: DeploymentsModelType$inboundSchema,
1882
- model_parameters: z.lazy(() => DeploymentsModelParameters$inboundSchema),
1883
- provider: DeploymentsProvider$inboundSchema,
1884
- messages: z.array(z.lazy(() => DeploymentsMessages$inboundSchema)),
1885
- }).transform((v) => {
1886
- return remap$(v, {
1887
- "model_type": "modelType",
1888
- "model_parameters": "modelParameters",
1889
- });
1890
- });
1891
-
1892
- /** @internal */
1893
- export type DeploymentsPromptConfig$Outbound = {
1894
- tools: Array<DeploymentsTools$Outbound>;
1895
- model: string;
1896
- model_type: string;
1897
- model_parameters: DeploymentsModelParameters$Outbound;
1898
- provider: string;
1899
- messages: Array<DeploymentsMessages$Outbound>;
1900
- };
1901
-
1902
- /** @internal */
1903
- export const DeploymentsPromptConfig$outboundSchema: z.ZodType<
1904
- DeploymentsPromptConfig$Outbound,
1905
- z.ZodTypeDef,
1906
- DeploymentsPromptConfig
1907
- > = z.object({
1908
- tools: z.array(z.lazy(() => DeploymentsTools$outboundSchema)),
1909
- model: z.string(),
1910
- modelType: DeploymentsModelType$outboundSchema,
1911
- modelParameters: z.lazy(() => DeploymentsModelParameters$outboundSchema),
1912
- provider: DeploymentsProvider$outboundSchema,
1913
- messages: z.array(z.lazy(() => DeploymentsMessages$outboundSchema)),
1914
- }).transform((v) => {
1915
- return remap$(v, {
1916
- modelType: "model_type",
1917
- modelParameters: "model_parameters",
1918
- });
1919
- });
1920
-
1921
- /**
1922
- * @internal
1923
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1924
- */
1925
- export namespace DeploymentsPromptConfig$ {
1926
- /** @deprecated use `DeploymentsPromptConfig$inboundSchema` instead. */
1927
- export const inboundSchema = DeploymentsPromptConfig$inboundSchema;
1928
- /** @deprecated use `DeploymentsPromptConfig$outboundSchema` instead. */
1929
- export const outboundSchema = DeploymentsPromptConfig$outboundSchema;
1930
- /** @deprecated use `DeploymentsPromptConfig$Outbound` instead. */
1931
- export type Outbound = DeploymentsPromptConfig$Outbound;
1932
- }
1933
-
1934
- export function deploymentsPromptConfigToJSON(
1935
- deploymentsPromptConfig: DeploymentsPromptConfig,
1936
- ): string {
1937
- return JSON.stringify(
1938
- DeploymentsPromptConfig$outboundSchema.parse(deploymentsPromptConfig),
1939
- );
1940
- }
1941
-
1942
- export function deploymentsPromptConfigFromJSON(
1943
- jsonString: string,
1944
- ): SafeParseResult<DeploymentsPromptConfig, SDKValidationError> {
1945
- return safeParse(
1946
- jsonString,
1947
- (x) => DeploymentsPromptConfig$inboundSchema.parse(JSON.parse(x)),
1948
- `Failed to parse 'DeploymentsPromptConfig' from JSON`,
1949
- );
1950
- }
1951
-
1952
- /** @internal */
1953
- export const Data$inboundSchema: z.ZodType<Data, z.ZodTypeDef, unknown> = z
1954
- .object({
1955
- id: z.string(),
1956
- created: z.string(),
1957
- updated: z.string(),
1958
- key: z.string(),
1959
- description: z.string(),
1960
- prompt_config: z.lazy(() => DeploymentsPromptConfig$inboundSchema),
1961
- version: z.string(),
1962
- }).transform((v) => {
1963
- return remap$(v, {
1964
- "prompt_config": "promptConfig",
1965
- });
1966
- });
1967
-
1968
- /** @internal */
1969
- export type Data$Outbound = {
1970
- id: string;
1971
- created: string;
1972
- updated: string;
1973
- key: string;
1974
- description: string;
1975
- prompt_config: DeploymentsPromptConfig$Outbound;
1976
- version: string;
1977
- };
1978
-
1979
- /** @internal */
1980
- export const Data$outboundSchema: z.ZodType<Data$Outbound, z.ZodTypeDef, Data> =
1981
- z.object({
1982
- id: z.string(),
1983
- created: z.string(),
1984
- updated: z.string(),
1985
- key: z.string(),
1986
- description: z.string(),
1987
- promptConfig: z.lazy(() => DeploymentsPromptConfig$outboundSchema),
1988
- version: z.string(),
1989
- }).transform((v) => {
1990
- return remap$(v, {
1991
- promptConfig: "prompt_config",
1992
- });
1993
- });
1994
-
1995
- /**
1996
- * @internal
1997
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1998
- */
1999
- export namespace Data$ {
2000
- /** @deprecated use `Data$inboundSchema` instead. */
2001
- export const inboundSchema = Data$inboundSchema;
2002
- /** @deprecated use `Data$outboundSchema` instead. */
2003
- export const outboundSchema = Data$outboundSchema;
2004
- /** @deprecated use `Data$Outbound` instead. */
2005
- export type Outbound = Data$Outbound;
2006
- }
2007
-
2008
- export function dataToJSON(data: Data): string {
2009
- return JSON.stringify(Data$outboundSchema.parse(data));
2010
- }
2011
-
2012
- export function dataFromJSON(
2013
- jsonString: string,
2014
- ): SafeParseResult<Data, SDKValidationError> {
2015
- return safeParse(
2016
- jsonString,
2017
- (x) => Data$inboundSchema.parse(JSON.parse(x)),
2018
- `Failed to parse 'Data' from JSON`,
2019
- );
2020
- }
2021
-
2022
- /** @internal */
2023
- export const DeploymentsResponseBody$inboundSchema: z.ZodType<
2024
- DeploymentsResponseBody,
2025
- z.ZodTypeDef,
2026
- unknown
2027
- > = z.object({
2028
- object: ObjectT$inboundSchema,
2029
- data: z.array(z.lazy(() => Data$inboundSchema)),
2030
- has_more: z.boolean(),
2031
- first_id: z.nullable(z.string()),
2032
- last_id: z.nullable(z.string()),
2033
- }).transform((v) => {
2034
- return remap$(v, {
2035
- "has_more": "hasMore",
2036
- "first_id": "firstId",
2037
- "last_id": "lastId",
2038
- });
2039
- });
2040
-
2041
- /** @internal */
2042
- export type DeploymentsResponseBody$Outbound = {
2043
- object: string;
2044
- data: Array<Data$Outbound>;
2045
- has_more: boolean;
2046
- first_id: string | null;
2047
- last_id: string | null;
2048
- };
2049
-
2050
- /** @internal */
2051
- export const DeploymentsResponseBody$outboundSchema: z.ZodType<
2052
- DeploymentsResponseBody$Outbound,
2053
- z.ZodTypeDef,
2054
- DeploymentsResponseBody
2055
- > = z.object({
2056
- object: ObjectT$outboundSchema,
2057
- data: z.array(z.lazy(() => Data$outboundSchema)),
2058
- hasMore: z.boolean(),
2059
- firstId: z.nullable(z.string()),
2060
- lastId: z.nullable(z.string()),
2061
- }).transform((v) => {
2062
- return remap$(v, {
2063
- hasMore: "has_more",
2064
- firstId: "first_id",
2065
- lastId: "last_id",
2066
- });
2067
- });
2068
-
2069
- /**
2070
- * @internal
2071
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2072
- */
2073
- export namespace DeploymentsResponseBody$ {
2074
- /** @deprecated use `DeploymentsResponseBody$inboundSchema` instead. */
2075
- export const inboundSchema = DeploymentsResponseBody$inboundSchema;
2076
- /** @deprecated use `DeploymentsResponseBody$outboundSchema` instead. */
2077
- export const outboundSchema = DeploymentsResponseBody$outboundSchema;
2078
- /** @deprecated use `DeploymentsResponseBody$Outbound` instead. */
2079
- export type Outbound = DeploymentsResponseBody$Outbound;
2080
- }
2081
-
2082
- export function deploymentsResponseBodyToJSON(
2083
- deploymentsResponseBody: DeploymentsResponseBody,
2084
- ): string {
2085
- return JSON.stringify(
2086
- DeploymentsResponseBody$outboundSchema.parse(deploymentsResponseBody),
2087
- );
2088
- }
2089
-
2090
- export function deploymentsResponseBodyFromJSON(
2091
- jsonString: string,
2092
- ): SafeParseResult<DeploymentsResponseBody, SDKValidationError> {
2093
- return safeParse(
2094
- jsonString,
2095
- (x) => DeploymentsResponseBody$inboundSchema.parse(JSON.parse(x)),
2096
- `Failed to parse 'DeploymentsResponseBody' from JSON`,
2097
- );
2098
- }