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,297 @@
1
+ import { APIResource } from "../resource.js";
2
+ import * as Core from "../core.js";
3
+ import * as Shared from "./shared.js";
4
+ /**
5
+ * OpenAI-compatible Moderations API.
6
+ */
7
+ export declare class Safety extends APIResource {
8
+ /**
9
+ * Run a safety shield on messages to check for policy violations.
10
+ */
11
+ runShield(body: SafetyRunShieldParams, options?: Core.RequestOptions): Core.APIPromise<RunShieldResponse>;
12
+ }
13
+ /**
14
+ * Response from running a safety shield.
15
+ */
16
+ export interface RunShieldResponse {
17
+ /**
18
+ * Details of a safety violation detected by content moderation.
19
+ */
20
+ violation?: Shared.SafetyViolation | null;
21
+ }
22
+ export interface SafetyRunShieldParams {
23
+ /**
24
+ * The messages to run the shield on
25
+ */
26
+ messages: Array<SafetyRunShieldParams.OpenAIUserMessageParamInput | SafetyRunShieldParams.OpenAISystemMessageParam | SafetyRunShieldParams.OpenAIAssistantMessageParamInput | SafetyRunShieldParams.OpenAIToolMessageParam | SafetyRunShieldParams.OpenAIDeveloperMessageParam>;
27
+ /**
28
+ * The identifier of the shield to run
29
+ */
30
+ shield_id: string;
31
+ }
32
+ export declare namespace SafetyRunShieldParams {
33
+ /**
34
+ * A message from the user in an OpenAI-compatible chat completion request.
35
+ */
36
+ interface OpenAIUserMessageParamInput {
37
+ /**
38
+ * The content of the message, which can include text and other media.
39
+ */
40
+ content: string | Array<OpenAIUserMessageParamInput.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParamInput.OpenAIChatCompletionContentPartImageParam | OpenAIUserMessageParamInput.OpenAIFile>;
41
+ /**
42
+ * The name of the user message participant.
43
+ */
44
+ name?: string | null;
45
+ /**
46
+ * Must be 'user' to identify this as a user message.
47
+ */
48
+ role?: 'user';
49
+ }
50
+ namespace OpenAIUserMessageParamInput {
51
+ /**
52
+ * Text content part for OpenAI-compatible chat completion messages.
53
+ */
54
+ interface OpenAIChatCompletionContentPartTextParam {
55
+ /**
56
+ * The text content of the message.
57
+ */
58
+ text: string;
59
+ /**
60
+ * Must be 'text' to identify this as text content.
61
+ */
62
+ type?: 'text';
63
+ }
64
+ /**
65
+ * Image content part for OpenAI-compatible chat completion messages.
66
+ */
67
+ interface OpenAIChatCompletionContentPartImageParam {
68
+ /**
69
+ * Image URL specification and processing details.
70
+ */
71
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
72
+ /**
73
+ * Must be 'image_url' to identify this as image content.
74
+ */
75
+ type?: 'image_url';
76
+ }
77
+ namespace OpenAIChatCompletionContentPartImageParam {
78
+ /**
79
+ * Image URL specification and processing details.
80
+ */
81
+ interface ImageURL {
82
+ /**
83
+ * URL of the image to include in the message.
84
+ */
85
+ url: string;
86
+ /**
87
+ * Level of detail for image processing. Can be 'low', 'high', or 'auto'.
88
+ */
89
+ detail?: 'low' | 'high' | 'auto' | null;
90
+ }
91
+ }
92
+ /**
93
+ * File content part for OpenAI-compatible chat completion messages.
94
+ */
95
+ interface OpenAIFile {
96
+ /**
97
+ * File specification.
98
+ */
99
+ file: OpenAIFile.File;
100
+ /**
101
+ * Must be 'file' to identify this as file content.
102
+ */
103
+ type?: 'file';
104
+ }
105
+ namespace OpenAIFile {
106
+ /**
107
+ * File specification.
108
+ */
109
+ interface File {
110
+ /**
111
+ * Base64-encoded file data.
112
+ */
113
+ file_data?: string | null;
114
+ /**
115
+ * ID of an uploaded file.
116
+ */
117
+ file_id?: string | null;
118
+ /**
119
+ * Name of the file.
120
+ */
121
+ filename?: string | null;
122
+ }
123
+ }
124
+ }
125
+ /**
126
+ * A system message providing instructions or context to the model.
127
+ */
128
+ interface OpenAISystemMessageParam {
129
+ /**
130
+ * The content of the 'system prompt'. If multiple system messages are provided,
131
+ * they are concatenated.
132
+ */
133
+ content: string | Array<OpenAISystemMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
134
+ /**
135
+ * The name of the system message participant.
136
+ */
137
+ name?: string | null;
138
+ /**
139
+ * Must be 'system' to identify this as a system message.
140
+ */
141
+ role?: 'system';
142
+ }
143
+ namespace OpenAISystemMessageParam {
144
+ /**
145
+ * Text content part for OpenAI-compatible chat completion messages.
146
+ */
147
+ interface ListOpenAIChatCompletionContentPartTextParam {
148
+ /**
149
+ * The text content of the message.
150
+ */
151
+ text: string;
152
+ /**
153
+ * Must be 'text' to identify this as text content.
154
+ */
155
+ type?: 'text';
156
+ }
157
+ }
158
+ /**
159
+ * A message containing the model's (assistant) response in an OpenAI-compatible
160
+ * chat completion request.
161
+ */
162
+ interface OpenAIAssistantMessageParamInput {
163
+ /**
164
+ * The content of the model's response.
165
+ */
166
+ content?: string | Array<OpenAIAssistantMessageParamInput.ListOpenAIChatCompletionContentPartTextParam> | null;
167
+ /**
168
+ * The name of the assistant message participant.
169
+ */
170
+ name?: string | null;
171
+ /**
172
+ * Must be 'assistant' to identify this as the model's response.
173
+ */
174
+ role?: 'assistant';
175
+ /**
176
+ * List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object.
177
+ */
178
+ tool_calls?: Array<OpenAIAssistantMessageParamInput.ToolCall> | null;
179
+ [k: string]: unknown;
180
+ }
181
+ namespace OpenAIAssistantMessageParamInput {
182
+ /**
183
+ * Text content part for OpenAI-compatible chat completion messages.
184
+ */
185
+ interface ListOpenAIChatCompletionContentPartTextParam {
186
+ /**
187
+ * The text content of the message.
188
+ */
189
+ text: string;
190
+ /**
191
+ * Must be 'text' to identify this as text content.
192
+ */
193
+ type?: 'text';
194
+ }
195
+ /**
196
+ * Tool call specification for OpenAI-compatible chat completion responses.
197
+ */
198
+ interface ToolCall {
199
+ /**
200
+ * Unique identifier for the tool call.
201
+ */
202
+ id: string;
203
+ /**
204
+ * Function call details.
205
+ */
206
+ function: ToolCall.Function;
207
+ /**
208
+ * Must be 'function' to identify this as a function call.
209
+ */
210
+ type: 'function';
211
+ }
212
+ namespace ToolCall {
213
+ /**
214
+ * Function call details.
215
+ */
216
+ interface Function {
217
+ /**
218
+ * Arguments to pass to the function as a JSON string.
219
+ */
220
+ arguments: string;
221
+ /**
222
+ * Name of the function to call.
223
+ */
224
+ name: string;
225
+ }
226
+ }
227
+ }
228
+ /**
229
+ * A message representing the result of a tool invocation in an OpenAI-compatible
230
+ * chat completion request.
231
+ */
232
+ interface OpenAIToolMessageParam {
233
+ /**
234
+ * The response content from the tool.
235
+ */
236
+ content: string | Array<OpenAIToolMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
237
+ /**
238
+ * Unique identifier for the tool call this response is for.
239
+ */
240
+ tool_call_id: string;
241
+ /**
242
+ * Must be 'tool' to identify this as a tool response.
243
+ */
244
+ role?: 'tool';
245
+ }
246
+ namespace OpenAIToolMessageParam {
247
+ /**
248
+ * Text content part for OpenAI-compatible chat completion messages.
249
+ */
250
+ interface ListOpenAIChatCompletionContentPartTextParam {
251
+ /**
252
+ * The text content of the message.
253
+ */
254
+ text: string;
255
+ /**
256
+ * Must be 'text' to identify this as text content.
257
+ */
258
+ type?: 'text';
259
+ }
260
+ }
261
+ /**
262
+ * A message from the developer in an OpenAI-compatible chat completion request.
263
+ */
264
+ interface OpenAIDeveloperMessageParam {
265
+ /**
266
+ * The content of the developer message.
267
+ */
268
+ content: string | Array<OpenAIDeveloperMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
269
+ /**
270
+ * The name of the developer message participant.
271
+ */
272
+ name?: string | null;
273
+ /**
274
+ * Must be 'developer' to identify this as a developer message.
275
+ */
276
+ role?: 'developer';
277
+ }
278
+ namespace OpenAIDeveloperMessageParam {
279
+ /**
280
+ * Text content part for OpenAI-compatible chat completion messages.
281
+ */
282
+ interface ListOpenAIChatCompletionContentPartTextParam {
283
+ /**
284
+ * The text content of the message.
285
+ */
286
+ text: string;
287
+ /**
288
+ * Must be 'text' to identify this as text content.
289
+ */
290
+ type?: 'text';
291
+ }
292
+ }
293
+ }
294
+ export declare namespace Safety {
295
+ export { type RunShieldResponse as RunShieldResponse, type SafetyRunShieldParams as SafetyRunShieldParams };
296
+ }
297
+ //# sourceMappingURL=safety.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safety.d.ts","sourceRoot":"","sources":["../src/resources/safety.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,24 @@
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.Safety = void 0;
11
+ const resource_1 = require("../resource.js");
12
+ /**
13
+ * OpenAI-compatible Moderations API.
14
+ */
15
+ class Safety extends resource_1.APIResource {
16
+ /**
17
+ * Run a safety shield on messages to check for policy violations.
18
+ */
19
+ runShield(body, options) {
20
+ return this._client.post('/v1/safety/run-shield', { body, ...options });
21
+ }
22
+ }
23
+ exports.Safety = Safety;
24
+ //# sourceMappingURL=safety.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safety.js","sourceRoot":"","sources":["../src/resources/safety.ts"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,sFAAsF;;;AAEtF,6CAA0C;AAI1C;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC;;OAEG;IACH,SAAS,CAAC,IAA2B,EAAE,OAA6B;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;CACF;AAPD,wBAOC"}
@@ -0,0 +1,20 @@
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
+ /**
10
+ * OpenAI-compatible Moderations API.
11
+ */
12
+ export class Safety extends APIResource {
13
+ /**
14
+ * Run a safety shield on messages to check for policy violations.
15
+ */
16
+ runShield(body, options) {
17
+ return this._client.post('/v1/safety/run-shield', { body, ...options });
18
+ }
19
+ }
20
+ //# sourceMappingURL=safety.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safety.mjs","sourceRoot":"","sources":["../src/resources/safety.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,SAAS,CAAC,IAA2B,EAAE,OAA6B;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;CACF"}