ogx-client 0.7.2-rc1 → 0.7.2

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 (640) hide show
  1. package/.devcontainer/devcontainer.json +15 -0
  2. package/.eslintrc.js +16 -0
  3. package/.github/workflows/ci.yml +94 -0
  4. package/.github/workflows/integration-tests.yml +133 -0
  5. package/.github/workflows/publish-npm.yml +32 -0
  6. package/.github/workflows/release-doctor.yml +21 -0
  7. package/.gitignore +13 -0
  8. package/.prettierignore +7 -0
  9. package/.prettierrc.json +7 -0
  10. package/.release-please-manifest.json +3 -0
  11. package/.stats.yml +4 -0
  12. package/Brewfile +1 -0
  13. package/CODE_OF_CONDUCT.md +80 -0
  14. package/CONTRIBUTING.md +112 -0
  15. package/SECURITY.md +27 -0
  16. package/api.md +337 -0
  17. package/bin/check-release-environment +22 -0
  18. package/bin/publish-npm +61 -0
  19. package/dist/CHANGELOG.md +512 -0
  20. package/dist/LICENSE +7 -0
  21. package/dist/README.md +391 -0
  22. package/dist/package.json +108 -0
  23. package/dist/src/_shims/MultipartBody.ts +15 -0
  24. package/dist/src/_shims/README.md +46 -0
  25. package/dist/src/_shims/auto/runtime-bun.ts +10 -0
  26. package/dist/src/_shims/auto/runtime-node.ts +10 -0
  27. package/dist/src/_shims/auto/runtime.ts +10 -0
  28. package/dist/src/_shims/auto/types-node.ts +10 -0
  29. package/dist/src/_shims/auto/types.d.ts +107 -0
  30. package/dist/src/_shims/auto/types.js +9 -0
  31. package/dist/src/_shims/auto/types.mjs +10 -0
  32. package/dist/src/_shims/bun-runtime.ts +20 -0
  33. package/dist/src/_shims/index.d.ts +89 -0
  34. package/dist/src/_shims/index.js +23 -0
  35. package/dist/src/_shims/index.mjs +18 -0
  36. package/dist/src/_shims/manual-types.d.ts +18 -0
  37. package/dist/src/_shims/manual-types.js +9 -0
  38. package/dist/src/_shims/manual-types.mjs +10 -0
  39. package/dist/src/_shims/node-runtime.ts +87 -0
  40. package/dist/src/_shims/node-types.d.ts +48 -0
  41. package/dist/src/_shims/node-types.js +9 -0
  42. package/dist/src/_shims/node-types.mjs +10 -0
  43. package/dist/src/_shims/registry.ts +73 -0
  44. package/dist/src/_shims/web-runtime.ts +109 -0
  45. package/dist/src/_shims/web-types.d.ts +89 -0
  46. package/dist/src/_shims/web-types.js +9 -0
  47. package/dist/src/_shims/web-types.mjs +10 -0
  48. package/dist/src/core.ts +1253 -0
  49. package/dist/src/error.ts +137 -0
  50. package/dist/src/index.ts +554 -0
  51. package/dist/src/internal/decoders/line.ts +182 -0
  52. package/dist/src/internal/qs/LICENSE.md +13 -0
  53. package/dist/src/internal/qs/README.md +3 -0
  54. package/dist/src/internal/qs/formats.ts +15 -0
  55. package/dist/src/internal/qs/index.ts +19 -0
  56. package/dist/src/internal/qs/stringify.ts +394 -0
  57. package/dist/src/internal/qs/types.ts +77 -0
  58. package/dist/src/internal/qs/utils.ts +271 -0
  59. package/dist/src/internal/stream-utils.ts +38 -0
  60. package/dist/src/internal/utils/query.ts +13 -0
  61. package/dist/src/lib/.keep +4 -0
  62. package/dist/src/lib/response-helpers.ts +60 -0
  63. package/dist/src/pagination.ts +80 -0
  64. package/dist/src/resource.ts +18 -0
  65. package/dist/src/resources/alpha/admin.ts +87 -0
  66. package/dist/src/resources/alpha/alpha.ts +31 -0
  67. package/dist/src/resources/alpha/benchmarks.ts +152 -0
  68. package/dist/src/resources/alpha/index.ts +11 -0
  69. package/dist/src/resources/alpha/inference.ts +191 -0
  70. package/dist/src/resources/alpha.ts +9 -0
  71. package/dist/src/resources/batches.ts +692 -0
  72. package/dist/src/resources/chat/chat.ts +351 -0
  73. package/dist/src/resources/chat/completions.ts +2430 -0
  74. package/dist/src/resources/chat/index.ts +19 -0
  75. package/dist/src/resources/chat.ts +9 -0
  76. package/dist/src/resources/completions.ts +350 -0
  77. package/dist/src/resources/conversations/conversations.ts +627 -0
  78. package/dist/src/resources/conversations/index.ts +25 -0
  79. package/dist/src/resources/conversations/items.ts +2061 -0
  80. package/dist/src/resources/conversations.ts +9 -0
  81. package/dist/src/resources/embeddings.ts +130 -0
  82. package/dist/src/resources/files.ts +225 -0
  83. package/dist/src/resources/index.ts +104 -0
  84. package/dist/src/resources/inspect.ts +30 -0
  85. package/dist/src/resources/models/index.ts +10 -0
  86. package/dist/src/resources/models/models.ts +133 -0
  87. package/dist/src/resources/models/openai.ts +20 -0
  88. package/dist/src/resources/models.ts +9 -0
  89. package/dist/src/resources/moderations.ts +97 -0
  90. package/dist/src/resources/prompts/index.ts +19 -0
  91. package/dist/src/resources/prompts/prompts.ts +188 -0
  92. package/dist/src/resources/prompts/versions.ts +27 -0
  93. package/dist/src/resources/prompts.ts +9 -0
  94. package/dist/src/resources/providers.ts +41 -0
  95. package/dist/src/resources/responses/index.ts +26 -0
  96. package/dist/src/resources/responses/input-items.ts +571 -0
  97. package/dist/src/resources/responses/responses.ts +6718 -0
  98. package/dist/src/resources/responses.ts +9 -0
  99. package/dist/src/resources/routes.ts +55 -0
  100. package/dist/src/resources/safety.ts +367 -0
  101. package/dist/src/resources/shared.ts +544 -0
  102. package/dist/src/resources/shields.ts +119 -0
  103. package/dist/src/resources/vector-io.ts +485 -0
  104. package/dist/src/resources/vector-stores/file-batches.ts +386 -0
  105. package/dist/src/resources/vector-stores/files.ts +496 -0
  106. package/dist/src/resources/vector-stores/index.ts +38 -0
  107. package/dist/src/resources/vector-stores/vector-stores.ts +588 -0
  108. package/dist/src/resources/vector-stores.ts +9 -0
  109. package/dist/src/resources.ts +7 -0
  110. package/dist/src/shims/node.ts +56 -0
  111. package/dist/src/shims/web.ts +56 -0
  112. package/dist/src/streaming.ts +315 -0
  113. package/dist/src/uploads.ts +261 -0
  114. package/dist/src/version.ts +7 -0
  115. package/dist/version.d.ts +2 -0
  116. package/dist/version.d.ts.map +1 -0
  117. package/{version.js → dist/version.js} +1 -1
  118. package/{version.js.map → dist/version.js.map} +1 -1
  119. package/dist/version.mjs +7 -0
  120. package/{version.mjs.map → dist/version.mjs.map} +1 -1
  121. package/examples/.keep +4 -0
  122. package/jest.config.ts +29 -0
  123. package/package.json +55 -35
  124. package/release-please-config.json +64 -0
  125. package/scripts/bootstrap +30 -0
  126. package/scripts/build +56 -0
  127. package/scripts/fast-format +40 -0
  128. package/scripts/format +8 -0
  129. package/scripts/lint +11 -0
  130. package/scripts/mock +52 -0
  131. package/scripts/test +56 -0
  132. package/scripts/utils/check-is-in-git-install.sh +15 -0
  133. package/scripts/utils/check-version.cjs +27 -0
  134. package/scripts/utils/fix-index-exports.cjs +21 -0
  135. package/scripts/utils/git-swap.sh +19 -0
  136. package/scripts/utils/make-dist-package-json.cjs +28 -0
  137. package/scripts/utils/postprocess-files.cjs +172 -0
  138. package/scripts/utils/upload-artifact.sh +33 -0
  139. package/src/_shims/auto/runtime-deno.ts +10 -0
  140. package/src/_shims/auto/types-deno.ts +10 -0
  141. package/src/_shims/auto/types.d.ts +18 -18
  142. package/src/_shims/index-deno.ts +118 -0
  143. package/src/_shims/index.d.ts +1 -1
  144. package/src/_shims/index.mjs +1 -1
  145. package/src/lib/.keep +4 -0
  146. package/src/version.ts +1 -1
  147. package/tests/api-resources/alpha/admin.test.ts +111 -0
  148. package/tests/api-resources/alpha/inference.test.ts +38 -0
  149. package/tests/api-resources/batches.test.ts +100 -0
  150. package/tests/api-resources/chat/completions.test.ts +117 -0
  151. package/tests/api-resources/completions.test.ts +48 -0
  152. package/tests/api-resources/conversations/conversations.test.ts +76 -0
  153. package/tests/api-resources/conversations/items.test.ts +117 -0
  154. package/tests/api-resources/embeddings.test.ts +35 -0
  155. package/tests/api-resources/files.test.ts +123 -0
  156. package/tests/api-resources/inspect.test.ts +50 -0
  157. package/tests/api-resources/models/models.test.ts +50 -0
  158. package/tests/api-resources/models/openai.test.ts +32 -0
  159. package/tests/api-resources/moderations.test.ts +29 -0
  160. package/tests/api-resources/prompts/prompts.test.ts +125 -0
  161. package/tests/api-resources/prompts/versions.test.ts +32 -0
  162. package/tests/api-resources/providers.test.ts +50 -0
  163. package/tests/api-resources/responses/input-items.test.ts +49 -0
  164. package/tests/api-resources/responses/responses.test.ts +177 -0
  165. package/tests/api-resources/routes.test.ts +39 -0
  166. package/tests/api-resources/safety.test.ts +41 -0
  167. package/tests/api-resources/shields.test.ts +88 -0
  168. package/tests/api-resources/vector-io.test.ts +84 -0
  169. package/tests/api-resources/vector-stores/file-batches.test.ts +103 -0
  170. package/tests/api-resources/vector-stores/files.test.ts +153 -0
  171. package/tests/api-resources/vector-stores/vector-stores.test.ts +134 -0
  172. package/tests/form.test.ts +71 -0
  173. package/tests/index.test.ts +438 -0
  174. package/tests/internal/decoders/line.test.ts +134 -0
  175. package/tests/qs/empty-keys-cases.ts +277 -0
  176. package/tests/qs/stringify.test.ts +2238 -0
  177. package/tests/qs/utils.test.ts +175 -0
  178. package/tests/responses.test.ts +91 -0
  179. package/tests/streaming.test.ts +250 -0
  180. package/tests/stringifyQuery.test.ts +27 -0
  181. package/tests/uploads.test.ts +71 -0
  182. package/tsc-multi.json +7 -0
  183. package/tsconfig.build.json +18 -0
  184. package/tsconfig.deno.json +15 -0
  185. package/tsconfig.dist-src.json +11 -0
  186. package/tsconfig.json +38 -0
  187. package/ogx-client-0.7.2-rc1.tgz +0 -0
  188. package/version.d.ts +0 -2
  189. package/version.d.ts.map +0 -1
  190. package/version.mjs +0 -7
  191. /package/{_shims → dist/_shims}/MultipartBody.d.ts +0 -0
  192. /package/{_shims → dist/_shims}/MultipartBody.d.ts.map +0 -0
  193. /package/{_shims → dist/_shims}/MultipartBody.js +0 -0
  194. /package/{_shims → dist/_shims}/MultipartBody.js.map +0 -0
  195. /package/{_shims → dist/_shims}/MultipartBody.mjs +0 -0
  196. /package/{_shims → dist/_shims}/MultipartBody.mjs.map +0 -0
  197. /package/{_shims → dist/_shims}/README.md +0 -0
  198. /package/{_shims → dist/_shims}/auto/runtime-bun.d.ts +0 -0
  199. /package/{_shims → dist/_shims}/auto/runtime-bun.d.ts.map +0 -0
  200. /package/{_shims → dist/_shims}/auto/runtime-bun.js +0 -0
  201. /package/{_shims → dist/_shims}/auto/runtime-bun.js.map +0 -0
  202. /package/{_shims → dist/_shims}/auto/runtime-bun.mjs +0 -0
  203. /package/{_shims → dist/_shims}/auto/runtime-bun.mjs.map +0 -0
  204. /package/{_shims → dist/_shims}/auto/runtime-node.d.ts +0 -0
  205. /package/{_shims → dist/_shims}/auto/runtime-node.d.ts.map +0 -0
  206. /package/{_shims → dist/_shims}/auto/runtime-node.js +0 -0
  207. /package/{_shims → dist/_shims}/auto/runtime-node.js.map +0 -0
  208. /package/{_shims → dist/_shims}/auto/runtime-node.mjs +0 -0
  209. /package/{_shims → dist/_shims}/auto/runtime-node.mjs.map +0 -0
  210. /package/{_shims → dist/_shims}/auto/runtime.d.ts +0 -0
  211. /package/{_shims → dist/_shims}/auto/runtime.d.ts.map +0 -0
  212. /package/{_shims → dist/_shims}/auto/runtime.js +0 -0
  213. /package/{_shims → dist/_shims}/auto/runtime.js.map +0 -0
  214. /package/{_shims → dist/_shims}/auto/runtime.mjs +0 -0
  215. /package/{_shims → dist/_shims}/auto/runtime.mjs.map +0 -0
  216. /package/{_shims → dist/_shims}/auto/types-node.d.ts +0 -0
  217. /package/{_shims → dist/_shims}/auto/types-node.d.ts.map +0 -0
  218. /package/{_shims → dist/_shims}/auto/types-node.js +0 -0
  219. /package/{_shims → dist/_shims}/auto/types-node.js.map +0 -0
  220. /package/{_shims → dist/_shims}/auto/types-node.mjs +0 -0
  221. /package/{_shims → dist/_shims}/auto/types-node.mjs.map +0 -0
  222. /package/{_shims → dist/_shims}/auto/types.d.ts +0 -0
  223. /package/{_shims → dist/_shims}/auto/types.js +0 -0
  224. /package/{_shims → dist/_shims}/auto/types.mjs +0 -0
  225. /package/{_shims → dist/_shims}/bun-runtime.d.ts +0 -0
  226. /package/{_shims → dist/_shims}/bun-runtime.d.ts.map +0 -0
  227. /package/{_shims → dist/_shims}/bun-runtime.js +0 -0
  228. /package/{_shims → dist/_shims}/bun-runtime.js.map +0 -0
  229. /package/{_shims → dist/_shims}/bun-runtime.mjs +0 -0
  230. /package/{_shims → dist/_shims}/bun-runtime.mjs.map +0 -0
  231. /package/{_shims → dist/_shims}/index.d.ts +0 -0
  232. /package/{_shims → dist/_shims}/index.js +0 -0
  233. /package/{_shims → dist/_shims}/index.mjs +0 -0
  234. /package/{_shims → dist/_shims}/manual-types.d.ts +0 -0
  235. /package/{_shims → dist/_shims}/manual-types.js +0 -0
  236. /package/{_shims → dist/_shims}/manual-types.mjs +0 -0
  237. /package/{_shims → dist/_shims}/node-runtime.d.ts +0 -0
  238. /package/{_shims → dist/_shims}/node-runtime.d.ts.map +0 -0
  239. /package/{_shims → dist/_shims}/node-runtime.js +0 -0
  240. /package/{_shims → dist/_shims}/node-runtime.js.map +0 -0
  241. /package/{_shims → dist/_shims}/node-runtime.mjs +0 -0
  242. /package/{_shims → dist/_shims}/node-runtime.mjs.map +0 -0
  243. /package/{_shims → dist/_shims}/node-types.d.ts +0 -0
  244. /package/{_shims → dist/_shims}/node-types.js +0 -0
  245. /package/{_shims → dist/_shims}/node-types.mjs +0 -0
  246. /package/{_shims → dist/_shims}/registry.d.ts +0 -0
  247. /package/{_shims → dist/_shims}/registry.d.ts.map +0 -0
  248. /package/{_shims → dist/_shims}/registry.js +0 -0
  249. /package/{_shims → dist/_shims}/registry.js.map +0 -0
  250. /package/{_shims → dist/_shims}/registry.mjs +0 -0
  251. /package/{_shims → dist/_shims}/registry.mjs.map +0 -0
  252. /package/{_shims → dist/_shims}/web-runtime.d.ts +0 -0
  253. /package/{_shims → dist/_shims}/web-runtime.d.ts.map +0 -0
  254. /package/{_shims → dist/_shims}/web-runtime.js +0 -0
  255. /package/{_shims → dist/_shims}/web-runtime.js.map +0 -0
  256. /package/{_shims → dist/_shims}/web-runtime.mjs +0 -0
  257. /package/{_shims → dist/_shims}/web-runtime.mjs.map +0 -0
  258. /package/{_shims → dist/_shims}/web-types.d.ts +0 -0
  259. /package/{_shims → dist/_shims}/web-types.js +0 -0
  260. /package/{_shims → dist/_shims}/web-types.mjs +0 -0
  261. /package/{core.d.ts → dist/core.d.ts} +0 -0
  262. /package/{core.d.ts.map → dist/core.d.ts.map} +0 -0
  263. /package/{core.js → dist/core.js} +0 -0
  264. /package/{core.js.map → dist/core.js.map} +0 -0
  265. /package/{core.mjs → dist/core.mjs} +0 -0
  266. /package/{core.mjs.map → dist/core.mjs.map} +0 -0
  267. /package/{error.d.ts → dist/error.d.ts} +0 -0
  268. /package/{error.d.ts.map → dist/error.d.ts.map} +0 -0
  269. /package/{error.js → dist/error.js} +0 -0
  270. /package/{error.js.map → dist/error.js.map} +0 -0
  271. /package/{error.mjs → dist/error.mjs} +0 -0
  272. /package/{error.mjs.map → dist/error.mjs.map} +0 -0
  273. /package/{index.d.mts → dist/index.d.mts} +0 -0
  274. /package/{index.d.ts → dist/index.d.ts} +0 -0
  275. /package/{index.d.ts.map → dist/index.d.ts.map} +0 -0
  276. /package/{index.js → dist/index.js} +0 -0
  277. /package/{index.js.map → dist/index.js.map} +0 -0
  278. /package/{index.mjs → dist/index.mjs} +0 -0
  279. /package/{index.mjs.map → dist/index.mjs.map} +0 -0
  280. /package/{internal → dist/internal}/decoders/line.d.ts +0 -0
  281. /package/{internal → dist/internal}/decoders/line.d.ts.map +0 -0
  282. /package/{internal → dist/internal}/decoders/line.js +0 -0
  283. /package/{internal → dist/internal}/decoders/line.js.map +0 -0
  284. /package/{internal → dist/internal}/decoders/line.mjs +0 -0
  285. /package/{internal → dist/internal}/decoders/line.mjs.map +0 -0
  286. /package/{internal → dist/internal}/qs/formats.d.ts +0 -0
  287. /package/{internal → dist/internal}/qs/formats.d.ts.map +0 -0
  288. /package/{internal → dist/internal}/qs/formats.js +0 -0
  289. /package/{internal → dist/internal}/qs/formats.js.map +0 -0
  290. /package/{internal → dist/internal}/qs/formats.mjs +0 -0
  291. /package/{internal → dist/internal}/qs/formats.mjs.map +0 -0
  292. /package/{internal → dist/internal}/qs/index.d.ts +0 -0
  293. /package/{internal → dist/internal}/qs/index.d.ts.map +0 -0
  294. /package/{internal → dist/internal}/qs/index.js +0 -0
  295. /package/{internal → dist/internal}/qs/index.js.map +0 -0
  296. /package/{internal → dist/internal}/qs/index.mjs +0 -0
  297. /package/{internal → dist/internal}/qs/index.mjs.map +0 -0
  298. /package/{internal → dist/internal}/qs/stringify.d.ts +0 -0
  299. /package/{internal → dist/internal}/qs/stringify.d.ts.map +0 -0
  300. /package/{internal → dist/internal}/qs/stringify.js +0 -0
  301. /package/{internal → dist/internal}/qs/stringify.js.map +0 -0
  302. /package/{internal → dist/internal}/qs/stringify.mjs +0 -0
  303. /package/{internal → dist/internal}/qs/stringify.mjs.map +0 -0
  304. /package/{internal → dist/internal}/qs/types.d.ts +0 -0
  305. /package/{internal → dist/internal}/qs/types.d.ts.map +0 -0
  306. /package/{internal → dist/internal}/qs/types.js +0 -0
  307. /package/{internal → dist/internal}/qs/types.js.map +0 -0
  308. /package/{internal → dist/internal}/qs/types.mjs +0 -0
  309. /package/{internal → dist/internal}/qs/types.mjs.map +0 -0
  310. /package/{internal → dist/internal}/qs/utils.d.ts +0 -0
  311. /package/{internal → dist/internal}/qs/utils.d.ts.map +0 -0
  312. /package/{internal → dist/internal}/qs/utils.js +0 -0
  313. /package/{internal → dist/internal}/qs/utils.js.map +0 -0
  314. /package/{internal → dist/internal}/qs/utils.mjs +0 -0
  315. /package/{internal → dist/internal}/qs/utils.mjs.map +0 -0
  316. /package/{internal → dist/internal}/stream-utils.d.ts +0 -0
  317. /package/{internal → dist/internal}/stream-utils.d.ts.map +0 -0
  318. /package/{internal → dist/internal}/stream-utils.js +0 -0
  319. /package/{internal → dist/internal}/stream-utils.js.map +0 -0
  320. /package/{internal → dist/internal}/stream-utils.mjs +0 -0
  321. /package/{internal → dist/internal}/stream-utils.mjs.map +0 -0
  322. /package/{internal → dist/internal}/utils/query.d.ts +0 -0
  323. /package/{internal → dist/internal}/utils/query.d.ts.map +0 -0
  324. /package/{internal → dist/internal}/utils/query.js +0 -0
  325. /package/{internal → dist/internal}/utils/query.js.map +0 -0
  326. /package/{internal → dist/internal}/utils/query.mjs +0 -0
  327. /package/{internal → dist/internal}/utils/query.mjs.map +0 -0
  328. /package/{lib → dist/lib}/response-helpers.d.ts +0 -0
  329. /package/{lib → dist/lib}/response-helpers.d.ts.map +0 -0
  330. /package/{lib → dist/lib}/response-helpers.js +0 -0
  331. /package/{lib → dist/lib}/response-helpers.js.map +0 -0
  332. /package/{lib → dist/lib}/response-helpers.mjs +0 -0
  333. /package/{lib → dist/lib}/response-helpers.mjs.map +0 -0
  334. /package/{pagination.d.ts → dist/pagination.d.ts} +0 -0
  335. /package/{pagination.d.ts.map → dist/pagination.d.ts.map} +0 -0
  336. /package/{pagination.js → dist/pagination.js} +0 -0
  337. /package/{pagination.js.map → dist/pagination.js.map} +0 -0
  338. /package/{pagination.mjs → dist/pagination.mjs} +0 -0
  339. /package/{pagination.mjs.map → dist/pagination.mjs.map} +0 -0
  340. /package/{resource.d.ts → dist/resource.d.ts} +0 -0
  341. /package/{resource.d.ts.map → dist/resource.d.ts.map} +0 -0
  342. /package/{resource.js → dist/resource.js} +0 -0
  343. /package/{resource.js.map → dist/resource.js.map} +0 -0
  344. /package/{resource.mjs → dist/resource.mjs} +0 -0
  345. /package/{resource.mjs.map → dist/resource.mjs.map} +0 -0
  346. /package/{resources → dist/resources}/alpha/admin.d.ts +0 -0
  347. /package/{resources → dist/resources}/alpha/admin.d.ts.map +0 -0
  348. /package/{resources → dist/resources}/alpha/admin.js +0 -0
  349. /package/{resources → dist/resources}/alpha/admin.js.map +0 -0
  350. /package/{resources → dist/resources}/alpha/admin.mjs +0 -0
  351. /package/{resources → dist/resources}/alpha/admin.mjs.map +0 -0
  352. /package/{resources → dist/resources}/alpha/alpha.d.ts +0 -0
  353. /package/{resources → dist/resources}/alpha/alpha.d.ts.map +0 -0
  354. /package/{resources → dist/resources}/alpha/alpha.js +0 -0
  355. /package/{resources → dist/resources}/alpha/alpha.js.map +0 -0
  356. /package/{resources → dist/resources}/alpha/alpha.mjs +0 -0
  357. /package/{resources → dist/resources}/alpha/alpha.mjs.map +0 -0
  358. /package/{resources → dist/resources}/alpha/benchmarks.d.ts +0 -0
  359. /package/{resources → dist/resources}/alpha/benchmarks.d.ts.map +0 -0
  360. /package/{resources → dist/resources}/alpha/benchmarks.js +0 -0
  361. /package/{resources → dist/resources}/alpha/benchmarks.js.map +0 -0
  362. /package/{resources → dist/resources}/alpha/benchmarks.mjs +0 -0
  363. /package/{resources → dist/resources}/alpha/benchmarks.mjs.map +0 -0
  364. /package/{resources → dist/resources}/alpha/index.d.ts +0 -0
  365. /package/{resources → dist/resources}/alpha/index.d.ts.map +0 -0
  366. /package/{resources → dist/resources}/alpha/index.js +0 -0
  367. /package/{resources → dist/resources}/alpha/index.js.map +0 -0
  368. /package/{resources → dist/resources}/alpha/index.mjs +0 -0
  369. /package/{resources → dist/resources}/alpha/index.mjs.map +0 -0
  370. /package/{resources → dist/resources}/alpha/inference.d.ts +0 -0
  371. /package/{resources → dist/resources}/alpha/inference.d.ts.map +0 -0
  372. /package/{resources → dist/resources}/alpha/inference.js +0 -0
  373. /package/{resources → dist/resources}/alpha/inference.js.map +0 -0
  374. /package/{resources → dist/resources}/alpha/inference.mjs +0 -0
  375. /package/{resources → dist/resources}/alpha/inference.mjs.map +0 -0
  376. /package/{resources → dist/resources}/alpha.d.ts +0 -0
  377. /package/{resources → dist/resources}/alpha.d.ts.map +0 -0
  378. /package/{resources → dist/resources}/alpha.js +0 -0
  379. /package/{resources → dist/resources}/alpha.js.map +0 -0
  380. /package/{resources → dist/resources}/alpha.mjs +0 -0
  381. /package/{resources → dist/resources}/alpha.mjs.map +0 -0
  382. /package/{resources → dist/resources}/batches.d.ts +0 -0
  383. /package/{resources → dist/resources}/batches.d.ts.map +0 -0
  384. /package/{resources → dist/resources}/batches.js +0 -0
  385. /package/{resources → dist/resources}/batches.js.map +0 -0
  386. /package/{resources → dist/resources}/batches.mjs +0 -0
  387. /package/{resources → dist/resources}/batches.mjs.map +0 -0
  388. /package/{resources → dist/resources}/chat/chat.d.ts +0 -0
  389. /package/{resources → dist/resources}/chat/chat.d.ts.map +0 -0
  390. /package/{resources → dist/resources}/chat/chat.js +0 -0
  391. /package/{resources → dist/resources}/chat/chat.js.map +0 -0
  392. /package/{resources → dist/resources}/chat/chat.mjs +0 -0
  393. /package/{resources → dist/resources}/chat/chat.mjs.map +0 -0
  394. /package/{resources → dist/resources}/chat/completions.d.ts +0 -0
  395. /package/{resources → dist/resources}/chat/completions.d.ts.map +0 -0
  396. /package/{resources → dist/resources}/chat/completions.js +0 -0
  397. /package/{resources → dist/resources}/chat/completions.js.map +0 -0
  398. /package/{resources → dist/resources}/chat/completions.mjs +0 -0
  399. /package/{resources → dist/resources}/chat/completions.mjs.map +0 -0
  400. /package/{resources → dist/resources}/chat/index.d.ts +0 -0
  401. /package/{resources → dist/resources}/chat/index.d.ts.map +0 -0
  402. /package/{resources → dist/resources}/chat/index.js +0 -0
  403. /package/{resources → dist/resources}/chat/index.js.map +0 -0
  404. /package/{resources → dist/resources}/chat/index.mjs +0 -0
  405. /package/{resources → dist/resources}/chat/index.mjs.map +0 -0
  406. /package/{resources → dist/resources}/chat.d.ts +0 -0
  407. /package/{resources → dist/resources}/chat.d.ts.map +0 -0
  408. /package/{resources → dist/resources}/chat.js +0 -0
  409. /package/{resources → dist/resources}/chat.js.map +0 -0
  410. /package/{resources → dist/resources}/chat.mjs +0 -0
  411. /package/{resources → dist/resources}/chat.mjs.map +0 -0
  412. /package/{resources → dist/resources}/completions.d.ts +0 -0
  413. /package/{resources → dist/resources}/completions.d.ts.map +0 -0
  414. /package/{resources → dist/resources}/completions.js +0 -0
  415. /package/{resources → dist/resources}/completions.js.map +0 -0
  416. /package/{resources → dist/resources}/completions.mjs +0 -0
  417. /package/{resources → dist/resources}/completions.mjs.map +0 -0
  418. /package/{resources → dist/resources}/conversations/conversations.d.ts +0 -0
  419. /package/{resources → dist/resources}/conversations/conversations.d.ts.map +0 -0
  420. /package/{resources → dist/resources}/conversations/conversations.js +0 -0
  421. /package/{resources → dist/resources}/conversations/conversations.js.map +0 -0
  422. /package/{resources → dist/resources}/conversations/conversations.mjs +0 -0
  423. /package/{resources → dist/resources}/conversations/conversations.mjs.map +0 -0
  424. /package/{resources → dist/resources}/conversations/index.d.ts +0 -0
  425. /package/{resources → dist/resources}/conversations/index.d.ts.map +0 -0
  426. /package/{resources → dist/resources}/conversations/index.js +0 -0
  427. /package/{resources → dist/resources}/conversations/index.js.map +0 -0
  428. /package/{resources → dist/resources}/conversations/index.mjs +0 -0
  429. /package/{resources → dist/resources}/conversations/index.mjs.map +0 -0
  430. /package/{resources → dist/resources}/conversations/items.d.ts +0 -0
  431. /package/{resources → dist/resources}/conversations/items.d.ts.map +0 -0
  432. /package/{resources → dist/resources}/conversations/items.js +0 -0
  433. /package/{resources → dist/resources}/conversations/items.js.map +0 -0
  434. /package/{resources → dist/resources}/conversations/items.mjs +0 -0
  435. /package/{resources → dist/resources}/conversations/items.mjs.map +0 -0
  436. /package/{resources → dist/resources}/conversations.d.ts +0 -0
  437. /package/{resources → dist/resources}/conversations.d.ts.map +0 -0
  438. /package/{resources → dist/resources}/conversations.js +0 -0
  439. /package/{resources → dist/resources}/conversations.js.map +0 -0
  440. /package/{resources → dist/resources}/conversations.mjs +0 -0
  441. /package/{resources → dist/resources}/conversations.mjs.map +0 -0
  442. /package/{resources → dist/resources}/embeddings.d.ts +0 -0
  443. /package/{resources → dist/resources}/embeddings.d.ts.map +0 -0
  444. /package/{resources → dist/resources}/embeddings.js +0 -0
  445. /package/{resources → dist/resources}/embeddings.js.map +0 -0
  446. /package/{resources → dist/resources}/embeddings.mjs +0 -0
  447. /package/{resources → dist/resources}/embeddings.mjs.map +0 -0
  448. /package/{resources → dist/resources}/files.d.ts +0 -0
  449. /package/{resources → dist/resources}/files.d.ts.map +0 -0
  450. /package/{resources → dist/resources}/files.js +0 -0
  451. /package/{resources → dist/resources}/files.js.map +0 -0
  452. /package/{resources → dist/resources}/files.mjs +0 -0
  453. /package/{resources → dist/resources}/files.mjs.map +0 -0
  454. /package/{resources → dist/resources}/index.d.ts +0 -0
  455. /package/{resources → dist/resources}/index.d.ts.map +0 -0
  456. /package/{resources → dist/resources}/index.js +0 -0
  457. /package/{resources → dist/resources}/index.js.map +0 -0
  458. /package/{resources → dist/resources}/index.mjs +0 -0
  459. /package/{resources → dist/resources}/index.mjs.map +0 -0
  460. /package/{resources → dist/resources}/inspect.d.ts +0 -0
  461. /package/{resources → dist/resources}/inspect.d.ts.map +0 -0
  462. /package/{resources → dist/resources}/inspect.js +0 -0
  463. /package/{resources → dist/resources}/inspect.js.map +0 -0
  464. /package/{resources → dist/resources}/inspect.mjs +0 -0
  465. /package/{resources → dist/resources}/inspect.mjs.map +0 -0
  466. /package/{resources → dist/resources}/models/index.d.ts +0 -0
  467. /package/{resources → dist/resources}/models/index.d.ts.map +0 -0
  468. /package/{resources → dist/resources}/models/index.js +0 -0
  469. /package/{resources → dist/resources}/models/index.js.map +0 -0
  470. /package/{resources → dist/resources}/models/index.mjs +0 -0
  471. /package/{resources → dist/resources}/models/index.mjs.map +0 -0
  472. /package/{resources → dist/resources}/models/models.d.ts +0 -0
  473. /package/{resources → dist/resources}/models/models.d.ts.map +0 -0
  474. /package/{resources → dist/resources}/models/models.js +0 -0
  475. /package/{resources → dist/resources}/models/models.js.map +0 -0
  476. /package/{resources → dist/resources}/models/models.mjs +0 -0
  477. /package/{resources → dist/resources}/models/models.mjs.map +0 -0
  478. /package/{resources → dist/resources}/models/openai.d.ts +0 -0
  479. /package/{resources → dist/resources}/models/openai.d.ts.map +0 -0
  480. /package/{resources → dist/resources}/models/openai.js +0 -0
  481. /package/{resources → dist/resources}/models/openai.js.map +0 -0
  482. /package/{resources → dist/resources}/models/openai.mjs +0 -0
  483. /package/{resources → dist/resources}/models/openai.mjs.map +0 -0
  484. /package/{resources → dist/resources}/models.d.ts +0 -0
  485. /package/{resources → dist/resources}/models.d.ts.map +0 -0
  486. /package/{resources → dist/resources}/models.js +0 -0
  487. /package/{resources → dist/resources}/models.js.map +0 -0
  488. /package/{resources → dist/resources}/models.mjs +0 -0
  489. /package/{resources → dist/resources}/models.mjs.map +0 -0
  490. /package/{resources → dist/resources}/moderations.d.ts +0 -0
  491. /package/{resources → dist/resources}/moderations.d.ts.map +0 -0
  492. /package/{resources → dist/resources}/moderations.js +0 -0
  493. /package/{resources → dist/resources}/moderations.js.map +0 -0
  494. /package/{resources → dist/resources}/moderations.mjs +0 -0
  495. /package/{resources → dist/resources}/moderations.mjs.map +0 -0
  496. /package/{resources → dist/resources}/prompts/index.d.ts +0 -0
  497. /package/{resources → dist/resources}/prompts/index.d.ts.map +0 -0
  498. /package/{resources → dist/resources}/prompts/index.js +0 -0
  499. /package/{resources → dist/resources}/prompts/index.js.map +0 -0
  500. /package/{resources → dist/resources}/prompts/index.mjs +0 -0
  501. /package/{resources → dist/resources}/prompts/index.mjs.map +0 -0
  502. /package/{resources → dist/resources}/prompts/prompts.d.ts +0 -0
  503. /package/{resources → dist/resources}/prompts/prompts.d.ts.map +0 -0
  504. /package/{resources → dist/resources}/prompts/prompts.js +0 -0
  505. /package/{resources → dist/resources}/prompts/prompts.js.map +0 -0
  506. /package/{resources → dist/resources}/prompts/prompts.mjs +0 -0
  507. /package/{resources → dist/resources}/prompts/prompts.mjs.map +0 -0
  508. /package/{resources → dist/resources}/prompts/versions.d.ts +0 -0
  509. /package/{resources → dist/resources}/prompts/versions.d.ts.map +0 -0
  510. /package/{resources → dist/resources}/prompts/versions.js +0 -0
  511. /package/{resources → dist/resources}/prompts/versions.js.map +0 -0
  512. /package/{resources → dist/resources}/prompts/versions.mjs +0 -0
  513. /package/{resources → dist/resources}/prompts/versions.mjs.map +0 -0
  514. /package/{resources → dist/resources}/prompts.d.ts +0 -0
  515. /package/{resources → dist/resources}/prompts.d.ts.map +0 -0
  516. /package/{resources → dist/resources}/prompts.js +0 -0
  517. /package/{resources → dist/resources}/prompts.js.map +0 -0
  518. /package/{resources → dist/resources}/prompts.mjs +0 -0
  519. /package/{resources → dist/resources}/prompts.mjs.map +0 -0
  520. /package/{resources → dist/resources}/providers.d.ts +0 -0
  521. /package/{resources → dist/resources}/providers.d.ts.map +0 -0
  522. /package/{resources → dist/resources}/providers.js +0 -0
  523. /package/{resources → dist/resources}/providers.js.map +0 -0
  524. /package/{resources → dist/resources}/providers.mjs +0 -0
  525. /package/{resources → dist/resources}/providers.mjs.map +0 -0
  526. /package/{resources → dist/resources}/responses/index.d.ts +0 -0
  527. /package/{resources → dist/resources}/responses/index.d.ts.map +0 -0
  528. /package/{resources → dist/resources}/responses/index.js +0 -0
  529. /package/{resources → dist/resources}/responses/index.js.map +0 -0
  530. /package/{resources → dist/resources}/responses/index.mjs +0 -0
  531. /package/{resources → dist/resources}/responses/index.mjs.map +0 -0
  532. /package/{resources → dist/resources}/responses/input-items.d.ts +0 -0
  533. /package/{resources → dist/resources}/responses/input-items.d.ts.map +0 -0
  534. /package/{resources → dist/resources}/responses/input-items.js +0 -0
  535. /package/{resources → dist/resources}/responses/input-items.js.map +0 -0
  536. /package/{resources → dist/resources}/responses/input-items.mjs +0 -0
  537. /package/{resources → dist/resources}/responses/input-items.mjs.map +0 -0
  538. /package/{resources → dist/resources}/responses/responses.d.ts +0 -0
  539. /package/{resources → dist/resources}/responses/responses.d.ts.map +0 -0
  540. /package/{resources → dist/resources}/responses/responses.js +0 -0
  541. /package/{resources → dist/resources}/responses/responses.js.map +0 -0
  542. /package/{resources → dist/resources}/responses/responses.mjs +0 -0
  543. /package/{resources → dist/resources}/responses/responses.mjs.map +0 -0
  544. /package/{resources → dist/resources}/responses.d.ts +0 -0
  545. /package/{resources → dist/resources}/responses.d.ts.map +0 -0
  546. /package/{resources → dist/resources}/responses.js +0 -0
  547. /package/{resources → dist/resources}/responses.js.map +0 -0
  548. /package/{resources → dist/resources}/responses.mjs +0 -0
  549. /package/{resources → dist/resources}/responses.mjs.map +0 -0
  550. /package/{resources → dist/resources}/routes.d.ts +0 -0
  551. /package/{resources → dist/resources}/routes.d.ts.map +0 -0
  552. /package/{resources → dist/resources}/routes.js +0 -0
  553. /package/{resources → dist/resources}/routes.js.map +0 -0
  554. /package/{resources → dist/resources}/routes.mjs +0 -0
  555. /package/{resources → dist/resources}/routes.mjs.map +0 -0
  556. /package/{resources → dist/resources}/safety.d.ts +0 -0
  557. /package/{resources → dist/resources}/safety.d.ts.map +0 -0
  558. /package/{resources → dist/resources}/safety.js +0 -0
  559. /package/{resources → dist/resources}/safety.js.map +0 -0
  560. /package/{resources → dist/resources}/safety.mjs +0 -0
  561. /package/{resources → dist/resources}/safety.mjs.map +0 -0
  562. /package/{resources → dist/resources}/shared.d.ts +0 -0
  563. /package/{resources → dist/resources}/shared.d.ts.map +0 -0
  564. /package/{resources → dist/resources}/shared.js +0 -0
  565. /package/{resources → dist/resources}/shared.js.map +0 -0
  566. /package/{resources → dist/resources}/shared.mjs +0 -0
  567. /package/{resources → dist/resources}/shared.mjs.map +0 -0
  568. /package/{resources → dist/resources}/shields.d.ts +0 -0
  569. /package/{resources → dist/resources}/shields.d.ts.map +0 -0
  570. /package/{resources → dist/resources}/shields.js +0 -0
  571. /package/{resources → dist/resources}/shields.js.map +0 -0
  572. /package/{resources → dist/resources}/shields.mjs +0 -0
  573. /package/{resources → dist/resources}/shields.mjs.map +0 -0
  574. /package/{resources → dist/resources}/vector-io.d.ts +0 -0
  575. /package/{resources → dist/resources}/vector-io.d.ts.map +0 -0
  576. /package/{resources → dist/resources}/vector-io.js +0 -0
  577. /package/{resources → dist/resources}/vector-io.js.map +0 -0
  578. /package/{resources → dist/resources}/vector-io.mjs +0 -0
  579. /package/{resources → dist/resources}/vector-io.mjs.map +0 -0
  580. /package/{resources → dist/resources}/vector-stores/file-batches.d.ts +0 -0
  581. /package/{resources → dist/resources}/vector-stores/file-batches.d.ts.map +0 -0
  582. /package/{resources → dist/resources}/vector-stores/file-batches.js +0 -0
  583. /package/{resources → dist/resources}/vector-stores/file-batches.js.map +0 -0
  584. /package/{resources → dist/resources}/vector-stores/file-batches.mjs +0 -0
  585. /package/{resources → dist/resources}/vector-stores/file-batches.mjs.map +0 -0
  586. /package/{resources → dist/resources}/vector-stores/files.d.ts +0 -0
  587. /package/{resources → dist/resources}/vector-stores/files.d.ts.map +0 -0
  588. /package/{resources → dist/resources}/vector-stores/files.js +0 -0
  589. /package/{resources → dist/resources}/vector-stores/files.js.map +0 -0
  590. /package/{resources → dist/resources}/vector-stores/files.mjs +0 -0
  591. /package/{resources → dist/resources}/vector-stores/files.mjs.map +0 -0
  592. /package/{resources → dist/resources}/vector-stores/index.d.ts +0 -0
  593. /package/{resources → dist/resources}/vector-stores/index.d.ts.map +0 -0
  594. /package/{resources → dist/resources}/vector-stores/index.js +0 -0
  595. /package/{resources → dist/resources}/vector-stores/index.js.map +0 -0
  596. /package/{resources → dist/resources}/vector-stores/index.mjs +0 -0
  597. /package/{resources → dist/resources}/vector-stores/index.mjs.map +0 -0
  598. /package/{resources → dist/resources}/vector-stores/vector-stores.d.ts +0 -0
  599. /package/{resources → dist/resources}/vector-stores/vector-stores.d.ts.map +0 -0
  600. /package/{resources → dist/resources}/vector-stores/vector-stores.js +0 -0
  601. /package/{resources → dist/resources}/vector-stores/vector-stores.js.map +0 -0
  602. /package/{resources → dist/resources}/vector-stores/vector-stores.mjs +0 -0
  603. /package/{resources → dist/resources}/vector-stores/vector-stores.mjs.map +0 -0
  604. /package/{resources → dist/resources}/vector-stores.d.ts +0 -0
  605. /package/{resources → dist/resources}/vector-stores.d.ts.map +0 -0
  606. /package/{resources → dist/resources}/vector-stores.js +0 -0
  607. /package/{resources → dist/resources}/vector-stores.js.map +0 -0
  608. /package/{resources → dist/resources}/vector-stores.mjs +0 -0
  609. /package/{resources → dist/resources}/vector-stores.mjs.map +0 -0
  610. /package/{resources.d.ts → dist/resources.d.ts} +0 -0
  611. /package/{resources.d.ts.map → dist/resources.d.ts.map} +0 -0
  612. /package/{resources.js → dist/resources.js} +0 -0
  613. /package/{resources.js.map → dist/resources.js.map} +0 -0
  614. /package/{resources.mjs → dist/resources.mjs} +0 -0
  615. /package/{resources.mjs.map → dist/resources.mjs.map} +0 -0
  616. /package/{shims → dist/shims}/node.d.ts +0 -0
  617. /package/{shims → dist/shims}/node.d.ts.map +0 -0
  618. /package/{shims → dist/shims}/node.js +0 -0
  619. /package/{shims → dist/shims}/node.js.map +0 -0
  620. /package/{shims → dist/shims}/node.mjs +0 -0
  621. /package/{shims → dist/shims}/node.mjs.map +0 -0
  622. /package/{shims → dist/shims}/web.d.ts +0 -0
  623. /package/{shims → dist/shims}/web.d.ts.map +0 -0
  624. /package/{shims → dist/shims}/web.js +0 -0
  625. /package/{shims → dist/shims}/web.js.map +0 -0
  626. /package/{shims → dist/shims}/web.mjs +0 -0
  627. /package/{shims → dist/shims}/web.mjs.map +0 -0
  628. /package/{src → dist/src}/tsconfig.json +0 -0
  629. /package/{streaming.d.ts → dist/streaming.d.ts} +0 -0
  630. /package/{streaming.d.ts.map → dist/streaming.d.ts.map} +0 -0
  631. /package/{streaming.js → dist/streaming.js} +0 -0
  632. /package/{streaming.js.map → dist/streaming.js.map} +0 -0
  633. /package/{streaming.mjs → dist/streaming.mjs} +0 -0
  634. /package/{streaming.mjs.map → dist/streaming.mjs.map} +0 -0
  635. /package/{uploads.d.ts → dist/uploads.d.ts} +0 -0
  636. /package/{uploads.d.ts.map → dist/uploads.d.ts.map} +0 -0
  637. /package/{uploads.js → dist/uploads.js} +0 -0
  638. /package/{uploads.js.map → dist/uploads.js.map} +0 -0
  639. /package/{uploads.mjs → dist/uploads.mjs} +0 -0
  640. /package/{uploads.mjs.map → dist/uploads.mjs.map} +0 -0
