ogx-client 0.7.2-rc1

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 (552) hide show
  1. package/CHANGELOG.md +512 -0
  2. package/LICENSE +7 -0
  3. package/README.md +391 -0
  4. package/_shims/MultipartBody.d.ts +9 -0
  5. package/_shims/MultipartBody.d.ts.map +1 -0
  6. package/_shims/MultipartBody.js +21 -0
  7. package/_shims/MultipartBody.js.map +1 -0
  8. package/_shims/MultipartBody.mjs +17 -0
  9. package/_shims/MultipartBody.mjs.map +1 -0
  10. package/_shims/README.md +46 -0
  11. package/_shims/auto/runtime-bun.d.ts +5 -0
  12. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  13. package/_shims/auto/runtime-bun.js +26 -0
  14. package/_shims/auto/runtime-bun.js.map +1 -0
  15. package/_shims/auto/runtime-bun.mjs +7 -0
  16. package/_shims/auto/runtime-bun.mjs.map +1 -0
  17. package/_shims/auto/runtime-node.d.ts +5 -0
  18. package/_shims/auto/runtime-node.d.ts.map +1 -0
  19. package/_shims/auto/runtime-node.js +26 -0
  20. package/_shims/auto/runtime-node.js.map +1 -0
  21. package/_shims/auto/runtime-node.mjs +7 -0
  22. package/_shims/auto/runtime-node.mjs.map +1 -0
  23. package/_shims/auto/runtime.d.ts +5 -0
  24. package/_shims/auto/runtime.d.ts.map +1 -0
  25. package/_shims/auto/runtime.js +26 -0
  26. package/_shims/auto/runtime.js.map +1 -0
  27. package/_shims/auto/runtime.mjs +7 -0
  28. package/_shims/auto/runtime.mjs.map +1 -0
  29. package/_shims/auto/types-node.d.ts +5 -0
  30. package/_shims/auto/types-node.d.ts.map +1 -0
  31. package/_shims/auto/types-node.js +26 -0
  32. package/_shims/auto/types-node.js.map +1 -0
  33. package/_shims/auto/types-node.mjs +7 -0
  34. package/_shims/auto/types-node.mjs.map +1 -0
  35. package/_shims/auto/types.d.ts +107 -0
  36. package/_shims/auto/types.js +9 -0
  37. package/_shims/auto/types.mjs +10 -0
  38. package/_shims/bun-runtime.d.ts +6 -0
  39. package/_shims/bun-runtime.d.ts.map +1 -0
  40. package/_shims/bun-runtime.js +19 -0
  41. package/_shims/bun-runtime.js.map +1 -0
  42. package/_shims/bun-runtime.mjs +15 -0
  43. package/_shims/bun-runtime.mjs.map +1 -0
  44. package/_shims/index.d.ts +89 -0
  45. package/_shims/index.js +23 -0
  46. package/_shims/index.mjs +18 -0
  47. package/_shims/manual-types.d.ts +18 -0
  48. package/_shims/manual-types.js +9 -0
  49. package/_shims/manual-types.mjs +10 -0
  50. package/_shims/node-runtime.d.ts +3 -0
  51. package/_shims/node-runtime.d.ts.map +1 -0
  52. package/_shims/node-runtime.js +94 -0
  53. package/_shims/node-runtime.js.map +1 -0
  54. package/_shims/node-runtime.mjs +61 -0
  55. package/_shims/node-runtime.mjs.map +1 -0
  56. package/_shims/node-types.d.ts +48 -0
  57. package/_shims/node-types.js +9 -0
  58. package/_shims/node-types.mjs +10 -0
  59. package/_shims/registry.d.ts +37 -0
  60. package/_shims/registry.d.ts.map +1 -0
  61. package/_shims/registry.js +46 -0
  62. package/_shims/registry.js.map +1 -0
  63. package/_shims/registry.mjs +42 -0
  64. package/_shims/registry.mjs.map +1 -0
  65. package/_shims/web-runtime.d.ts +5 -0
  66. package/_shims/web-runtime.d.ts.map +1 -0
  67. package/_shims/web-runtime.js +83 -0
  68. package/_shims/web-runtime.js.map +1 -0
  69. package/_shims/web-runtime.mjs +76 -0
  70. package/_shims/web-runtime.mjs.map +1 -0
  71. package/_shims/web-types.d.ts +89 -0
  72. package/_shims/web-types.js +9 -0
  73. package/_shims/web-types.mjs +10 -0
  74. package/core.d.ts +257 -0
  75. package/core.d.ts.map +1 -0
  76. package/core.js +936 -0
  77. package/core.js.map +1 -0
  78. package/core.mjs +904 -0
  79. package/core.mjs.map +1 -0
  80. package/error.d.ts +47 -0
  81. package/error.d.ts.map +1 -0
  82. package/error.js +119 -0
  83. package/error.js.map +1 -0
  84. package/error.mjs +101 -0
  85. package/error.mjs.map +1 -0
  86. package/index.d.mts +233 -0
  87. package/index.d.ts +233 -0
  88. package/index.d.ts.map +1 -0
  89. package/index.js +254 -0
  90. package/index.js.map +1 -0
  91. package/index.mjs +210 -0
  92. package/index.mjs.map +1 -0
  93. package/internal/decoders/line.d.ts +21 -0
  94. package/internal/decoders/line.d.ts.map +1 -0
  95. package/internal/decoders/line.js +155 -0
  96. package/internal/decoders/line.js.map +1 -0
  97. package/internal/decoders/line.mjs +150 -0
  98. package/internal/decoders/line.mjs.map +1 -0
  99. package/internal/qs/formats.d.ts +6 -0
  100. package/internal/qs/formats.d.ts.map +1 -0
  101. package/internal/qs/formats.js +16 -0
  102. package/internal/qs/formats.js.map +1 -0
  103. package/internal/qs/formats.mjs +13 -0
  104. package/internal/qs/formats.mjs.map +1 -0
  105. package/internal/qs/index.d.ts +10 -0
  106. package/internal/qs/index.d.ts.map +1 -0
  107. package/internal/qs/index.js +19 -0
  108. package/internal/qs/index.js.map +1 -0
  109. package/internal/qs/index.mjs +15 -0
  110. package/internal/qs/index.mjs.map +1 -0
  111. package/internal/qs/stringify.d.ts +3 -0
  112. package/internal/qs/stringify.d.ts.map +1 -0
  113. package/internal/qs/stringify.js +285 -0
  114. package/internal/qs/stringify.js.map +1 -0
  115. package/internal/qs/stringify.mjs +281 -0
  116. package/internal/qs/stringify.mjs.map +1 -0
  117. package/internal/qs/types.d.ts +57 -0
  118. package/internal/qs/types.d.ts.map +1 -0
  119. package/internal/qs/types.js +8 -0
  120. package/internal/qs/types.js.map +1 -0
  121. package/internal/qs/types.mjs +7 -0
  122. package/internal/qs/types.mjs.map +1 -0
  123. package/internal/qs/utils.d.ts +14 -0
  124. package/internal/qs/utils.d.ts.map +1 -0
  125. package/internal/qs/utils.js +234 -0
  126. package/internal/qs/utils.js.map +1 -0
  127. package/internal/qs/utils.mjs +222 -0
  128. package/internal/qs/utils.mjs.map +1 -0
  129. package/internal/stream-utils.d.ts +8 -0
  130. package/internal/stream-utils.d.ts.map +1 -0
  131. package/internal/stream-utils.js +44 -0
  132. package/internal/stream-utils.js.map +1 -0
  133. package/internal/stream-utils.mjs +40 -0
  134. package/internal/stream-utils.mjs.map +1 -0
  135. package/internal/utils/query.d.ts +2 -0
  136. package/internal/utils/query.d.ts.map +1 -0
  137. package/internal/utils/query.js +39 -0
  138. package/internal/utils/query.js.map +1 -0
  139. package/internal/utils/query.mjs +12 -0
  140. package/internal/utils/query.mjs.map +1 -0
  141. package/lib/response-helpers.d.ts +23 -0
  142. package/lib/response-helpers.d.ts.map +1 -0
  143. package/lib/response-helpers.js +53 -0
  144. package/lib/response-helpers.js.map +1 -0
  145. package/lib/response-helpers.mjs +49 -0
  146. package/lib/response-helpers.mjs.map +1 -0
  147. package/ogx-client-0.7.2-rc1.tgz +0 -0
  148. package/package.json +108 -0
  149. package/pagination.d.ts +21 -0
  150. package/pagination.d.ts.map +1 -0
  151. package/pagination.js +53 -0
  152. package/pagination.js.map +1 -0
  153. package/pagination.mjs +47 -0
  154. package/pagination.mjs.map +1 -0
  155. package/resource.d.ts +6 -0
  156. package/resource.d.ts.map +1 -0
  157. package/resource.js +15 -0
  158. package/resource.js.map +1 -0
  159. package/resource.mjs +11 -0
  160. package/resource.mjs.map +1 -0
  161. package/resources/alpha/admin.d.ts +44 -0
  162. package/resources/alpha/admin.d.ts.map +1 -0
  163. package/resources/alpha/admin.js +49 -0
  164. package/resources/alpha/admin.js.map +1 -0
  165. package/resources/alpha/admin.mjs +45 -0
  166. package/resources/alpha/admin.mjs.map +1 -0
  167. package/resources/alpha/alpha.d.ts +14 -0
  168. package/resources/alpha/alpha.d.ts.map +1 -0
  169. package/resources/alpha/alpha.js +49 -0
  170. package/resources/alpha/alpha.js.map +1 -0
  171. package/resources/alpha/alpha.mjs +22 -0
  172. package/resources/alpha/alpha.mjs.map +1 -0
  173. package/resources/alpha/benchmarks.d.ts +104 -0
  174. package/resources/alpha/benchmarks.d.ts.map +1 -0
  175. package/resources/alpha/benchmarks.js +50 -0
  176. package/resources/alpha/benchmarks.js.map +1 -0
  177. package/resources/alpha/benchmarks.mjs +44 -0
  178. package/resources/alpha/benchmarks.mjs.map +1 -0
  179. package/resources/alpha/index.d.ts +4 -0
  180. package/resources/alpha/index.d.ts.map +1 -0
  181. package/resources/alpha/index.js +17 -0
  182. package/resources/alpha/index.js.map +1 -0
  183. package/resources/alpha/index.mjs +11 -0
  184. package/resources/alpha/index.mjs.map +1 -0
  185. package/resources/alpha/inference.d.ts +144 -0
  186. package/resources/alpha/inference.d.ts.map +1 -0
  187. package/resources/alpha/inference.js +29 -0
  188. package/resources/alpha/inference.js.map +1 -0
  189. package/resources/alpha/inference.mjs +25 -0
  190. package/resources/alpha/inference.mjs.map +1 -0
  191. package/resources/alpha.d.ts +2 -0
  192. package/resources/alpha.d.ts.map +1 -0
  193. package/resources/alpha.js +25 -0
  194. package/resources/alpha.js.map +1 -0
  195. package/resources/alpha.mjs +9 -0
  196. package/resources/alpha.mjs.map +1 -0
  197. package/resources/batches.d.ts +442 -0
  198. package/resources/batches.d.ts.map +1 -0
  199. package/resources/batches.js +53 -0
  200. package/resources/batches.js.map +1 -0
  201. package/resources/batches.mjs +48 -0
  202. package/resources/batches.mjs.map +1 -0
  203. package/resources/chat/chat.d.ts +276 -0
  204. package/resources/chat/chat.d.ts.map +1 -0
  205. package/resources/chat/chat.js +45 -0
  206. package/resources/chat/chat.js.map +1 -0
  207. package/resources/chat/chat.mjs +18 -0
  208. package/resources/chat/chat.mjs.map +1 -0
  209. package/resources/chat/completions.d.ts +2021 -0
  210. package/resources/chat/completions.d.ts.map +1 -0
  211. package/resources/chat/completions.js +39 -0
  212. package/resources/chat/completions.js.map +1 -0
  213. package/resources/chat/completions.mjs +35 -0
  214. package/resources/chat/completions.mjs.map +1 -0
  215. package/resources/chat/index.d.ts +3 -0
  216. package/resources/chat/index.d.ts.map +1 -0
  217. package/resources/chat/index.js +15 -0
  218. package/resources/chat/index.js.map +1 -0
  219. package/resources/chat/index.mjs +10 -0
  220. package/resources/chat/index.mjs.map +1 -0
  221. package/resources/chat.d.ts +2 -0
  222. package/resources/chat.d.ts.map +1 -0
  223. package/resources/chat.js +25 -0
  224. package/resources/chat.js.map +1 -0
  225. package/resources/chat.mjs +9 -0
  226. package/resources/chat.mjs.map +1 -0
  227. package/resources/completions.d.ts +273 -0
  228. package/resources/completions.d.ts.map +1 -0
  229. package/resources/completions.js +26 -0
  230. package/resources/completions.js.map +1 -0
  231. package/resources/completions.mjs +22 -0
  232. package/resources/completions.mjs.map +1 -0
  233. package/resources/conversations/conversations.d.ts +429 -0
  234. package/resources/conversations/conversations.d.ts.map +1 -0
  235. package/resources/conversations/conversations.js +73 -0
  236. package/resources/conversations/conversations.js.map +1 -0
  237. package/resources/conversations/conversations.mjs +46 -0
  238. package/resources/conversations/conversations.mjs.map +1 -0
  239. package/resources/conversations/index.d.ts +3 -0
  240. package/resources/conversations/index.d.ts.map +1 -0
  241. package/resources/conversations/index.js +16 -0
  242. package/resources/conversations/index.js.map +1 -0
  243. package/resources/conversations/index.mjs +10 -0
  244. package/resources/conversations/index.mjs.map +1 -0
  245. package/resources/conversations/items.d.ts +1408 -0
  246. package/resources/conversations/items.d.ts.map +1 -0
  247. package/resources/conversations/items.js +48 -0
  248. package/resources/conversations/items.js.map +1 -0
  249. package/resources/conversations/items.mjs +43 -0
  250. package/resources/conversations/items.mjs.map +1 -0
  251. package/resources/conversations.d.ts +2 -0
  252. package/resources/conversations.d.ts.map +1 -0
  253. package/resources/conversations.js +25 -0
  254. package/resources/conversations.js.map +1 -0
  255. package/resources/conversations.mjs +9 -0
  256. package/resources/conversations.mjs.map +1 -0
  257. package/resources/embeddings.d.ts +98 -0
  258. package/resources/embeddings.d.ts.map +1 -0
  259. package/resources/embeddings.js +30 -0
  260. package/resources/embeddings.js.map +1 -0
  261. package/resources/embeddings.mjs +26 -0
  262. package/resources/embeddings.mjs.map +1 -0
  263. package/resources/files.d.ts +159 -0
  264. package/resources/files.d.ts.map +1 -0
  265. package/resources/files.js +78 -0
  266. package/resources/files.js.map +1 -0
  267. package/resources/files.mjs +50 -0
  268. package/resources/files.mjs.map +1 -0
  269. package/resources/index.d.ts +20 -0
  270. package/resources/index.d.ts.map +1 -0
  271. package/resources/index.js +66 -0
  272. package/resources/index.js.map +1 -0
  273. package/resources/index.mjs +27 -0
  274. package/resources/index.mjs.map +1 -0
  275. package/resources/inspect.d.ts +17 -0
  276. package/resources/inspect.d.ts.map +1 -0
  277. package/resources/inspect.js +30 -0
  278. package/resources/inspect.js.map +1 -0
  279. package/resources/inspect.mjs +26 -0
  280. package/resources/inspect.mjs.map +1 -0
  281. package/resources/models/index.d.ts +3 -0
  282. package/resources/models/index.d.ts.map +1 -0
  283. package/resources/models/index.js +15 -0
  284. package/resources/models/index.js.map +1 -0
  285. package/resources/models/index.mjs +10 -0
  286. package/resources/models/index.mjs.map +1 -0
  287. package/resources/models/models.d.ts +97 -0
  288. package/resources/models/models.d.ts.map +1 -0
  289. package/resources/models/models.js +57 -0
  290. package/resources/models/models.js.map +1 -0
  291. package/resources/models/models.mjs +30 -0
  292. package/resources/models/models.mjs.map +1 -0
  293. package/resources/models/openai.d.ts +10 -0
  294. package/resources/models/openai.d.ts.map +1 -0
  295. package/resources/models/openai.js +21 -0
  296. package/resources/models/openai.js.map +1 -0
  297. package/resources/models/openai.mjs +17 -0
  298. package/resources/models/openai.mjs.map +1 -0
  299. package/resources/models.d.ts +2 -0
  300. package/resources/models.d.ts.map +1 -0
  301. package/resources/models.js +25 -0
  302. package/resources/models.js.map +1 -0
  303. package/resources/models.mjs +9 -0
  304. package/resources/models.mjs.map +1 -0
  305. package/resources/moderations.d.ts +83 -0
  306. package/resources/moderations.d.ts.map +1 -0
  307. package/resources/moderations.js +24 -0
  308. package/resources/moderations.js.map +1 -0
  309. package/resources/moderations.mjs +20 -0
  310. package/resources/moderations.mjs.map +1 -0
  311. package/resources/prompts/index.d.ts +3 -0
  312. package/resources/prompts/index.d.ts.map +1 -0
  313. package/resources/prompts/index.js +15 -0
  314. package/resources/prompts/index.js.map +1 -0
  315. package/resources/prompts/index.mjs +10 -0
  316. package/resources/prompts/index.mjs.map +1 -0
  317. package/resources/prompts/prompts.d.ts +113 -0
  318. package/resources/prompts/prompts.d.ts.map +1 -0
  319. package/resources/prompts/prompts.js +88 -0
  320. package/resources/prompts/prompts.js.map +1 -0
  321. package/resources/prompts/prompts.mjs +61 -0
  322. package/resources/prompts/prompts.mjs.map +1 -0
  323. package/resources/prompts/versions.d.ts +13 -0
  324. package/resources/prompts/versions.d.ts.map +1 -0
  325. package/resources/prompts/versions.js +24 -0
  326. package/resources/prompts/versions.js.map +1 -0
  327. package/resources/prompts/versions.mjs +20 -0
  328. package/resources/prompts/versions.mjs.map +1 -0
  329. package/resources/prompts.d.ts +2 -0
  330. package/resources/prompts.d.ts.map +1 -0
  331. package/resources/prompts.js +25 -0
  332. package/resources/prompts.js.map +1 -0
  333. package/resources/prompts.mjs +9 -0
  334. package/resources/prompts.mjs.map +1 -0
  335. package/resources/providers.d.ts +24 -0
  336. package/resources/providers.d.ts.map +1 -0
  337. package/resources/providers.js +30 -0
  338. package/resources/providers.js.map +1 -0
  339. package/resources/providers.mjs +26 -0
  340. package/resources/providers.mjs.map +1 -0
  341. package/resources/responses/index.d.ts +3 -0
  342. package/resources/responses/index.d.ts.map +1 -0
  343. package/resources/responses/index.js +16 -0
  344. package/resources/responses/index.js.map +1 -0
  345. package/resources/responses/index.mjs +10 -0
  346. package/resources/responses/index.mjs.map +1 -0
  347. package/resources/responses/input-items.d.ts +382 -0
  348. package/resources/responses/input-items.d.ts.map +1 -0
  349. package/resources/responses/input-items.js +25 -0
  350. package/resources/responses/input-items.js.map +1 -0
  351. package/resources/responses/input-items.mjs +21 -0
  352. package/resources/responses/input-items.mjs.map +1 -0
  353. package/resources/responses/responses.d.ts +4808 -0
  354. package/resources/responses/responses.d.ts.map +1 -0
  355. package/resources/responses/responses.js +85 -0
  356. package/resources/responses/responses.js.map +1 -0
  357. package/resources/responses/responses.mjs +57 -0
  358. package/resources/responses/responses.mjs.map +1 -0
  359. package/resources/responses.d.ts +2 -0
  360. package/resources/responses.d.ts.map +1 -0
  361. package/resources/responses.js +25 -0
  362. package/resources/responses.js.map +1 -0
  363. package/resources/responses.mjs +9 -0
  364. package/resources/responses.mjs.map +1 -0
  365. package/resources/routes.d.ts +30 -0
  366. package/resources/routes.d.ts.map +1 -0
  367. package/resources/routes.js +25 -0
  368. package/resources/routes.js.map +1 -0
  369. package/resources/routes.mjs +21 -0
  370. package/resources/routes.mjs.map +1 -0
  371. package/resources/safety.d.ts +297 -0
  372. package/resources/safety.d.ts.map +1 -0
  373. package/resources/safety.js +24 -0
  374. package/resources/safety.js.map +1 -0
  375. package/resources/safety.mjs +20 -0
  376. package/resources/safety.mjs.map +1 -0
  377. package/resources/shared.d.ts +447 -0
  378. package/resources/shared.d.ts.map +1 -0
  379. package/resources/shared.js +10 -0
  380. package/resources/shared.js.map +1 -0
  381. package/resources/shared.mjs +9 -0
  382. package/resources/shared.mjs.map +1 -0
  383. package/resources/shields.d.ts +82 -0
  384. package/resources/shields.d.ts.map +1 -0
  385. package/resources/shields.js +46 -0
  386. package/resources/shields.js.map +1 -0
  387. package/resources/shields.mjs +42 -0
  388. package/resources/shields.mjs.map +1 -0
  389. package/resources/vector-io.d.ts +375 -0
  390. package/resources/vector-io.d.ts.map +1 -0
  391. package/resources/vector-io.js +31 -0
  392. package/resources/vector-io.js.map +1 -0
  393. package/resources/vector-io.mjs +27 -0
  394. package/resources/vector-io.mjs.map +1 -0
  395. package/resources/vector-stores/file-batches.d.ts +268 -0
  396. package/resources/vector-stores/file-batches.d.ts.map +1 -0
  397. package/resources/vector-stores/file-batches.js +42 -0
  398. package/resources/vector-stores/file-batches.js.map +1 -0
  399. package/resources/vector-stores/file-batches.mjs +38 -0
  400. package/resources/vector-stores/file-batches.mjs.map +1 -0
  401. package/resources/vector-stores/files.d.ts +335 -0
  402. package/resources/vector-stores/files.d.ts.map +1 -0
  403. package/resources/vector-stores/files.js +60 -0
  404. package/resources/vector-stores/files.js.map +1 -0
  405. package/resources/vector-stores/files.mjs +55 -0
  406. package/resources/vector-stores/files.mjs.map +1 -0
  407. package/resources/vector-stores/index.d.ts +4 -0
  408. package/resources/vector-stores/index.d.ts.map +1 -0
  409. package/resources/vector-stores/index.js +19 -0
  410. package/resources/vector-stores/index.js.map +1 -0
  411. package/resources/vector-stores/index.mjs +11 -0
  412. package/resources/vector-stores/index.mjs.map +1 -0
  413. package/resources/vector-stores/vector-stores.d.ts +412 -0
  414. package/resources/vector-stores/vector-stores.d.ts.map +1 -0
  415. package/resources/vector-stores/vector-stores.js +92 -0
  416. package/resources/vector-stores/vector-stores.js.map +1 -0
  417. package/resources/vector-stores/vector-stores.mjs +64 -0
  418. package/resources/vector-stores/vector-stores.mjs.map +1 -0
  419. package/resources/vector-stores.d.ts +2 -0
  420. package/resources/vector-stores.d.ts.map +1 -0
  421. package/resources/vector-stores.js +25 -0
  422. package/resources/vector-stores.js.map +1 -0
  423. package/resources/vector-stores.mjs +9 -0
  424. package/resources/vector-stores.mjs.map +1 -0
  425. package/resources.d.ts +2 -0
  426. package/resources.d.ts.map +1 -0
  427. package/resources.js +23 -0
  428. package/resources.js.map +1 -0
  429. package/resources.mjs +7 -0
  430. package/resources.mjs.map +1 -0
  431. package/shims/node.d.ts +30 -0
  432. package/shims/node.d.ts.map +1 -0
  433. package/shims/node.js +36 -0
  434. package/shims/node.js.map +1 -0
  435. package/shims/node.mjs +10 -0
  436. package/shims/node.mjs.map +1 -0
  437. package/shims/web.d.ts +26 -0
  438. package/shims/web.d.ts.map +1 -0
  439. package/shims/web.js +36 -0
  440. package/shims/web.js.map +1 -0
  441. package/shims/web.mjs +10 -0
  442. package/shims/web.mjs.map +1 -0
  443. package/src/_shims/MultipartBody.ts +15 -0
  444. package/src/_shims/README.md +46 -0
  445. package/src/_shims/auto/runtime-bun.ts +10 -0
  446. package/src/_shims/auto/runtime-node.ts +10 -0
  447. package/src/_shims/auto/runtime.ts +10 -0
  448. package/src/_shims/auto/types-node.ts +10 -0
  449. package/src/_shims/auto/types.d.ts +107 -0
  450. package/src/_shims/auto/types.js +9 -0
  451. package/src/_shims/auto/types.mjs +10 -0
  452. package/src/_shims/bun-runtime.ts +20 -0
  453. package/src/_shims/index.d.ts +89 -0
  454. package/src/_shims/index.js +23 -0
  455. package/src/_shims/index.mjs +18 -0
  456. package/src/_shims/manual-types.d.ts +18 -0
  457. package/src/_shims/manual-types.js +9 -0
  458. package/src/_shims/manual-types.mjs +10 -0
  459. package/src/_shims/node-runtime.ts +87 -0
  460. package/src/_shims/node-types.d.ts +48 -0
  461. package/src/_shims/node-types.js +9 -0
  462. package/src/_shims/node-types.mjs +10 -0
  463. package/src/_shims/registry.ts +73 -0
  464. package/src/_shims/web-runtime.ts +109 -0
  465. package/src/_shims/web-types.d.ts +89 -0
  466. package/src/_shims/web-types.js +9 -0
  467. package/src/_shims/web-types.mjs +10 -0
  468. package/src/core.ts +1253 -0
  469. package/src/error.ts +137 -0
  470. package/src/index.ts +554 -0
  471. package/src/internal/decoders/line.ts +182 -0
  472. package/src/internal/qs/LICENSE.md +13 -0
  473. package/src/internal/qs/README.md +3 -0
  474. package/src/internal/qs/formats.ts +15 -0
  475. package/src/internal/qs/index.ts +19 -0
  476. package/src/internal/qs/stringify.ts +394 -0
  477. package/src/internal/qs/types.ts +77 -0
  478. package/src/internal/qs/utils.ts +271 -0
  479. package/src/internal/stream-utils.ts +38 -0
  480. package/src/internal/utils/query.ts +13 -0
  481. package/src/lib/response-helpers.ts +60 -0
  482. package/src/pagination.ts +80 -0
  483. package/src/resource.ts +18 -0
  484. package/src/resources/alpha/admin.ts +87 -0
  485. package/src/resources/alpha/alpha.ts +31 -0
  486. package/src/resources/alpha/benchmarks.ts +152 -0
  487. package/src/resources/alpha/index.ts +11 -0
  488. package/src/resources/alpha/inference.ts +191 -0
  489. package/src/resources/alpha.ts +9 -0
  490. package/src/resources/batches.ts +692 -0
  491. package/src/resources/chat/chat.ts +351 -0
  492. package/src/resources/chat/completions.ts +2430 -0
  493. package/src/resources/chat/index.ts +19 -0
  494. package/src/resources/chat.ts +9 -0
  495. package/src/resources/completions.ts +350 -0
  496. package/src/resources/conversations/conversations.ts +627 -0
  497. package/src/resources/conversations/index.ts +25 -0
  498. package/src/resources/conversations/items.ts +2061 -0
  499. package/src/resources/conversations.ts +9 -0
  500. package/src/resources/embeddings.ts +130 -0
  501. package/src/resources/files.ts +225 -0
  502. package/src/resources/index.ts +104 -0
  503. package/src/resources/inspect.ts +30 -0
  504. package/src/resources/models/index.ts +10 -0
  505. package/src/resources/models/models.ts +133 -0
  506. package/src/resources/models/openai.ts +20 -0
  507. package/src/resources/models.ts +9 -0
  508. package/src/resources/moderations.ts +97 -0
  509. package/src/resources/prompts/index.ts +19 -0
  510. package/src/resources/prompts/prompts.ts +188 -0
  511. package/src/resources/prompts/versions.ts +27 -0
  512. package/src/resources/prompts.ts +9 -0
  513. package/src/resources/providers.ts +41 -0
  514. package/src/resources/responses/index.ts +26 -0
  515. package/src/resources/responses/input-items.ts +571 -0
  516. package/src/resources/responses/responses.ts +6718 -0
  517. package/src/resources/responses.ts +9 -0
  518. package/src/resources/routes.ts +55 -0
  519. package/src/resources/safety.ts +367 -0
  520. package/src/resources/shared.ts +544 -0
  521. package/src/resources/shields.ts +119 -0
  522. package/src/resources/vector-io.ts +485 -0
  523. package/src/resources/vector-stores/file-batches.ts +386 -0
  524. package/src/resources/vector-stores/files.ts +496 -0
  525. package/src/resources/vector-stores/index.ts +38 -0
  526. package/src/resources/vector-stores/vector-stores.ts +588 -0
  527. package/src/resources/vector-stores.ts +9 -0
  528. package/src/resources.ts +7 -0
  529. package/src/shims/node.ts +56 -0
  530. package/src/shims/web.ts +56 -0
  531. package/src/streaming.ts +315 -0
  532. package/src/tsconfig.json +11 -0
  533. package/src/uploads.ts +261 -0
  534. package/src/version.ts +7 -0
  535. package/streaming.d.ts +32 -0
  536. package/streaming.d.ts.map +1 -0
  537. package/streaming.js +272 -0
  538. package/streaming.js.map +1 -0
  539. package/streaming.mjs +267 -0
  540. package/streaming.mjs.map +1 -0
  541. package/uploads.d.ts +75 -0
  542. package/uploads.d.ts.map +1 -0
  543. package/uploads.js +176 -0
  544. package/uploads.js.map +1 -0
  545. package/uploads.mjs +163 -0
  546. package/uploads.mjs.map +1 -0
  547. package/version.d.ts +2 -0
  548. package/version.d.ts.map +1 -0
  549. package/version.js +10 -0
  550. package/version.js.map +1 -0
  551. package/version.mjs +7 -0
  552. package/version.mjs.map +1 -0
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ // Copyright (c) The OGX Contributors.
3
+ // All rights reserved.
4
+ //
5
+ // This source code is licensed under the terms described in the LICENSE file in
6
+ // the root directory of this source tree.
7
+ //
8
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
21
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ __exportStar(require("./alpha/index.js"), exports);
25
+ //# sourceMappingURL=alpha.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alpha.js","sourceRoot":"","sources":["../src/resources/alpha.ts"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,sFAAsF;;;;;;;;;;;;;;;;AAEtF,mDAA8B"}
@@ -0,0 +1,9 @@
1
+ // Copyright (c) The OGX Contributors.
2
+ // All rights reserved.
3
+ //
4
+ // This source code is licensed under the terms described in the LICENSE file in
5
+ // the root directory of this source tree.
6
+ //
7
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
8
+ export * from "./alpha/index.mjs";
9
+ //# sourceMappingURL=alpha.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alpha.mjs","sourceRoot":"","sources":["../src/resources/alpha.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,sFAAsF"}
@@ -0,0 +1,442 @@
1
+ import { APIResource } from "../resource.js";
2
+ import * as Core from "../core.js";
3
+ import { OpenAICursorPage, type OpenAICursorPageParams } from "../pagination.js";
4
+ /**
5
+ * The API is designed to allow use of openai client libraries for seamless integration.
6
+ *
7
+ * This API provides the following extensions:
8
+ * - idempotent batch creation
9
+ *
10
+ * Note: This API is currently under active development and may undergo changes.
11
+ */
12
+ export declare class Batches extends APIResource {
13
+ /**
14
+ * Create a new batch for processing multiple API requests.
15
+ */
16
+ create(body: BatchCreateParams, options?: Core.RequestOptions): Core.APIPromise<BatchCreateResponse>;
17
+ /**
18
+ * Retrieve information about a specific batch.
19
+ */
20
+ retrieve(batchId: string, options?: Core.RequestOptions): Core.APIPromise<BatchRetrieveResponse>;
21
+ /**
22
+ * List all batches for the current user.
23
+ */
24
+ list(query?: BatchListParams, options?: Core.RequestOptions): Core.PagePromise<BatchListResponsesOpenAICursorPage, BatchListResponse>;
25
+ list(options?: Core.RequestOptions): Core.PagePromise<BatchListResponsesOpenAICursorPage, BatchListResponse>;
26
+ /**
27
+ * Cancel a batch that is in progress.
28
+ */
29
+ cancel(batchId: string, options?: Core.RequestOptions): Core.APIPromise<BatchCancelResponse>;
30
+ }
31
+ export declare class BatchListResponsesOpenAICursorPage extends OpenAICursorPage<BatchListResponse> {
32
+ }
33
+ export interface BatchCreateResponse {
34
+ id: string;
35
+ completion_window: string;
36
+ created_at: number;
37
+ endpoint: string;
38
+ input_file_id: string;
39
+ object: 'batch';
40
+ status: 'validating' | 'failed' | 'in_progress' | 'finalizing' | 'completed' | 'expired' | 'cancelling' | 'cancelled';
41
+ cancelled_at?: number | null;
42
+ cancelling_at?: number | null;
43
+ completed_at?: number | null;
44
+ error_file_id?: string | null;
45
+ errors?: BatchCreateResponse.Errors | null;
46
+ expired_at?: number | null;
47
+ expires_at?: number | null;
48
+ failed_at?: number | null;
49
+ finalizing_at?: number | null;
50
+ in_progress_at?: number | null;
51
+ metadata?: {
52
+ [key: string]: string;
53
+ } | null;
54
+ model?: string | null;
55
+ output_file_id?: string | null;
56
+ /**
57
+ * The request counts for different statuses within the batch.
58
+ */
59
+ request_counts?: BatchCreateResponse.RequestCounts | null;
60
+ /**
61
+ * Represents token usage details including input tokens, output tokens, a
62
+ * breakdown of output tokens, and the total tokens used. Only populated on batches
63
+ * created after September 7, 2025.
64
+ */
65
+ usage?: BatchCreateResponse.Usage | null;
66
+ [k: string]: unknown;
67
+ }
68
+ export declare namespace BatchCreateResponse {
69
+ interface Errors {
70
+ data?: Array<Errors.Data> | null;
71
+ object?: string | null;
72
+ [k: string]: unknown;
73
+ }
74
+ namespace Errors {
75
+ interface Data {
76
+ code?: string | null;
77
+ line?: number | null;
78
+ message?: string | null;
79
+ param?: string | null;
80
+ [k: string]: unknown;
81
+ }
82
+ }
83
+ /**
84
+ * The request counts for different statuses within the batch.
85
+ */
86
+ interface RequestCounts {
87
+ completed: number;
88
+ failed: number;
89
+ total: number;
90
+ [k: string]: unknown;
91
+ }
92
+ /**
93
+ * Represents token usage details including input tokens, output tokens, a
94
+ * breakdown of output tokens, and the total tokens used. Only populated on batches
95
+ * created after September 7, 2025.
96
+ */
97
+ interface Usage {
98
+ input_tokens: number;
99
+ /**
100
+ * A detailed breakdown of the input tokens.
101
+ */
102
+ input_tokens_details: Usage.InputTokensDetails;
103
+ output_tokens: number;
104
+ /**
105
+ * A detailed breakdown of the output tokens.
106
+ */
107
+ output_tokens_details: Usage.OutputTokensDetails;
108
+ total_tokens: number;
109
+ [k: string]: unknown;
110
+ }
111
+ namespace Usage {
112
+ /**
113
+ * A detailed breakdown of the input tokens.
114
+ */
115
+ interface InputTokensDetails {
116
+ cached_tokens: number;
117
+ [k: string]: unknown;
118
+ }
119
+ /**
120
+ * A detailed breakdown of the output tokens.
121
+ */
122
+ interface OutputTokensDetails {
123
+ reasoning_tokens: number;
124
+ [k: string]: unknown;
125
+ }
126
+ }
127
+ }
128
+ export interface BatchRetrieveResponse {
129
+ id: string;
130
+ completion_window: string;
131
+ created_at: number;
132
+ endpoint: string;
133
+ input_file_id: string;
134
+ object: 'batch';
135
+ status: 'validating' | 'failed' | 'in_progress' | 'finalizing' | 'completed' | 'expired' | 'cancelling' | 'cancelled';
136
+ cancelled_at?: number | null;
137
+ cancelling_at?: number | null;
138
+ completed_at?: number | null;
139
+ error_file_id?: string | null;
140
+ errors?: BatchRetrieveResponse.Errors | null;
141
+ expired_at?: number | null;
142
+ expires_at?: number | null;
143
+ failed_at?: number | null;
144
+ finalizing_at?: number | null;
145
+ in_progress_at?: number | null;
146
+ metadata?: {
147
+ [key: string]: string;
148
+ } | null;
149
+ model?: string | null;
150
+ output_file_id?: string | null;
151
+ /**
152
+ * The request counts for different statuses within the batch.
153
+ */
154
+ request_counts?: BatchRetrieveResponse.RequestCounts | null;
155
+ /**
156
+ * Represents token usage details including input tokens, output tokens, a
157
+ * breakdown of output tokens, and the total tokens used. Only populated on batches
158
+ * created after September 7, 2025.
159
+ */
160
+ usage?: BatchRetrieveResponse.Usage | null;
161
+ [k: string]: unknown;
162
+ }
163
+ export declare namespace BatchRetrieveResponse {
164
+ interface Errors {
165
+ data?: Array<Errors.Data> | null;
166
+ object?: string | null;
167
+ [k: string]: unknown;
168
+ }
169
+ namespace Errors {
170
+ interface Data {
171
+ code?: string | null;
172
+ line?: number | null;
173
+ message?: string | null;
174
+ param?: string | null;
175
+ [k: string]: unknown;
176
+ }
177
+ }
178
+ /**
179
+ * The request counts for different statuses within the batch.
180
+ */
181
+ interface RequestCounts {
182
+ completed: number;
183
+ failed: number;
184
+ total: number;
185
+ [k: string]: unknown;
186
+ }
187
+ /**
188
+ * Represents token usage details including input tokens, output tokens, a
189
+ * breakdown of output tokens, and the total tokens used. Only populated on batches
190
+ * created after September 7, 2025.
191
+ */
192
+ interface Usage {
193
+ input_tokens: number;
194
+ /**
195
+ * A detailed breakdown of the input tokens.
196
+ */
197
+ input_tokens_details: Usage.InputTokensDetails;
198
+ output_tokens: number;
199
+ /**
200
+ * A detailed breakdown of the output tokens.
201
+ */
202
+ output_tokens_details: Usage.OutputTokensDetails;
203
+ total_tokens: number;
204
+ [k: string]: unknown;
205
+ }
206
+ namespace Usage {
207
+ /**
208
+ * A detailed breakdown of the input tokens.
209
+ */
210
+ interface InputTokensDetails {
211
+ cached_tokens: number;
212
+ [k: string]: unknown;
213
+ }
214
+ /**
215
+ * A detailed breakdown of the output tokens.
216
+ */
217
+ interface OutputTokensDetails {
218
+ reasoning_tokens: number;
219
+ [k: string]: unknown;
220
+ }
221
+ }
222
+ }
223
+ export interface BatchListResponse {
224
+ id: string;
225
+ completion_window: string;
226
+ created_at: number;
227
+ endpoint: string;
228
+ input_file_id: string;
229
+ object: 'batch';
230
+ status: 'validating' | 'failed' | 'in_progress' | 'finalizing' | 'completed' | 'expired' | 'cancelling' | 'cancelled';
231
+ cancelled_at?: number | null;
232
+ cancelling_at?: number | null;
233
+ completed_at?: number | null;
234
+ error_file_id?: string | null;
235
+ errors?: BatchListResponse.Errors | null;
236
+ expired_at?: number | null;
237
+ expires_at?: number | null;
238
+ failed_at?: number | null;
239
+ finalizing_at?: number | null;
240
+ in_progress_at?: number | null;
241
+ metadata?: {
242
+ [key: string]: string;
243
+ } | null;
244
+ model?: string | null;
245
+ output_file_id?: string | null;
246
+ /**
247
+ * The request counts for different statuses within the batch.
248
+ */
249
+ request_counts?: BatchListResponse.RequestCounts | null;
250
+ /**
251
+ * Represents token usage details including input tokens, output tokens, a
252
+ * breakdown of output tokens, and the total tokens used. Only populated on batches
253
+ * created after September 7, 2025.
254
+ */
255
+ usage?: BatchListResponse.Usage | null;
256
+ [k: string]: unknown;
257
+ }
258
+ export declare namespace BatchListResponse {
259
+ interface Errors {
260
+ data?: Array<Errors.Data> | null;
261
+ object?: string | null;
262
+ [k: string]: unknown;
263
+ }
264
+ namespace Errors {
265
+ interface Data {
266
+ code?: string | null;
267
+ line?: number | null;
268
+ message?: string | null;
269
+ param?: string | null;
270
+ [k: string]: unknown;
271
+ }
272
+ }
273
+ /**
274
+ * The request counts for different statuses within the batch.
275
+ */
276
+ interface RequestCounts {
277
+ completed: number;
278
+ failed: number;
279
+ total: number;
280
+ [k: string]: unknown;
281
+ }
282
+ /**
283
+ * Represents token usage details including input tokens, output tokens, a
284
+ * breakdown of output tokens, and the total tokens used. Only populated on batches
285
+ * created after September 7, 2025.
286
+ */
287
+ interface Usage {
288
+ input_tokens: number;
289
+ /**
290
+ * A detailed breakdown of the input tokens.
291
+ */
292
+ input_tokens_details: Usage.InputTokensDetails;
293
+ output_tokens: number;
294
+ /**
295
+ * A detailed breakdown of the output tokens.
296
+ */
297
+ output_tokens_details: Usage.OutputTokensDetails;
298
+ total_tokens: number;
299
+ [k: string]: unknown;
300
+ }
301
+ namespace Usage {
302
+ /**
303
+ * A detailed breakdown of the input tokens.
304
+ */
305
+ interface InputTokensDetails {
306
+ cached_tokens: number;
307
+ [k: string]: unknown;
308
+ }
309
+ /**
310
+ * A detailed breakdown of the output tokens.
311
+ */
312
+ interface OutputTokensDetails {
313
+ reasoning_tokens: number;
314
+ [k: string]: unknown;
315
+ }
316
+ }
317
+ }
318
+ export interface BatchCancelResponse {
319
+ id: string;
320
+ completion_window: string;
321
+ created_at: number;
322
+ endpoint: string;
323
+ input_file_id: string;
324
+ object: 'batch';
325
+ status: 'validating' | 'failed' | 'in_progress' | 'finalizing' | 'completed' | 'expired' | 'cancelling' | 'cancelled';
326
+ cancelled_at?: number | null;
327
+ cancelling_at?: number | null;
328
+ completed_at?: number | null;
329
+ error_file_id?: string | null;
330
+ errors?: BatchCancelResponse.Errors | null;
331
+ expired_at?: number | null;
332
+ expires_at?: number | null;
333
+ failed_at?: number | null;
334
+ finalizing_at?: number | null;
335
+ in_progress_at?: number | null;
336
+ metadata?: {
337
+ [key: string]: string;
338
+ } | null;
339
+ model?: string | null;
340
+ output_file_id?: string | null;
341
+ /**
342
+ * The request counts for different statuses within the batch.
343
+ */
344
+ request_counts?: BatchCancelResponse.RequestCounts | null;
345
+ /**
346
+ * Represents token usage details including input tokens, output tokens, a
347
+ * breakdown of output tokens, and the total tokens used. Only populated on batches
348
+ * created after September 7, 2025.
349
+ */
350
+ usage?: BatchCancelResponse.Usage | null;
351
+ [k: string]: unknown;
352
+ }
353
+ export declare namespace BatchCancelResponse {
354
+ interface Errors {
355
+ data?: Array<Errors.Data> | null;
356
+ object?: string | null;
357
+ [k: string]: unknown;
358
+ }
359
+ namespace Errors {
360
+ interface Data {
361
+ code?: string | null;
362
+ line?: number | null;
363
+ message?: string | null;
364
+ param?: string | null;
365
+ [k: string]: unknown;
366
+ }
367
+ }
368
+ /**
369
+ * The request counts for different statuses within the batch.
370
+ */
371
+ interface RequestCounts {
372
+ completed: number;
373
+ failed: number;
374
+ total: number;
375
+ [k: string]: unknown;
376
+ }
377
+ /**
378
+ * Represents token usage details including input tokens, output tokens, a
379
+ * breakdown of output tokens, and the total tokens used. Only populated on batches
380
+ * created after September 7, 2025.
381
+ */
382
+ interface Usage {
383
+ input_tokens: number;
384
+ /**
385
+ * A detailed breakdown of the input tokens.
386
+ */
387
+ input_tokens_details: Usage.InputTokensDetails;
388
+ output_tokens: number;
389
+ /**
390
+ * A detailed breakdown of the output tokens.
391
+ */
392
+ output_tokens_details: Usage.OutputTokensDetails;
393
+ total_tokens: number;
394
+ [k: string]: unknown;
395
+ }
396
+ namespace Usage {
397
+ /**
398
+ * A detailed breakdown of the input tokens.
399
+ */
400
+ interface InputTokensDetails {
401
+ cached_tokens: number;
402
+ [k: string]: unknown;
403
+ }
404
+ /**
405
+ * A detailed breakdown of the output tokens.
406
+ */
407
+ interface OutputTokensDetails {
408
+ reasoning_tokens: number;
409
+ [k: string]: unknown;
410
+ }
411
+ }
412
+ }
413
+ export interface BatchCreateParams {
414
+ /**
415
+ * The time window within which the batch should be processed.
416
+ */
417
+ completion_window: '24h';
418
+ /**
419
+ * The endpoint to be used for all requests in the batch.
420
+ */
421
+ endpoint: string;
422
+ /**
423
+ * The ID of an uploaded file containing requests for the batch.
424
+ */
425
+ input_file_id: string;
426
+ /**
427
+ * Optional idempotency key. When provided, enables idempotent behavior.
428
+ */
429
+ idempotency_key?: string | null;
430
+ /**
431
+ * Optional metadata for the batch.
432
+ */
433
+ metadata?: {
434
+ [key: string]: string;
435
+ } | null;
436
+ }
437
+ export interface BatchListParams extends OpenAICursorPageParams {
438
+ }
439
+ export declare namespace Batches {
440
+ export { type BatchCreateResponse as BatchCreateResponse, type BatchRetrieveResponse as BatchRetrieveResponse, type BatchListResponse as BatchListResponse, type BatchCancelResponse as BatchCancelResponse, BatchListResponsesOpenAICursorPage as BatchListResponsesOpenAICursorPage, type BatchCreateParams as BatchCreateParams, type BatchListParams as BatchListParams, };
441
+ }
442
+ //# sourceMappingURL=batches.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batches.d.ts","sourceRoot":"","sources":["../src/resources/batches.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE9E;;;;;;;GAOG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH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;KAAE,GAAG,IAAI,CAAC;CAC7C;AAED,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;CAAG;AAIlE,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,kCAAkC,IAAI,kCAAkC,EACxE,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ // Copyright (c) The OGX Contributors.
3
+ // All rights reserved.
4
+ //
5
+ // This source code is licensed under the terms described in the LICENSE file in
6
+ // the root directory of this source tree.
7
+ //
8
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.BatchListResponsesOpenAICursorPage = exports.Batches = void 0;
11
+ const resource_1 = require("../resource.js");
12
+ const core_1 = require("../core.js");
13
+ const pagination_1 = require("../pagination.js");
14
+ /**
15
+ * The API is designed to allow use of openai client libraries for seamless integration.
16
+ *
17
+ * This API provides the following extensions:
18
+ * - idempotent batch creation
19
+ *
20
+ * Note: This API is currently under active development and may undergo changes.
21
+ */
22
+ class Batches extends resource_1.APIResource {
23
+ /**
24
+ * Create a new batch for processing multiple API requests.
25
+ */
26
+ create(body, options) {
27
+ return this._client.post('/v1/batches', { body, ...options });
28
+ }
29
+ /**
30
+ * Retrieve information about a specific batch.
31
+ */
32
+ retrieve(batchId, options) {
33
+ return this._client.get(`/v1/batches/${batchId}`, options);
34
+ }
35
+ list(query = {}, options) {
36
+ if ((0, core_1.isRequestOptions)(query)) {
37
+ return this.list({}, query);
38
+ }
39
+ return this._client.getAPIList('/v1/batches', BatchListResponsesOpenAICursorPage, { query, ...options });
40
+ }
41
+ /**
42
+ * Cancel a batch that is in progress.
43
+ */
44
+ cancel(batchId, options) {
45
+ return this._client.post(`/v1/batches/${batchId}/cancel`, options);
46
+ }
47
+ }
48
+ exports.Batches = Batches;
49
+ class BatchListResponsesOpenAICursorPage extends pagination_1.OpenAICursorPage {
50
+ }
51
+ exports.BatchListResponsesOpenAICursorPage = BatchListResponsesOpenAICursorPage;
52
+ Batches.BatchListResponsesOpenAICursorPage = BatchListResponsesOpenAICursorPage;
53
+ //# sourceMappingURL=batches.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batches.js","sourceRoot":"","sources":["../src/resources/batches.ts"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,sFAAsF;;;AAEtF,6CAA0C;AAC1C,qCAA2C;AAE3C,iDAA8E;AAE9E;;;;;;;GAOG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAuB,EAAE,OAA6B;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,OAAe,EAAE,OAA6B;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAYD,IAAI,CACF,QAA+C,EAAE,EACjD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,kCAAkC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3G,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,OAAe,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,OAAO,SAAS,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACF;AAzCD,0BAyCC;AAED,MAAa,kCAAmC,SAAQ,6BAAmC;CAAG;AAA9F,gFAA8F;AAumB9F,OAAO,CAAC,kCAAkC,GAAG,kCAAkC,CAAC"}
@@ -0,0 +1,48 @@
1
+ // Copyright (c) The OGX Contributors.
2
+ // All rights reserved.
3
+ //
4
+ // This source code is licensed under the terms described in the LICENSE file in
5
+ // the root directory of this source tree.
6
+ //
7
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
8
+ import { APIResource } from "../resource.mjs";
9
+ import { isRequestOptions } from "../core.mjs";
10
+ import { OpenAICursorPage } from "../pagination.mjs";
11
+ /**
12
+ * The API is designed to allow use of openai client libraries for seamless integration.
13
+ *
14
+ * This API provides the following extensions:
15
+ * - idempotent batch creation
16
+ *
17
+ * Note: This API is currently under active development and may undergo changes.
18
+ */
19
+ export class Batches extends APIResource {
20
+ /**
21
+ * Create a new batch for processing multiple API requests.
22
+ */
23
+ create(body, options) {
24
+ return this._client.post('/v1/batches', { body, ...options });
25
+ }
26
+ /**
27
+ * Retrieve information about a specific batch.
28
+ */
29
+ retrieve(batchId, options) {
30
+ return this._client.get(`/v1/batches/${batchId}`, options);
31
+ }
32
+ list(query = {}, options) {
33
+ if (isRequestOptions(query)) {
34
+ return this.list({}, query);
35
+ }
36
+ return this._client.getAPIList('/v1/batches', BatchListResponsesOpenAICursorPage, { query, ...options });
37
+ }
38
+ /**
39
+ * Cancel a batch that is in progress.
40
+ */
41
+ cancel(batchId, options) {
42
+ return this._client.post(`/v1/batches/${batchId}/cancel`, options);
43
+ }
44
+ }
45
+ export class BatchListResponsesOpenAICursorPage extends OpenAICursorPage {
46
+ }
47
+ Batches.BatchListResponsesOpenAICursorPage = BatchListResponsesOpenAICursorPage;
48
+ //# sourceMappingURL=batches.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batches.mjs","sourceRoot":"","sources":["../src/resources/batches.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,EAAE,gBAAgB,EAA+B;AAExD;;;;;;;GAOG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAuB,EAAE,OAA6B;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,OAAe,EAAE,OAA6B;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAYD,IAAI,CACF,QAA+C,EAAE,EACjD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,kCAAkC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3G,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,OAAe,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,OAAO,SAAS,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACF;AAED,MAAM,OAAO,kCAAmC,SAAQ,gBAAmC;CAAG;AAumB9F,OAAO,CAAC,kCAAkC,GAAG,kCAAkC,CAAC"}