llama-stack-client 0.4.3 → 0.4.4

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 (808) hide show
  1. package/.devcontainer/devcontainer.json +15 -0
  2. package/.eslintrc.js +16 -0
  3. package/.github/workflows/ci.yml +88 -0
  4. package/.github/workflows/integration-tests.yml +133 -0
  5. package/.github/workflows/release-doctor.yml +19 -0
  6. package/.gitignore +12 -0
  7. package/.prettierignore +7 -0
  8. package/.prettierrc.json +7 -0
  9. package/.release-please-manifest.json +3 -0
  10. package/.stats.yml +4 -0
  11. package/Brewfile +1 -0
  12. package/CODE_OF_CONDUCT.md +80 -0
  13. package/CONTRIBUTING.md +98 -0
  14. package/README.md +22 -31
  15. package/SECURITY.md +27 -0
  16. package/api.md +484 -0
  17. package/bin/check-release-environment +18 -0
  18. package/bin/publish-npm +61 -0
  19. package/dist/CHANGELOG.md +352 -0
  20. package/dist/LICENSE +7 -0
  21. package/dist/README.md +355 -0
  22. package/{index.d.mts → dist/index.d.mts} +6 -12
  23. package/{index.d.ts → dist/index.d.ts} +6 -12
  24. package/{index.d.ts.map → dist/index.d.ts.map} +1 -1
  25. package/{index.js.map → dist/index.js.map} +1 -1
  26. package/dist/index.mjs.map +1 -0
  27. package/dist/package.json +108 -0
  28. package/{resources → dist/resources}/alpha/alpha.d.ts +2 -6
  29. package/dist/resources/alpha/alpha.d.ts.map +1 -0
  30. package/{resources → dist/resources}/alpha/alpha.js +0 -4
  31. package/dist/resources/alpha/alpha.js.map +1 -0
  32. package/{resources → dist/resources}/alpha/alpha.mjs +0 -4
  33. package/dist/resources/alpha/alpha.mjs.map +1 -0
  34. package/{resources → dist/resources}/alpha/benchmarks.d.ts +1 -37
  35. package/dist/resources/alpha/benchmarks.d.ts.map +1 -0
  36. package/{resources → dist/resources}/alpha/index.d.ts +1 -2
  37. package/dist/resources/alpha/index.d.ts.map +1 -0
  38. package/{resources → dist/resources}/alpha/index.js +1 -3
  39. package/dist/resources/alpha/index.js.map +1 -0
  40. package/{resources → dist/resources}/alpha/index.mjs +0 -1
  41. package/{resources → dist/resources}/alpha/index.mjs.map +1 -1
  42. package/dist/resources/alpha/post-training/index.d.ts +3 -0
  43. package/dist/resources/alpha/post-training/index.d.ts.map +1 -0
  44. package/{resources → dist/resources}/alpha/post-training/index.js.map +1 -1
  45. package/{resources → dist/resources}/alpha/post-training/index.mjs.map +1 -1
  46. package/{resources → dist/resources}/alpha/post-training/job.d.ts +4 -1
  47. package/dist/resources/alpha/post-training/job.d.ts.map +1 -0
  48. package/{resources → dist/resources}/alpha/post-training/post-training.d.ts +3 -6
  49. package/dist/resources/alpha/post-training/post-training.d.ts.map +1 -0
  50. package/{resources → dist/resources}/alpha/post-training/post-training.js.map +1 -1
  51. package/{resources → dist/resources}/alpha/post-training/post-training.mjs.map +1 -1
  52. package/{resources → dist/resources}/beta/datasets.d.ts +8 -89
  53. package/dist/resources/beta/datasets.d.ts.map +1 -0
  54. package/{resources → dist/resources}/chat/chat.d.ts +2 -2
  55. package/{resources → dist/resources}/chat/chat.d.ts.map +1 -1
  56. package/{resources → dist/resources}/chat/completions.d.ts +6 -6
  57. package/dist/resources/chat/completions.d.ts.map +1 -0
  58. package/{resources → dist/resources}/completions.d.ts +2 -2
  59. package/dist/resources/completions.d.ts.map +1 -0
  60. package/{resources → dist/resources}/conversations/conversations.d.ts +4 -32
  61. package/dist/resources/conversations/conversations.d.ts.map +1 -0
  62. package/{resources → dist/resources}/conversations/conversations.js.map +1 -1
  63. package/{resources → dist/resources}/conversations/conversations.mjs.map +1 -1
  64. package/{resources → dist/resources}/conversations/items.d.ts +12 -124
  65. package/dist/resources/conversations/items.d.ts.map +1 -0
  66. package/{resources → dist/resources}/conversations/items.js.map +1 -1
  67. package/{resources → dist/resources}/conversations/items.mjs.map +1 -1
  68. package/{resources → dist/resources}/index.d.ts +3 -3
  69. package/dist/resources/index.d.ts.map +1 -0
  70. package/{resources → dist/resources}/index.js.map +1 -1
  71. package/{resources → dist/resources}/index.mjs.map +1 -1
  72. package/dist/resources/inspect.d.ts +56 -0
  73. package/dist/resources/inspect.d.ts.map +1 -0
  74. package/{resources → dist/resources}/inspect.js +4 -0
  75. package/dist/resources/inspect.js.map +1 -0
  76. package/{resources → dist/resources}/inspect.mjs +4 -0
  77. package/dist/resources/inspect.mjs.map +1 -0
  78. package/dist/resources/providers.d.ts +28 -0
  79. package/dist/resources/providers.d.ts.map +1 -0
  80. package/{resources → dist/resources}/providers.js +4 -0
  81. package/dist/resources/providers.js.map +1 -0
  82. package/{resources → dist/resources}/providers.mjs +4 -0
  83. package/dist/resources/providers.mjs.map +1 -0
  84. package/{resources → dist/resources}/responses/input-items.d.ts +8 -64
  85. package/dist/resources/responses/input-items.d.ts.map +1 -0
  86. package/{resources → dist/resources}/responses/responses.d.ts +31 -479
  87. package/dist/resources/responses/responses.d.ts.map +1 -0
  88. package/{resources → dist/resources}/responses/responses.js.map +1 -1
  89. package/{resources → dist/resources}/responses/responses.mjs.map +1 -1
  90. package/dist/resources/routes.d.ts +26 -0
  91. package/dist/resources/routes.d.ts.map +1 -0
  92. package/{resources → dist/resources}/routes.js.map +1 -1
  93. package/{resources → dist/resources}/routes.mjs.map +1 -1
  94. package/{resources → dist/resources}/shared.d.ts +0 -86
  95. package/dist/resources/shared.d.ts.map +1 -0
  96. package/dist/src/_shims/MultipartBody.ts +15 -0
  97. package/dist/src/_shims/README.md +46 -0
  98. package/dist/src/_shims/auto/runtime-bun.ts +10 -0
  99. package/dist/src/_shims/auto/runtime-node.ts +10 -0
  100. package/dist/src/_shims/auto/runtime.ts +10 -0
  101. package/dist/src/_shims/auto/types-node.ts +10 -0
  102. package/dist/src/_shims/auto/types.d.ts +107 -0
  103. package/dist/src/_shims/auto/types.js +9 -0
  104. package/dist/src/_shims/auto/types.mjs +10 -0
  105. package/dist/src/_shims/bun-runtime.ts +20 -0
  106. package/dist/src/_shims/index.d.ts +89 -0
  107. package/dist/src/_shims/index.js +23 -0
  108. package/dist/src/_shims/index.mjs +18 -0
  109. package/dist/src/_shims/manual-types.d.ts +18 -0
  110. package/dist/src/_shims/manual-types.js +9 -0
  111. package/dist/src/_shims/manual-types.mjs +10 -0
  112. package/dist/src/_shims/node-runtime.ts +87 -0
  113. package/dist/src/_shims/node-types.d.ts +48 -0
  114. package/dist/src/_shims/node-types.js +9 -0
  115. package/dist/src/_shims/node-types.mjs +10 -0
  116. package/dist/src/_shims/registry.ts +73 -0
  117. package/dist/src/_shims/web-runtime.ts +109 -0
  118. package/dist/src/_shims/web-types.d.ts +89 -0
  119. package/dist/src/_shims/web-types.js +9 -0
  120. package/dist/src/_shims/web-types.mjs +10 -0
  121. package/dist/src/core.ts +1259 -0
  122. package/dist/src/error.ts +137 -0
  123. package/dist/src/index.ts +591 -0
  124. package/dist/src/internal/decoders/line.ts +182 -0
  125. package/dist/src/internal/qs/LICENSE.md +13 -0
  126. package/dist/src/internal/qs/README.md +3 -0
  127. package/dist/src/internal/qs/formats.ts +15 -0
  128. package/dist/src/internal/qs/index.ts +19 -0
  129. package/dist/src/internal/qs/stringify.ts +394 -0
  130. package/dist/src/internal/qs/types.ts +77 -0
  131. package/dist/src/internal/qs/utils.ts +271 -0
  132. package/dist/src/internal/stream-utils.ts +38 -0
  133. package/dist/src/lib/.keep +4 -0
  134. package/dist/src/lib/response-helpers.ts +60 -0
  135. package/dist/src/pagination.ts +134 -0
  136. package/dist/src/resource.ts +18 -0
  137. package/dist/src/resources/alpha/alpha.ts +85 -0
  138. package/dist/src/resources/alpha/benchmarks.ts +116 -0
  139. package/dist/src/resources/alpha/eval/eval.ts +234 -0
  140. package/dist/src/resources/alpha/eval/index.ts +19 -0
  141. package/dist/src/resources/alpha/eval/jobs.ts +41 -0
  142. package/dist/src/resources/alpha/eval.ts +10 -0
  143. package/dist/src/resources/alpha/index.ts +34 -0
  144. package/dist/src/resources/alpha/inference.ts +132 -0
  145. package/dist/src/resources/alpha/post-training/index.ts +25 -0
  146. package/dist/src/resources/alpha/post-training/job.ts +182 -0
  147. package/dist/src/resources/alpha/post-training/post-training.ts +369 -0
  148. package/dist/src/resources/alpha/post-training.ts +9 -0
  149. package/dist/src/resources/alpha.ts +9 -0
  150. package/dist/src/resources/batches.ts +572 -0
  151. package/dist/src/resources/beta/beta.ts +41 -0
  152. package/dist/src/resources/beta/datasets.ts +350 -0
  153. package/dist/src/resources/beta/index.ts +20 -0
  154. package/dist/src/resources/beta.ts +9 -0
  155. package/dist/src/resources/chat/chat.ts +246 -0
  156. package/dist/src/resources/chat/completions.ts +1875 -0
  157. package/dist/src/resources/chat/index.ts +19 -0
  158. package/dist/src/resources/chat.ts +9 -0
  159. package/dist/src/resources/completions.ts +235 -0
  160. package/dist/src/resources/conversations/conversations.ts +455 -0
  161. package/dist/src/resources/conversations/index.ts +25 -0
  162. package/dist/src/resources/conversations/items.ts +1221 -0
  163. package/dist/src/resources/conversations.ts +9 -0
  164. package/dist/src/resources/embeddings.ts +84 -0
  165. package/dist/src/resources/files.ts +184 -0
  166. package/dist/src/resources/index.ts +139 -0
  167. package/dist/src/resources/inspect.ts +81 -0
  168. package/dist/src/resources/models/index.ts +18 -0
  169. package/dist/src/resources/models/models.ts +179 -0
  170. package/dist/src/resources/models/openai.ts +22 -0
  171. package/dist/src/resources/models.ts +9 -0
  172. package/dist/src/resources/moderations.ts +61 -0
  173. package/dist/src/resources/prompts/index.ts +19 -0
  174. package/dist/src/resources/prompts/prompts.ts +171 -0
  175. package/dist/src/resources/prompts/versions.ts +26 -0
  176. package/dist/src/resources/prompts.ts +9 -0
  177. package/dist/src/resources/providers.ts +49 -0
  178. package/dist/src/resources/responses/index.ts +21 -0
  179. package/dist/src/resources/responses/input-items.ts +508 -0
  180. package/dist/src/resources/responses/responses.ts +3689 -0
  181. package/dist/src/resources/responses.ts +9 -0
  182. package/dist/src/resources/routes.ts +56 -0
  183. package/dist/src/resources/safety.ts +241 -0
  184. package/dist/src/resources/scoring-functions.ts +343 -0
  185. package/dist/src/resources/scoring.ts +197 -0
  186. package/dist/src/resources/shared.ts +418 -0
  187. package/dist/src/resources/shields.ts +98 -0
  188. package/dist/src/resources/tool-runtime.ts +217 -0
  189. package/dist/src/resources/toolgroups.ts +135 -0
  190. package/dist/src/resources/tools.ts +52 -0
  191. package/dist/src/resources/vector-io.ts +468 -0
  192. package/dist/src/resources/vector-stores/file-batches.ts +201 -0
  193. package/dist/src/resources/vector-stores/files.ts +358 -0
  194. package/dist/src/resources/vector-stores/index.ts +38 -0
  195. package/dist/src/resources/vector-stores/vector-stores.ts +402 -0
  196. package/dist/src/resources/vector-stores.ts +9 -0
  197. package/dist/src/resources.ts +7 -0
  198. package/dist/src/shims/node.ts +56 -0
  199. package/dist/src/shims/web.ts +56 -0
  200. package/dist/src/streaming.ts +297 -0
  201. package/dist/src/uploads.ts +261 -0
  202. package/dist/src/version.ts +7 -0
  203. package/dist/version.d.ts +2 -0
  204. package/{version.js → dist/version.js} +1 -1
  205. package/{version.mjs → dist/version.mjs} +1 -1
  206. package/examples/.keep +4 -0
  207. package/jest.config.ts +29 -0
  208. package/package.json +55 -35
  209. package/release-please-config.json +64 -0
  210. package/scripts/bootstrap +30 -0
  211. package/scripts/build +56 -0
  212. package/scripts/fast-format +40 -0
  213. package/scripts/format +8 -0
  214. package/scripts/lint +11 -0
  215. package/scripts/mock +41 -0
  216. package/scripts/test +56 -0
  217. package/scripts/utils/check-is-in-git-install.sh +15 -0
  218. package/scripts/utils/check-version.cjs +27 -0
  219. package/scripts/utils/fix-index-exports.cjs +21 -0
  220. package/scripts/utils/git-swap.sh +19 -0
  221. package/scripts/utils/make-dist-package-json.cjs +28 -0
  222. package/scripts/utils/postprocess-files.cjs +172 -0
  223. package/scripts/utils/upload-artifact.sh +33 -0
  224. package/src/_shims/auto/runtime-deno.ts +10 -0
  225. package/src/_shims/auto/types-deno.ts +10 -0
  226. package/src/_shims/auto/types.d.ts +18 -18
  227. package/src/_shims/index-deno.ts +118 -0
  228. package/src/_shims/index.d.ts +1 -1
  229. package/src/_shims/index.mjs +1 -1
  230. package/src/index.ts +16 -11
  231. package/src/resources/alpha/alpha.ts +0 -8
  232. package/src/resources/alpha/benchmarks.ts +1 -37
  233. package/src/resources/alpha/index.ts +0 -2
  234. package/src/resources/alpha/post-training/index.ts +1 -1
  235. package/src/resources/alpha/post-training/job.ts +5 -0
  236. package/src/resources/alpha/post-training/post-training.ts +2 -5
  237. package/src/resources/beta/datasets.ts +8 -89
  238. package/src/resources/chat/chat.ts +4 -4
  239. package/src/resources/chat/completions.ts +12 -12
  240. package/src/resources/completions.ts +4 -4
  241. package/src/resources/conversations/conversations.ts +7 -43
  242. package/src/resources/conversations/items.ts +21 -165
  243. package/src/resources/index.ts +3 -3
  244. package/src/resources/inspect.ts +57 -3
  245. package/src/resources/providers.ts +16 -5
  246. package/src/resources/responses/input-items.ts +14 -86
  247. package/src/resources/responses/responses.ts +45 -654
  248. package/src/resources/routes.ts +14 -10
  249. package/src/resources/shared.ts +0 -95
  250. package/src/version.ts +1 -1
  251. package/tests/api-resources/alpha/benchmarks.test.ts +94 -0
  252. package/tests/api-resources/alpha/eval/eval.test.ts +186 -0
  253. package/tests/api-resources/alpha/eval/jobs.test.ts +68 -0
  254. package/tests/api-resources/alpha/inference.test.ts +38 -0
  255. package/tests/api-resources/alpha/post-training/job.test.ts +77 -0
  256. package/tests/api-resources/alpha/post-training/post-training.test.ts +124 -0
  257. package/tests/api-resources/batches.test.ts +100 -0
  258. package/tests/api-resources/beta/datasets.test.ts +135 -0
  259. package/tests/api-resources/chat/completions.test.ts +102 -0
  260. package/tests/api-resources/completions.test.ts +48 -0
  261. package/tests/api-resources/conversations/conversations.test.ts +76 -0
  262. package/tests/api-resources/conversations/items.test.ts +98 -0
  263. package/tests/api-resources/embeddings.test.ts +35 -0
  264. package/tests/api-resources/files.test.ts +118 -0
  265. package/tests/api-resources/inspect.test.ts +50 -0
  266. package/tests/api-resources/models/models.test.ts +89 -0
  267. package/tests/api-resources/models/openai.test.ts +32 -0
  268. package/tests/api-resources/moderations.test.ts +29 -0
  269. package/tests/api-resources/prompts/prompts.test.ts +125 -0
  270. package/tests/api-resources/prompts/versions.test.ts +32 -0
  271. package/tests/api-resources/providers.test.ts +50 -0
  272. package/tests/api-resources/responses/input-items.test.ts +43 -0
  273. package/tests/api-resources/responses/responses.test.ts +118 -0
  274. package/tests/api-resources/routes.test.ts +39 -0
  275. package/tests/api-resources/safety.test.ts +37 -0
  276. package/tests/api-resources/scoring-functions.test.ts +100 -0
  277. package/tests/api-resources/scoring.test.ts +73 -0
  278. package/tests/api-resources/shields.test.ts +88 -0
  279. package/tests/api-resources/tool-runtime.test.ts +61 -0
  280. package/tests/api-resources/toolgroups.test.ts +91 -0
  281. package/tests/api-resources/tools.test.ts +57 -0
  282. package/tests/api-resources/vector-io.test.ts +75 -0
  283. package/tests/api-resources/vector-stores/file-batches.test.ts +107 -0
  284. package/tests/api-resources/vector-stores/files.test.ts +147 -0
  285. package/tests/api-resources/vector-stores/vector-stores.test.ts +122 -0
  286. package/tests/form.test.ts +71 -0
  287. package/tests/index.test.ts +438 -0
  288. package/tests/internal/decoders/line.test.ts +134 -0
  289. package/tests/qs/empty-keys-cases.ts +277 -0
  290. package/tests/qs/stringify.test.ts +2238 -0
  291. package/tests/qs/utils.test.ts +175 -0
  292. package/tests/responses.test.ts +91 -0
  293. package/tests/streaming.test.ts +250 -0
  294. package/tests/stringifyQuery.test.ts +29 -0
  295. package/tests/uploads.test.ts +71 -0
  296. package/tsc-multi.json +7 -0
  297. package/tsconfig.build.json +18 -0
  298. package/tsconfig.deno.json +15 -0
  299. package/tsconfig.dist-src.json +11 -0
  300. package/tsconfig.json +38 -0
  301. package/index.mjs.map +0 -1
  302. package/resources/alpha/admin.d.ts +0 -41
  303. package/resources/alpha/admin.d.ts.map +0 -1
  304. package/resources/alpha/admin.js +0 -46
  305. package/resources/alpha/admin.js.map +0 -1
  306. package/resources/alpha/admin.mjs +0 -42
  307. package/resources/alpha/admin.mjs.map +0 -1
  308. package/resources/alpha/alpha.d.ts.map +0 -1
  309. package/resources/alpha/alpha.js.map +0 -1
  310. package/resources/alpha/alpha.mjs.map +0 -1
  311. package/resources/alpha/benchmarks.d.ts.map +0 -1
  312. package/resources/alpha/index.d.ts.map +0 -1
  313. package/resources/alpha/index.js.map +0 -1
  314. package/resources/alpha/post-training/index.d.ts +0 -3
  315. package/resources/alpha/post-training/index.d.ts.map +0 -1
  316. package/resources/alpha/post-training/job.d.ts.map +0 -1
  317. package/resources/alpha/post-training/post-training.d.ts.map +0 -1
  318. package/resources/beta/datasets.d.ts.map +0 -1
  319. package/resources/chat/completions.d.ts.map +0 -1
  320. package/resources/completions.d.ts.map +0 -1
  321. package/resources/conversations/conversations.d.ts.map +0 -1
  322. package/resources/conversations/items.d.ts.map +0 -1
  323. package/resources/index.d.ts.map +0 -1
  324. package/resources/inspect.d.ts +0 -14
  325. package/resources/inspect.d.ts.map +0 -1
  326. package/resources/inspect.js.map +0 -1
  327. package/resources/inspect.mjs.map +0 -1
  328. package/resources/providers.d.ts +0 -21
  329. package/resources/providers.d.ts.map +0 -1
  330. package/resources/providers.js.map +0 -1
  331. package/resources/providers.mjs.map +0 -1
  332. package/resources/responses/input-items.d.ts.map +0 -1
  333. package/resources/responses/responses.d.ts.map +0 -1
  334. package/resources/routes.d.ts +0 -27
  335. package/resources/routes.d.ts.map +0 -1
  336. package/resources/shared.d.ts.map +0 -1
  337. package/src/resources/alpha/admin.ts +0 -84
  338. package/version.d.ts +0 -2
  339. /package/{_shims → dist/_shims}/MultipartBody.d.ts +0 -0
  340. /package/{_shims → dist/_shims}/MultipartBody.d.ts.map +0 -0
  341. /package/{_shims → dist/_shims}/MultipartBody.js +0 -0
  342. /package/{_shims → dist/_shims}/MultipartBody.js.map +0 -0
  343. /package/{_shims → dist/_shims}/MultipartBody.mjs +0 -0
  344. /package/{_shims → dist/_shims}/MultipartBody.mjs.map +0 -0
  345. /package/{_shims → dist/_shims}/README.md +0 -0
  346. /package/{_shims → dist/_shims}/auto/runtime-bun.d.ts +0 -0
  347. /package/{_shims → dist/_shims}/auto/runtime-bun.d.ts.map +0 -0
  348. /package/{_shims → dist/_shims}/auto/runtime-bun.js +0 -0
  349. /package/{_shims → dist/_shims}/auto/runtime-bun.js.map +0 -0
  350. /package/{_shims → dist/_shims}/auto/runtime-bun.mjs +0 -0
  351. /package/{_shims → dist/_shims}/auto/runtime-bun.mjs.map +0 -0
  352. /package/{_shims → dist/_shims}/auto/runtime-node.d.ts +0 -0
  353. /package/{_shims → dist/_shims}/auto/runtime-node.d.ts.map +0 -0
  354. /package/{_shims → dist/_shims}/auto/runtime-node.js +0 -0
  355. /package/{_shims → dist/_shims}/auto/runtime-node.js.map +0 -0
  356. /package/{_shims → dist/_shims}/auto/runtime-node.mjs +0 -0
  357. /package/{_shims → dist/_shims}/auto/runtime-node.mjs.map +0 -0
  358. /package/{_shims → dist/_shims}/auto/runtime.d.ts +0 -0
  359. /package/{_shims → dist/_shims}/auto/runtime.d.ts.map +0 -0
  360. /package/{_shims → dist/_shims}/auto/runtime.js +0 -0
  361. /package/{_shims → dist/_shims}/auto/runtime.js.map +0 -0
  362. /package/{_shims → dist/_shims}/auto/runtime.mjs +0 -0
  363. /package/{_shims → dist/_shims}/auto/runtime.mjs.map +0 -0
  364. /package/{_shims → dist/_shims}/auto/types-node.d.ts +0 -0
  365. /package/{_shims → dist/_shims}/auto/types-node.d.ts.map +0 -0
  366. /package/{_shims → dist/_shims}/auto/types-node.js +0 -0
  367. /package/{_shims → dist/_shims}/auto/types-node.js.map +0 -0
  368. /package/{_shims → dist/_shims}/auto/types-node.mjs +0 -0
  369. /package/{_shims → dist/_shims}/auto/types-node.mjs.map +0 -0
  370. /package/{_shims → dist/_shims}/auto/types.d.ts +0 -0
  371. /package/{_shims → dist/_shims}/auto/types.js +0 -0
  372. /package/{_shims → dist/_shims}/auto/types.mjs +0 -0
  373. /package/{_shims → dist/_shims}/bun-runtime.d.ts +0 -0
  374. /package/{_shims → dist/_shims}/bun-runtime.d.ts.map +0 -0
  375. /package/{_shims → dist/_shims}/bun-runtime.js +0 -0
  376. /package/{_shims → dist/_shims}/bun-runtime.js.map +0 -0
  377. /package/{_shims → dist/_shims}/bun-runtime.mjs +0 -0
  378. /package/{_shims → dist/_shims}/bun-runtime.mjs.map +0 -0
  379. /package/{_shims → dist/_shims}/index.d.ts +0 -0
  380. /package/{_shims → dist/_shims}/index.js +0 -0
  381. /package/{_shims → dist/_shims}/index.mjs +0 -0
  382. /package/{_shims → dist/_shims}/manual-types.d.ts +0 -0
  383. /package/{_shims → dist/_shims}/manual-types.js +0 -0
  384. /package/{_shims → dist/_shims}/manual-types.mjs +0 -0
  385. /package/{_shims → dist/_shims}/node-runtime.d.ts +0 -0
  386. /package/{_shims → dist/_shims}/node-runtime.d.ts.map +0 -0
  387. /package/{_shims → dist/_shims}/node-runtime.js +0 -0
  388. /package/{_shims → dist/_shims}/node-runtime.js.map +0 -0
  389. /package/{_shims → dist/_shims}/node-runtime.mjs +0 -0
  390. /package/{_shims → dist/_shims}/node-runtime.mjs.map +0 -0
  391. /package/{_shims → dist/_shims}/node-types.d.ts +0 -0
  392. /package/{_shims → dist/_shims}/node-types.js +0 -0
  393. /package/{_shims → dist/_shims}/node-types.mjs +0 -0
  394. /package/{_shims → dist/_shims}/registry.d.ts +0 -0
  395. /package/{_shims → dist/_shims}/registry.d.ts.map +0 -0
  396. /package/{_shims → dist/_shims}/registry.js +0 -0
  397. /package/{_shims → dist/_shims}/registry.js.map +0 -0
  398. /package/{_shims → dist/_shims}/registry.mjs +0 -0
  399. /package/{_shims → dist/_shims}/registry.mjs.map +0 -0
  400. /package/{_shims → dist/_shims}/web-runtime.d.ts +0 -0
  401. /package/{_shims → dist/_shims}/web-runtime.d.ts.map +0 -0
  402. /package/{_shims → dist/_shims}/web-runtime.js +0 -0
  403. /package/{_shims → dist/_shims}/web-runtime.js.map +0 -0
  404. /package/{_shims → dist/_shims}/web-runtime.mjs +0 -0
  405. /package/{_shims → dist/_shims}/web-runtime.mjs.map +0 -0
  406. /package/{_shims → dist/_shims}/web-types.d.ts +0 -0
  407. /package/{_shims → dist/_shims}/web-types.js +0 -0
  408. /package/{_shims → dist/_shims}/web-types.mjs +0 -0
  409. /package/{core.d.ts → dist/core.d.ts} +0 -0
  410. /package/{core.d.ts.map → dist/core.d.ts.map} +0 -0
  411. /package/{core.js → dist/core.js} +0 -0
  412. /package/{core.js.map → dist/core.js.map} +0 -0
  413. /package/{core.mjs → dist/core.mjs} +0 -0
  414. /package/{core.mjs.map → dist/core.mjs.map} +0 -0
  415. /package/{error.d.ts → dist/error.d.ts} +0 -0
  416. /package/{error.d.ts.map → dist/error.d.ts.map} +0 -0
  417. /package/{error.js → dist/error.js} +0 -0
  418. /package/{error.js.map → dist/error.js.map} +0 -0
  419. /package/{error.mjs → dist/error.mjs} +0 -0
  420. /package/{error.mjs.map → dist/error.mjs.map} +0 -0
  421. /package/{index.js → dist/index.js} +0 -0
  422. /package/{index.mjs → dist/index.mjs} +0 -0
  423. /package/{internal → dist/internal}/decoders/line.d.ts +0 -0
  424. /package/{internal → dist/internal}/decoders/line.d.ts.map +0 -0
  425. /package/{internal → dist/internal}/decoders/line.js +0 -0
  426. /package/{internal → dist/internal}/decoders/line.js.map +0 -0
  427. /package/{internal → dist/internal}/decoders/line.mjs +0 -0
  428. /package/{internal → dist/internal}/decoders/line.mjs.map +0 -0
  429. /package/{internal → dist/internal}/qs/formats.d.ts +0 -0
  430. /package/{internal → dist/internal}/qs/formats.d.ts.map +0 -0
  431. /package/{internal → dist/internal}/qs/formats.js +0 -0
  432. /package/{internal → dist/internal}/qs/formats.js.map +0 -0
  433. /package/{internal → dist/internal}/qs/formats.mjs +0 -0
  434. /package/{internal → dist/internal}/qs/formats.mjs.map +0 -0
  435. /package/{internal → dist/internal}/qs/index.d.ts +0 -0
  436. /package/{internal → dist/internal}/qs/index.d.ts.map +0 -0
  437. /package/{internal → dist/internal}/qs/index.js +0 -0
  438. /package/{internal → dist/internal}/qs/index.js.map +0 -0
  439. /package/{internal → dist/internal}/qs/index.mjs +0 -0
  440. /package/{internal → dist/internal}/qs/index.mjs.map +0 -0
  441. /package/{internal → dist/internal}/qs/stringify.d.ts +0 -0
  442. /package/{internal → dist/internal}/qs/stringify.d.ts.map +0 -0
  443. /package/{internal → dist/internal}/qs/stringify.js +0 -0
  444. /package/{internal → dist/internal}/qs/stringify.js.map +0 -0
  445. /package/{internal → dist/internal}/qs/stringify.mjs +0 -0
  446. /package/{internal → dist/internal}/qs/stringify.mjs.map +0 -0
  447. /package/{internal → dist/internal}/qs/types.d.ts +0 -0
  448. /package/{internal → dist/internal}/qs/types.d.ts.map +0 -0
  449. /package/{internal → dist/internal}/qs/types.js +0 -0
  450. /package/{internal → dist/internal}/qs/types.js.map +0 -0
  451. /package/{internal → dist/internal}/qs/types.mjs +0 -0
  452. /package/{internal → dist/internal}/qs/types.mjs.map +0 -0
  453. /package/{internal → dist/internal}/qs/utils.d.ts +0 -0
  454. /package/{internal → dist/internal}/qs/utils.d.ts.map +0 -0
  455. /package/{internal → dist/internal}/qs/utils.js +0 -0
  456. /package/{internal → dist/internal}/qs/utils.js.map +0 -0
  457. /package/{internal → dist/internal}/qs/utils.mjs +0 -0
  458. /package/{internal → dist/internal}/qs/utils.mjs.map +0 -0
  459. /package/{internal → dist/internal}/stream-utils.d.ts +0 -0
  460. /package/{internal → dist/internal}/stream-utils.d.ts.map +0 -0
  461. /package/{internal → dist/internal}/stream-utils.js +0 -0
  462. /package/{internal → dist/internal}/stream-utils.js.map +0 -0
  463. /package/{internal → dist/internal}/stream-utils.mjs +0 -0
  464. /package/{internal → dist/internal}/stream-utils.mjs.map +0 -0
  465. /package/{lib → dist/lib}/response-helpers.d.ts +0 -0
  466. /package/{lib → dist/lib}/response-helpers.d.ts.map +0 -0
  467. /package/{lib → dist/lib}/response-helpers.js +0 -0
  468. /package/{lib → dist/lib}/response-helpers.js.map +0 -0
  469. /package/{lib → dist/lib}/response-helpers.mjs +0 -0
  470. /package/{lib → dist/lib}/response-helpers.mjs.map +0 -0
  471. /package/{pagination.d.ts → dist/pagination.d.ts} +0 -0
  472. /package/{pagination.d.ts.map → dist/pagination.d.ts.map} +0 -0
  473. /package/{pagination.js → dist/pagination.js} +0 -0
  474. /package/{pagination.js.map → dist/pagination.js.map} +0 -0
  475. /package/{pagination.mjs → dist/pagination.mjs} +0 -0
  476. /package/{pagination.mjs.map → dist/pagination.mjs.map} +0 -0
  477. /package/{resource.d.ts → dist/resource.d.ts} +0 -0
  478. /package/{resource.d.ts.map → dist/resource.d.ts.map} +0 -0
  479. /package/{resource.js → dist/resource.js} +0 -0
  480. /package/{resource.js.map → dist/resource.js.map} +0 -0
  481. /package/{resource.mjs → dist/resource.mjs} +0 -0
  482. /package/{resource.mjs.map → dist/resource.mjs.map} +0 -0
  483. /package/{resources → dist/resources}/alpha/benchmarks.js +0 -0
  484. /package/{resources → dist/resources}/alpha/benchmarks.js.map +0 -0
  485. /package/{resources → dist/resources}/alpha/benchmarks.mjs +0 -0
  486. /package/{resources → dist/resources}/alpha/benchmarks.mjs.map +0 -0
  487. /package/{resources → dist/resources}/alpha/eval/eval.d.ts +0 -0
  488. /package/{resources → dist/resources}/alpha/eval/eval.d.ts.map +0 -0
  489. /package/{resources → dist/resources}/alpha/eval/eval.js +0 -0
  490. /package/{resources → dist/resources}/alpha/eval/eval.js.map +0 -0
  491. /package/{resources → dist/resources}/alpha/eval/eval.mjs +0 -0
  492. /package/{resources → dist/resources}/alpha/eval/eval.mjs.map +0 -0
  493. /package/{resources → dist/resources}/alpha/eval/index.d.ts +0 -0
  494. /package/{resources → dist/resources}/alpha/eval/index.d.ts.map +0 -0
  495. /package/{resources → dist/resources}/alpha/eval/index.js +0 -0
  496. /package/{resources → dist/resources}/alpha/eval/index.js.map +0 -0
  497. /package/{resources → dist/resources}/alpha/eval/index.mjs +0 -0
  498. /package/{resources → dist/resources}/alpha/eval/index.mjs.map +0 -0
  499. /package/{resources → dist/resources}/alpha/eval/jobs.d.ts +0 -0
  500. /package/{resources → dist/resources}/alpha/eval/jobs.d.ts.map +0 -0
  501. /package/{resources → dist/resources}/alpha/eval/jobs.js +0 -0
  502. /package/{resources → dist/resources}/alpha/eval/jobs.js.map +0 -0
  503. /package/{resources → dist/resources}/alpha/eval/jobs.mjs +0 -0
  504. /package/{resources → dist/resources}/alpha/eval/jobs.mjs.map +0 -0
  505. /package/{resources → dist/resources}/alpha/eval.d.ts +0 -0
  506. /package/{resources → dist/resources}/alpha/eval.d.ts.map +0 -0
  507. /package/{resources → dist/resources}/alpha/eval.js +0 -0
  508. /package/{resources → dist/resources}/alpha/eval.js.map +0 -0
  509. /package/{resources → dist/resources}/alpha/eval.mjs +0 -0
  510. /package/{resources → dist/resources}/alpha/eval.mjs.map +0 -0
  511. /package/{resources → dist/resources}/alpha/inference.d.ts +0 -0
  512. /package/{resources → dist/resources}/alpha/inference.d.ts.map +0 -0
  513. /package/{resources → dist/resources}/alpha/inference.js +0 -0
  514. /package/{resources → dist/resources}/alpha/inference.js.map +0 -0
  515. /package/{resources → dist/resources}/alpha/inference.mjs +0 -0
  516. /package/{resources → dist/resources}/alpha/inference.mjs.map +0 -0
  517. /package/{resources → dist/resources}/alpha/post-training/index.js +0 -0
  518. /package/{resources → dist/resources}/alpha/post-training/index.mjs +0 -0
  519. /package/{resources → dist/resources}/alpha/post-training/job.js +0 -0
  520. /package/{resources → dist/resources}/alpha/post-training/job.js.map +0 -0
  521. /package/{resources → dist/resources}/alpha/post-training/job.mjs +0 -0
  522. /package/{resources → dist/resources}/alpha/post-training/job.mjs.map +0 -0
  523. /package/{resources → dist/resources}/alpha/post-training/post-training.js +0 -0
  524. /package/{resources → dist/resources}/alpha/post-training/post-training.mjs +0 -0
  525. /package/{resources → dist/resources}/alpha/post-training.d.ts +0 -0
  526. /package/{resources → dist/resources}/alpha/post-training.d.ts.map +0 -0
  527. /package/{resources → dist/resources}/alpha/post-training.js +0 -0
  528. /package/{resources → dist/resources}/alpha/post-training.js.map +0 -0
  529. /package/{resources → dist/resources}/alpha/post-training.mjs +0 -0
  530. /package/{resources → dist/resources}/alpha/post-training.mjs.map +0 -0
  531. /package/{resources → dist/resources}/alpha.d.ts +0 -0
  532. /package/{resources → dist/resources}/alpha.d.ts.map +0 -0
  533. /package/{resources → dist/resources}/alpha.js +0 -0
  534. /package/{resources → dist/resources}/alpha.js.map +0 -0
  535. /package/{resources → dist/resources}/alpha.mjs +0 -0
  536. /package/{resources → dist/resources}/alpha.mjs.map +0 -0
  537. /package/{resources → dist/resources}/batches.d.ts +0 -0
  538. /package/{resources → dist/resources}/batches.d.ts.map +0 -0
  539. /package/{resources → dist/resources}/batches.js +0 -0
  540. /package/{resources → dist/resources}/batches.js.map +0 -0
  541. /package/{resources → dist/resources}/batches.mjs +0 -0
  542. /package/{resources → dist/resources}/batches.mjs.map +0 -0
  543. /package/{resources → dist/resources}/beta/beta.d.ts +0 -0
  544. /package/{resources → dist/resources}/beta/beta.d.ts.map +0 -0
  545. /package/{resources → dist/resources}/beta/beta.js +0 -0
  546. /package/{resources → dist/resources}/beta/beta.js.map +0 -0
  547. /package/{resources → dist/resources}/beta/beta.mjs +0 -0
  548. /package/{resources → dist/resources}/beta/beta.mjs.map +0 -0
  549. /package/{resources → dist/resources}/beta/datasets.js +0 -0
  550. /package/{resources → dist/resources}/beta/datasets.js.map +0 -0
  551. /package/{resources → dist/resources}/beta/datasets.mjs +0 -0
  552. /package/{resources → dist/resources}/beta/datasets.mjs.map +0 -0
  553. /package/{resources → dist/resources}/beta/index.d.ts +0 -0
  554. /package/{resources → dist/resources}/beta/index.d.ts.map +0 -0
  555. /package/{resources → dist/resources}/beta/index.js +0 -0
  556. /package/{resources → dist/resources}/beta/index.js.map +0 -0
  557. /package/{resources → dist/resources}/beta/index.mjs +0 -0
  558. /package/{resources → dist/resources}/beta/index.mjs.map +0 -0
  559. /package/{resources → dist/resources}/beta.d.ts +0 -0
  560. /package/{resources → dist/resources}/beta.d.ts.map +0 -0
  561. /package/{resources → dist/resources}/beta.js +0 -0
  562. /package/{resources → dist/resources}/beta.js.map +0 -0
  563. /package/{resources → dist/resources}/beta.mjs +0 -0
  564. /package/{resources → dist/resources}/beta.mjs.map +0 -0
  565. /package/{resources → dist/resources}/chat/chat.js +0 -0
  566. /package/{resources → dist/resources}/chat/chat.js.map +0 -0
  567. /package/{resources → dist/resources}/chat/chat.mjs +0 -0
  568. /package/{resources → dist/resources}/chat/chat.mjs.map +0 -0
  569. /package/{resources → dist/resources}/chat/completions.js +0 -0
  570. /package/{resources → dist/resources}/chat/completions.js.map +0 -0
  571. /package/{resources → dist/resources}/chat/completions.mjs +0 -0
  572. /package/{resources → dist/resources}/chat/completions.mjs.map +0 -0
  573. /package/{resources → dist/resources}/chat/index.d.ts +0 -0
  574. /package/{resources → dist/resources}/chat/index.d.ts.map +0 -0
  575. /package/{resources → dist/resources}/chat/index.js +0 -0
  576. /package/{resources → dist/resources}/chat/index.js.map +0 -0
  577. /package/{resources → dist/resources}/chat/index.mjs +0 -0
  578. /package/{resources → dist/resources}/chat/index.mjs.map +0 -0
  579. /package/{resources → dist/resources}/chat.d.ts +0 -0
  580. /package/{resources → dist/resources}/chat.d.ts.map +0 -0
  581. /package/{resources → dist/resources}/chat.js +0 -0
  582. /package/{resources → dist/resources}/chat.js.map +0 -0
  583. /package/{resources → dist/resources}/chat.mjs +0 -0
  584. /package/{resources → dist/resources}/chat.mjs.map +0 -0
  585. /package/{resources → dist/resources}/completions.js +0 -0
  586. /package/{resources → dist/resources}/completions.js.map +0 -0
  587. /package/{resources → dist/resources}/completions.mjs +0 -0
  588. /package/{resources → dist/resources}/completions.mjs.map +0 -0
  589. /package/{resources → dist/resources}/conversations/conversations.js +0 -0
  590. /package/{resources → dist/resources}/conversations/conversations.mjs +0 -0
  591. /package/{resources → dist/resources}/conversations/index.d.ts +0 -0
  592. /package/{resources → dist/resources}/conversations/index.d.ts.map +0 -0
  593. /package/{resources → dist/resources}/conversations/index.js +0 -0
  594. /package/{resources → dist/resources}/conversations/index.js.map +0 -0
  595. /package/{resources → dist/resources}/conversations/index.mjs +0 -0
  596. /package/{resources → dist/resources}/conversations/index.mjs.map +0 -0
  597. /package/{resources → dist/resources}/conversations/items.js +0 -0
  598. /package/{resources → dist/resources}/conversations/items.mjs +0 -0
  599. /package/{resources → dist/resources}/conversations.d.ts +0 -0
  600. /package/{resources → dist/resources}/conversations.d.ts.map +0 -0
  601. /package/{resources → dist/resources}/conversations.js +0 -0
  602. /package/{resources → dist/resources}/conversations.js.map +0 -0
  603. /package/{resources → dist/resources}/conversations.mjs +0 -0
  604. /package/{resources → dist/resources}/conversations.mjs.map +0 -0
  605. /package/{resources → dist/resources}/embeddings.d.ts +0 -0
  606. /package/{resources → dist/resources}/embeddings.d.ts.map +0 -0
  607. /package/{resources → dist/resources}/embeddings.js +0 -0
  608. /package/{resources → dist/resources}/embeddings.js.map +0 -0
  609. /package/{resources → dist/resources}/embeddings.mjs +0 -0
  610. /package/{resources → dist/resources}/embeddings.mjs.map +0 -0
  611. /package/{resources → dist/resources}/files.d.ts +0 -0
  612. /package/{resources → dist/resources}/files.d.ts.map +0 -0
  613. /package/{resources → dist/resources}/files.js +0 -0
  614. /package/{resources → dist/resources}/files.js.map +0 -0
  615. /package/{resources → dist/resources}/files.mjs +0 -0
  616. /package/{resources → dist/resources}/files.mjs.map +0 -0
  617. /package/{resources → dist/resources}/index.js +0 -0
  618. /package/{resources → dist/resources}/index.mjs +0 -0
  619. /package/{resources → dist/resources}/models/index.d.ts +0 -0
  620. /package/{resources → dist/resources}/models/index.d.ts.map +0 -0
  621. /package/{resources → dist/resources}/models/index.js +0 -0
  622. /package/{resources → dist/resources}/models/index.js.map +0 -0
  623. /package/{resources → dist/resources}/models/index.mjs +0 -0
  624. /package/{resources → dist/resources}/models/index.mjs.map +0 -0
  625. /package/{resources → dist/resources}/models/models.d.ts +0 -0
  626. /package/{resources → dist/resources}/models/models.d.ts.map +0 -0
  627. /package/{resources → dist/resources}/models/models.js +0 -0
  628. /package/{resources → dist/resources}/models/models.js.map +0 -0
  629. /package/{resources → dist/resources}/models/models.mjs +0 -0
  630. /package/{resources → dist/resources}/models/models.mjs.map +0 -0
  631. /package/{resources → dist/resources}/models/openai.d.ts +0 -0
  632. /package/{resources → dist/resources}/models/openai.d.ts.map +0 -0
  633. /package/{resources → dist/resources}/models/openai.js +0 -0
  634. /package/{resources → dist/resources}/models/openai.js.map +0 -0
  635. /package/{resources → dist/resources}/models/openai.mjs +0 -0
  636. /package/{resources → dist/resources}/models/openai.mjs.map +0 -0
  637. /package/{resources → dist/resources}/models.d.ts +0 -0
  638. /package/{resources → dist/resources}/models.d.ts.map +0 -0
  639. /package/{resources → dist/resources}/models.js +0 -0
  640. /package/{resources → dist/resources}/models.js.map +0 -0
  641. /package/{resources → dist/resources}/models.mjs +0 -0
  642. /package/{resources → dist/resources}/models.mjs.map +0 -0
  643. /package/{resources → dist/resources}/moderations.d.ts +0 -0
  644. /package/{resources → dist/resources}/moderations.d.ts.map +0 -0
  645. /package/{resources → dist/resources}/moderations.js +0 -0
  646. /package/{resources → dist/resources}/moderations.js.map +0 -0
  647. /package/{resources → dist/resources}/moderations.mjs +0 -0
  648. /package/{resources → dist/resources}/moderations.mjs.map +0 -0
  649. /package/{resources → dist/resources}/prompts/index.d.ts +0 -0
  650. /package/{resources → dist/resources}/prompts/index.d.ts.map +0 -0
  651. /package/{resources → dist/resources}/prompts/index.js +0 -0
  652. /package/{resources → dist/resources}/prompts/index.js.map +0 -0
  653. /package/{resources → dist/resources}/prompts/index.mjs +0 -0
  654. /package/{resources → dist/resources}/prompts/index.mjs.map +0 -0
  655. /package/{resources → dist/resources}/prompts/prompts.d.ts +0 -0
  656. /package/{resources → dist/resources}/prompts/prompts.d.ts.map +0 -0
  657. /package/{resources → dist/resources}/prompts/prompts.js +0 -0
  658. /package/{resources → dist/resources}/prompts/prompts.js.map +0 -0
  659. /package/{resources → dist/resources}/prompts/prompts.mjs +0 -0
  660. /package/{resources → dist/resources}/prompts/prompts.mjs.map +0 -0
  661. /package/{resources → dist/resources}/prompts/versions.d.ts +0 -0
  662. /package/{resources → dist/resources}/prompts/versions.d.ts.map +0 -0
  663. /package/{resources → dist/resources}/prompts/versions.js +0 -0
  664. /package/{resources → dist/resources}/prompts/versions.js.map +0 -0
  665. /package/{resources → dist/resources}/prompts/versions.mjs +0 -0
  666. /package/{resources → dist/resources}/prompts/versions.mjs.map +0 -0
  667. /package/{resources → dist/resources}/prompts.d.ts +0 -0
  668. /package/{resources → dist/resources}/prompts.d.ts.map +0 -0
  669. /package/{resources → dist/resources}/prompts.js +0 -0
  670. /package/{resources → dist/resources}/prompts.js.map +0 -0
  671. /package/{resources → dist/resources}/prompts.mjs +0 -0
  672. /package/{resources → dist/resources}/prompts.mjs.map +0 -0
  673. /package/{resources → dist/resources}/responses/index.d.ts +0 -0
  674. /package/{resources → dist/resources}/responses/index.d.ts.map +0 -0
  675. /package/{resources → dist/resources}/responses/index.js +0 -0
  676. /package/{resources → dist/resources}/responses/index.js.map +0 -0
  677. /package/{resources → dist/resources}/responses/index.mjs +0 -0
  678. /package/{resources → dist/resources}/responses/index.mjs.map +0 -0
  679. /package/{resources → dist/resources}/responses/input-items.js +0 -0
  680. /package/{resources → dist/resources}/responses/input-items.js.map +0 -0
  681. /package/{resources → dist/resources}/responses/input-items.mjs +0 -0
  682. /package/{resources → dist/resources}/responses/input-items.mjs.map +0 -0
  683. /package/{resources → dist/resources}/responses/responses.js +0 -0
  684. /package/{resources → dist/resources}/responses/responses.mjs +0 -0
  685. /package/{resources → dist/resources}/responses.d.ts +0 -0
  686. /package/{resources → dist/resources}/responses.d.ts.map +0 -0
  687. /package/{resources → dist/resources}/responses.js +0 -0
  688. /package/{resources → dist/resources}/responses.js.map +0 -0
  689. /package/{resources → dist/resources}/responses.mjs +0 -0
  690. /package/{resources → dist/resources}/responses.mjs.map +0 -0
  691. /package/{resources → dist/resources}/routes.js +0 -0
  692. /package/{resources → dist/resources}/routes.mjs +0 -0
  693. /package/{resources → dist/resources}/safety.d.ts +0 -0
  694. /package/{resources → dist/resources}/safety.d.ts.map +0 -0
  695. /package/{resources → dist/resources}/safety.js +0 -0
  696. /package/{resources → dist/resources}/safety.js.map +0 -0
  697. /package/{resources → dist/resources}/safety.mjs +0 -0
  698. /package/{resources → dist/resources}/safety.mjs.map +0 -0
  699. /package/{resources → dist/resources}/scoring-functions.d.ts +0 -0
  700. /package/{resources → dist/resources}/scoring-functions.d.ts.map +0 -0
  701. /package/{resources → dist/resources}/scoring-functions.js +0 -0
  702. /package/{resources → dist/resources}/scoring-functions.js.map +0 -0
  703. /package/{resources → dist/resources}/scoring-functions.mjs +0 -0
  704. /package/{resources → dist/resources}/scoring-functions.mjs.map +0 -0
  705. /package/{resources → dist/resources}/scoring.d.ts +0 -0
  706. /package/{resources → dist/resources}/scoring.d.ts.map +0 -0
  707. /package/{resources → dist/resources}/scoring.js +0 -0
  708. /package/{resources → dist/resources}/scoring.js.map +0 -0
  709. /package/{resources → dist/resources}/scoring.mjs +0 -0
  710. /package/{resources → dist/resources}/scoring.mjs.map +0 -0
  711. /package/{resources → dist/resources}/shared.js +0 -0
  712. /package/{resources → dist/resources}/shared.js.map +0 -0
  713. /package/{resources → dist/resources}/shared.mjs +0 -0
  714. /package/{resources → dist/resources}/shared.mjs.map +0 -0
  715. /package/{resources → dist/resources}/shields.d.ts +0 -0
  716. /package/{resources → dist/resources}/shields.d.ts.map +0 -0
  717. /package/{resources → dist/resources}/shields.js +0 -0
  718. /package/{resources → dist/resources}/shields.js.map +0 -0
  719. /package/{resources → dist/resources}/shields.mjs +0 -0
  720. /package/{resources → dist/resources}/shields.mjs.map +0 -0
  721. /package/{resources → dist/resources}/tool-runtime.d.ts +0 -0
  722. /package/{resources → dist/resources}/tool-runtime.d.ts.map +0 -0
  723. /package/{resources → dist/resources}/tool-runtime.js +0 -0
  724. /package/{resources → dist/resources}/tool-runtime.js.map +0 -0
  725. /package/{resources → dist/resources}/tool-runtime.mjs +0 -0
  726. /package/{resources → dist/resources}/tool-runtime.mjs.map +0 -0
  727. /package/{resources → dist/resources}/toolgroups.d.ts +0 -0
  728. /package/{resources → dist/resources}/toolgroups.d.ts.map +0 -0
  729. /package/{resources → dist/resources}/toolgroups.js +0 -0
  730. /package/{resources → dist/resources}/toolgroups.js.map +0 -0
  731. /package/{resources → dist/resources}/toolgroups.mjs +0 -0
  732. /package/{resources → dist/resources}/toolgroups.mjs.map +0 -0
  733. /package/{resources → dist/resources}/tools.d.ts +0 -0
  734. /package/{resources → dist/resources}/tools.d.ts.map +0 -0
  735. /package/{resources → dist/resources}/tools.js +0 -0
  736. /package/{resources → dist/resources}/tools.js.map +0 -0
  737. /package/{resources → dist/resources}/tools.mjs +0 -0
  738. /package/{resources → dist/resources}/tools.mjs.map +0 -0
  739. /package/{resources → dist/resources}/vector-io.d.ts +0 -0
  740. /package/{resources → dist/resources}/vector-io.d.ts.map +0 -0
  741. /package/{resources → dist/resources}/vector-io.js +0 -0
  742. /package/{resources → dist/resources}/vector-io.js.map +0 -0
  743. /package/{resources → dist/resources}/vector-io.mjs +0 -0
  744. /package/{resources → dist/resources}/vector-io.mjs.map +0 -0
  745. /package/{resources → dist/resources}/vector-stores/file-batches.d.ts +0 -0
  746. /package/{resources → dist/resources}/vector-stores/file-batches.d.ts.map +0 -0
  747. /package/{resources → dist/resources}/vector-stores/file-batches.js +0 -0
  748. /package/{resources → dist/resources}/vector-stores/file-batches.js.map +0 -0
  749. /package/{resources → dist/resources}/vector-stores/file-batches.mjs +0 -0
  750. /package/{resources → dist/resources}/vector-stores/file-batches.mjs.map +0 -0
  751. /package/{resources → dist/resources}/vector-stores/files.d.ts +0 -0
  752. /package/{resources → dist/resources}/vector-stores/files.d.ts.map +0 -0
  753. /package/{resources → dist/resources}/vector-stores/files.js +0 -0
  754. /package/{resources → dist/resources}/vector-stores/files.js.map +0 -0
  755. /package/{resources → dist/resources}/vector-stores/files.mjs +0 -0
  756. /package/{resources → dist/resources}/vector-stores/files.mjs.map +0 -0
  757. /package/{resources → dist/resources}/vector-stores/index.d.ts +0 -0
  758. /package/{resources → dist/resources}/vector-stores/index.d.ts.map +0 -0
  759. /package/{resources → dist/resources}/vector-stores/index.js +0 -0
  760. /package/{resources → dist/resources}/vector-stores/index.js.map +0 -0
  761. /package/{resources → dist/resources}/vector-stores/index.mjs +0 -0
  762. /package/{resources → dist/resources}/vector-stores/index.mjs.map +0 -0
  763. /package/{resources → dist/resources}/vector-stores/vector-stores.d.ts +0 -0
  764. /package/{resources → dist/resources}/vector-stores/vector-stores.d.ts.map +0 -0
  765. /package/{resources → dist/resources}/vector-stores/vector-stores.js +0 -0
  766. /package/{resources → dist/resources}/vector-stores/vector-stores.js.map +0 -0
  767. /package/{resources → dist/resources}/vector-stores/vector-stores.mjs +0 -0
  768. /package/{resources → dist/resources}/vector-stores/vector-stores.mjs.map +0 -0
  769. /package/{resources → dist/resources}/vector-stores.d.ts +0 -0
  770. /package/{resources → dist/resources}/vector-stores.d.ts.map +0 -0
  771. /package/{resources → dist/resources}/vector-stores.js +0 -0
  772. /package/{resources → dist/resources}/vector-stores.js.map +0 -0
  773. /package/{resources → dist/resources}/vector-stores.mjs +0 -0
  774. /package/{resources → dist/resources}/vector-stores.mjs.map +0 -0
  775. /package/{resources.d.ts → dist/resources.d.ts} +0 -0
  776. /package/{resources.d.ts.map → dist/resources.d.ts.map} +0 -0
  777. /package/{resources.js → dist/resources.js} +0 -0
  778. /package/{resources.js.map → dist/resources.js.map} +0 -0
  779. /package/{resources.mjs → dist/resources.mjs} +0 -0
  780. /package/{resources.mjs.map → dist/resources.mjs.map} +0 -0
  781. /package/{shims → dist/shims}/node.d.ts +0 -0
  782. /package/{shims → dist/shims}/node.d.ts.map +0 -0
  783. /package/{shims → dist/shims}/node.js +0 -0
  784. /package/{shims → dist/shims}/node.js.map +0 -0
  785. /package/{shims → dist/shims}/node.mjs +0 -0
  786. /package/{shims → dist/shims}/node.mjs.map +0 -0
  787. /package/{shims → dist/shims}/web.d.ts +0 -0
  788. /package/{shims → dist/shims}/web.d.ts.map +0 -0
  789. /package/{shims → dist/shims}/web.js +0 -0
  790. /package/{shims → dist/shims}/web.js.map +0 -0
  791. /package/{shims → dist/shims}/web.mjs +0 -0
  792. /package/{shims → dist/shims}/web.mjs.map +0 -0
  793. /package/{src → dist/src}/tsconfig.json +0 -0
  794. /package/{streaming.d.ts → dist/streaming.d.ts} +0 -0
  795. /package/{streaming.d.ts.map → dist/streaming.d.ts.map} +0 -0
  796. /package/{streaming.js → dist/streaming.js} +0 -0
  797. /package/{streaming.js.map → dist/streaming.js.map} +0 -0
  798. /package/{streaming.mjs → dist/streaming.mjs} +0 -0
  799. /package/{streaming.mjs.map → dist/streaming.mjs.map} +0 -0
  800. /package/{uploads.d.ts → dist/uploads.d.ts} +0 -0
  801. /package/{uploads.d.ts.map → dist/uploads.d.ts.map} +0 -0
  802. /package/{uploads.js → dist/uploads.js} +0 -0
  803. /package/{uploads.js.map → dist/uploads.js.map} +0 -0
  804. /package/{uploads.mjs → dist/uploads.mjs} +0 -0
  805. /package/{uploads.mjs.map → dist/uploads.mjs.map} +0 -0
  806. /package/{version.d.ts.map → dist/version.d.ts.map} +0 -0
  807. /package/{version.js.map → dist/version.js.map} +0 -0
  808. /package/{version.mjs.map → dist/version.mjs.map} +0 -0