@@ -0,0 +1,627 @@
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
+
9
+ import { APIResource } from '../../resource';
10
+ import * as Core from '../../core';
11
+ import * as ItemsAPI from './items';
12
+ import {
13
+ ItemCreateParams,
14
+ ItemCreateResponse,
15
+ ItemDeleteResponse,
16
+ ItemGetResponse,
17
+ ItemListParams,
18
+ ItemListResponse,
19
+ ItemListResponsesOpenAICursorPage,
20
+ Items,
21
+ } from './items';
22
+
23
+ /**
24
+ * Protocol for conversation management operations.
25
+ */
26
+ export class Conversations extends APIResource {
27
+ items: ItemsAPI.Items = new ItemsAPI.Items(this._client);
28
+
29
+ /**
30
+ * Create a conversation.
31
+ */
32
+ create(body: ConversationCreateParams, options?: Core.RequestOptions): Core.APIPromise<ConversationObject> {
33
+ return this._client.post('/v1/conversations', { body, ...options });
34
+ }
35
+
36
+ /**
37
+ * Get a conversation with the given ID.
38
+ */
39
+ retrieve(conversationId: string, options?: Core.RequestOptions): Core.APIPromise<ConversationObject> {
40
+ return this._client.get(`/v1/conversations/${conversationId}`, options);
41
+ }
42
+
43
+ /**
44
+ * Update a conversation's metadata with the given ID.
45
+ */
46
+ update(
47
+ conversationId: string,
48
+ body: ConversationUpdateParams,
49
+ options?: Core.RequestOptions,
50
+ ): Core.APIPromise<ConversationObject> {
51
+ return this._client.post(`/v1/conversations/${conversationId}`, { body, ...options });
52
+ }
53
+
54
+ /**
55
+ * Delete a conversation with the given ID.
56
+ */
57
+ delete(conversationId: string, options?: Core.RequestOptions): Core.APIPromise<ConversationDeleteResponse> {
58
+ return this._client.delete(`/v1/conversations/${conversationId}`, options);
59
+ }
60
+ }
61
+
62
+ /**
63
+ * OpenAI-compatible conversation object.
64
+ */
65
+ export interface ConversationObject {
66
+ /**
67
+ * The unique ID of the conversation.
68
+ */
69
+ id: string;
70
+
71
+ /**
72
+ * The time at which the conversation was created, measured in seconds since the
73
+ * Unix epoch.
74
+ */
75
+ created_at: number;
76
+
77
+ /**
78
+ * Initial items to include in the conversation context. You may add up to 20 items
79
+ * at a time.
80
+ */
81
+ items?: Array<{ [key: string]: unknown }> | null;
82
+
83
+ /**
84
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
85
+ * for storing additional information about the object in a structured format, and
86
+ * querying for objects via API or the dashboard.
87
+ */
88
+ metadata?: { [key: string]: string } | null;
89
+
90
+ /**
91
+ * The object type, which is always conversation.
92
+ */
93
+ object?: 'conversation';
94
+ }
95
+
96
+ /**
97
+ * Response for deleted conversation.
98
+ */
99
+ export interface ConversationDeleteResponse {
100
+ /**
101
+ * The deleted conversation identifier
102
+ */
103
+ id: string;
104
+
105
+ /**
106
+ * Whether the object was deleted
107
+ */
108
+ deleted?: boolean;
109
+
110
+ /**
111
+ * Object type
112
+ */
113
+ object?: string;
114
+ }
115
+
116
+ export interface ConversationCreateParams {
117
+ /**
118
+ * Initial items to include in the conversation context.
119
+ */
120
+ items?: Array<
121
+ | ConversationCreateParams.OpenAIResponseMessageInput
122
+ | ConversationCreateParams.OpenAIResponseOutputMessageWebSearchToolCall
123
+ | ConversationCreateParams.OpenAIResponseOutputMessageFileSearchToolCall
124
+ | ConversationCreateParams.OpenAIResponseOutputMessageFunctionToolCall
125
+ | ConversationCreateParams.OpenAIResponseInputFunctionToolCallOutput
126
+ | ConversationCreateParams.OpenAIResponseMcpApprovalRequest
127
+ | ConversationCreateParams.OpenAIResponseMcpApprovalResponse
128
+ | ConversationCreateParams.OpenAIResponseOutputMessageMcpCall
129
+ | ConversationCreateParams.OpenAIResponseOutputMessageMcpListTools
130
+ | ConversationCreateParams.OpenAIResponseOutputMessageReasoningItem
131
+ > | null;
132
+
133
+ /**
134
+ * Set of key-value pairs that can be attached to an object.
135
+ */
136
+ metadata?: { [key: string]: string } | null;
137
+ }
138
+
139
+ export namespace ConversationCreateParams {
140
+ /**
141
+ * Corresponds to the various Message types in the Responses API. They are all
142
+ * under one type because the Responses API gives them all the same "type" value,
143
+ * and there is no way to tell them apart in certain scenarios.
144
+ */
145
+ export interface OpenAIResponseMessageInput {
146
+ content:
147
+ | string
148
+ | Array<
149
+ | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentText
150
+ | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentImage
151
+ | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile
152
+ >
153
+ | Array<
154
+ | OpenAIResponseMessageInput.OpenAIResponseOutputMessageContentOutputTextInput
155
+ | OpenAIResponseMessageInput.OpenAIResponseContentPartRefusal
156
+ >;
157
+
158
+ role: 'system' | 'developer' | 'user' | 'assistant';
159
+
160
+ id?: string | null;
161
+
162
+ status?: string | null;
163
+
164
+ type?: 'message';
165
+ }
166
+
167
+ export namespace OpenAIResponseMessageInput {
168
+ /**
169
+ * Text content for input messages in OpenAI response format.
170
+ */
171
+ export interface OpenAIResponseInputMessageContentText {
172
+ text: string;
173
+
174
+ type?: 'input_text';
175
+ }
176
+
177
+ /**
178
+ * Image content for input messages in OpenAI response format.
179
+ */
180
+ export interface OpenAIResponseInputMessageContentImage {
181
+ detail?: 'low' | 'high' | 'auto';
182
+
183
+ file_id?: string | null;
184
+
185
+ image_url?: string | null;
186
+
187
+ type?: 'input_image';
188
+ }
189
+
190
+ /**
191
+ * File content for input messages in OpenAI response format.
192
+ */
193
+ export interface OpenAIResponseInputMessageContentFile {
194
+ file_data?: string | null;
195
+
196
+ file_id?: string | null;
197
+
198
+ file_url?: string | null;
199
+
200
+ filename?: string | null;
201
+
202
+ type?: 'input_file';
203
+ }
204
+
205
+ /**
206
+ * Text content within an output message of an OpenAI response.
207
+ */
208
+ export interface OpenAIResponseOutputMessageContentOutputTextInput {
209
+ text: string;
210
+
211
+ annotations?: Array<
212
+ | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFileCitation
213
+ | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationCitation
214
+ | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationContainerFileCitation
215
+ | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFilePath
216
+ >;
217
+
218
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextInput.Logprob> | null;
219
+
220
+ type?: 'output_text';
221
+ }
222
+
223
+ export namespace OpenAIResponseOutputMessageContentOutputTextInput {
224
+ /**
225
+ * File citation annotation for referencing specific files in response content.
226
+ */
227
+ export interface OpenAIResponseAnnotationFileCitation {
228
+ file_id: string;
229
+
230
+ filename: string;
231
+
232
+ index: number;
233
+
234
+ type?: 'file_citation';
235
+ }
236
+
237
+ /**
238
+ * URL citation annotation for referencing external web resources.
239
+ */
240
+ export interface OpenAIResponseAnnotationCitation {
241
+ end_index: number;
242
+
243
+ start_index: number;
244
+
245
+ title: string;
246
+
247
+ url: string;
248
+
249
+ type?: 'url_citation';
250
+ }
251
+
252
+ /**
253
+ * Container file citation annotation referencing a file within a container.
254
+ */
255
+ export interface OpenAIResponseAnnotationContainerFileCitation {
256
+ container_id: string;
257
+
258
+ end_index: number;
259
+
260
+ file_id: string;
261
+
262
+ filename: string;
263
+
264
+ start_index: number;
265
+
266
+ type?: 'container_file_citation';
267
+ }
268
+
269
+ /**
270
+ * File path annotation referencing a generated file in response content.
271
+ */
272
+ export interface OpenAIResponseAnnotationFilePath {
273
+ file_id: string;
274
+
275
+ index: number;
276
+
277
+ type?: 'file_path';
278
+ }
279
+
280
+ /**
281
+ * The log probability for a token from an OpenAI-compatible chat completion
282
+ * response.
283
+ */
284
+ export interface Logprob {
285
+ /**
286
+ * The token.
287
+ */
288
+ token: string;
289
+
290
+ /**
291
+ * The log probability of the token.
292
+ */
293
+ logprob: number;
294
+
295
+ /**
296
+ * The bytes for the token.
297
+ */
298
+ bytes?: Array<number> | null;
299
+
300
+ /**
301
+ * The top log probabilities for the token.
302
+ */
303
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
304
+ }
305
+
306
+ export namespace Logprob {
307
+ /**
308
+ * The top log probability for a token from an OpenAI-compatible chat completion
309
+ * response.
310
+ */
311
+ export interface TopLogprob {
312
+ /**
313
+ * The token.
314
+ */
315
+ token: string;
316
+
317
+ /**
318
+ * The log probability of the token.
319
+ */
320
+ logprob: number;
321
+
322
+ /**
323
+ * The bytes for the token.
324
+ */
325
+ bytes?: Array<number> | null;
326
+ }
327
+ }
328
+ }
329
+
330
+ /**
331
+ * Refusal content within a streamed response part.
332
+ */
333
+ export interface OpenAIResponseContentPartRefusal {
334
+ refusal: string;
335
+
336
+ type?: 'refusal';
337
+ }
338
+ }
339
+
340
+ /**
341
+ * Web search tool call output message for OpenAI responses.
342
+ */
343
+ export interface OpenAIResponseOutputMessageWebSearchToolCall {
344
+ id: string;
345
+
346
+ status: string;
347
+
348
+ type?: 'web_search_call';
349
+ }
350
+
351
+ /**
352
+ * File search tool call output message for OpenAI responses.
353
+ */
354
+ export interface OpenAIResponseOutputMessageFileSearchToolCall {
355
+ id: string;
356
+
357
+ queries: Array<string>;
358
+
359
+ status: string;
360
+
361
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
362
+
363
+ type?: 'file_search_call';
364
+ }
365
+
366
+ export namespace OpenAIResponseOutputMessageFileSearchToolCall {
367
+ /**
368
+ * Search results returned by the file search operation.
369
+ */
370
+ export interface Result {
371
+ attributes: { [key: string]: unknown };
372
+
373
+ file_id: string;
374
+
375
+ filename: string;
376
+
377
+ score: number;
378
+
379
+ text: string;
380
+ }
381
+ }
382
+
383
+ /**
384
+ * Function tool call output message for OpenAI responses.
385
+ */
386
+ export interface OpenAIResponseOutputMessageFunctionToolCall {
387
+ arguments: string;
388
+
389
+ call_id: string;
390
+
391
+ name: string;
392
+
393
+ id?: string | null;
394
+
395
+ status?: string | null;
396
+
397
+ type?: 'function_call';
398
+ }
399
+
400
+ /**
401
+ * This represents the output of a function call that gets passed back to the
402
+ * model.
403
+ */
404
+ export interface OpenAIResponseInputFunctionToolCallOutput {
405
+ call_id: string;
406
+
407
+ output:
408
+ | string
409
+ | Array<
410
+ | OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentText
411
+ | OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentImage
412
+ | OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentFile
413
+ >;
414
+
415
+ id?: string | null;
416
+
417
+ status?: string | null;
418
+
419
+ type?: 'function_call_output';
420
+ }
421
+
422
+ export namespace OpenAIResponseInputFunctionToolCallOutput {
423
+ /**
424
+ * Text content for input messages in OpenAI response format.
425
+ */
426
+ export interface OpenAIResponseInputMessageContentText {
427
+ text: string;
428
+
429
+ type?: 'input_text';
430
+ }
431
+
432
+ /**
433
+ * Image content for input messages in OpenAI response format.
434
+ */
435
+ export interface OpenAIResponseInputMessageContentImage {
436
+ detail?: 'low' | 'high' | 'auto';
437
+
438
+ file_id?: string | null;
439
+
440
+ image_url?: string | null;
441
+
442
+ type?: 'input_image';
443
+ }
444
+
445
+ /**
446
+ * File content for input messages in OpenAI response format.
447
+ */
448
+ export interface OpenAIResponseInputMessageContentFile {
449
+ file_data?: string | null;
450
+
451
+ file_id?: string | null;
452
+
453
+ file_url?: string | null;
454
+
455
+ filename?: string | null;
456
+
457
+ type?: 'input_file';
458
+ }
459
+ }
460
+
461
+ /**
462
+ * A request for human approval of a tool invocation.
463
+ */
464
+ export interface OpenAIResponseMcpApprovalRequest {
465
+ id: string;
466
+
467
+ arguments: string;
468
+
469
+ name: string;
470
+
471
+ server_label: string;
472
+
473
+ type?: 'mcp_approval_request';
474
+ }
475
+
476
+ /**
477
+ * A response to an MCP approval request.
478
+ */
479
+ export interface OpenAIResponseMcpApprovalResponse {
480
+ approval_request_id: string;
481
+
482
+ approve: boolean;
483
+
484
+ id?: string | null;
485
+
486
+ reason?: string | null;
487
+
488
+ type?: 'mcp_approval_response';
489
+ }
490
+
491
+ /**
492
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
493
+ */
494
+ export interface OpenAIResponseOutputMessageMcpCall {
495
+ id: string;
496
+
497
+ arguments: string;
498
+
499
+ name: string;
500
+
501
+ server_label: string;
502
+
503
+ error?: string | null;
504
+
505
+ output?: string | null;
506
+
507
+ type?: 'mcp_call';
508
+ }
509
+
510
+ /**
511
+ * MCP list tools output message containing available tools from an MCP server.
512
+ */
513
+ export interface OpenAIResponseOutputMessageMcpListTools {
514
+ id: string;
515
+
516
+ server_label: string;
517
+
518
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
519
+
520
+ type?: 'mcp_list_tools';
521
+ }
522
+
523
+ export namespace OpenAIResponseOutputMessageMcpListTools {
524
+ /**
525
+ * Tool definition returned by MCP list tools operation.
526
+ */
527
+ export interface Tool {
528
+ input_schema: { [key: string]: unknown };
529
+
530
+ name: string;
531
+
532
+ description?: string | null;
533
+ }
534
+ }
535
+
536
+ /**
537
+ * Reasoning output from the model, representing the model's thinking process.
538
+ */
539
+ export interface OpenAIResponseOutputMessageReasoningItem {
540
+ /**
541
+ * Unique identifier for the reasoning output item.
542
+ */
543
+ id: string;
544
+
545
+ /**
546
+ * Summary of the reasoning output.
547
+ */
548
+ summary: Array<OpenAIResponseOutputMessageReasoningItem.Summary>;
549
+
550
+ /**
551
+ * The reasoning content from the model.
552
+ */
553
+ content?: Array<OpenAIResponseOutputMessageReasoningItem.Content> | null;
554
+
555
+ /**
556
+ * The status of the reasoning output.
557
+ */
558
+ status?: 'in_progress' | 'completed' | 'incomplete' | null;
559
+
560
+ /**
561
+ * The type identifier, always 'reasoning'.
562
+ */
563
+ type?: 'reasoning';
564
+ }
565
+
566
+ export namespace OpenAIResponseOutputMessageReasoningItem {
567
+ /**
568
+ * A summary of reasoning output from the model.
569
+ */
570
+ export interface Summary {
571
+ /**
572
+ * The summary text of the reasoning output.
573
+ */
574
+ text: string;
575
+
576
+ /**
577
+ * The type identifier, always 'summary_text'.
578
+ */
579
+ type?: 'summary_text';
580
+ }
581
+
582
+ /**
583
+ * Reasoning text from the model.
584
+ */
585
+ export interface Content {
586
+ /**
587
+ * The reasoning text content from the model.
588
+ */
589
+ text: string;
590
+
591
+ /**
592
+ * The type identifier, always 'reasoning_text'.
593
+ */
594
+ type?: 'reasoning_text';
595
+ }
596
+ }
597
+ }
598
+
599
+ export interface ConversationUpdateParams {
600
+ /**
601
+ * Set of key-value pairs that can be attached to an object.
602
+ */
603
+ metadata: { [key: string]: string };
604
+ }
605
+
606
+ Conversations.Items = Items;
607
+ Conversations.ItemListResponsesOpenAICursorPage = ItemListResponsesOpenAICursorPage;
608
+
609
+ export declare namespace Conversations {
610
+ export {
611
+ type ConversationObject as ConversationObject,
612
+ type ConversationDeleteResponse as ConversationDeleteResponse,
613
+ type ConversationCreateParams as ConversationCreateParams,
614
+ type ConversationUpdateParams as ConversationUpdateParams,
615
+ };
616
+
617
+ export {
618
+ Items as Items,
619
+ type ItemCreateResponse as ItemCreateResponse,
620
+ type ItemListResponse as ItemListResponse,
621
+ type ItemDeleteResponse as ItemDeleteResponse,
622
+ type ItemGetResponse as ItemGetResponse,
623
+ ItemListResponsesOpenAICursorPage as ItemListResponsesOpenAICursorPage,
624
+ type ItemCreateParams as ItemCreateParams,
625
+ type ItemListParams as ItemListParams,
626
+ };
627
+ }
@@ -0,0 +1,25 @@
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
+
9
+ export {
10
+ Conversations,
11
+ type ConversationObject,
12
+ type ConversationDeleteResponse,
13
+ type ConversationCreateParams,
14
+ type ConversationUpdateParams,
15
+ } from './conversations';
16
+ export {
17
+ ItemListResponsesOpenAICursorPage,
18
+ Items,
19
+ type ItemCreateResponse,
20
+ type ItemListResponse,
21
+ type ItemDeleteResponse,
22
+ type ItemGetResponse,
23
+ type ItemCreateParams,
24
+ type ItemListParams,
25
+ } from './items';