@@ -0,0 +1,1875 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
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 { isRequestOptions } from '../../core';
11
+ import { APIPromise } from '../../core';
12
+ import * as Core from '../../core';
13
+ import * as CompletionsAPI from './completions';
14
+ import * as ChatAPI from './chat';
15
+ import { Stream } from '../../streaming';
16
+
17
+ export class Completions extends APIResource {
18
+ /**
19
+ * Create chat completions.
20
+ *
21
+ * Generate an OpenAI-compatible chat completion for the given messages using the
22
+ * specified model.
23
+ */
24
+ create(
25
+ body: CompletionCreateParamsNonStreaming,
26
+ options?: Core.RequestOptions,
27
+ ): APIPromise<CompletionCreateResponse>;
28
+ create(
29
+ body: CompletionCreateParamsStreaming,
30
+ options?: Core.RequestOptions,
31
+ ): APIPromise<Stream<ChatAPI.ChatCompletionChunk>>;
32
+ create(
33
+ body: CompletionCreateParamsBase,
34
+ options?: Core.RequestOptions,
35
+ ): APIPromise<Stream<ChatAPI.ChatCompletionChunk> | CompletionCreateResponse>;
36
+ create(
37
+ body: CompletionCreateParams,
38
+ options?: Core.RequestOptions,
39
+ ): APIPromise<CompletionCreateResponse> | APIPromise<Stream<ChatAPI.ChatCompletionChunk>> {
40
+ return this._client.post('/v1/chat/completions', { body, ...options, stream: body.stream ?? false }) as
41
+ | APIPromise<CompletionCreateResponse>
42
+ | APIPromise<Stream<ChatAPI.ChatCompletionChunk>>;
43
+ }
44
+
45
+ /**
46
+ * Get chat completion.
47
+ *
48
+ * Describe a chat completion by its ID.
49
+ */
50
+ retrieve(completionId: string, options?: Core.RequestOptions): Core.APIPromise<CompletionRetrieveResponse> {
51
+ return this._client.get(`/v1/chat/completions/${completionId}`, options);
52
+ }
53
+
54
+ /**
55
+ * List chat completions.
56
+ */
57
+ list(query?: CompletionListParams, options?: Core.RequestOptions): Core.APIPromise<CompletionListResponse>;
58
+ list(options?: Core.RequestOptions): Core.APIPromise<CompletionListResponse>;
59
+ list(
60
+ query: CompletionListParams | Core.RequestOptions = {},
61
+ options?: Core.RequestOptions,
62
+ ): Core.APIPromise<CompletionListResponse> {
63
+ if (isRequestOptions(query)) {
64
+ return this.list({}, query);
65
+ }
66
+ return this._client.get('/v1/chat/completions', { query, ...options });
67
+ }
68
+ }
69
+
70
+ /**
71
+ * Response from an OpenAI-compatible chat completion request.
72
+ */
73
+ export interface CompletionCreateResponse {
74
+ id: string;
75
+
76
+ choices: Array<CompletionCreateResponse.Choice>;
77
+
78
+ created: number;
79
+
80
+ model: string;
81
+
82
+ object?: 'chat.completion';
83
+
84
+ /**
85
+ * Usage information for OpenAI chat completion.
86
+ */
87
+ usage?: CompletionCreateResponse.Usage | null;
88
+ }
89
+
90
+ export namespace CompletionCreateResponse {
91
+ /**
92
+ * A choice from an OpenAI-compatible chat completion response.
93
+ */
94
+ export interface Choice {
95
+ finish_reason: string;
96
+
97
+ index: number;
98
+
99
+ /**
100
+ * A message from the user in an OpenAI-compatible chat completion request.
101
+ */
102
+ message:
103
+ | Choice.OpenAIUserMessageParamOutput
104
+ | Choice.OpenAISystemMessageParam
105
+ | Choice.OpenAIAssistantMessageParamOutput
106
+ | Choice.OpenAIToolMessageParam
107
+ | Choice.OpenAIDeveloperMessageParam;
108
+
109
+ /**
110
+ * The log probabilities for the tokens in the message from an OpenAI-compatible
111
+ * chat completion response.
112
+ */
113
+ logprobs?: Choice.Logprobs | null;
114
+ }
115
+
116
+ export namespace Choice {
117
+ /**
118
+ * A message from the user in an OpenAI-compatible chat completion request.
119
+ */
120
+ export interface OpenAIUserMessageParamOutput {
121
+ content:
122
+ | string
123
+ | Array<
124
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartTextParam
125
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartImageParam
126
+ | OpenAIUserMessageParamOutput.OpenAIFile
127
+ >;
128
+
129
+ name?: string | null;
130
+
131
+ role?: 'user';
132
+ }
133
+
134
+ export namespace OpenAIUserMessageParamOutput {
135
+ /**
136
+ * Text content part for OpenAI-compatible chat completion messages.
137
+ */
138
+ export interface OpenAIChatCompletionContentPartTextParam {
139
+ text: string;
140
+
141
+ type?: 'text';
142
+ }
143
+
144
+ /**
145
+ * Image content part for OpenAI-compatible chat completion messages.
146
+ */
147
+ export interface OpenAIChatCompletionContentPartImageParam {
148
+ /**
149
+ * Image URL specification for OpenAI-compatible chat completion messages.
150
+ */
151
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
152
+
153
+ type?: 'image_url';
154
+ }
155
+
156
+ export namespace OpenAIChatCompletionContentPartImageParam {
157
+ /**
158
+ * Image URL specification for OpenAI-compatible chat completion messages.
159
+ */
160
+ export interface ImageURL {
161
+ url: string;
162
+
163
+ detail?: string | null;
164
+ }
165
+ }
166
+
167
+ export interface OpenAIFile {
168
+ file: OpenAIFile.File;
169
+
170
+ type?: 'file';
171
+ }
172
+
173
+ export namespace OpenAIFile {
174
+ export interface File {
175
+ file_data?: string | null;
176
+
177
+ file_id?: string | null;
178
+
179
+ filename?: string | null;
180
+ }
181
+ }
182
+ }
183
+
184
+ /**
185
+ * A system message providing instructions or context to the model.
186
+ */
187
+ export interface OpenAISystemMessageParam {
188
+ content: string | Array<OpenAISystemMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
189
+
190
+ name?: string | null;
191
+
192
+ role?: 'system';
193
+ }
194
+
195
+ export namespace OpenAISystemMessageParam {
196
+ /**
197
+ * Text content part for OpenAI-compatible chat completion messages.
198
+ */
199
+ export interface ListOpenAIChatCompletionContentPartTextParam {
200
+ text: string;
201
+
202
+ type?: 'text';
203
+ }
204
+ }
205
+
206
+ /**
207
+ * A message containing the model's (assistant) response in an OpenAI-compatible
208
+ * chat completion request.
209
+ */
210
+ export interface OpenAIAssistantMessageParamOutput {
211
+ content?:
212
+ | string
213
+ | Array<OpenAIAssistantMessageParamOutput.ListOpenAIChatCompletionContentPartTextParam>
214
+ | null;
215
+
216
+ name?: string | null;
217
+
218
+ role?: 'assistant';
219
+
220
+ tool_calls?: Array<OpenAIAssistantMessageParamOutput.ToolCall> | null;
221
+ }
222
+
223
+ export namespace OpenAIAssistantMessageParamOutput {
224
+ /**
225
+ * Text content part for OpenAI-compatible chat completion messages.
226
+ */
227
+ export interface ListOpenAIChatCompletionContentPartTextParam {
228
+ text: string;
229
+
230
+ type?: 'text';
231
+ }
232
+
233
+ /**
234
+ * Tool call specification for OpenAI-compatible chat completion responses.
235
+ */
236
+ export interface ToolCall {
237
+ id?: string | null;
238
+
239
+ /**
240
+ * Function call details for OpenAI-compatible tool calls.
241
+ */
242
+ function?: ToolCall.Function | null;
243
+
244
+ index?: number | null;
245
+
246
+ type?: 'function';
247
+ }
248
+
249
+ export namespace ToolCall {
250
+ /**
251
+ * Function call details for OpenAI-compatible tool calls.
252
+ */
253
+ export interface Function {
254
+ arguments?: string | null;
255
+
256
+ name?: string | null;
257
+ }
258
+ }
259
+ }
260
+
261
+ /**
262
+ * A message representing the result of a tool invocation in an OpenAI-compatible
263
+ * chat completion request.
264
+ */
265
+ export interface OpenAIToolMessageParam {
266
+ content: string | Array<OpenAIToolMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
267
+
268
+ tool_call_id: string;
269
+
270
+ role?: 'tool';
271
+ }
272
+
273
+ export namespace OpenAIToolMessageParam {
274
+ /**
275
+ * Text content part for OpenAI-compatible chat completion messages.
276
+ */
277
+ export interface ListOpenAIChatCompletionContentPartTextParam {
278
+ text: string;
279
+
280
+ type?: 'text';
281
+ }
282
+ }
283
+
284
+ /**
285
+ * A message from the developer in an OpenAI-compatible chat completion request.
286
+ */
287
+ export interface OpenAIDeveloperMessageParam {
288
+ content: string | Array<OpenAIDeveloperMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
289
+
290
+ name?: string | null;
291
+
292
+ role?: 'developer';
293
+ }
294
+
295
+ export namespace OpenAIDeveloperMessageParam {
296
+ /**
297
+ * Text content part for OpenAI-compatible chat completion messages.
298
+ */
299
+ export interface ListOpenAIChatCompletionContentPartTextParam {
300
+ text: string;
301
+
302
+ type?: 'text';
303
+ }
304
+ }
305
+
306
+ /**
307
+ * The log probabilities for the tokens in the message from an OpenAI-compatible
308
+ * chat completion response.
309
+ */
310
+ export interface Logprobs {
311
+ content?: Array<Logprobs.Content> | null;
312
+
313
+ refusal?: Array<Logprobs.Refusal> | null;
314
+ }
315
+
316
+ export namespace Logprobs {
317
+ /**
318
+ * The log probability for a token from an OpenAI-compatible chat completion
319
+ * response.
320
+ *
321
+ * :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
322
+ * probability of the token :top_logprobs: The top log probabilities for the token
323
+ */
324
+ export interface Content {
325
+ token: string;
326
+
327
+ logprob: number;
328
+
329
+ top_logprobs: Array<Content.TopLogprob>;
330
+
331
+ bytes?: Array<number> | null;
332
+ }
333
+
334
+ export namespace Content {
335
+ /**
336
+ * The top log probability for a token from an OpenAI-compatible chat completion
337
+ * response.
338
+ *
339
+ * :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
340
+ * probability of the token
341
+ */
342
+ export interface TopLogprob {
343
+ token: string;
344
+
345
+ logprob: number;
346
+
347
+ bytes?: Array<number> | null;
348
+ }
349
+ }
350
+
351
+ /**
352
+ * The log probability for a token from an OpenAI-compatible chat completion
353
+ * response.
354
+ *
355
+ * :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
356
+ * probability of the token :top_logprobs: The top log probabilities for the token
357
+ */
358
+ export interface Refusal {
359
+ token: string;
360
+
361
+ logprob: number;
362
+
363
+ top_logprobs: Array<Refusal.TopLogprob>;
364
+
365
+ bytes?: Array<number> | null;
366
+ }
367
+
368
+ export namespace Refusal {
369
+ /**
370
+ * The top log probability for a token from an OpenAI-compatible chat completion
371
+ * response.
372
+ *
373
+ * :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
374
+ * probability of the token
375
+ */
376
+ export interface TopLogprob {
377
+ token: string;
378
+
379
+ logprob: number;
380
+
381
+ bytes?: Array<number> | null;
382
+ }
383
+ }
384
+ }
385
+ }
386
+
387
+ /**
388
+ * Usage information for OpenAI chat completion.
389
+ */
390
+ export interface Usage {
391
+ completion_tokens: number;
392
+
393
+ prompt_tokens: number;
394
+
395
+ total_tokens: number;
396
+
397
+ /**
398
+ * Token details for output tokens in OpenAI chat completion usage.
399
+ */
400
+ completion_tokens_details?: Usage.CompletionTokensDetails | null;
401
+
402
+ /**
403
+ * Token details for prompt tokens in OpenAI chat completion usage.
404
+ */
405
+ prompt_tokens_details?: Usage.PromptTokensDetails | null;
406
+ }
407
+
408
+ export namespace Usage {
409
+ /**
410
+ * Token details for output tokens in OpenAI chat completion usage.
411
+ */
412
+ export interface CompletionTokensDetails {
413
+ reasoning_tokens?: number | null;
414
+ }
415
+
416
+ /**
417
+ * Token details for prompt tokens in OpenAI chat completion usage.
418
+ */
419
+ export interface PromptTokensDetails {
420
+ cached_tokens?: number | null;
421
+ }
422
+ }
423
+ }
424
+
425
+ export interface CompletionRetrieveResponse {
426
+ id: string;
427
+
428
+ choices: Array<CompletionRetrieveResponse.Choice>;
429
+
430
+ created: number;
431
+
432
+ input_messages: Array<
433
+ | CompletionRetrieveResponse.OpenAIUserMessageParamOutput
434
+ | CompletionRetrieveResponse.OpenAISystemMessageParam
435
+ | CompletionRetrieveResponse.OpenAIAssistantMessageParamOutput
436
+ | CompletionRetrieveResponse.OpenAIToolMessageParam
437
+ | CompletionRetrieveResponse.OpenAIDeveloperMessageParam
438
+ >;
439
+
440
+ model: string;
441
+
442
+ object?: 'chat.completion';
443
+
444
+ /**
445
+ * Usage information for OpenAI chat completion.
446
+ */
447
+ usage?: CompletionRetrieveResponse.Usage | null;
448
+ }
449
+
450
+ export namespace CompletionRetrieveResponse {
451
+ /**
452
+ * A choice from an OpenAI-compatible chat completion response.
453
+ */
454
+ export interface Choice {
455
+ finish_reason: string;
456
+
457
+ index: number;
458
+
459
+ /**
460
+ * A message from the user in an OpenAI-compatible chat completion request.
461
+ */
462
+ message:
463
+ | Choice.OpenAIUserMessageParamOutput
464
+ | Choice.OpenAISystemMessageParam
465
+ | Choice.OpenAIAssistantMessageParamOutput
466
+ | Choice.OpenAIToolMessageParam
467
+ | Choice.OpenAIDeveloperMessageParam;
468
+
469
+ /**
470
+ * The log probabilities for the tokens in the message from an OpenAI-compatible
471
+ * chat completion response.
472
+ */
473
+ logprobs?: Choice.Logprobs | null;
474
+ }
475
+
476
+ export namespace Choice {
477
+ /**
478
+ * A message from the user in an OpenAI-compatible chat completion request.
479
+ */
480
+ export interface OpenAIUserMessageParamOutput {
481
+ content:
482
+ | string
483
+ | Array<
484
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartTextParam
485
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartImageParam
486
+ | OpenAIUserMessageParamOutput.OpenAIFile
487
+ >;
488
+
489
+ name?: string | null;
490
+
491
+ role?: 'user';
492
+ }
493
+
494
+ export namespace OpenAIUserMessageParamOutput {
495
+ /**
496
+ * Text content part for OpenAI-compatible chat completion messages.
497
+ */
498
+ export interface OpenAIChatCompletionContentPartTextParam {
499
+ text: string;
500
+
501
+ type?: 'text';
502
+ }
503
+
504
+ /**
505
+ * Image content part for OpenAI-compatible chat completion messages.
506
+ */
507
+ export interface OpenAIChatCompletionContentPartImageParam {
508
+ /**
509
+ * Image URL specification for OpenAI-compatible chat completion messages.
510
+ */
511
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
512
+
513
+ type?: 'image_url';
514
+ }
515
+
516
+ export namespace OpenAIChatCompletionContentPartImageParam {
517
+ /**
518
+ * Image URL specification for OpenAI-compatible chat completion messages.
519
+ */
520
+ export interface ImageURL {
521
+ url: string;
522
+
523
+ detail?: string | null;
524
+ }
525
+ }
526
+
527
+ export interface OpenAIFile {
528
+ file: OpenAIFile.File;
529
+
530
+ type?: 'file';
531
+ }
532
+
533
+ export namespace OpenAIFile {
534
+ export interface File {
535
+ file_data?: string | null;
536
+
537
+ file_id?: string | null;
538
+
539
+ filename?: string | null;
540
+ }
541
+ }
542
+ }
543
+
544
+ /**
545
+ * A system message providing instructions or context to the model.
546
+ */
547
+ export interface OpenAISystemMessageParam {
548
+ content: string | Array<OpenAISystemMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
549
+
550
+ name?: string | null;
551
+
552
+ role?: 'system';
553
+ }
554
+
555
+ export namespace OpenAISystemMessageParam {
556
+ /**
557
+ * Text content part for OpenAI-compatible chat completion messages.
558
+ */
559
+ export interface ListOpenAIChatCompletionContentPartTextParam {
560
+ text: string;
561
+
562
+ type?: 'text';
563
+ }
564
+ }
565
+
566
+ /**
567
+ * A message containing the model's (assistant) response in an OpenAI-compatible
568
+ * chat completion request.
569
+ */
570
+ export interface OpenAIAssistantMessageParamOutput {
571
+ content?:
572
+ | string
573
+ | Array<OpenAIAssistantMessageParamOutput.ListOpenAIChatCompletionContentPartTextParam>
574
+ | null;
575
+
576
+ name?: string | null;
577
+
578
+ role?: 'assistant';
579
+
580
+ tool_calls?: Array<OpenAIAssistantMessageParamOutput.ToolCall> | null;
581
+ }
582
+
583
+ export namespace OpenAIAssistantMessageParamOutput {
584
+ /**
585
+ * Text content part for OpenAI-compatible chat completion messages.
586
+ */
587
+ export interface ListOpenAIChatCompletionContentPartTextParam {
588
+ text: string;
589
+
590
+ type?: 'text';
591
+ }
592
+
593
+ /**
594
+ * Tool call specification for OpenAI-compatible chat completion responses.
595
+ */
596
+ export interface ToolCall {
597
+ id?: string | null;
598
+
599
+ /**
600
+ * Function call details for OpenAI-compatible tool calls.
601
+ */
602
+ function?: ToolCall.Function | null;
603
+
604
+ index?: number | null;
605
+
606
+ type?: 'function';
607
+ }
608
+
609
+ export namespace ToolCall {
610
+ /**
611
+ * Function call details for OpenAI-compatible tool calls.
612
+ */
613
+ export interface Function {
614
+ arguments?: string | null;
615
+
616
+ name?: string | null;
617
+ }
618
+ }
619
+ }
620
+
621
+ /**
622
+ * A message representing the result of a tool invocation in an OpenAI-compatible
623
+ * chat completion request.
624
+ */
625
+ export interface OpenAIToolMessageParam {
626
+ content: string | Array<OpenAIToolMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
627
+
628
+ tool_call_id: string;
629
+
630
+ role?: 'tool';
631
+ }
632
+
633
+ export namespace OpenAIToolMessageParam {
634
+ /**
635
+ * Text content part for OpenAI-compatible chat completion messages.
636
+ */
637
+ export interface ListOpenAIChatCompletionContentPartTextParam {
638
+ text: string;
639
+
640
+ type?: 'text';
641
+ }
642
+ }
643
+
644
+ /**
645
+ * A message from the developer in an OpenAI-compatible chat completion request.
646
+ */
647
+ export interface OpenAIDeveloperMessageParam {
648
+ content: string | Array<OpenAIDeveloperMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
649
+
650
+ name?: string | null;
651
+
652
+ role?: 'developer';
653
+ }
654
+
655
+ export namespace OpenAIDeveloperMessageParam {
656
+ /**
657
+ * Text content part for OpenAI-compatible chat completion messages.
658
+ */
659
+ export interface ListOpenAIChatCompletionContentPartTextParam {
660
+ text: string;
661
+
662
+ type?: 'text';
663
+ }
664
+ }
665
+
666
+ /**
667
+ * The log probabilities for the tokens in the message from an OpenAI-compatible
668
+ * chat completion response.
669
+ */
670
+ export interface Logprobs {
671
+ content?: Array<Logprobs.Content> | null;
672
+
673
+ refusal?: Array<Logprobs.Refusal> | null;
674
+ }
675
+
676
+ export namespace Logprobs {
677
+ /**
678
+ * The log probability for a token from an OpenAI-compatible chat completion
679
+ * response.
680
+ *
681
+ * :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
682
+ * probability of the token :top_logprobs: The top log probabilities for the token
683
+ */
684
+ export interface Content {
685
+ token: string;
686
+
687
+ logprob: number;
688
+
689
+ top_logprobs: Array<Content.TopLogprob>;
690
+
691
+ bytes?: Array<number> | null;
692
+ }
693
+
694
+ export namespace Content {
695
+ /**
696
+ * The top log probability for a token from an OpenAI-compatible chat completion
697
+ * response.
698
+ *
699
+ * :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
700
+ * probability of the token
701
+ */
702
+ export interface TopLogprob {
703
+ token: string;
704
+
705
+ logprob: number;
706
+
707
+ bytes?: Array<number> | null;
708
+ }
709
+ }
710
+
711
+ /**
712
+ * The log probability for a token from an OpenAI-compatible chat completion
713
+ * response.
714
+ *
715
+ * :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
716
+ * probability of the token :top_logprobs: The top log probabilities for the token
717
+ */
718
+ export interface Refusal {
719
+ token: string;
720
+
721
+ logprob: number;
722
+
723
+ top_logprobs: Array<Refusal.TopLogprob>;
724
+
725
+ bytes?: Array<number> | null;
726
+ }
727
+
728
+ export namespace Refusal {
729
+ /**
730
+ * The top log probability for a token from an OpenAI-compatible chat completion
731
+ * response.
732
+ *
733
+ * :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
734
+ * probability of the token
735
+ */
736
+ export interface TopLogprob {
737
+ token: string;
738
+
739
+ logprob: number;
740
+
741
+ bytes?: Array<number> | null;
742
+ }
743
+ }
744
+ }
745
+ }
746
+
747
+ /**
748
+ * A message from the user in an OpenAI-compatible chat completion request.
749
+ */
750
+ export interface OpenAIUserMessageParamOutput {
751
+ content:
752
+ | string
753
+ | Array<
754
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartTextParam
755
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartImageParam
756
+ | OpenAIUserMessageParamOutput.OpenAIFile
757
+ >;
758
+
759
+ name?: string | null;
760
+
761
+ role?: 'user';
762
+ }
763
+
764
+ export namespace OpenAIUserMessageParamOutput {
765
+ /**
766
+ * Text content part for OpenAI-compatible chat completion messages.
767
+ */
768
+ export interface OpenAIChatCompletionContentPartTextParam {
769
+ text: string;
770
+
771
+ type?: 'text';
772
+ }
773
+
774
+ /**
775
+ * Image content part for OpenAI-compatible chat completion messages.
776
+ */
777
+ export interface OpenAIChatCompletionContentPartImageParam {
778
+ /**
779
+ * Image URL specification for OpenAI-compatible chat completion messages.
780
+ */
781
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
782
+
783
+ type?: 'image_url';
784
+ }
785
+
786
+ export namespace OpenAIChatCompletionContentPartImageParam {
787
+ /**
788
+ * Image URL specification for OpenAI-compatible chat completion messages.
789
+ */
790
+ export interface ImageURL {
791
+ url: string;
792
+
793
+ detail?: string | null;
794
+ }
795
+ }
796
+
797
+ export interface OpenAIFile {
798
+ file: OpenAIFile.File;
799
+
800
+ type?: 'file';
801
+ }
802
+
803
+ export namespace OpenAIFile {
804
+ export interface File {
805
+ file_data?: string | null;
806
+
807
+ file_id?: string | null;
808
+
809
+ filename?: string | null;
810
+ }
811
+ }
812
+ }
813
+
814
+ /**
815
+ * A system message providing instructions or context to the model.
816
+ */
817
+ export interface OpenAISystemMessageParam {
818
+ content: string | Array<OpenAISystemMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
819
+
820
+ name?: string | null;
821
+
822
+ role?: 'system';
823
+ }
824
+
825
+ export namespace OpenAISystemMessageParam {
826
+ /**
827
+ * Text content part for OpenAI-compatible chat completion messages.
828
+ */
829
+ export interface ListOpenAIChatCompletionContentPartTextParam {
830
+ text: string;
831
+
832
+ type?: 'text';
833
+ }
834
+ }
835
+
836
+ /**
837
+ * A message containing the model's (assistant) response in an OpenAI-compatible
838
+ * chat completion request.
839
+ */
840
+ export interface OpenAIAssistantMessageParamOutput {
841
+ content?:
842
+ | string
843
+ | Array<OpenAIAssistantMessageParamOutput.ListOpenAIChatCompletionContentPartTextParam>
844
+ | null;
845
+
846
+ name?: string | null;
847
+
848
+ role?: 'assistant';
849
+
850
+ tool_calls?: Array<OpenAIAssistantMessageParamOutput.ToolCall> | null;
851
+ }
852
+
853
+ export namespace OpenAIAssistantMessageParamOutput {
854
+ /**
855
+ * Text content part for OpenAI-compatible chat completion messages.
856
+ */
857
+ export interface ListOpenAIChatCompletionContentPartTextParam {
858
+ text: string;
859
+
860
+ type?: 'text';
861
+ }
862
+
863
+ /**
864
+ * Tool call specification for OpenAI-compatible chat completion responses.
865
+ */
866
+ export interface ToolCall {
867
+ id?: string | null;
868
+
869
+ /**
870
+ * Function call details for OpenAI-compatible tool calls.
871
+ */
872
+ function?: ToolCall.Function | null;
873
+
874
+ index?: number | null;
875
+
876
+ type?: 'function';
877
+ }
878
+
879
+ export namespace ToolCall {
880
+ /**
881
+ * Function call details for OpenAI-compatible tool calls.
882
+ */
883
+ export interface Function {
884
+ arguments?: string | null;
885
+
886
+ name?: string | null;
887
+ }
888
+ }
889
+ }
890
+
891
+ /**
892
+ * A message representing the result of a tool invocation in an OpenAI-compatible
893
+ * chat completion request.
894
+ */
895
+ export interface OpenAIToolMessageParam {
896
+ content: string | Array<OpenAIToolMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
897
+
898
+ tool_call_id: string;
899
+
900
+ role?: 'tool';
901
+ }
902
+
903
+ export namespace OpenAIToolMessageParam {
904
+ /**
905
+ * Text content part for OpenAI-compatible chat completion messages.
906
+ */
907
+ export interface ListOpenAIChatCompletionContentPartTextParam {
908
+ text: string;
909
+
910
+ type?: 'text';
911
+ }
912
+ }
913
+
914
+ /**
915
+ * A message from the developer in an OpenAI-compatible chat completion request.
916
+ */
917
+ export interface OpenAIDeveloperMessageParam {
918
+ content: string | Array<OpenAIDeveloperMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
919
+
920
+ name?: string | null;
921
+
922
+ role?: 'developer';
923
+ }
924
+
925
+ export namespace OpenAIDeveloperMessageParam {
926
+ /**
927
+ * Text content part for OpenAI-compatible chat completion messages.
928
+ */
929
+ export interface ListOpenAIChatCompletionContentPartTextParam {
930
+ text: string;
931
+
932
+ type?: 'text';
933
+ }
934
+ }
935
+
936
+ /**
937
+ * Usage information for OpenAI chat completion.
938
+ */
939
+ export interface Usage {
940
+ completion_tokens: number;
941
+
942
+ prompt_tokens: number;
943
+
944
+ total_tokens: number;
945
+
946
+ /**
947
+ * Token details for output tokens in OpenAI chat completion usage.
948
+ */
949
+ completion_tokens_details?: Usage.CompletionTokensDetails | null;
950
+
951
+ /**
952
+ * Token details for prompt tokens in OpenAI chat completion usage.
953
+ */
954
+ prompt_tokens_details?: Usage.PromptTokensDetails | null;
955
+ }
956
+
957
+ export namespace Usage {
958
+ /**
959
+ * Token details for output tokens in OpenAI chat completion usage.
960
+ */
961
+ export interface CompletionTokensDetails {
962
+ reasoning_tokens?: number | null;
963
+ }
964
+
965
+ /**
966
+ * Token details for prompt tokens in OpenAI chat completion usage.
967
+ */
968
+ export interface PromptTokensDetails {
969
+ cached_tokens?: number | null;
970
+ }
971
+ }
972
+ }
973
+
974
+ /**
975
+ * Response from listing OpenAI-compatible chat completions.
976
+ */
977
+ export interface CompletionListResponse {
978
+ data: Array<CompletionListResponse.Data>;
979
+
980
+ first_id: string;
981
+
982
+ has_more: boolean;
983
+
984
+ last_id: string;
985
+
986
+ object?: 'list';
987
+ }
988
+
989
+ export namespace CompletionListResponse {
990
+ export interface Data {
991
+ id: string;
992
+
993
+ choices: Array<Data.Choice>;
994
+
995
+ created: number;
996
+
997
+ input_messages: Array<
998
+ | Data.OpenAIUserMessageParamOutput
999
+ | Data.OpenAISystemMessageParam
1000
+ | Data.OpenAIAssistantMessageParamOutput
1001
+ | Data.OpenAIToolMessageParam
1002
+ | Data.OpenAIDeveloperMessageParam
1003
+ >;
1004
+
1005
+ model: string;
1006
+
1007
+ object?: 'chat.completion';
1008
+
1009
+ /**
1010
+ * Usage information for OpenAI chat completion.
1011
+ */
1012
+ usage?: Data.Usage | null;
1013
+ }
1014
+
1015
+ export namespace Data {
1016
+ /**
1017
+ * A choice from an OpenAI-compatible chat completion response.
1018
+ */
1019
+ export interface Choice {
1020
+ finish_reason: string;
1021
+
1022
+ index: number;
1023
+
1024
+ /**
1025
+ * A message from the user in an OpenAI-compatible chat completion request.
1026
+ */
1027
+ message:
1028
+ | Choice.OpenAIUserMessageParamOutput
1029
+ | Choice.OpenAISystemMessageParam
1030
+ | Choice.OpenAIAssistantMessageParamOutput
1031
+ | Choice.OpenAIToolMessageParam
1032
+ | Choice.OpenAIDeveloperMessageParam;
1033
+
1034
+ /**
1035
+ * The log probabilities for the tokens in the message from an OpenAI-compatible
1036
+ * chat completion response.
1037
+ */
1038
+ logprobs?: Choice.Logprobs | null;
1039
+ }
1040
+
1041
+ export namespace Choice {
1042
+ /**
1043
+ * A message from the user in an OpenAI-compatible chat completion request.
1044
+ */
1045
+ export interface OpenAIUserMessageParamOutput {
1046
+ content:
1047
+ | string
1048
+ | Array<
1049
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartTextParam
1050
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartImageParam
1051
+ | OpenAIUserMessageParamOutput.OpenAIFile
1052
+ >;
1053
+
1054
+ name?: string | null;
1055
+
1056
+ role?: 'user';
1057
+ }
1058
+
1059
+ export namespace OpenAIUserMessageParamOutput {
1060
+ /**
1061
+ * Text content part for OpenAI-compatible chat completion messages.
1062
+ */
1063
+ export interface OpenAIChatCompletionContentPartTextParam {
1064
+ text: string;
1065
+
1066
+ type?: 'text';
1067
+ }
1068
+
1069
+ /**
1070
+ * Image content part for OpenAI-compatible chat completion messages.
1071
+ */
1072
+ export interface OpenAIChatCompletionContentPartImageParam {
1073
+ /**
1074
+ * Image URL specification for OpenAI-compatible chat completion messages.
1075
+ */
1076
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
1077
+
1078
+ type?: 'image_url';
1079
+ }
1080
+
1081
+ export namespace OpenAIChatCompletionContentPartImageParam {
1082
+ /**
1083
+ * Image URL specification for OpenAI-compatible chat completion messages.
1084
+ */
1085
+ export interface ImageURL {
1086
+ url: string;
1087
+
1088
+ detail?: string | null;
1089
+ }
1090
+ }
1091
+
1092
+ export interface OpenAIFile {
1093
+ file: OpenAIFile.File;
1094
+
1095
+ type?: 'file';
1096
+ }
1097
+
1098
+ export namespace OpenAIFile {
1099
+ export interface File {
1100
+ file_data?: string | null;
1101
+
1102
+ file_id?: string | null;
1103
+
1104
+ filename?: string | null;
1105
+ }
1106
+ }
1107
+ }
1108
+
1109
+ /**
1110
+ * A system message providing instructions or context to the model.
1111
+ */
1112
+ export interface OpenAISystemMessageParam {
1113
+ content: string | Array<OpenAISystemMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
1114
+
1115
+ name?: string | null;
1116
+
1117
+ role?: 'system';
1118
+ }
1119
+
1120
+ export namespace OpenAISystemMessageParam {
1121
+ /**
1122
+ * Text content part for OpenAI-compatible chat completion messages.
1123
+ */
1124
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1125
+ text: string;
1126
+
1127
+ type?: 'text';
1128
+ }
1129
+ }
1130
+
1131
+ /**
1132
+ * A message containing the model's (assistant) response in an OpenAI-compatible
1133
+ * chat completion request.
1134
+ */
1135
+ export interface OpenAIAssistantMessageParamOutput {
1136
+ content?:
1137
+ | string
1138
+ | Array<OpenAIAssistantMessageParamOutput.ListOpenAIChatCompletionContentPartTextParam>
1139
+ | null;
1140
+
1141
+ name?: string | null;
1142
+
1143
+ role?: 'assistant';
1144
+
1145
+ tool_calls?: Array<OpenAIAssistantMessageParamOutput.ToolCall> | null;
1146
+ }
1147
+
1148
+ export namespace OpenAIAssistantMessageParamOutput {
1149
+ /**
1150
+ * Text content part for OpenAI-compatible chat completion messages.
1151
+ */
1152
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1153
+ text: string;
1154
+
1155
+ type?: 'text';
1156
+ }
1157
+
1158
+ /**
1159
+ * Tool call specification for OpenAI-compatible chat completion responses.
1160
+ */
1161
+ export interface ToolCall {
1162
+ id?: string | null;
1163
+
1164
+ /**
1165
+ * Function call details for OpenAI-compatible tool calls.
1166
+ */
1167
+ function?: ToolCall.Function | null;
1168
+
1169
+ index?: number | null;
1170
+
1171
+ type?: 'function';
1172
+ }
1173
+
1174
+ export namespace ToolCall {
1175
+ /**
1176
+ * Function call details for OpenAI-compatible tool calls.
1177
+ */
1178
+ export interface Function {
1179
+ arguments?: string | null;
1180
+
1181
+ name?: string | null;
1182
+ }
1183
+ }
1184
+ }
1185
+
1186
+ /**
1187
+ * A message representing the result of a tool invocation in an OpenAI-compatible
1188
+ * chat completion request.
1189
+ */
1190
+ export interface OpenAIToolMessageParam {
1191
+ content: string | Array<OpenAIToolMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
1192
+
1193
+ tool_call_id: string;
1194
+
1195
+ role?: 'tool';
1196
+ }
1197
+
1198
+ export namespace OpenAIToolMessageParam {
1199
+ /**
1200
+ * Text content part for OpenAI-compatible chat completion messages.
1201
+ */
1202
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1203
+ text: string;
1204
+
1205
+ type?: 'text';
1206
+ }
1207
+ }
1208
+
1209
+ /**
1210
+ * A message from the developer in an OpenAI-compatible chat completion request.
1211
+ */
1212
+ export interface OpenAIDeveloperMessageParam {
1213
+ content: string | Array<OpenAIDeveloperMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
1214
+
1215
+ name?: string | null;
1216
+
1217
+ role?: 'developer';
1218
+ }
1219
+
1220
+ export namespace OpenAIDeveloperMessageParam {
1221
+ /**
1222
+ * Text content part for OpenAI-compatible chat completion messages.
1223
+ */
1224
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1225
+ text: string;
1226
+
1227
+ type?: 'text';
1228
+ }
1229
+ }
1230
+
1231
+ /**
1232
+ * The log probabilities for the tokens in the message from an OpenAI-compatible
1233
+ * chat completion response.
1234
+ */
1235
+ export interface Logprobs {
1236
+ content?: Array<Logprobs.Content> | null;
1237
+
1238
+ refusal?: Array<Logprobs.Refusal> | null;
1239
+ }
1240
+
1241
+ export namespace Logprobs {
1242
+ /**
1243
+ * The log probability for a token from an OpenAI-compatible chat completion
1244
+ * response.
1245
+ *
1246
+ * :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
1247
+ * probability of the token :top_logprobs: The top log probabilities for the token
1248
+ */
1249
+ export interface Content {
1250
+ token: string;
1251
+
1252
+ logprob: number;
1253
+
1254
+ top_logprobs: Array<Content.TopLogprob>;
1255
+
1256
+ bytes?: Array<number> | null;
1257
+ }
1258
+
1259
+ export namespace Content {
1260
+ /**
1261
+ * The top log probability for a token from an OpenAI-compatible chat completion
1262
+ * response.
1263
+ *
1264
+ * :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
1265
+ * probability of the token
1266
+ */
1267
+ export interface TopLogprob {
1268
+ token: string;
1269
+
1270
+ logprob: number;
1271
+
1272
+ bytes?: Array<number> | null;
1273
+ }
1274
+ }
1275
+
1276
+ /**
1277
+ * The log probability for a token from an OpenAI-compatible chat completion
1278
+ * response.
1279
+ *
1280
+ * :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
1281
+ * probability of the token :top_logprobs: The top log probabilities for the token
1282
+ */
1283
+ export interface Refusal {
1284
+ token: string;
1285
+
1286
+ logprob: number;
1287
+
1288
+ top_logprobs: Array<Refusal.TopLogprob>;
1289
+
1290
+ bytes?: Array<number> | null;
1291
+ }
1292
+
1293
+ export namespace Refusal {
1294
+ /**
1295
+ * The top log probability for a token from an OpenAI-compatible chat completion
1296
+ * response.
1297
+ *
1298
+ * :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
1299
+ * probability of the token
1300
+ */
1301
+ export interface TopLogprob {
1302
+ token: string;
1303
+
1304
+ logprob: number;
1305
+
1306
+ bytes?: Array<number> | null;
1307
+ }
1308
+ }
1309
+ }
1310
+ }
1311
+
1312
+ /**
1313
+ * A message from the user in an OpenAI-compatible chat completion request.
1314
+ */
1315
+ export interface OpenAIUserMessageParamOutput {
1316
+ content:
1317
+ | string
1318
+ | Array<
1319
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartTextParam
1320
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartImageParam
1321
+ | OpenAIUserMessageParamOutput.OpenAIFile
1322
+ >;
1323
+
1324
+ name?: string | null;
1325
+
1326
+ role?: 'user';
1327
+ }
1328
+
1329
+ export namespace OpenAIUserMessageParamOutput {
1330
+ /**
1331
+ * Text content part for OpenAI-compatible chat completion messages.
1332
+ */
1333
+ export interface OpenAIChatCompletionContentPartTextParam {
1334
+ text: string;
1335
+
1336
+ type?: 'text';
1337
+ }
1338
+
1339
+ /**
1340
+ * Image content part for OpenAI-compatible chat completion messages.
1341
+ */
1342
+ export interface OpenAIChatCompletionContentPartImageParam {
1343
+ /**
1344
+ * Image URL specification for OpenAI-compatible chat completion messages.
1345
+ */
1346
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
1347
+
1348
+ type?: 'image_url';
1349
+ }
1350
+
1351
+ export namespace OpenAIChatCompletionContentPartImageParam {
1352
+ /**
1353
+ * Image URL specification for OpenAI-compatible chat completion messages.
1354
+ */
1355
+ export interface ImageURL {
1356
+ url: string;
1357
+
1358
+ detail?: string | null;
1359
+ }
1360
+ }
1361
+
1362
+ export interface OpenAIFile {
1363
+ file: OpenAIFile.File;
1364
+
1365
+ type?: 'file';
1366
+ }
1367
+
1368
+ export namespace OpenAIFile {
1369
+ export interface File {
1370
+ file_data?: string | null;
1371
+
1372
+ file_id?: string | null;
1373
+
1374
+ filename?: string | null;
1375
+ }
1376
+ }
1377
+ }
1378
+
1379
+ /**
1380
+ * A system message providing instructions or context to the model.
1381
+ */
1382
+ export interface OpenAISystemMessageParam {
1383
+ content: string | Array<OpenAISystemMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
1384
+
1385
+ name?: string | null;
1386
+
1387
+ role?: 'system';
1388
+ }
1389
+
1390
+ export namespace OpenAISystemMessageParam {
1391
+ /**
1392
+ * Text content part for OpenAI-compatible chat completion messages.
1393
+ */
1394
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1395
+ text: string;
1396
+
1397
+ type?: 'text';
1398
+ }
1399
+ }
1400
+
1401
+ /**
1402
+ * A message containing the model's (assistant) response in an OpenAI-compatible
1403
+ * chat completion request.
1404
+ */
1405
+ export interface OpenAIAssistantMessageParamOutput {
1406
+ content?:
1407
+ | string
1408
+ | Array<OpenAIAssistantMessageParamOutput.ListOpenAIChatCompletionContentPartTextParam>
1409
+ | null;
1410
+
1411
+ name?: string | null;
1412
+
1413
+ role?: 'assistant';
1414
+
1415
+ tool_calls?: Array<OpenAIAssistantMessageParamOutput.ToolCall> | null;
1416
+ }
1417
+
1418
+ export namespace OpenAIAssistantMessageParamOutput {
1419
+ /**
1420
+ * Text content part for OpenAI-compatible chat completion messages.
1421
+ */
1422
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1423
+ text: string;
1424
+
1425
+ type?: 'text';
1426
+ }
1427
+
1428
+ /**
1429
+ * Tool call specification for OpenAI-compatible chat completion responses.
1430
+ */
1431
+ export interface ToolCall {
1432
+ id?: string | null;
1433
+
1434
+ /**
1435
+ * Function call details for OpenAI-compatible tool calls.
1436
+ */
1437
+ function?: ToolCall.Function | null;
1438
+
1439
+ index?: number | null;
1440
+
1441
+ type?: 'function';
1442
+ }
1443
+
1444
+ export namespace ToolCall {
1445
+ /**
1446
+ * Function call details for OpenAI-compatible tool calls.
1447
+ */
1448
+ export interface Function {
1449
+ arguments?: string | null;
1450
+
1451
+ name?: string | null;
1452
+ }
1453
+ }
1454
+ }
1455
+
1456
+ /**
1457
+ * A message representing the result of a tool invocation in an OpenAI-compatible
1458
+ * chat completion request.
1459
+ */
1460
+ export interface OpenAIToolMessageParam {
1461
+ content: string | Array<OpenAIToolMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
1462
+
1463
+ tool_call_id: string;
1464
+
1465
+ role?: 'tool';
1466
+ }
1467
+
1468
+ export namespace OpenAIToolMessageParam {
1469
+ /**
1470
+ * Text content part for OpenAI-compatible chat completion messages.
1471
+ */
1472
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1473
+ text: string;
1474
+
1475
+ type?: 'text';
1476
+ }
1477
+ }
1478
+
1479
+ /**
1480
+ * A message from the developer in an OpenAI-compatible chat completion request.
1481
+ */
1482
+ export interface OpenAIDeveloperMessageParam {
1483
+ content: string | Array<OpenAIDeveloperMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
1484
+
1485
+ name?: string | null;
1486
+
1487
+ role?: 'developer';
1488
+ }
1489
+
1490
+ export namespace OpenAIDeveloperMessageParam {
1491
+ /**
1492
+ * Text content part for OpenAI-compatible chat completion messages.
1493
+ */
1494
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1495
+ text: string;
1496
+
1497
+ type?: 'text';
1498
+ }
1499
+ }
1500
+
1501
+ /**
1502
+ * Usage information for OpenAI chat completion.
1503
+ */
1504
+ export interface Usage {
1505
+ completion_tokens: number;
1506
+
1507
+ prompt_tokens: number;
1508
+
1509
+ total_tokens: number;
1510
+
1511
+ /**
1512
+ * Token details for output tokens in OpenAI chat completion usage.
1513
+ */
1514
+ completion_tokens_details?: Usage.CompletionTokensDetails | null;
1515
+
1516
+ /**
1517
+ * Token details for prompt tokens in OpenAI chat completion usage.
1518
+ */
1519
+ prompt_tokens_details?: Usage.PromptTokensDetails | null;
1520
+ }
1521
+
1522
+ export namespace Usage {
1523
+ /**
1524
+ * Token details for output tokens in OpenAI chat completion usage.
1525
+ */
1526
+ export interface CompletionTokensDetails {
1527
+ reasoning_tokens?: number | null;
1528
+ }
1529
+
1530
+ /**
1531
+ * Token details for prompt tokens in OpenAI chat completion usage.
1532
+ */
1533
+ export interface PromptTokensDetails {
1534
+ cached_tokens?: number | null;
1535
+ }
1536
+ }
1537
+ }
1538
+ }
1539
+
1540
+ export type CompletionCreateParams = CompletionCreateParamsNonStreaming | CompletionCreateParamsStreaming;
1541
+
1542
+ export interface CompletionCreateParamsBase {
1543
+ messages: Array<
1544
+ | CompletionCreateParams.OpenAIUserMessageParamInput
1545
+ | CompletionCreateParams.OpenAISystemMessageParam
1546
+ | CompletionCreateParams.OpenAIAssistantMessageParamInput
1547
+ | CompletionCreateParams.OpenAIToolMessageParam
1548
+ | CompletionCreateParams.OpenAIDeveloperMessageParam
1549
+ >;
1550
+
1551
+ model: string;
1552
+
1553
+ frequency_penalty?: number | null;
1554
+
1555
+ function_call?: string | { [key: string]: unknown } | null;
1556
+
1557
+ functions?: Array<{ [key: string]: unknown }> | null;
1558
+
1559
+ logit_bias?: { [key: string]: number } | null;
1560
+
1561
+ logprobs?: boolean | null;
1562
+
1563
+ max_completion_tokens?: number | null;
1564
+
1565
+ max_tokens?: number | null;
1566
+
1567
+ n?: number | null;
1568
+
1569
+ parallel_tool_calls?: boolean | null;
1570
+
1571
+ presence_penalty?: number | null;
1572
+
1573
+ /**
1574
+ * Text response format for OpenAI-compatible chat completion requests.
1575
+ */
1576
+ response_format?:
1577
+ | CompletionCreateParams.OpenAIResponseFormatText
1578
+ | CompletionCreateParams.OpenAIResponseFormatJsonSchema
1579
+ | CompletionCreateParams.OpenAIResponseFormatJsonObject
1580
+ | null;
1581
+
1582
+ seed?: number | null;
1583
+
1584
+ stop?: string | Array<string> | null;
1585
+
1586
+ stream?: boolean | null;
1587
+
1588
+ stream_options?: { [key: string]: unknown } | null;
1589
+
1590
+ temperature?: number | null;
1591
+
1592
+ tool_choice?: string | { [key: string]: unknown } | null;
1593
+
1594
+ tools?: Array<{ [key: string]: unknown }> | null;
1595
+
1596
+ top_logprobs?: number | null;
1597
+
1598
+ top_p?: number | null;
1599
+
1600
+ user?: string | null;
1601
+
1602
+ [k: string]: unknown;
1603
+ }
1604
+
1605
+ export namespace CompletionCreateParams {
1606
+ /**
1607
+ * A message from the user in an OpenAI-compatible chat completion request.
1608
+ */
1609
+ export interface OpenAIUserMessageParamInput {
1610
+ content:
1611
+ | string
1612
+ | Array<
1613
+ | OpenAIUserMessageParamInput.OpenAIChatCompletionContentPartTextParam
1614
+ | OpenAIUserMessageParamInput.OpenAIChatCompletionContentPartImageParam
1615
+ | OpenAIUserMessageParamInput.OpenAIFile
1616
+ >;
1617
+
1618
+ name?: string | null;
1619
+
1620
+ role?: 'user';
1621
+ }
1622
+
1623
+ export namespace OpenAIUserMessageParamInput {
1624
+ /**
1625
+ * Text content part for OpenAI-compatible chat completion messages.
1626
+ */
1627
+ export interface OpenAIChatCompletionContentPartTextParam {
1628
+ text: string;
1629
+
1630
+ type?: 'text';
1631
+ }
1632
+
1633
+ /**
1634
+ * Image content part for OpenAI-compatible chat completion messages.
1635
+ */
1636
+ export interface OpenAIChatCompletionContentPartImageParam {
1637
+ /**
1638
+ * Image URL specification for OpenAI-compatible chat completion messages.
1639
+ */
1640
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
1641
+
1642
+ type?: 'image_url';
1643
+ }
1644
+
1645
+ export namespace OpenAIChatCompletionContentPartImageParam {
1646
+ /**
1647
+ * Image URL specification for OpenAI-compatible chat completion messages.
1648
+ */
1649
+ export interface ImageURL {
1650
+ url: string;
1651
+
1652
+ detail?: string | null;
1653
+ }
1654
+ }
1655
+
1656
+ export interface OpenAIFile {
1657
+ file: OpenAIFile.File;
1658
+
1659
+ type?: 'file';
1660
+ }
1661
+
1662
+ export namespace OpenAIFile {
1663
+ export interface File {
1664
+ file_data?: string | null;
1665
+
1666
+ file_id?: string | null;
1667
+
1668
+ filename?: string | null;
1669
+ }
1670
+ }
1671
+ }
1672
+
1673
+ /**
1674
+ * A system message providing instructions or context to the model.
1675
+ */
1676
+ export interface OpenAISystemMessageParam {
1677
+ content: string | Array<OpenAISystemMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
1678
+
1679
+ name?: string | null;
1680
+
1681
+ role?: 'system';
1682
+ }
1683
+
1684
+ export namespace OpenAISystemMessageParam {
1685
+ /**
1686
+ * Text content part for OpenAI-compatible chat completion messages.
1687
+ */
1688
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1689
+ text: string;
1690
+
1691
+ type?: 'text';
1692
+ }
1693
+ }
1694
+
1695
+ /**
1696
+ * A message containing the model's (assistant) response in an OpenAI-compatible
1697
+ * chat completion request.
1698
+ */
1699
+ export interface OpenAIAssistantMessageParamInput {
1700
+ content?:
1701
+ | string
1702
+ | Array<OpenAIAssistantMessageParamInput.ListOpenAIChatCompletionContentPartTextParam>
1703
+ | null;
1704
+
1705
+ name?: string | null;
1706
+
1707
+ role?: 'assistant';
1708
+
1709
+ tool_calls?: Array<OpenAIAssistantMessageParamInput.ToolCall> | null;
1710
+ }
1711
+
1712
+ export namespace OpenAIAssistantMessageParamInput {
1713
+ /**
1714
+ * Text content part for OpenAI-compatible chat completion messages.
1715
+ */
1716
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1717
+ text: string;
1718
+
1719
+ type?: 'text';
1720
+ }
1721
+
1722
+ /**
1723
+ * Tool call specification for OpenAI-compatible chat completion responses.
1724
+ */
1725
+ export interface ToolCall {
1726
+ id?: string | null;
1727
+
1728
+ /**
1729
+ * Function call details for OpenAI-compatible tool calls.
1730
+ */
1731
+ function?: ToolCall.Function | null;
1732
+
1733
+ index?: number | null;
1734
+
1735
+ type?: 'function';
1736
+ }
1737
+
1738
+ export namespace ToolCall {
1739
+ /**
1740
+ * Function call details for OpenAI-compatible tool calls.
1741
+ */
1742
+ export interface Function {
1743
+ arguments?: string | null;
1744
+
1745
+ name?: string | null;
1746
+ }
1747
+ }
1748
+ }
1749
+
1750
+ /**
1751
+ * A message representing the result of a tool invocation in an OpenAI-compatible
1752
+ * chat completion request.
1753
+ */
1754
+ export interface OpenAIToolMessageParam {
1755
+ content: string | Array<OpenAIToolMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
1756
+
1757
+ tool_call_id: string;
1758
+
1759
+ role?: 'tool';
1760
+ }
1761
+
1762
+ export namespace OpenAIToolMessageParam {
1763
+ /**
1764
+ * Text content part for OpenAI-compatible chat completion messages.
1765
+ */
1766
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1767
+ text: string;
1768
+
1769
+ type?: 'text';
1770
+ }
1771
+ }
1772
+
1773
+ /**
1774
+ * A message from the developer in an OpenAI-compatible chat completion request.
1775
+ */
1776
+ export interface OpenAIDeveloperMessageParam {
1777
+ content: string | Array<OpenAIDeveloperMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
1778
+
1779
+ name?: string | null;
1780
+
1781
+ role?: 'developer';
1782
+ }
1783
+
1784
+ export namespace OpenAIDeveloperMessageParam {
1785
+ /**
1786
+ * Text content part for OpenAI-compatible chat completion messages.
1787
+ */
1788
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1789
+ text: string;
1790
+
1791
+ type?: 'text';
1792
+ }
1793
+ }
1794
+
1795
+ /**
1796
+ * Text response format for OpenAI-compatible chat completion requests.
1797
+ */
1798
+ export interface OpenAIResponseFormatText {
1799
+ type?: 'text';
1800
+ }
1801
+
1802
+ /**
1803
+ * JSON schema response format for OpenAI-compatible chat completion requests.
1804
+ */
1805
+ export interface OpenAIResponseFormatJsonSchema {
1806
+ /**
1807
+ * JSON schema specification for OpenAI-compatible structured response format.
1808
+ */
1809
+ json_schema: OpenAIResponseFormatJsonSchema.JsonSchema;
1810
+
1811
+ type?: 'json_schema';
1812
+ }
1813
+
1814
+ export namespace OpenAIResponseFormatJsonSchema {
1815
+ /**
1816
+ * JSON schema specification for OpenAI-compatible structured response format.
1817
+ */
1818
+ export interface JsonSchema {
1819
+ description?: string | null;
1820
+
1821
+ name?: string;
1822
+
1823
+ schema?: { [key: string]: unknown } | null;
1824
+
1825
+ strict?: boolean | null;
1826
+ }
1827
+ }
1828
+
1829
+ /**
1830
+ * JSON object response format for OpenAI-compatible chat completion requests.
1831
+ */
1832
+ export interface OpenAIResponseFormatJsonObject {
1833
+ type?: 'json_object';
1834
+ }
1835
+
1836
+ export type CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming;
1837
+ export type CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming;
1838
+ }
1839
+
1840
+ export interface CompletionCreateParamsNonStreaming extends CompletionCreateParamsBase {
1841
+ stream?: false | null;
1842
+
1843
+ [k: string]: unknown;
1844
+ }
1845
+
1846
+ export interface CompletionCreateParamsStreaming extends CompletionCreateParamsBase {
1847
+ stream: true;
1848
+
1849
+ [k: string]: unknown;
1850
+ }
1851
+
1852
+ export interface CompletionListParams {
1853
+ after?: string | null;
1854
+
1855
+ limit?: number | null;
1856
+
1857
+ model?: string | null;
1858
+
1859
+ /**
1860
+ * Sort order for paginated responses.
1861
+ */
1862
+ order?: 'asc' | 'desc' | null;
1863
+ }
1864
+
1865
+ export declare namespace Completions {
1866
+ export {
1867
+ type CompletionCreateResponse as CompletionCreateResponse,
1868
+ type CompletionRetrieveResponse as CompletionRetrieveResponse,
1869
+ type CompletionListResponse as CompletionListResponse,
1870
+ type CompletionCreateParams as CompletionCreateParams,
1871
+ type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming,
1872
+ type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming,
1873
+ type CompletionListParams as CompletionListParams,
1874
+ };
1875
+ }