llama-stack-client 0.4.3 → 0.4.5

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 (932) 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/CHANGELOG.md +41 -0
  13. package/CODE_OF_CONDUCT.md +80 -0
  14. package/CONTRIBUTING.md +98 -0
  15. package/LICENSE +1 -1
  16. package/README.md +10 -5
  17. package/SECURITY.md +27 -0
  18. package/api.md +491 -0
  19. package/bin/check-release-environment +18 -0
  20. package/bin/publish-npm +61 -0
  21. package/dist/CHANGELOG.md +393 -0
  22. package/dist/LICENSE +7 -0
  23. package/dist/README.md +369 -0
  24. package/dist/core.d.ts.map +1 -0
  25. package/dist/core.js +945 -0
  26. package/dist/core.js.map +1 -0
  27. package/dist/core.mjs +913 -0
  28. package/dist/core.mjs.map +1 -0
  29. package/dist/package.json +108 -0
  30. package/dist/resources/alpha/alpha.d.ts +26 -0
  31. package/dist/resources/alpha/alpha.d.ts.map +1 -0
  32. package/dist/resources/alpha/alpha.js +61 -0
  33. package/dist/resources/alpha/alpha.js.map +1 -0
  34. package/dist/resources/alpha/alpha.mjs +34 -0
  35. package/dist/resources/alpha/alpha.mjs.map +1 -0
  36. package/dist/resources/alpha/eval/eval.d.ts +181 -0
  37. package/dist/resources/alpha/eval/eval.d.ts.map +1 -0
  38. package/dist/resources/alpha/eval/eval.js.map +1 -0
  39. package/dist/resources/alpha/eval/eval.mjs.map +1 -0
  40. package/dist/resources/alpha/inference.d.ts +136 -0
  41. package/dist/resources/alpha/inference.d.ts.map +1 -0
  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/dist/resources/alpha/post-training/index.js.map +1 -0
  45. package/dist/resources/alpha/post-training/index.mjs +10 -0
  46. package/dist/resources/alpha/post-training/index.mjs.map +1 -0
  47. package/dist/resources/alpha/post-training/job.d.ts +104 -0
  48. package/dist/resources/alpha/post-training/job.d.ts.map +1 -0
  49. package/dist/resources/alpha/post-training/job.js +42 -0
  50. package/dist/resources/alpha/post-training/job.js.map +1 -0
  51. package/dist/resources/alpha/post-training/job.mjs +38 -0
  52. package/dist/resources/alpha/post-training/job.mjs.map +1 -0
  53. package/dist/resources/alpha/post-training/post-training.d.ts +269 -0
  54. package/dist/resources/alpha/post-training/post-training.d.ts.map +1 -0
  55. package/dist/resources/alpha/post-training/post-training.js.map +1 -0
  56. package/dist/resources/alpha/post-training/post-training.mjs +30 -0
  57. package/dist/resources/alpha/post-training/post-training.mjs.map +1 -0
  58. package/dist/resources/beta/datasets.d.ts +351 -0
  59. package/dist/resources/beta/datasets.d.ts.map +1 -0
  60. package/dist/resources/chat/chat.d.ts +274 -0
  61. package/dist/resources/chat/chat.d.ts.map +1 -0
  62. package/dist/resources/chat/chat.js.map +1 -0
  63. package/dist/resources/chat/chat.mjs.map +1 -0
  64. package/dist/resources/chat/completions.d.ts +2413 -0
  65. package/dist/resources/chat/completions.d.ts.map +1 -0
  66. package/dist/resources/chat/completions.js +31 -0
  67. package/dist/resources/chat/completions.js.map +1 -0
  68. package/dist/resources/chat/completions.mjs +27 -0
  69. package/dist/resources/chat/completions.mjs.map +1 -0
  70. package/dist/resources/completions.d.ts +267 -0
  71. package/dist/resources/completions.d.ts.map +1 -0
  72. package/dist/resources/completions.js.map +1 -0
  73. package/dist/resources/completions.mjs.map +1 -0
  74. package/dist/resources/conversations/conversations.d.ts +336 -0
  75. package/dist/resources/conversations/conversations.d.ts.map +1 -0
  76. package/dist/resources/conversations/conversations.js +70 -0
  77. package/dist/resources/conversations/conversations.js.map +1 -0
  78. package/dist/resources/conversations/conversations.mjs +43 -0
  79. package/dist/resources/conversations/conversations.mjs.map +1 -0
  80. package/dist/resources/conversations/items.d.ts +1045 -0
  81. package/dist/resources/conversations/items.d.ts.map +1 -0
  82. package/dist/resources/conversations/items.js +45 -0
  83. package/dist/resources/conversations/items.js.map +1 -0
  84. package/dist/resources/conversations/items.mjs +40 -0
  85. package/dist/resources/conversations/items.mjs.map +1 -0
  86. package/dist/resources/embeddings.d.ts +90 -0
  87. package/dist/resources/embeddings.d.ts.map +1 -0
  88. package/dist/resources/embeddings.js +22 -0
  89. package/dist/resources/embeddings.js.map +1 -0
  90. package/dist/resources/embeddings.mjs +18 -0
  91. package/dist/resources/embeddings.mjs.map +1 -0
  92. package/dist/resources/files.d.ts +147 -0
  93. package/dist/resources/files.d.ts.map +1 -0
  94. package/dist/resources/files.js +75 -0
  95. package/dist/resources/files.js.map +1 -0
  96. package/dist/resources/files.mjs +47 -0
  97. package/dist/resources/files.mjs.map +1 -0
  98. package/dist/resources/models/models.d.ts +142 -0
  99. package/dist/resources/models/models.d.ts.map +1 -0
  100. package/dist/resources/models/models.js +76 -0
  101. package/dist/resources/models/models.js.map +1 -0
  102. package/dist/resources/models/models.mjs +49 -0
  103. package/dist/resources/models/models.mjs.map +1 -0
  104. package/dist/resources/moderations.d.ts +80 -0
  105. package/dist/resources/moderations.d.ts.map +1 -0
  106. package/dist/resources/moderations.js +21 -0
  107. package/dist/resources/moderations.js.map +1 -0
  108. package/dist/resources/moderations.mjs +17 -0
  109. package/dist/resources/moderations.mjs.map +1 -0
  110. package/dist/resources/prompts/prompts.d.ts +110 -0
  111. package/dist/resources/prompts/prompts.d.ts.map +1 -0
  112. package/dist/resources/prompts/prompts.js +85 -0
  113. package/dist/resources/prompts/prompts.js.map +1 -0
  114. package/dist/resources/prompts/prompts.mjs +58 -0
  115. package/dist/resources/prompts/prompts.mjs.map +1 -0
  116. package/dist/resources/prompts/versions.d.ts +10 -0
  117. package/dist/resources/prompts/versions.d.ts.map +1 -0
  118. package/dist/resources/prompts/versions.js +21 -0
  119. package/dist/resources/prompts/versions.js.map +1 -0
  120. package/dist/resources/prompts/versions.mjs +17 -0
  121. package/dist/resources/prompts/versions.mjs.map +1 -0
  122. package/dist/resources/responses/input-items.d.ts +410 -0
  123. package/dist/resources/responses/input-items.d.ts.map +1 -0
  124. package/dist/resources/responses/responses.d.ts +3180 -0
  125. package/dist/resources/responses/responses.d.ts.map +1 -0
  126. package/dist/resources/responses/responses.js.map +1 -0
  127. package/dist/resources/responses/responses.mjs.map +1 -0
  128. package/dist/resources/safety.d.ts +294 -0
  129. package/dist/resources/safety.d.ts.map +1 -0
  130. package/dist/resources/safety.js +21 -0
  131. package/dist/resources/safety.js.map +1 -0
  132. package/dist/resources/safety.mjs +17 -0
  133. package/dist/resources/safety.mjs.map +1 -0
  134. package/dist/resources/scoring-functions.d.ts +232 -0
  135. package/dist/resources/scoring-functions.d.ts.map +1 -0
  136. package/dist/resources/scoring.d.ts +157 -0
  137. package/dist/resources/scoring.d.ts.map +1 -0
  138. package/dist/resources/shared.d.ts +464 -0
  139. package/dist/resources/shared.d.ts.map +1 -0
  140. package/dist/resources/shields.d.ts +82 -0
  141. package/dist/resources/shields.d.ts.map +1 -0
  142. package/dist/resources/vector-io.d.ts +375 -0
  143. package/dist/resources/vector-io.d.ts.map +1 -0
  144. package/dist/resources/vector-io.js +31 -0
  145. package/dist/resources/vector-io.mjs +27 -0
  146. package/dist/resources/vector-stores/file-batches.d.ts +117 -0
  147. package/dist/resources/vector-stores/file-batches.d.ts.map +1 -0
  148. package/dist/resources/vector-stores/file-batches.js +42 -0
  149. package/dist/resources/vector-stores/file-batches.js.map +1 -0
  150. package/dist/resources/vector-stores/file-batches.mjs +38 -0
  151. package/dist/resources/vector-stores/file-batches.mjs.map +1 -0
  152. package/dist/resources/vector-stores/files.d.ts +235 -0
  153. package/dist/resources/vector-stores/files.d.ts.map +1 -0
  154. package/dist/resources/vector-stores/files.js +60 -0
  155. package/dist/resources/vector-stores/files.js.map +1 -0
  156. package/dist/resources/vector-stores/files.mjs +55 -0
  157. package/dist/resources/vector-stores/files.mjs.map +1 -0
  158. package/dist/resources/vector-stores/vector-stores.d.ts +322 -0
  159. package/dist/resources/vector-stores/vector-stores.d.ts.map +1 -0
  160. package/dist/resources/vector-stores/vector-stores.js +92 -0
  161. package/dist/resources/vector-stores/vector-stores.js.map +1 -0
  162. package/dist/resources/vector-stores/vector-stores.mjs +64 -0
  163. package/dist/resources/vector-stores/vector-stores.mjs.map +1 -0
  164. package/dist/src/_shims/MultipartBody.ts +15 -0
  165. package/dist/src/_shims/README.md +46 -0
  166. package/dist/src/_shims/auto/runtime-bun.ts +10 -0
  167. package/dist/src/_shims/auto/runtime-node.ts +10 -0
  168. package/dist/src/_shims/auto/runtime.ts +10 -0
  169. package/dist/src/_shims/auto/types-node.ts +10 -0
  170. package/dist/src/_shims/auto/types.d.ts +107 -0
  171. package/dist/src/_shims/auto/types.js +9 -0
  172. package/dist/src/_shims/auto/types.mjs +10 -0
  173. package/dist/src/_shims/bun-runtime.ts +20 -0
  174. package/dist/src/_shims/index.d.ts +89 -0
  175. package/dist/src/_shims/index.js +23 -0
  176. package/dist/src/_shims/index.mjs +18 -0
  177. package/dist/src/_shims/manual-types.d.ts +18 -0
  178. package/dist/src/_shims/manual-types.js +9 -0
  179. package/dist/src/_shims/manual-types.mjs +10 -0
  180. package/dist/src/_shims/node-runtime.ts +87 -0
  181. package/dist/src/_shims/node-types.d.ts +48 -0
  182. package/dist/src/_shims/node-types.js +9 -0
  183. package/dist/src/_shims/node-types.mjs +10 -0
  184. package/dist/src/_shims/registry.ts +73 -0
  185. package/dist/src/_shims/web-runtime.ts +109 -0
  186. package/dist/src/_shims/web-types.d.ts +89 -0
  187. package/dist/src/_shims/web-types.js +9 -0
  188. package/dist/src/_shims/web-types.mjs +10 -0
  189. package/dist/src/core.ts +1265 -0
  190. package/dist/src/error.ts +137 -0
  191. package/dist/src/index.ts +586 -0
  192. package/dist/src/internal/decoders/line.ts +182 -0
  193. package/dist/src/internal/qs/LICENSE.md +13 -0
  194. package/dist/src/internal/qs/README.md +3 -0
  195. package/dist/src/internal/qs/formats.ts +15 -0
  196. package/dist/src/internal/qs/index.ts +19 -0
  197. package/dist/src/internal/qs/stringify.ts +394 -0
  198. package/dist/src/internal/qs/types.ts +77 -0
  199. package/dist/src/internal/qs/utils.ts +271 -0
  200. package/dist/src/internal/stream-utils.ts +38 -0
  201. package/dist/src/lib/.keep +4 -0
  202. package/dist/src/lib/response-helpers.ts +60 -0
  203. package/dist/src/pagination.ts +134 -0
  204. package/dist/src/resource.ts +18 -0
  205. package/dist/src/resources/alpha/admin.ts +84 -0
  206. package/dist/src/resources/alpha/alpha.ts +93 -0
  207. package/dist/src/resources/alpha/benchmarks.ts +152 -0
  208. package/dist/src/resources/alpha/eval/eval.ts +255 -0
  209. package/dist/src/resources/alpha/eval/index.ts +19 -0
  210. package/dist/src/resources/alpha/eval/jobs.ts +41 -0
  211. package/dist/src/resources/alpha/eval.ts +10 -0
  212. package/dist/src/resources/alpha/index.ts +36 -0
  213. package/dist/src/resources/alpha/inference.ts +183 -0
  214. package/dist/src/resources/alpha/post-training/index.ts +17 -0
  215. package/dist/src/resources/alpha/post-training/job.ts +161 -0
  216. package/dist/src/resources/alpha/post-training/post-training.ts +385 -0
  217. package/dist/src/resources/alpha/post-training.ts +9 -0
  218. package/dist/src/resources/alpha.ts +9 -0
  219. package/dist/src/resources/batches.ts +572 -0
  220. package/dist/src/resources/beta/beta.ts +41 -0
  221. package/dist/src/resources/beta/datasets.ts +445 -0
  222. package/dist/src/resources/beta/index.ts +20 -0
  223. package/dist/src/resources/beta.ts +9 -0
  224. package/dist/src/resources/chat/chat.ts +348 -0
  225. package/dist/src/resources/chat/completions.ts +2934 -0
  226. package/dist/src/resources/chat/index.ts +19 -0
  227. package/dist/src/resources/chat.ts +9 -0
  228. package/dist/src/resources/completions.ts +344 -0
  229. package/dist/src/resources/conversations/conversations.ts +507 -0
  230. package/dist/src/resources/conversations/index.ts +25 -0
  231. package/dist/src/resources/conversations/items.ts +1590 -0
  232. package/dist/src/resources/conversations.ts +9 -0
  233. package/dist/src/resources/embeddings.ts +122 -0
  234. package/dist/src/resources/files.ts +211 -0
  235. package/dist/src/resources/index.ts +139 -0
  236. package/dist/src/resources/inspect.ts +27 -0
  237. package/dist/src/resources/models/index.ts +18 -0
  238. package/dist/src/resources/models/models.ts +194 -0
  239. package/dist/src/resources/models/openai.ts +22 -0
  240. package/dist/src/resources/models.ts +9 -0
  241. package/dist/src/resources/moderations.ts +94 -0
  242. package/dist/src/resources/prompts/index.ts +19 -0
  243. package/dist/src/resources/prompts/prompts.ts +185 -0
  244. package/dist/src/resources/prompts/versions.ts +24 -0
  245. package/dist/src/resources/prompts.ts +9 -0
  246. package/dist/src/resources/providers.ts +38 -0
  247. package/dist/src/resources/responses/index.ts +21 -0
  248. package/dist/src/resources/responses/input-items.ts +631 -0
  249. package/dist/src/resources/responses/responses.ts +4569 -0
  250. package/dist/src/resources/responses.ts +9 -0
  251. package/dist/src/resources/routes.ts +52 -0
  252. package/dist/src/resources/safety.ts +364 -0
  253. package/dist/src/resources/scoring-functions.ts +365 -0
  254. package/dist/src/resources/scoring.ts +221 -0
  255. package/dist/src/resources/shared.ts +559 -0
  256. package/dist/src/resources/shields.ts +119 -0
  257. package/dist/src/resources/tool-runtime.ts +217 -0
  258. package/dist/src/resources/toolgroups.ts +135 -0
  259. package/dist/src/resources/tools.ts +52 -0
  260. package/dist/src/resources/vector-io.ts +485 -0
  261. package/dist/src/resources/vector-stores/file-batches.ts +207 -0
  262. package/dist/src/resources/vector-stores/files.ts +378 -0
  263. package/dist/src/resources/vector-stores/index.ts +38 -0
  264. package/dist/src/resources/vector-stores/vector-stores.ts +476 -0
  265. package/dist/src/resources/vector-stores.ts +9 -0
  266. package/dist/src/resources.ts +7 -0
  267. package/dist/src/shims/node.ts +56 -0
  268. package/dist/src/shims/web.ts +56 -0
  269. package/dist/src/streaming.ts +297 -0
  270. package/dist/src/uploads.ts +261 -0
  271. package/dist/src/version.ts +7 -0
  272. package/dist/version.d.ts +2 -0
  273. package/dist/version.js +10 -0
  274. package/dist/version.mjs +7 -0
  275. package/examples/.keep +4 -0
  276. package/jest.config.ts +29 -0
  277. package/package.json +55 -35
  278. package/release-please-config.json +64 -0
  279. package/scripts/bootstrap +30 -0
  280. package/scripts/build +56 -0
  281. package/scripts/fast-format +40 -0
  282. package/scripts/format +8 -0
  283. package/scripts/lint +11 -0
  284. package/scripts/mock +41 -0
  285. package/scripts/test +56 -0
  286. package/scripts/utils/check-is-in-git-install.sh +15 -0
  287. package/scripts/utils/check-version.cjs +27 -0
  288. package/scripts/utils/fix-index-exports.cjs +21 -0
  289. package/scripts/utils/git-swap.sh +19 -0
  290. package/scripts/utils/make-dist-package-json.cjs +28 -0
  291. package/scripts/utils/postprocess-files.cjs +172 -0
  292. package/scripts/utils/upload-artifact.sh +33 -0
  293. package/src/_shims/auto/runtime-deno.ts +10 -0
  294. package/src/_shims/auto/types-deno.ts +10 -0
  295. package/src/_shims/auto/types.d.ts +18 -18
  296. package/src/_shims/index-deno.ts +118 -0
  297. package/src/_shims/index.d.ts +1 -1
  298. package/src/_shims/index.mjs +1 -1
  299. package/src/core.ts +6 -0
  300. package/src/resources/alpha/alpha.ts +8 -8
  301. package/src/resources/alpha/eval/eval.ts +28 -7
  302. package/src/resources/alpha/inference.ts +58 -7
  303. package/src/resources/alpha/post-training/index.ts +1 -9
  304. package/src/resources/alpha/post-training/job.ts +5 -21
  305. package/src/resources/alpha/post-training/post-training.ts +33 -20
  306. package/src/resources/beta/datasets.ts +14 -0
  307. package/src/resources/chat/chat.ts +118 -16
  308. package/src/resources/chat/completions.ts +1126 -67
  309. package/src/resources/completions.ts +133 -24
  310. package/src/resources/conversations/conversations.ts +30 -14
  311. package/src/resources/conversations/items.ts +361 -136
  312. package/src/resources/embeddings.ts +46 -8
  313. package/src/resources/files.ts +58 -31
  314. package/src/resources/models/models.ts +21 -6
  315. package/src/resources/moderations.ts +38 -5
  316. package/src/resources/prompts/prompts.ts +26 -12
  317. package/src/resources/prompts/versions.ts +0 -2
  318. package/src/resources/responses/input-items.ts +64 -13
  319. package/src/resources/responses/responses.ts +523 -252
  320. package/src/resources/safety.ts +131 -8
  321. package/src/resources/scoring-functions.ts +23 -1
  322. package/src/resources/scoring.ts +24 -0
  323. package/src/resources/shared.ts +53 -7
  324. package/src/resources/shields.ts +21 -0
  325. package/src/resources/vector-io.ts +95 -78
  326. package/src/resources/vector-stores/file-batches.ts +13 -7
  327. package/src/resources/vector-stores/files.ts +31 -11
  328. package/src/resources/vector-stores/vector-stores.ts +89 -15
  329. package/src/version.ts +1 -1
  330. package/tests/api-resources/alpha/admin.test.ts +111 -0
  331. package/tests/api-resources/alpha/benchmarks.test.ts +94 -0
  332. package/tests/api-resources/alpha/eval/eval.test.ts +206 -0
  333. package/tests/api-resources/alpha/eval/jobs.test.ts +68 -0
  334. package/tests/api-resources/alpha/inference.test.ts +38 -0
  335. package/tests/api-resources/alpha/post-training/job.test.ts +86 -0
  336. package/tests/api-resources/alpha/post-training/post-training.test.ts +134 -0
  337. package/tests/api-resources/batches.test.ts +100 -0
  338. package/tests/api-resources/beta/datasets.test.ts +141 -0
  339. package/tests/api-resources/chat/completions.test.ts +115 -0
  340. package/tests/api-resources/completions.test.ts +48 -0
  341. package/tests/api-resources/conversations/conversations.test.ts +76 -0
  342. package/tests/api-resources/conversations/items.test.ts +117 -0
  343. package/tests/api-resources/embeddings.test.ts +35 -0
  344. package/tests/api-resources/files.test.ts +123 -0
  345. package/tests/api-resources/inspect.test.ts +50 -0
  346. package/tests/api-resources/models/models.test.ts +89 -0
  347. package/tests/api-resources/models/openai.test.ts +32 -0
  348. package/tests/api-resources/moderations.test.ts +29 -0
  349. package/tests/api-resources/prompts/prompts.test.ts +125 -0
  350. package/tests/api-resources/prompts/versions.test.ts +32 -0
  351. package/tests/api-resources/providers.test.ts +50 -0
  352. package/tests/api-resources/responses/input-items.test.ts +49 -0
  353. package/tests/api-resources/responses/responses.test.ts +132 -0
  354. package/tests/api-resources/routes.test.ts +39 -0
  355. package/tests/api-resources/safety.test.ts +41 -0
  356. package/tests/api-resources/scoring-functions.test.ts +100 -0
  357. package/tests/api-resources/scoring.test.ts +73 -0
  358. package/tests/api-resources/shields.test.ts +88 -0
  359. package/tests/api-resources/tool-runtime.test.ts +68 -0
  360. package/tests/api-resources/toolgroups.test.ts +91 -0
  361. package/tests/api-resources/tools.test.ts +57 -0
  362. package/tests/api-resources/vector-io.test.ts +84 -0
  363. package/tests/api-resources/vector-stores/file-batches.test.ts +113 -0
  364. package/tests/api-resources/vector-stores/files.test.ts +153 -0
  365. package/tests/api-resources/vector-stores/vector-stores.test.ts +134 -0
  366. package/tests/form.test.ts +71 -0
  367. package/tests/index.test.ts +438 -0
  368. package/tests/internal/decoders/line.test.ts +134 -0
  369. package/tests/qs/empty-keys-cases.ts +277 -0
  370. package/tests/qs/stringify.test.ts +2238 -0
  371. package/tests/qs/utils.test.ts +175 -0
  372. package/tests/responses.test.ts +91 -0
  373. package/tests/streaming.test.ts +250 -0
  374. package/tests/stringifyQuery.test.ts +29 -0
  375. package/tests/uploads.test.ts +71 -0
  376. package/tsc-multi.json +7 -0
  377. package/tsconfig.build.json +18 -0
  378. package/tsconfig.deno.json +15 -0
  379. package/tsconfig.dist-src.json +11 -0
  380. package/tsconfig.json +38 -0
  381. package/core.d.ts.map +0 -1
  382. package/core.js +0 -940
  383. package/core.js.map +0 -1
  384. package/core.mjs +0 -908
  385. package/core.mjs.map +0 -1
  386. package/resources/alpha/alpha.d.ts +0 -26
  387. package/resources/alpha/alpha.d.ts.map +0 -1
  388. package/resources/alpha/alpha.js +0 -61
  389. package/resources/alpha/alpha.js.map +0 -1
  390. package/resources/alpha/alpha.mjs +0 -34
  391. package/resources/alpha/alpha.mjs.map +0 -1
  392. package/resources/alpha/eval/eval.d.ts +0 -160
  393. package/resources/alpha/eval/eval.d.ts.map +0 -1
  394. package/resources/alpha/eval/eval.js.map +0 -1
  395. package/resources/alpha/eval/eval.mjs.map +0 -1
  396. package/resources/alpha/inference.d.ts +0 -85
  397. package/resources/alpha/inference.d.ts.map +0 -1
  398. package/resources/alpha/post-training/index.d.ts +0 -3
  399. package/resources/alpha/post-training/index.d.ts.map +0 -1
  400. package/resources/alpha/post-training/index.js.map +0 -1
  401. package/resources/alpha/post-training/index.mjs +0 -10
  402. package/resources/alpha/post-training/index.mjs.map +0 -1
  403. package/resources/alpha/post-training/job.d.ts +0 -113
  404. package/resources/alpha/post-training/job.d.ts.map +0 -1
  405. package/resources/alpha/post-training/job.js +0 -43
  406. package/resources/alpha/post-training/job.js.map +0 -1
  407. package/resources/alpha/post-training/job.mjs +0 -39
  408. package/resources/alpha/post-training/job.mjs.map +0 -1
  409. package/resources/alpha/post-training/post-training.d.ts +0 -245
  410. package/resources/alpha/post-training/post-training.d.ts.map +0 -1
  411. package/resources/alpha/post-training/post-training.js.map +0 -1
  412. package/resources/alpha/post-training/post-training.mjs +0 -30
  413. package/resources/alpha/post-training/post-training.mjs.map +0 -1
  414. package/resources/beta/datasets.d.ts +0 -338
  415. package/resources/beta/datasets.d.ts.map +0 -1
  416. package/resources/chat/chat.d.ts +0 -172
  417. package/resources/chat/chat.d.ts.map +0 -1
  418. package/resources/chat/chat.js.map +0 -1
  419. package/resources/chat/chat.mjs.map +0 -1
  420. package/resources/chat/completions.d.ts +0 -1356
  421. package/resources/chat/completions.d.ts.map +0 -1
  422. package/resources/chat/completions.js +0 -33
  423. package/resources/chat/completions.js.map +0 -1
  424. package/resources/chat/completions.mjs +0 -29
  425. package/resources/chat/completions.mjs.map +0 -1
  426. package/resources/completions.d.ts +0 -158
  427. package/resources/completions.d.ts.map +0 -1
  428. package/resources/completions.js.map +0 -1
  429. package/resources/completions.mjs.map +0 -1
  430. package/resources/conversations/conversations.d.ts +0 -320
  431. package/resources/conversations/conversations.d.ts.map +0 -1
  432. package/resources/conversations/conversations.js +0 -78
  433. package/resources/conversations/conversations.js.map +0 -1
  434. package/resources/conversations/conversations.mjs +0 -51
  435. package/resources/conversations/conversations.mjs.map +0 -1
  436. package/resources/conversations/items.d.ts +0 -874
  437. package/resources/conversations/items.d.ts.map +0 -1
  438. package/resources/conversations/items.js +0 -51
  439. package/resources/conversations/items.js.map +0 -1
  440. package/resources/conversations/items.mjs +0 -46
  441. package/resources/conversations/items.mjs.map +0 -1
  442. package/resources/embeddings.d.ts +0 -52
  443. package/resources/embeddings.d.ts.map +0 -1
  444. package/resources/embeddings.js +0 -24
  445. package/resources/embeddings.js.map +0 -1
  446. package/resources/embeddings.mjs +0 -20
  447. package/resources/embeddings.mjs.map +0 -1
  448. package/resources/files.d.ts +0 -120
  449. package/resources/files.d.ts.map +0 -1
  450. package/resources/files.js +0 -87
  451. package/resources/files.js.map +0 -1
  452. package/resources/files.mjs +0 -59
  453. package/resources/files.mjs.map +0 -1
  454. package/resources/models/models.d.ts +0 -127
  455. package/resources/models/models.d.ts.map +0 -1
  456. package/resources/models/models.js +0 -82
  457. package/resources/models/models.js.map +0 -1
  458. package/resources/models/models.mjs +0 -55
  459. package/resources/models/models.mjs.map +0 -1
  460. package/resources/moderations.d.ts +0 -47
  461. package/resources/moderations.d.ts.map +0 -1
  462. package/resources/moderations.js +0 -23
  463. package/resources/moderations.js.map +0 -1
  464. package/resources/moderations.mjs +0 -19
  465. package/resources/moderations.mjs.map +0 -1
  466. package/resources/prompts/prompts.d.ts +0 -96
  467. package/resources/prompts/prompts.d.ts.map +0 -1
  468. package/resources/prompts/prompts.js +0 -93
  469. package/resources/prompts/prompts.js.map +0 -1
  470. package/resources/prompts/prompts.mjs +0 -66
  471. package/resources/prompts/prompts.mjs.map +0 -1
  472. package/resources/prompts/versions.d.ts +0 -12
  473. package/resources/prompts/versions.d.ts.map +0 -1
  474. package/resources/prompts/versions.js +0 -23
  475. package/resources/prompts/versions.js.map +0 -1
  476. package/resources/prompts/versions.mjs +0 -19
  477. package/resources/prompts/versions.mjs.map +0 -1
  478. package/resources/responses/input-items.d.ts +0 -367
  479. package/resources/responses/input-items.d.ts.map +0 -1
  480. package/resources/responses/responses.d.ts +0 -2871
  481. package/resources/responses/responses.d.ts.map +0 -1
  482. package/resources/responses/responses.js.map +0 -1
  483. package/resources/responses/responses.mjs.map +0 -1
  484. package/resources/safety.d.ts +0 -172
  485. package/resources/safety.d.ts.map +0 -1
  486. package/resources/safety.js +0 -23
  487. package/resources/safety.js.map +0 -1
  488. package/resources/safety.mjs +0 -19
  489. package/resources/safety.mjs.map +0 -1
  490. package/resources/scoring-functions.d.ts +0 -210
  491. package/resources/scoring-functions.d.ts.map +0 -1
  492. package/resources/scoring.d.ts +0 -133
  493. package/resources/scoring.d.ts.map +0 -1
  494. package/resources/shared.d.ts +0 -418
  495. package/resources/shared.d.ts.map +0 -1
  496. package/resources/shields.d.ts +0 -61
  497. package/resources/shields.d.ts.map +0 -1
  498. package/resources/vector-io.d.ts +0 -358
  499. package/resources/vector-io.d.ts.map +0 -1
  500. package/resources/vector-io.js +0 -31
  501. package/resources/vector-io.mjs +0 -27
  502. package/resources/vector-stores/file-batches.d.ts +0 -111
  503. package/resources/vector-stores/file-batches.d.ts.map +0 -1
  504. package/resources/vector-stores/file-batches.js +0 -45
  505. package/resources/vector-stores/file-batches.js.map +0 -1
  506. package/resources/vector-stores/file-batches.mjs +0 -41
  507. package/resources/vector-stores/file-batches.mjs.map +0 -1
  508. package/resources/vector-stores/files.d.ts +0 -213
  509. package/resources/vector-stores/files.d.ts.map +0 -1
  510. package/resources/vector-stores/files.js +0 -60
  511. package/resources/vector-stores/files.js.map +0 -1
  512. package/resources/vector-stores/files.mjs +0 -55
  513. package/resources/vector-stores/files.mjs.map +0 -1
  514. package/resources/vector-stores/vector-stores.d.ts +0 -248
  515. package/resources/vector-stores/vector-stores.d.ts.map +0 -1
  516. package/resources/vector-stores/vector-stores.js +0 -97
  517. package/resources/vector-stores/vector-stores.js.map +0 -1
  518. package/resources/vector-stores/vector-stores.mjs +0 -69
  519. package/resources/vector-stores/vector-stores.mjs.map +0 -1
  520. package/version.d.ts +0 -2
  521. package/version.js +0 -10
  522. package/version.mjs +0 -7
  523. /package/{_shims → dist/_shims}/MultipartBody.d.ts +0 -0
  524. /package/{_shims → dist/_shims}/MultipartBody.d.ts.map +0 -0
  525. /package/{_shims → dist/_shims}/MultipartBody.js +0 -0
  526. /package/{_shims → dist/_shims}/MultipartBody.js.map +0 -0
  527. /package/{_shims → dist/_shims}/MultipartBody.mjs +0 -0
  528. /package/{_shims → dist/_shims}/MultipartBody.mjs.map +0 -0
  529. /package/{_shims → dist/_shims}/README.md +0 -0
  530. /package/{_shims → dist/_shims}/auto/runtime-bun.d.ts +0 -0
  531. /package/{_shims → dist/_shims}/auto/runtime-bun.d.ts.map +0 -0
  532. /package/{_shims → dist/_shims}/auto/runtime-bun.js +0 -0
  533. /package/{_shims → dist/_shims}/auto/runtime-bun.js.map +0 -0
  534. /package/{_shims → dist/_shims}/auto/runtime-bun.mjs +0 -0
  535. /package/{_shims → dist/_shims}/auto/runtime-bun.mjs.map +0 -0
  536. /package/{_shims → dist/_shims}/auto/runtime-node.d.ts +0 -0
  537. /package/{_shims → dist/_shims}/auto/runtime-node.d.ts.map +0 -0
  538. /package/{_shims → dist/_shims}/auto/runtime-node.js +0 -0
  539. /package/{_shims → dist/_shims}/auto/runtime-node.js.map +0 -0
  540. /package/{_shims → dist/_shims}/auto/runtime-node.mjs +0 -0
  541. /package/{_shims → dist/_shims}/auto/runtime-node.mjs.map +0 -0
  542. /package/{_shims → dist/_shims}/auto/runtime.d.ts +0 -0
  543. /package/{_shims → dist/_shims}/auto/runtime.d.ts.map +0 -0
  544. /package/{_shims → dist/_shims}/auto/runtime.js +0 -0
  545. /package/{_shims → dist/_shims}/auto/runtime.js.map +0 -0
  546. /package/{_shims → dist/_shims}/auto/runtime.mjs +0 -0
  547. /package/{_shims → dist/_shims}/auto/runtime.mjs.map +0 -0
  548. /package/{_shims → dist/_shims}/auto/types-node.d.ts +0 -0
  549. /package/{_shims → dist/_shims}/auto/types-node.d.ts.map +0 -0
  550. /package/{_shims → dist/_shims}/auto/types-node.js +0 -0
  551. /package/{_shims → dist/_shims}/auto/types-node.js.map +0 -0
  552. /package/{_shims → dist/_shims}/auto/types-node.mjs +0 -0
  553. /package/{_shims → dist/_shims}/auto/types-node.mjs.map +0 -0
  554. /package/{_shims → dist/_shims}/auto/types.d.ts +0 -0
  555. /package/{_shims → dist/_shims}/auto/types.js +0 -0
  556. /package/{_shims → dist/_shims}/auto/types.mjs +0 -0
  557. /package/{_shims → dist/_shims}/bun-runtime.d.ts +0 -0
  558. /package/{_shims → dist/_shims}/bun-runtime.d.ts.map +0 -0
  559. /package/{_shims → dist/_shims}/bun-runtime.js +0 -0
  560. /package/{_shims → dist/_shims}/bun-runtime.js.map +0 -0
  561. /package/{_shims → dist/_shims}/bun-runtime.mjs +0 -0
  562. /package/{_shims → dist/_shims}/bun-runtime.mjs.map +0 -0
  563. /package/{_shims → dist/_shims}/index.d.ts +0 -0
  564. /package/{_shims → dist/_shims}/index.js +0 -0
  565. /package/{_shims → dist/_shims}/index.mjs +0 -0
  566. /package/{_shims → dist/_shims}/manual-types.d.ts +0 -0
  567. /package/{_shims → dist/_shims}/manual-types.js +0 -0
  568. /package/{_shims → dist/_shims}/manual-types.mjs +0 -0
  569. /package/{_shims → dist/_shims}/node-runtime.d.ts +0 -0
  570. /package/{_shims → dist/_shims}/node-runtime.d.ts.map +0 -0
  571. /package/{_shims → dist/_shims}/node-runtime.js +0 -0
  572. /package/{_shims → dist/_shims}/node-runtime.js.map +0 -0
  573. /package/{_shims → dist/_shims}/node-runtime.mjs +0 -0
  574. /package/{_shims → dist/_shims}/node-runtime.mjs.map +0 -0
  575. /package/{_shims → dist/_shims}/node-types.d.ts +0 -0
  576. /package/{_shims → dist/_shims}/node-types.js +0 -0
  577. /package/{_shims → dist/_shims}/node-types.mjs +0 -0
  578. /package/{_shims → dist/_shims}/registry.d.ts +0 -0
  579. /package/{_shims → dist/_shims}/registry.d.ts.map +0 -0
  580. /package/{_shims → dist/_shims}/registry.js +0 -0
  581. /package/{_shims → dist/_shims}/registry.js.map +0 -0
  582. /package/{_shims → dist/_shims}/registry.mjs +0 -0
  583. /package/{_shims → dist/_shims}/registry.mjs.map +0 -0
  584. /package/{_shims → dist/_shims}/web-runtime.d.ts +0 -0
  585. /package/{_shims → dist/_shims}/web-runtime.d.ts.map +0 -0
  586. /package/{_shims → dist/_shims}/web-runtime.js +0 -0
  587. /package/{_shims → dist/_shims}/web-runtime.js.map +0 -0
  588. /package/{_shims → dist/_shims}/web-runtime.mjs +0 -0
  589. /package/{_shims → dist/_shims}/web-runtime.mjs.map +0 -0
  590. /package/{_shims → dist/_shims}/web-types.d.ts +0 -0
  591. /package/{_shims → dist/_shims}/web-types.js +0 -0
  592. /package/{_shims → dist/_shims}/web-types.mjs +0 -0
  593. /package/{core.d.ts → dist/core.d.ts} +0 -0
  594. /package/{error.d.ts → dist/error.d.ts} +0 -0
  595. /package/{error.d.ts.map → dist/error.d.ts.map} +0 -0
  596. /package/{error.js → dist/error.js} +0 -0
  597. /package/{error.js.map → dist/error.js.map} +0 -0
  598. /package/{error.mjs → dist/error.mjs} +0 -0
  599. /package/{error.mjs.map → dist/error.mjs.map} +0 -0
  600. /package/{index.d.mts → dist/index.d.mts} +0 -0
  601. /package/{index.d.ts → dist/index.d.ts} +0 -0
  602. /package/{index.d.ts.map → dist/index.d.ts.map} +0 -0
  603. /package/{index.js → dist/index.js} +0 -0
  604. /package/{index.js.map → dist/index.js.map} +0 -0
  605. /package/{index.mjs → dist/index.mjs} +0 -0
  606. /package/{index.mjs.map → dist/index.mjs.map} +0 -0
  607. /package/{internal → dist/internal}/decoders/line.d.ts +0 -0
  608. /package/{internal → dist/internal}/decoders/line.d.ts.map +0 -0
  609. /package/{internal → dist/internal}/decoders/line.js +0 -0
  610. /package/{internal → dist/internal}/decoders/line.js.map +0 -0
  611. /package/{internal → dist/internal}/decoders/line.mjs +0 -0
  612. /package/{internal → dist/internal}/decoders/line.mjs.map +0 -0
  613. /package/{internal → dist/internal}/qs/formats.d.ts +0 -0
  614. /package/{internal → dist/internal}/qs/formats.d.ts.map +0 -0
  615. /package/{internal → dist/internal}/qs/formats.js +0 -0
  616. /package/{internal → dist/internal}/qs/formats.js.map +0 -0
  617. /package/{internal → dist/internal}/qs/formats.mjs +0 -0
  618. /package/{internal → dist/internal}/qs/formats.mjs.map +0 -0
  619. /package/{internal → dist/internal}/qs/index.d.ts +0 -0
  620. /package/{internal → dist/internal}/qs/index.d.ts.map +0 -0
  621. /package/{internal → dist/internal}/qs/index.js +0 -0
  622. /package/{internal → dist/internal}/qs/index.js.map +0 -0
  623. /package/{internal → dist/internal}/qs/index.mjs +0 -0
  624. /package/{internal → dist/internal}/qs/index.mjs.map +0 -0
  625. /package/{internal → dist/internal}/qs/stringify.d.ts +0 -0
  626. /package/{internal → dist/internal}/qs/stringify.d.ts.map +0 -0
  627. /package/{internal → dist/internal}/qs/stringify.js +0 -0
  628. /package/{internal → dist/internal}/qs/stringify.js.map +0 -0
  629. /package/{internal → dist/internal}/qs/stringify.mjs +0 -0
  630. /package/{internal → dist/internal}/qs/stringify.mjs.map +0 -0
  631. /package/{internal → dist/internal}/qs/types.d.ts +0 -0
  632. /package/{internal → dist/internal}/qs/types.d.ts.map +0 -0
  633. /package/{internal → dist/internal}/qs/types.js +0 -0
  634. /package/{internal → dist/internal}/qs/types.js.map +0 -0
  635. /package/{internal → dist/internal}/qs/types.mjs +0 -0
  636. /package/{internal → dist/internal}/qs/types.mjs.map +0 -0
  637. /package/{internal → dist/internal}/qs/utils.d.ts +0 -0
  638. /package/{internal → dist/internal}/qs/utils.d.ts.map +0 -0
  639. /package/{internal → dist/internal}/qs/utils.js +0 -0
  640. /package/{internal → dist/internal}/qs/utils.js.map +0 -0
  641. /package/{internal → dist/internal}/qs/utils.mjs +0 -0
  642. /package/{internal → dist/internal}/qs/utils.mjs.map +0 -0
  643. /package/{internal → dist/internal}/stream-utils.d.ts +0 -0
  644. /package/{internal → dist/internal}/stream-utils.d.ts.map +0 -0
  645. /package/{internal → dist/internal}/stream-utils.js +0 -0
  646. /package/{internal → dist/internal}/stream-utils.js.map +0 -0
  647. /package/{internal → dist/internal}/stream-utils.mjs +0 -0
  648. /package/{internal → dist/internal}/stream-utils.mjs.map +0 -0
  649. /package/{lib → dist/lib}/response-helpers.d.ts +0 -0
  650. /package/{lib → dist/lib}/response-helpers.d.ts.map +0 -0
  651. /package/{lib → dist/lib}/response-helpers.js +0 -0
  652. /package/{lib → dist/lib}/response-helpers.js.map +0 -0
  653. /package/{lib → dist/lib}/response-helpers.mjs +0 -0
  654. /package/{lib → dist/lib}/response-helpers.mjs.map +0 -0
  655. /package/{pagination.d.ts → dist/pagination.d.ts} +0 -0
  656. /package/{pagination.d.ts.map → dist/pagination.d.ts.map} +0 -0
  657. /package/{pagination.js → dist/pagination.js} +0 -0
  658. /package/{pagination.js.map → dist/pagination.js.map} +0 -0
  659. /package/{pagination.mjs → dist/pagination.mjs} +0 -0
  660. /package/{pagination.mjs.map → dist/pagination.mjs.map} +0 -0
  661. /package/{resource.d.ts → dist/resource.d.ts} +0 -0
  662. /package/{resource.d.ts.map → dist/resource.d.ts.map} +0 -0
  663. /package/{resource.js → dist/resource.js} +0 -0
  664. /package/{resource.js.map → dist/resource.js.map} +0 -0
  665. /package/{resource.mjs → dist/resource.mjs} +0 -0
  666. /package/{resource.mjs.map → dist/resource.mjs.map} +0 -0
  667. /package/{resources → dist/resources}/alpha/admin.d.ts +0 -0
  668. /package/{resources → dist/resources}/alpha/admin.d.ts.map +0 -0
  669. /package/{resources → dist/resources}/alpha/admin.js +0 -0
  670. /package/{resources → dist/resources}/alpha/admin.js.map +0 -0
  671. /package/{resources → dist/resources}/alpha/admin.mjs +0 -0
  672. /package/{resources → dist/resources}/alpha/admin.mjs.map +0 -0
  673. /package/{resources → dist/resources}/alpha/benchmarks.d.ts +0 -0
  674. /package/{resources → dist/resources}/alpha/benchmarks.d.ts.map +0 -0
  675. /package/{resources → dist/resources}/alpha/benchmarks.js +0 -0
  676. /package/{resources → dist/resources}/alpha/benchmarks.js.map +0 -0
  677. /package/{resources → dist/resources}/alpha/benchmarks.mjs +0 -0
  678. /package/{resources → dist/resources}/alpha/benchmarks.mjs.map +0 -0
  679. /package/{resources → dist/resources}/alpha/eval/eval.js +0 -0
  680. /package/{resources → dist/resources}/alpha/eval/eval.mjs +0 -0
  681. /package/{resources → dist/resources}/alpha/eval/index.d.ts +0 -0
  682. /package/{resources → dist/resources}/alpha/eval/index.d.ts.map +0 -0
  683. /package/{resources → dist/resources}/alpha/eval/index.js +0 -0
  684. /package/{resources → dist/resources}/alpha/eval/index.js.map +0 -0
  685. /package/{resources → dist/resources}/alpha/eval/index.mjs +0 -0
  686. /package/{resources → dist/resources}/alpha/eval/index.mjs.map +0 -0
  687. /package/{resources → dist/resources}/alpha/eval/jobs.d.ts +0 -0
  688. /package/{resources → dist/resources}/alpha/eval/jobs.d.ts.map +0 -0
  689. /package/{resources → dist/resources}/alpha/eval/jobs.js +0 -0
  690. /package/{resources → dist/resources}/alpha/eval/jobs.js.map +0 -0
  691. /package/{resources → dist/resources}/alpha/eval/jobs.mjs +0 -0
  692. /package/{resources → dist/resources}/alpha/eval/jobs.mjs.map +0 -0
  693. /package/{resources → dist/resources}/alpha/eval.d.ts +0 -0
  694. /package/{resources → dist/resources}/alpha/eval.d.ts.map +0 -0
  695. /package/{resources → dist/resources}/alpha/eval.js +0 -0
  696. /package/{resources → dist/resources}/alpha/eval.js.map +0 -0
  697. /package/{resources → dist/resources}/alpha/eval.mjs +0 -0
  698. /package/{resources → dist/resources}/alpha/eval.mjs.map +0 -0
  699. /package/{resources → dist/resources}/alpha/index.d.ts +0 -0
  700. /package/{resources → dist/resources}/alpha/index.d.ts.map +0 -0
  701. /package/{resources → dist/resources}/alpha/index.js +0 -0
  702. /package/{resources → dist/resources}/alpha/index.js.map +0 -0
  703. /package/{resources → dist/resources}/alpha/index.mjs +0 -0
  704. /package/{resources → dist/resources}/alpha/index.mjs.map +0 -0
  705. /package/{resources → dist/resources}/alpha/inference.js +0 -0
  706. /package/{resources → dist/resources}/alpha/inference.js.map +0 -0
  707. /package/{resources → dist/resources}/alpha/inference.mjs +0 -0
  708. /package/{resources → dist/resources}/alpha/inference.mjs.map +0 -0
  709. /package/{resources → dist/resources}/alpha/post-training/index.js +0 -0
  710. /package/{resources → dist/resources}/alpha/post-training/post-training.js +0 -0
  711. /package/{resources → dist/resources}/alpha/post-training.d.ts +0 -0
  712. /package/{resources → dist/resources}/alpha/post-training.d.ts.map +0 -0
  713. /package/{resources → dist/resources}/alpha/post-training.js +0 -0
  714. /package/{resources → dist/resources}/alpha/post-training.js.map +0 -0
  715. /package/{resources → dist/resources}/alpha/post-training.mjs +0 -0
  716. /package/{resources → dist/resources}/alpha/post-training.mjs.map +0 -0
  717. /package/{resources → dist/resources}/alpha.d.ts +0 -0
  718. /package/{resources → dist/resources}/alpha.d.ts.map +0 -0
  719. /package/{resources → dist/resources}/alpha.js +0 -0
  720. /package/{resources → dist/resources}/alpha.js.map +0 -0
  721. /package/{resources → dist/resources}/alpha.mjs +0 -0
  722. /package/{resources → dist/resources}/alpha.mjs.map +0 -0
  723. /package/{resources → dist/resources}/batches.d.ts +0 -0
  724. /package/{resources → dist/resources}/batches.d.ts.map +0 -0
  725. /package/{resources → dist/resources}/batches.js +0 -0
  726. /package/{resources → dist/resources}/batches.js.map +0 -0
  727. /package/{resources → dist/resources}/batches.mjs +0 -0
  728. /package/{resources → dist/resources}/batches.mjs.map +0 -0
  729. /package/{resources → dist/resources}/beta/beta.d.ts +0 -0
  730. /package/{resources → dist/resources}/beta/beta.d.ts.map +0 -0
  731. /package/{resources → dist/resources}/beta/beta.js +0 -0
  732. /package/{resources → dist/resources}/beta/beta.js.map +0 -0
  733. /package/{resources → dist/resources}/beta/beta.mjs +0 -0
  734. /package/{resources → dist/resources}/beta/beta.mjs.map +0 -0
  735. /package/{resources → dist/resources}/beta/datasets.js +0 -0
  736. /package/{resources → dist/resources}/beta/datasets.js.map +0 -0
  737. /package/{resources → dist/resources}/beta/datasets.mjs +0 -0
  738. /package/{resources → dist/resources}/beta/datasets.mjs.map +0 -0
  739. /package/{resources → dist/resources}/beta/index.d.ts +0 -0
  740. /package/{resources → dist/resources}/beta/index.d.ts.map +0 -0
  741. /package/{resources → dist/resources}/beta/index.js +0 -0
  742. /package/{resources → dist/resources}/beta/index.js.map +0 -0
  743. /package/{resources → dist/resources}/beta/index.mjs +0 -0
  744. /package/{resources → dist/resources}/beta/index.mjs.map +0 -0
  745. /package/{resources → dist/resources}/beta.d.ts +0 -0
  746. /package/{resources → dist/resources}/beta.d.ts.map +0 -0
  747. /package/{resources → dist/resources}/beta.js +0 -0
  748. /package/{resources → dist/resources}/beta.js.map +0 -0
  749. /package/{resources → dist/resources}/beta.mjs +0 -0
  750. /package/{resources → dist/resources}/beta.mjs.map +0 -0
  751. /package/{resources → dist/resources}/chat/chat.js +0 -0
  752. /package/{resources → dist/resources}/chat/chat.mjs +0 -0
  753. /package/{resources → dist/resources}/chat/index.d.ts +0 -0
  754. /package/{resources → dist/resources}/chat/index.d.ts.map +0 -0
  755. /package/{resources → dist/resources}/chat/index.js +0 -0
  756. /package/{resources → dist/resources}/chat/index.js.map +0 -0
  757. /package/{resources → dist/resources}/chat/index.mjs +0 -0
  758. /package/{resources → dist/resources}/chat/index.mjs.map +0 -0
  759. /package/{resources → dist/resources}/chat.d.ts +0 -0
  760. /package/{resources → dist/resources}/chat.d.ts.map +0 -0
  761. /package/{resources → dist/resources}/chat.js +0 -0
  762. /package/{resources → dist/resources}/chat.js.map +0 -0
  763. /package/{resources → dist/resources}/chat.mjs +0 -0
  764. /package/{resources → dist/resources}/chat.mjs.map +0 -0
  765. /package/{resources → dist/resources}/completions.js +0 -0
  766. /package/{resources → dist/resources}/completions.mjs +0 -0
  767. /package/{resources → dist/resources}/conversations/index.d.ts +0 -0
  768. /package/{resources → dist/resources}/conversations/index.d.ts.map +0 -0
  769. /package/{resources → dist/resources}/conversations/index.js +0 -0
  770. /package/{resources → dist/resources}/conversations/index.js.map +0 -0
  771. /package/{resources → dist/resources}/conversations/index.mjs +0 -0
  772. /package/{resources → dist/resources}/conversations/index.mjs.map +0 -0
  773. /package/{resources → dist/resources}/conversations.d.ts +0 -0
  774. /package/{resources → dist/resources}/conversations.d.ts.map +0 -0
  775. /package/{resources → dist/resources}/conversations.js +0 -0
  776. /package/{resources → dist/resources}/conversations.js.map +0 -0
  777. /package/{resources → dist/resources}/conversations.mjs +0 -0
  778. /package/{resources → dist/resources}/conversations.mjs.map +0 -0
  779. /package/{resources → dist/resources}/index.d.ts +0 -0
  780. /package/{resources → dist/resources}/index.d.ts.map +0 -0
  781. /package/{resources → dist/resources}/index.js +0 -0
  782. /package/{resources → dist/resources}/index.js.map +0 -0
  783. /package/{resources → dist/resources}/index.mjs +0 -0
  784. /package/{resources → dist/resources}/index.mjs.map +0 -0
  785. /package/{resources → dist/resources}/inspect.d.ts +0 -0
  786. /package/{resources → dist/resources}/inspect.d.ts.map +0 -0
  787. /package/{resources → dist/resources}/inspect.js +0 -0
  788. /package/{resources → dist/resources}/inspect.js.map +0 -0
  789. /package/{resources → dist/resources}/inspect.mjs +0 -0
  790. /package/{resources → dist/resources}/inspect.mjs.map +0 -0
  791. /package/{resources → dist/resources}/models/index.d.ts +0 -0
  792. /package/{resources → dist/resources}/models/index.d.ts.map +0 -0
  793. /package/{resources → dist/resources}/models/index.js +0 -0
  794. /package/{resources → dist/resources}/models/index.js.map +0 -0
  795. /package/{resources → dist/resources}/models/index.mjs +0 -0
  796. /package/{resources → dist/resources}/models/index.mjs.map +0 -0
  797. /package/{resources → dist/resources}/models/openai.d.ts +0 -0
  798. /package/{resources → dist/resources}/models/openai.d.ts.map +0 -0
  799. /package/{resources → dist/resources}/models/openai.js +0 -0
  800. /package/{resources → dist/resources}/models/openai.js.map +0 -0
  801. /package/{resources → dist/resources}/models/openai.mjs +0 -0
  802. /package/{resources → dist/resources}/models/openai.mjs.map +0 -0
  803. /package/{resources → dist/resources}/models.d.ts +0 -0
  804. /package/{resources → dist/resources}/models.d.ts.map +0 -0
  805. /package/{resources → dist/resources}/models.js +0 -0
  806. /package/{resources → dist/resources}/models.js.map +0 -0
  807. /package/{resources → dist/resources}/models.mjs +0 -0
  808. /package/{resources → dist/resources}/models.mjs.map +0 -0
  809. /package/{resources → dist/resources}/prompts/index.d.ts +0 -0
  810. /package/{resources → dist/resources}/prompts/index.d.ts.map +0 -0
  811. /package/{resources → dist/resources}/prompts/index.js +0 -0
  812. /package/{resources → dist/resources}/prompts/index.js.map +0 -0
  813. /package/{resources → dist/resources}/prompts/index.mjs +0 -0
  814. /package/{resources → dist/resources}/prompts/index.mjs.map +0 -0
  815. /package/{resources → dist/resources}/prompts.d.ts +0 -0
  816. /package/{resources → dist/resources}/prompts.d.ts.map +0 -0
  817. /package/{resources → dist/resources}/prompts.js +0 -0
  818. /package/{resources → dist/resources}/prompts.js.map +0 -0
  819. /package/{resources → dist/resources}/prompts.mjs +0 -0
  820. /package/{resources → dist/resources}/prompts.mjs.map +0 -0
  821. /package/{resources → dist/resources}/providers.d.ts +0 -0
  822. /package/{resources → dist/resources}/providers.d.ts.map +0 -0
  823. /package/{resources → dist/resources}/providers.js +0 -0
  824. /package/{resources → dist/resources}/providers.js.map +0 -0
  825. /package/{resources → dist/resources}/providers.mjs +0 -0
  826. /package/{resources → dist/resources}/providers.mjs.map +0 -0
  827. /package/{resources → dist/resources}/responses/index.d.ts +0 -0
  828. /package/{resources → dist/resources}/responses/index.d.ts.map +0 -0
  829. /package/{resources → dist/resources}/responses/index.js +0 -0
  830. /package/{resources → dist/resources}/responses/index.js.map +0 -0
  831. /package/{resources → dist/resources}/responses/index.mjs +0 -0
  832. /package/{resources → dist/resources}/responses/index.mjs.map +0 -0
  833. /package/{resources → dist/resources}/responses/input-items.js +0 -0
  834. /package/{resources → dist/resources}/responses/input-items.js.map +0 -0
  835. /package/{resources → dist/resources}/responses/input-items.mjs +0 -0
  836. /package/{resources → dist/resources}/responses/input-items.mjs.map +0 -0
  837. /package/{resources → dist/resources}/responses/responses.js +0 -0
  838. /package/{resources → dist/resources}/responses/responses.mjs +0 -0
  839. /package/{resources → dist/resources}/responses.d.ts +0 -0
  840. /package/{resources → dist/resources}/responses.d.ts.map +0 -0
  841. /package/{resources → dist/resources}/responses.js +0 -0
  842. /package/{resources → dist/resources}/responses.js.map +0 -0
  843. /package/{resources → dist/resources}/responses.mjs +0 -0
  844. /package/{resources → dist/resources}/responses.mjs.map +0 -0
  845. /package/{resources → dist/resources}/routes.d.ts +0 -0
  846. /package/{resources → dist/resources}/routes.d.ts.map +0 -0
  847. /package/{resources → dist/resources}/routes.js +0 -0
  848. /package/{resources → dist/resources}/routes.js.map +0 -0
  849. /package/{resources → dist/resources}/routes.mjs +0 -0
  850. /package/{resources → dist/resources}/routes.mjs.map +0 -0
  851. /package/{resources → dist/resources}/scoring-functions.js +0 -0
  852. /package/{resources → dist/resources}/scoring-functions.js.map +0 -0
  853. /package/{resources → dist/resources}/scoring-functions.mjs +0 -0
  854. /package/{resources → dist/resources}/scoring-functions.mjs.map +0 -0
  855. /package/{resources → dist/resources}/scoring.js +0 -0
  856. /package/{resources → dist/resources}/scoring.js.map +0 -0
  857. /package/{resources → dist/resources}/scoring.mjs +0 -0
  858. /package/{resources → dist/resources}/scoring.mjs.map +0 -0
  859. /package/{resources → dist/resources}/shared.js +0 -0
  860. /package/{resources → dist/resources}/shared.js.map +0 -0
  861. /package/{resources → dist/resources}/shared.mjs +0 -0
  862. /package/{resources → dist/resources}/shared.mjs.map +0 -0
  863. /package/{resources → dist/resources}/shields.js +0 -0
  864. /package/{resources → dist/resources}/shields.js.map +0 -0
  865. /package/{resources → dist/resources}/shields.mjs +0 -0
  866. /package/{resources → dist/resources}/shields.mjs.map +0 -0
  867. /package/{resources → dist/resources}/tool-runtime.d.ts +0 -0
  868. /package/{resources → dist/resources}/tool-runtime.d.ts.map +0 -0
  869. /package/{resources → dist/resources}/tool-runtime.js +0 -0
  870. /package/{resources → dist/resources}/tool-runtime.js.map +0 -0
  871. /package/{resources → dist/resources}/tool-runtime.mjs +0 -0
  872. /package/{resources → dist/resources}/tool-runtime.mjs.map +0 -0
  873. /package/{resources → dist/resources}/toolgroups.d.ts +0 -0
  874. /package/{resources → dist/resources}/toolgroups.d.ts.map +0 -0
  875. /package/{resources → dist/resources}/toolgroups.js +0 -0
  876. /package/{resources → dist/resources}/toolgroups.js.map +0 -0
  877. /package/{resources → dist/resources}/toolgroups.mjs +0 -0
  878. /package/{resources → dist/resources}/toolgroups.mjs.map +0 -0
  879. /package/{resources → dist/resources}/tools.d.ts +0 -0
  880. /package/{resources → dist/resources}/tools.d.ts.map +0 -0
  881. /package/{resources → dist/resources}/tools.js +0 -0
  882. /package/{resources → dist/resources}/tools.js.map +0 -0
  883. /package/{resources → dist/resources}/tools.mjs +0 -0
  884. /package/{resources → dist/resources}/tools.mjs.map +0 -0
  885. /package/{resources → dist/resources}/vector-io.js.map +0 -0
  886. /package/{resources → dist/resources}/vector-io.mjs.map +0 -0
  887. /package/{resources → dist/resources}/vector-stores/index.d.ts +0 -0
  888. /package/{resources → dist/resources}/vector-stores/index.d.ts.map +0 -0
  889. /package/{resources → dist/resources}/vector-stores/index.js +0 -0
  890. /package/{resources → dist/resources}/vector-stores/index.js.map +0 -0
  891. /package/{resources → dist/resources}/vector-stores/index.mjs +0 -0
  892. /package/{resources → dist/resources}/vector-stores/index.mjs.map +0 -0
  893. /package/{resources → dist/resources}/vector-stores.d.ts +0 -0
  894. /package/{resources → dist/resources}/vector-stores.d.ts.map +0 -0
  895. /package/{resources → dist/resources}/vector-stores.js +0 -0
  896. /package/{resources → dist/resources}/vector-stores.js.map +0 -0
  897. /package/{resources → dist/resources}/vector-stores.mjs +0 -0
  898. /package/{resources → dist/resources}/vector-stores.mjs.map +0 -0
  899. /package/{resources.d.ts → dist/resources.d.ts} +0 -0
  900. /package/{resources.d.ts.map → dist/resources.d.ts.map} +0 -0
  901. /package/{resources.js → dist/resources.js} +0 -0
  902. /package/{resources.js.map → dist/resources.js.map} +0 -0
  903. /package/{resources.mjs → dist/resources.mjs} +0 -0
  904. /package/{resources.mjs.map → dist/resources.mjs.map} +0 -0
  905. /package/{shims → dist/shims}/node.d.ts +0 -0
  906. /package/{shims → dist/shims}/node.d.ts.map +0 -0
  907. /package/{shims → dist/shims}/node.js +0 -0
  908. /package/{shims → dist/shims}/node.js.map +0 -0
  909. /package/{shims → dist/shims}/node.mjs +0 -0
  910. /package/{shims → dist/shims}/node.mjs.map +0 -0
  911. /package/{shims → dist/shims}/web.d.ts +0 -0
  912. /package/{shims → dist/shims}/web.d.ts.map +0 -0
  913. /package/{shims → dist/shims}/web.js +0 -0
  914. /package/{shims → dist/shims}/web.js.map +0 -0
  915. /package/{shims → dist/shims}/web.mjs +0 -0
  916. /package/{shims → dist/shims}/web.mjs.map +0 -0
  917. /package/{src → dist/src}/tsconfig.json +0 -0
  918. /package/{streaming.d.ts → dist/streaming.d.ts} +0 -0
  919. /package/{streaming.d.ts.map → dist/streaming.d.ts.map} +0 -0
  920. /package/{streaming.js → dist/streaming.js} +0 -0
  921. /package/{streaming.js.map → dist/streaming.js.map} +0 -0
  922. /package/{streaming.mjs → dist/streaming.mjs} +0 -0
  923. /package/{streaming.mjs.map → dist/streaming.mjs.map} +0 -0
  924. /package/{uploads.d.ts → dist/uploads.d.ts} +0 -0
  925. /package/{uploads.d.ts.map → dist/uploads.d.ts.map} +0 -0
  926. /package/{uploads.js → dist/uploads.js} +0 -0
  927. /package/{uploads.js.map → dist/uploads.js.map} +0 -0
  928. /package/{uploads.mjs → dist/uploads.mjs} +0 -0
  929. /package/{uploads.mjs.map → dist/uploads.mjs.map} +0 -0
  930. /package/{version.d.ts.map → dist/version.d.ts.map} +0 -0
  931. /package/{version.js.map → dist/version.js.map} +0 -0
  932. /package/{version.mjs.map → dist/version.mjs.map} +0 -0
@@ -0,0 +1,2934 @@
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
+ * Generate an OpenAI-compatible chat completion for the given messages using the
20
+ * specified model.
21
+ */
22
+ create(
23
+ body: CompletionCreateParamsNonStreaming,
24
+ options?: Core.RequestOptions,
25
+ ): APIPromise<CompletionCreateResponse>;
26
+ create(
27
+ body: CompletionCreateParamsStreaming,
28
+ options?: Core.RequestOptions,
29
+ ): APIPromise<Stream<ChatAPI.ChatCompletionChunk>>;
30
+ create(
31
+ body: CompletionCreateParamsBase,
32
+ options?: Core.RequestOptions,
33
+ ): APIPromise<Stream<ChatAPI.ChatCompletionChunk> | CompletionCreateResponse>;
34
+ create(
35
+ body: CompletionCreateParams,
36
+ options?: Core.RequestOptions,
37
+ ): APIPromise<CompletionCreateResponse> | APIPromise<Stream<ChatAPI.ChatCompletionChunk>> {
38
+ return this._client.post('/v1/chat/completions', { body, ...options, stream: body.stream ?? false }) as
39
+ | APIPromise<CompletionCreateResponse>
40
+ | APIPromise<Stream<ChatAPI.ChatCompletionChunk>>;
41
+ }
42
+
43
+ /**
44
+ * Describe a chat completion by its ID.
45
+ */
46
+ retrieve(completionId: string, options?: Core.RequestOptions): Core.APIPromise<CompletionRetrieveResponse> {
47
+ return this._client.get(`/v1/chat/completions/${completionId}`, options);
48
+ }
49
+
50
+ /**
51
+ * List chat completions.
52
+ */
53
+ list(query?: CompletionListParams, options?: Core.RequestOptions): Core.APIPromise<CompletionListResponse>;
54
+ list(options?: Core.RequestOptions): Core.APIPromise<CompletionListResponse>;
55
+ list(
56
+ query: CompletionListParams | Core.RequestOptions = {},
57
+ options?: Core.RequestOptions,
58
+ ): Core.APIPromise<CompletionListResponse> {
59
+ if (isRequestOptions(query)) {
60
+ return this.list({}, query);
61
+ }
62
+ return this._client.get('/v1/chat/completions', { query, ...options });
63
+ }
64
+ }
65
+
66
+ /**
67
+ * Response from an OpenAI-compatible chat completion request.
68
+ */
69
+ export interface CompletionCreateResponse {
70
+ /**
71
+ * The ID of the chat completion.
72
+ */
73
+ id: string;
74
+
75
+ /**
76
+ * List of choices.
77
+ */
78
+ choices: Array<CompletionCreateResponse.Choice>;
79
+
80
+ /**
81
+ * The Unix timestamp in seconds when the chat completion was created.
82
+ */
83
+ created: number;
84
+
85
+ /**
86
+ * The model that was used to generate the chat completion.
87
+ */
88
+ model: string;
89
+
90
+ /**
91
+ * The object type.
92
+ */
93
+ object?: 'chat.completion';
94
+
95
+ /**
96
+ * Usage information for OpenAI chat completion.
97
+ */
98
+ usage?: CompletionCreateResponse.Usage | null;
99
+ }
100
+
101
+ export namespace CompletionCreateResponse {
102
+ /**
103
+ * A choice from an OpenAI-compatible chat completion response.
104
+ */
105
+ export interface Choice {
106
+ /**
107
+ * The reason the model stopped generating.
108
+ */
109
+ finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
110
+
111
+ /**
112
+ * The index of the choice.
113
+ */
114
+ index: number;
115
+
116
+ /**
117
+ * The message from the model.
118
+ */
119
+ message:
120
+ | Choice.OpenAIUserMessageParamOutput
121
+ | Choice.OpenAISystemMessageParam
122
+ | Choice.OpenAIAssistantMessageParamOutput
123
+ | Choice.OpenAIToolMessageParam
124
+ | Choice.OpenAIDeveloperMessageParam;
125
+
126
+ /**
127
+ * The log probabilities for the tokens in the message from an OpenAI-compatible
128
+ * chat completion response.
129
+ */
130
+ logprobs?: Choice.Logprobs | null;
131
+ }
132
+
133
+ export namespace Choice {
134
+ /**
135
+ * A message from the user in an OpenAI-compatible chat completion request.
136
+ */
137
+ export interface OpenAIUserMessageParamOutput {
138
+ /**
139
+ * The content of the message, which can include text and other media.
140
+ */
141
+ content:
142
+ | string
143
+ | Array<
144
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartTextParam
145
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartImageParam
146
+ | OpenAIUserMessageParamOutput.OpenAIFile
147
+ >;
148
+
149
+ /**
150
+ * The name of the user message participant.
151
+ */
152
+ name?: string | null;
153
+
154
+ /**
155
+ * Must be 'user' to identify this as a user message.
156
+ */
157
+ role?: 'user';
158
+ }
159
+
160
+ export namespace OpenAIUserMessageParamOutput {
161
+ /**
162
+ * Text content part for OpenAI-compatible chat completion messages.
163
+ */
164
+ export interface OpenAIChatCompletionContentPartTextParam {
165
+ /**
166
+ * The text content of the message.
167
+ */
168
+ text: string;
169
+
170
+ /**
171
+ * Must be 'text' to identify this as text content.
172
+ */
173
+ type?: 'text';
174
+ }
175
+
176
+ /**
177
+ * Image content part for OpenAI-compatible chat completion messages.
178
+ */
179
+ export interface OpenAIChatCompletionContentPartImageParam {
180
+ /**
181
+ * Image URL specification and processing details.
182
+ */
183
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
184
+
185
+ /**
186
+ * Must be 'image_url' to identify this as image content.
187
+ */
188
+ type?: 'image_url';
189
+ }
190
+
191
+ export namespace OpenAIChatCompletionContentPartImageParam {
192
+ /**
193
+ * Image URL specification and processing details.
194
+ */
195
+ export interface ImageURL {
196
+ /**
197
+ * URL of the image to include in the message.
198
+ */
199
+ url: string;
200
+
201
+ /**
202
+ * Level of detail for image processing. Can be 'low', 'high', or 'auto'.
203
+ */
204
+ detail?: 'low' | 'high' | 'auto' | null;
205
+ }
206
+ }
207
+
208
+ export interface OpenAIFile {
209
+ /**
210
+ * File specification.
211
+ */
212
+ file: OpenAIFile.File;
213
+
214
+ /**
215
+ * Must be 'file' to identify this as file content.
216
+ */
217
+ type?: 'file';
218
+ }
219
+
220
+ export namespace OpenAIFile {
221
+ /**
222
+ * File specification.
223
+ */
224
+ export interface File {
225
+ /**
226
+ * Base64-encoded file data.
227
+ */
228
+ file_data?: string | null;
229
+
230
+ /**
231
+ * ID of an uploaded file.
232
+ */
233
+ file_id?: string | null;
234
+
235
+ /**
236
+ * Name of the file.
237
+ */
238
+ filename?: string | null;
239
+ }
240
+ }
241
+ }
242
+
243
+ /**
244
+ * A system message providing instructions or context to the model.
245
+ */
246
+ export interface OpenAISystemMessageParam {
247
+ /**
248
+ * The content of the 'system prompt'. If multiple system messages are provided,
249
+ * they are concatenated.
250
+ */
251
+ content: string | Array<OpenAISystemMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
252
+
253
+ /**
254
+ * The name of the system message participant.
255
+ */
256
+ name?: string | null;
257
+
258
+ /**
259
+ * Must be 'system' to identify this as a system message.
260
+ */
261
+ role?: 'system';
262
+ }
263
+
264
+ export namespace OpenAISystemMessageParam {
265
+ /**
266
+ * Text content part for OpenAI-compatible chat completion messages.
267
+ */
268
+ export interface ListOpenAIChatCompletionContentPartTextParam {
269
+ /**
270
+ * The text content of the message.
271
+ */
272
+ text: string;
273
+
274
+ /**
275
+ * Must be 'text' to identify this as text content.
276
+ */
277
+ type?: 'text';
278
+ }
279
+ }
280
+
281
+ /**
282
+ * A message containing the model's (assistant) response in an OpenAI-compatible
283
+ * chat completion request.
284
+ */
285
+ export interface OpenAIAssistantMessageParamOutput {
286
+ /**
287
+ * The content of the model's response.
288
+ */
289
+ content?:
290
+ | string
291
+ | Array<OpenAIAssistantMessageParamOutput.ListOpenAIChatCompletionContentPartTextParam>
292
+ | null;
293
+
294
+ /**
295
+ * The name of the assistant message participant.
296
+ */
297
+ name?: string | null;
298
+
299
+ /**
300
+ * Must be 'assistant' to identify this as the model's response.
301
+ */
302
+ role?: 'assistant';
303
+
304
+ /**
305
+ * List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object.
306
+ */
307
+ tool_calls?: Array<OpenAIAssistantMessageParamOutput.ToolCall> | null;
308
+ }
309
+
310
+ export namespace OpenAIAssistantMessageParamOutput {
311
+ /**
312
+ * Text content part for OpenAI-compatible chat completion messages.
313
+ */
314
+ export interface ListOpenAIChatCompletionContentPartTextParam {
315
+ /**
316
+ * The text content of the message.
317
+ */
318
+ text: string;
319
+
320
+ /**
321
+ * Must be 'text' to identify this as text content.
322
+ */
323
+ type?: 'text';
324
+ }
325
+
326
+ /**
327
+ * Tool call specification for OpenAI-compatible chat completion responses.
328
+ */
329
+ export interface ToolCall {
330
+ /**
331
+ * Unique identifier for the tool call.
332
+ */
333
+ id?: string | null;
334
+
335
+ /**
336
+ * Function call details for OpenAI-compatible tool calls.
337
+ */
338
+ function?: ToolCall.Function | null;
339
+
340
+ /**
341
+ * Index of the tool call in the list.
342
+ */
343
+ index?: number | null;
344
+
345
+ /**
346
+ * Must be 'function' to identify this as a function call.
347
+ */
348
+ type?: 'function';
349
+ }
350
+
351
+ export namespace ToolCall {
352
+ /**
353
+ * Function call details for OpenAI-compatible tool calls.
354
+ */
355
+ export interface Function {
356
+ /**
357
+ * Arguments to pass to the function as a JSON string.
358
+ */
359
+ arguments?: string | null;
360
+
361
+ /**
362
+ * Name of the function to call.
363
+ */
364
+ name?: string | null;
365
+ }
366
+ }
367
+ }
368
+
369
+ /**
370
+ * A message representing the result of a tool invocation in an OpenAI-compatible
371
+ * chat completion request.
372
+ */
373
+ export interface OpenAIToolMessageParam {
374
+ /**
375
+ * The response content from the tool.
376
+ */
377
+ content: string | Array<OpenAIToolMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
378
+
379
+ /**
380
+ * Unique identifier for the tool call this response is for.
381
+ */
382
+ tool_call_id: string;
383
+
384
+ /**
385
+ * Must be 'tool' to identify this as a tool response.
386
+ */
387
+ role?: 'tool';
388
+ }
389
+
390
+ export namespace OpenAIToolMessageParam {
391
+ /**
392
+ * Text content part for OpenAI-compatible chat completion messages.
393
+ */
394
+ export interface ListOpenAIChatCompletionContentPartTextParam {
395
+ /**
396
+ * The text content of the message.
397
+ */
398
+ text: string;
399
+
400
+ /**
401
+ * Must be 'text' to identify this as text content.
402
+ */
403
+ type?: 'text';
404
+ }
405
+ }
406
+
407
+ /**
408
+ * A message from the developer in an OpenAI-compatible chat completion request.
409
+ */
410
+ export interface OpenAIDeveloperMessageParam {
411
+ /**
412
+ * The content of the developer message.
413
+ */
414
+ content: string | Array<OpenAIDeveloperMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
415
+
416
+ /**
417
+ * The name of the developer message participant.
418
+ */
419
+ name?: string | null;
420
+
421
+ /**
422
+ * Must be 'developer' to identify this as a developer message.
423
+ */
424
+ role?: 'developer';
425
+ }
426
+
427
+ export namespace OpenAIDeveloperMessageParam {
428
+ /**
429
+ * Text content part for OpenAI-compatible chat completion messages.
430
+ */
431
+ export interface ListOpenAIChatCompletionContentPartTextParam {
432
+ /**
433
+ * The text content of the message.
434
+ */
435
+ text: string;
436
+
437
+ /**
438
+ * Must be 'text' to identify this as text content.
439
+ */
440
+ type?: 'text';
441
+ }
442
+ }
443
+
444
+ /**
445
+ * The log probabilities for the tokens in the message from an OpenAI-compatible
446
+ * chat completion response.
447
+ */
448
+ export interface Logprobs {
449
+ /**
450
+ * The log probabilities for the tokens in the message.
451
+ */
452
+ content?: Array<Logprobs.Content> | null;
453
+
454
+ /**
455
+ * The log probabilities for the refusal tokens.
456
+ */
457
+ refusal?: Array<Logprobs.Refusal> | null;
458
+ }
459
+
460
+ export namespace Logprobs {
461
+ /**
462
+ * The log probability for a token from an OpenAI-compatible chat completion
463
+ * response.
464
+ */
465
+ export interface Content {
466
+ /**
467
+ * The token.
468
+ */
469
+ token: string;
470
+
471
+ /**
472
+ * The log probability of the token.
473
+ */
474
+ logprob: number;
475
+
476
+ /**
477
+ * The bytes for the token.
478
+ */
479
+ bytes?: Array<number> | null;
480
+
481
+ /**
482
+ * The top log probabilities for the token.
483
+ */
484
+ top_logprobs?: Array<Content.TopLogprob> | null;
485
+ }
486
+
487
+ export namespace Content {
488
+ /**
489
+ * The top log probability for a token from an OpenAI-compatible chat completion
490
+ * response.
491
+ */
492
+ export interface TopLogprob {
493
+ /**
494
+ * The token.
495
+ */
496
+ token: string;
497
+
498
+ /**
499
+ * The log probability of the token.
500
+ */
501
+ logprob: number;
502
+
503
+ /**
504
+ * The bytes for the token.
505
+ */
506
+ bytes?: Array<number> | null;
507
+ }
508
+ }
509
+
510
+ /**
511
+ * The log probability for a token from an OpenAI-compatible chat completion
512
+ * response.
513
+ */
514
+ export interface Refusal {
515
+ /**
516
+ * The token.
517
+ */
518
+ token: string;
519
+
520
+ /**
521
+ * The log probability of the token.
522
+ */
523
+ logprob: number;
524
+
525
+ /**
526
+ * The bytes for the token.
527
+ */
528
+ bytes?: Array<number> | null;
529
+
530
+ /**
531
+ * The top log probabilities for the token.
532
+ */
533
+ top_logprobs?: Array<Refusal.TopLogprob> | null;
534
+ }
535
+
536
+ export namespace Refusal {
537
+ /**
538
+ * The top log probability for a token from an OpenAI-compatible chat completion
539
+ * response.
540
+ */
541
+ export interface TopLogprob {
542
+ /**
543
+ * The token.
544
+ */
545
+ token: string;
546
+
547
+ /**
548
+ * The log probability of the token.
549
+ */
550
+ logprob: number;
551
+
552
+ /**
553
+ * The bytes for the token.
554
+ */
555
+ bytes?: Array<number> | null;
556
+ }
557
+ }
558
+ }
559
+ }
560
+
561
+ /**
562
+ * Usage information for OpenAI chat completion.
563
+ */
564
+ export interface Usage {
565
+ /**
566
+ * Number of tokens in the completion.
567
+ */
568
+ completion_tokens: number;
569
+
570
+ /**
571
+ * Number of tokens in the prompt.
572
+ */
573
+ prompt_tokens: number;
574
+
575
+ /**
576
+ * Total tokens used (prompt + completion).
577
+ */
578
+ total_tokens: number;
579
+
580
+ /**
581
+ * Token details for output tokens in OpenAI chat completion usage.
582
+ */
583
+ completion_tokens_details?: Usage.CompletionTokensDetails | null;
584
+
585
+ /**
586
+ * Token details for prompt tokens in OpenAI chat completion usage.
587
+ */
588
+ prompt_tokens_details?: Usage.PromptTokensDetails | null;
589
+ }
590
+
591
+ export namespace Usage {
592
+ /**
593
+ * Token details for output tokens in OpenAI chat completion usage.
594
+ */
595
+ export interface CompletionTokensDetails {
596
+ /**
597
+ * Number of tokens used for reasoning (o1/o3 models).
598
+ */
599
+ reasoning_tokens?: number | null;
600
+ }
601
+
602
+ /**
603
+ * Token details for prompt tokens in OpenAI chat completion usage.
604
+ */
605
+ export interface PromptTokensDetails {
606
+ /**
607
+ * Number of tokens retrieved from cache.
608
+ */
609
+ cached_tokens?: number | null;
610
+ }
611
+ }
612
+ }
613
+
614
+ export interface CompletionRetrieveResponse {
615
+ /**
616
+ * The ID of the chat completion.
617
+ */
618
+ id: string;
619
+
620
+ /**
621
+ * List of choices.
622
+ */
623
+ choices: Array<CompletionRetrieveResponse.Choice>;
624
+
625
+ /**
626
+ * The Unix timestamp in seconds when the chat completion was created.
627
+ */
628
+ created: number;
629
+
630
+ /**
631
+ * The input messages used to generate this completion.
632
+ */
633
+ input_messages: Array<
634
+ | CompletionRetrieveResponse.OpenAIUserMessageParamOutput
635
+ | CompletionRetrieveResponse.OpenAISystemMessageParam
636
+ | CompletionRetrieveResponse.OpenAIAssistantMessageParamOutput
637
+ | CompletionRetrieveResponse.OpenAIToolMessageParam
638
+ | CompletionRetrieveResponse.OpenAIDeveloperMessageParam
639
+ >;
640
+
641
+ /**
642
+ * The model that was used to generate the chat completion.
643
+ */
644
+ model: string;
645
+
646
+ /**
647
+ * The object type.
648
+ */
649
+ object?: 'chat.completion';
650
+
651
+ /**
652
+ * Usage information for OpenAI chat completion.
653
+ */
654
+ usage?: CompletionRetrieveResponse.Usage | null;
655
+ }
656
+
657
+ export namespace CompletionRetrieveResponse {
658
+ /**
659
+ * A choice from an OpenAI-compatible chat completion response.
660
+ */
661
+ export interface Choice {
662
+ /**
663
+ * The reason the model stopped generating.
664
+ */
665
+ finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
666
+
667
+ /**
668
+ * The index of the choice.
669
+ */
670
+ index: number;
671
+
672
+ /**
673
+ * The message from the model.
674
+ */
675
+ message:
676
+ | Choice.OpenAIUserMessageParamOutput
677
+ | Choice.OpenAISystemMessageParam
678
+ | Choice.OpenAIAssistantMessageParamOutput
679
+ | Choice.OpenAIToolMessageParam
680
+ | Choice.OpenAIDeveloperMessageParam;
681
+
682
+ /**
683
+ * The log probabilities for the tokens in the message from an OpenAI-compatible
684
+ * chat completion response.
685
+ */
686
+ logprobs?: Choice.Logprobs | null;
687
+ }
688
+
689
+ export namespace Choice {
690
+ /**
691
+ * A message from the user in an OpenAI-compatible chat completion request.
692
+ */
693
+ export interface OpenAIUserMessageParamOutput {
694
+ /**
695
+ * The content of the message, which can include text and other media.
696
+ */
697
+ content:
698
+ | string
699
+ | Array<
700
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartTextParam
701
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartImageParam
702
+ | OpenAIUserMessageParamOutput.OpenAIFile
703
+ >;
704
+
705
+ /**
706
+ * The name of the user message participant.
707
+ */
708
+ name?: string | null;
709
+
710
+ /**
711
+ * Must be 'user' to identify this as a user message.
712
+ */
713
+ role?: 'user';
714
+ }
715
+
716
+ export namespace OpenAIUserMessageParamOutput {
717
+ /**
718
+ * Text content part for OpenAI-compatible chat completion messages.
719
+ */
720
+ export interface OpenAIChatCompletionContentPartTextParam {
721
+ /**
722
+ * The text content of the message.
723
+ */
724
+ text: string;
725
+
726
+ /**
727
+ * Must be 'text' to identify this as text content.
728
+ */
729
+ type?: 'text';
730
+ }
731
+
732
+ /**
733
+ * Image content part for OpenAI-compatible chat completion messages.
734
+ */
735
+ export interface OpenAIChatCompletionContentPartImageParam {
736
+ /**
737
+ * Image URL specification and processing details.
738
+ */
739
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
740
+
741
+ /**
742
+ * Must be 'image_url' to identify this as image content.
743
+ */
744
+ type?: 'image_url';
745
+ }
746
+
747
+ export namespace OpenAIChatCompletionContentPartImageParam {
748
+ /**
749
+ * Image URL specification and processing details.
750
+ */
751
+ export interface ImageURL {
752
+ /**
753
+ * URL of the image to include in the message.
754
+ */
755
+ url: string;
756
+
757
+ /**
758
+ * Level of detail for image processing. Can be 'low', 'high', or 'auto'.
759
+ */
760
+ detail?: 'low' | 'high' | 'auto' | null;
761
+ }
762
+ }
763
+
764
+ export interface OpenAIFile {
765
+ /**
766
+ * File specification.
767
+ */
768
+ file: OpenAIFile.File;
769
+
770
+ /**
771
+ * Must be 'file' to identify this as file content.
772
+ */
773
+ type?: 'file';
774
+ }
775
+
776
+ export namespace OpenAIFile {
777
+ /**
778
+ * File specification.
779
+ */
780
+ export interface File {
781
+ /**
782
+ * Base64-encoded file data.
783
+ */
784
+ file_data?: string | null;
785
+
786
+ /**
787
+ * ID of an uploaded file.
788
+ */
789
+ file_id?: string | null;
790
+
791
+ /**
792
+ * Name of the file.
793
+ */
794
+ filename?: string | null;
795
+ }
796
+ }
797
+ }
798
+
799
+ /**
800
+ * A system message providing instructions or context to the model.
801
+ */
802
+ export interface OpenAISystemMessageParam {
803
+ /**
804
+ * The content of the 'system prompt'. If multiple system messages are provided,
805
+ * they are concatenated.
806
+ */
807
+ content: string | Array<OpenAISystemMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
808
+
809
+ /**
810
+ * The name of the system message participant.
811
+ */
812
+ name?: string | null;
813
+
814
+ /**
815
+ * Must be 'system' to identify this as a system message.
816
+ */
817
+ role?: 'system';
818
+ }
819
+
820
+ export namespace OpenAISystemMessageParam {
821
+ /**
822
+ * Text content part for OpenAI-compatible chat completion messages.
823
+ */
824
+ export interface ListOpenAIChatCompletionContentPartTextParam {
825
+ /**
826
+ * The text content of the message.
827
+ */
828
+ text: string;
829
+
830
+ /**
831
+ * Must be 'text' to identify this as text content.
832
+ */
833
+ type?: 'text';
834
+ }
835
+ }
836
+
837
+ /**
838
+ * A message containing the model's (assistant) response in an OpenAI-compatible
839
+ * chat completion request.
840
+ */
841
+ export interface OpenAIAssistantMessageParamOutput {
842
+ /**
843
+ * The content of the model's response.
844
+ */
845
+ content?:
846
+ | string
847
+ | Array<OpenAIAssistantMessageParamOutput.ListOpenAIChatCompletionContentPartTextParam>
848
+ | null;
849
+
850
+ /**
851
+ * The name of the assistant message participant.
852
+ */
853
+ name?: string | null;
854
+
855
+ /**
856
+ * Must be 'assistant' to identify this as the model's response.
857
+ */
858
+ role?: 'assistant';
859
+
860
+ /**
861
+ * List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object.
862
+ */
863
+ tool_calls?: Array<OpenAIAssistantMessageParamOutput.ToolCall> | null;
864
+ }
865
+
866
+ export namespace OpenAIAssistantMessageParamOutput {
867
+ /**
868
+ * Text content part for OpenAI-compatible chat completion messages.
869
+ */
870
+ export interface ListOpenAIChatCompletionContentPartTextParam {
871
+ /**
872
+ * The text content of the message.
873
+ */
874
+ text: string;
875
+
876
+ /**
877
+ * Must be 'text' to identify this as text content.
878
+ */
879
+ type?: 'text';
880
+ }
881
+
882
+ /**
883
+ * Tool call specification for OpenAI-compatible chat completion responses.
884
+ */
885
+ export interface ToolCall {
886
+ /**
887
+ * Unique identifier for the tool call.
888
+ */
889
+ id?: string | null;
890
+
891
+ /**
892
+ * Function call details for OpenAI-compatible tool calls.
893
+ */
894
+ function?: ToolCall.Function | null;
895
+
896
+ /**
897
+ * Index of the tool call in the list.
898
+ */
899
+ index?: number | null;
900
+
901
+ /**
902
+ * Must be 'function' to identify this as a function call.
903
+ */
904
+ type?: 'function';
905
+ }
906
+
907
+ export namespace ToolCall {
908
+ /**
909
+ * Function call details for OpenAI-compatible tool calls.
910
+ */
911
+ export interface Function {
912
+ /**
913
+ * Arguments to pass to the function as a JSON string.
914
+ */
915
+ arguments?: string | null;
916
+
917
+ /**
918
+ * Name of the function to call.
919
+ */
920
+ name?: string | null;
921
+ }
922
+ }
923
+ }
924
+
925
+ /**
926
+ * A message representing the result of a tool invocation in an OpenAI-compatible
927
+ * chat completion request.
928
+ */
929
+ export interface OpenAIToolMessageParam {
930
+ /**
931
+ * The response content from the tool.
932
+ */
933
+ content: string | Array<OpenAIToolMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
934
+
935
+ /**
936
+ * Unique identifier for the tool call this response is for.
937
+ */
938
+ tool_call_id: string;
939
+
940
+ /**
941
+ * Must be 'tool' to identify this as a tool response.
942
+ */
943
+ role?: 'tool';
944
+ }
945
+
946
+ export namespace OpenAIToolMessageParam {
947
+ /**
948
+ * Text content part for OpenAI-compatible chat completion messages.
949
+ */
950
+ export interface ListOpenAIChatCompletionContentPartTextParam {
951
+ /**
952
+ * The text content of the message.
953
+ */
954
+ text: string;
955
+
956
+ /**
957
+ * Must be 'text' to identify this as text content.
958
+ */
959
+ type?: 'text';
960
+ }
961
+ }
962
+
963
+ /**
964
+ * A message from the developer in an OpenAI-compatible chat completion request.
965
+ */
966
+ export interface OpenAIDeveloperMessageParam {
967
+ /**
968
+ * The content of the developer message.
969
+ */
970
+ content: string | Array<OpenAIDeveloperMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
971
+
972
+ /**
973
+ * The name of the developer message participant.
974
+ */
975
+ name?: string | null;
976
+
977
+ /**
978
+ * Must be 'developer' to identify this as a developer message.
979
+ */
980
+ role?: 'developer';
981
+ }
982
+
983
+ export namespace OpenAIDeveloperMessageParam {
984
+ /**
985
+ * Text content part for OpenAI-compatible chat completion messages.
986
+ */
987
+ export interface ListOpenAIChatCompletionContentPartTextParam {
988
+ /**
989
+ * The text content of the message.
990
+ */
991
+ text: string;
992
+
993
+ /**
994
+ * Must be 'text' to identify this as text content.
995
+ */
996
+ type?: 'text';
997
+ }
998
+ }
999
+
1000
+ /**
1001
+ * The log probabilities for the tokens in the message from an OpenAI-compatible
1002
+ * chat completion response.
1003
+ */
1004
+ export interface Logprobs {
1005
+ /**
1006
+ * The log probabilities for the tokens in the message.
1007
+ */
1008
+ content?: Array<Logprobs.Content> | null;
1009
+
1010
+ /**
1011
+ * The log probabilities for the refusal tokens.
1012
+ */
1013
+ refusal?: Array<Logprobs.Refusal> | null;
1014
+ }
1015
+
1016
+ export namespace Logprobs {
1017
+ /**
1018
+ * The log probability for a token from an OpenAI-compatible chat completion
1019
+ * response.
1020
+ */
1021
+ export interface Content {
1022
+ /**
1023
+ * The token.
1024
+ */
1025
+ token: string;
1026
+
1027
+ /**
1028
+ * The log probability of the token.
1029
+ */
1030
+ logprob: number;
1031
+
1032
+ /**
1033
+ * The bytes for the token.
1034
+ */
1035
+ bytes?: Array<number> | null;
1036
+
1037
+ /**
1038
+ * The top log probabilities for the token.
1039
+ */
1040
+ top_logprobs?: Array<Content.TopLogprob> | null;
1041
+ }
1042
+
1043
+ export namespace Content {
1044
+ /**
1045
+ * The top log probability for a token from an OpenAI-compatible chat completion
1046
+ * response.
1047
+ */
1048
+ export interface TopLogprob {
1049
+ /**
1050
+ * The token.
1051
+ */
1052
+ token: string;
1053
+
1054
+ /**
1055
+ * The log probability of the token.
1056
+ */
1057
+ logprob: number;
1058
+
1059
+ /**
1060
+ * The bytes for the token.
1061
+ */
1062
+ bytes?: Array<number> | null;
1063
+ }
1064
+ }
1065
+
1066
+ /**
1067
+ * The log probability for a token from an OpenAI-compatible chat completion
1068
+ * response.
1069
+ */
1070
+ export interface Refusal {
1071
+ /**
1072
+ * The token.
1073
+ */
1074
+ token: string;
1075
+
1076
+ /**
1077
+ * The log probability of the token.
1078
+ */
1079
+ logprob: number;
1080
+
1081
+ /**
1082
+ * The bytes for the token.
1083
+ */
1084
+ bytes?: Array<number> | null;
1085
+
1086
+ /**
1087
+ * The top log probabilities for the token.
1088
+ */
1089
+ top_logprobs?: Array<Refusal.TopLogprob> | null;
1090
+ }
1091
+
1092
+ export namespace Refusal {
1093
+ /**
1094
+ * The top log probability for a token from an OpenAI-compatible chat completion
1095
+ * response.
1096
+ */
1097
+ export interface TopLogprob {
1098
+ /**
1099
+ * The token.
1100
+ */
1101
+ token: string;
1102
+
1103
+ /**
1104
+ * The log probability of the token.
1105
+ */
1106
+ logprob: number;
1107
+
1108
+ /**
1109
+ * The bytes for the token.
1110
+ */
1111
+ bytes?: Array<number> | null;
1112
+ }
1113
+ }
1114
+ }
1115
+ }
1116
+
1117
+ /**
1118
+ * A message from the user in an OpenAI-compatible chat completion request.
1119
+ */
1120
+ export interface OpenAIUserMessageParamOutput {
1121
+ /**
1122
+ * The content of the message, which can include text and other media.
1123
+ */
1124
+ content:
1125
+ | string
1126
+ | Array<
1127
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartTextParam
1128
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartImageParam
1129
+ | OpenAIUserMessageParamOutput.OpenAIFile
1130
+ >;
1131
+
1132
+ /**
1133
+ * The name of the user message participant.
1134
+ */
1135
+ name?: string | null;
1136
+
1137
+ /**
1138
+ * Must be 'user' to identify this as a user message.
1139
+ */
1140
+ role?: 'user';
1141
+ }
1142
+
1143
+ export namespace OpenAIUserMessageParamOutput {
1144
+ /**
1145
+ * Text content part for OpenAI-compatible chat completion messages.
1146
+ */
1147
+ export interface OpenAIChatCompletionContentPartTextParam {
1148
+ /**
1149
+ * The text content of the message.
1150
+ */
1151
+ text: string;
1152
+
1153
+ /**
1154
+ * Must be 'text' to identify this as text content.
1155
+ */
1156
+ type?: 'text';
1157
+ }
1158
+
1159
+ /**
1160
+ * Image content part for OpenAI-compatible chat completion messages.
1161
+ */
1162
+ export interface OpenAIChatCompletionContentPartImageParam {
1163
+ /**
1164
+ * Image URL specification and processing details.
1165
+ */
1166
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
1167
+
1168
+ /**
1169
+ * Must be 'image_url' to identify this as image content.
1170
+ */
1171
+ type?: 'image_url';
1172
+ }
1173
+
1174
+ export namespace OpenAIChatCompletionContentPartImageParam {
1175
+ /**
1176
+ * Image URL specification and processing details.
1177
+ */
1178
+ export interface ImageURL {
1179
+ /**
1180
+ * URL of the image to include in the message.
1181
+ */
1182
+ url: string;
1183
+
1184
+ /**
1185
+ * Level of detail for image processing. Can be 'low', 'high', or 'auto'.
1186
+ */
1187
+ detail?: 'low' | 'high' | 'auto' | null;
1188
+ }
1189
+ }
1190
+
1191
+ export interface OpenAIFile {
1192
+ /**
1193
+ * File specification.
1194
+ */
1195
+ file: OpenAIFile.File;
1196
+
1197
+ /**
1198
+ * Must be 'file' to identify this as file content.
1199
+ */
1200
+ type?: 'file';
1201
+ }
1202
+
1203
+ export namespace OpenAIFile {
1204
+ /**
1205
+ * File specification.
1206
+ */
1207
+ export interface File {
1208
+ /**
1209
+ * Base64-encoded file data.
1210
+ */
1211
+ file_data?: string | null;
1212
+
1213
+ /**
1214
+ * ID of an uploaded file.
1215
+ */
1216
+ file_id?: string | null;
1217
+
1218
+ /**
1219
+ * Name of the file.
1220
+ */
1221
+ filename?: string | null;
1222
+ }
1223
+ }
1224
+ }
1225
+
1226
+ /**
1227
+ * A system message providing instructions or context to the model.
1228
+ */
1229
+ export interface OpenAISystemMessageParam {
1230
+ /**
1231
+ * The content of the 'system prompt'. If multiple system messages are provided,
1232
+ * they are concatenated.
1233
+ */
1234
+ content: string | Array<OpenAISystemMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
1235
+
1236
+ /**
1237
+ * The name of the system message participant.
1238
+ */
1239
+ name?: string | null;
1240
+
1241
+ /**
1242
+ * Must be 'system' to identify this as a system message.
1243
+ */
1244
+ role?: 'system';
1245
+ }
1246
+
1247
+ export namespace OpenAISystemMessageParam {
1248
+ /**
1249
+ * Text content part for OpenAI-compatible chat completion messages.
1250
+ */
1251
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1252
+ /**
1253
+ * The text content of the message.
1254
+ */
1255
+ text: string;
1256
+
1257
+ /**
1258
+ * Must be 'text' to identify this as text content.
1259
+ */
1260
+ type?: 'text';
1261
+ }
1262
+ }
1263
+
1264
+ /**
1265
+ * A message containing the model's (assistant) response in an OpenAI-compatible
1266
+ * chat completion request.
1267
+ */
1268
+ export interface OpenAIAssistantMessageParamOutput {
1269
+ /**
1270
+ * The content of the model's response.
1271
+ */
1272
+ content?:
1273
+ | string
1274
+ | Array<OpenAIAssistantMessageParamOutput.ListOpenAIChatCompletionContentPartTextParam>
1275
+ | null;
1276
+
1277
+ /**
1278
+ * The name of the assistant message participant.
1279
+ */
1280
+ name?: string | null;
1281
+
1282
+ /**
1283
+ * Must be 'assistant' to identify this as the model's response.
1284
+ */
1285
+ role?: 'assistant';
1286
+
1287
+ /**
1288
+ * List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object.
1289
+ */
1290
+ tool_calls?: Array<OpenAIAssistantMessageParamOutput.ToolCall> | null;
1291
+ }
1292
+
1293
+ export namespace OpenAIAssistantMessageParamOutput {
1294
+ /**
1295
+ * Text content part for OpenAI-compatible chat completion messages.
1296
+ */
1297
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1298
+ /**
1299
+ * The text content of the message.
1300
+ */
1301
+ text: string;
1302
+
1303
+ /**
1304
+ * Must be 'text' to identify this as text content.
1305
+ */
1306
+ type?: 'text';
1307
+ }
1308
+
1309
+ /**
1310
+ * Tool call specification for OpenAI-compatible chat completion responses.
1311
+ */
1312
+ export interface ToolCall {
1313
+ /**
1314
+ * Unique identifier for the tool call.
1315
+ */
1316
+ id?: string | null;
1317
+
1318
+ /**
1319
+ * Function call details for OpenAI-compatible tool calls.
1320
+ */
1321
+ function?: ToolCall.Function | null;
1322
+
1323
+ /**
1324
+ * Index of the tool call in the list.
1325
+ */
1326
+ index?: number | null;
1327
+
1328
+ /**
1329
+ * Must be 'function' to identify this as a function call.
1330
+ */
1331
+ type?: 'function';
1332
+ }
1333
+
1334
+ export namespace ToolCall {
1335
+ /**
1336
+ * Function call details for OpenAI-compatible tool calls.
1337
+ */
1338
+ export interface Function {
1339
+ /**
1340
+ * Arguments to pass to the function as a JSON string.
1341
+ */
1342
+ arguments?: string | null;
1343
+
1344
+ /**
1345
+ * Name of the function to call.
1346
+ */
1347
+ name?: string | null;
1348
+ }
1349
+ }
1350
+ }
1351
+
1352
+ /**
1353
+ * A message representing the result of a tool invocation in an OpenAI-compatible
1354
+ * chat completion request.
1355
+ */
1356
+ export interface OpenAIToolMessageParam {
1357
+ /**
1358
+ * The response content from the tool.
1359
+ */
1360
+ content: string | Array<OpenAIToolMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
1361
+
1362
+ /**
1363
+ * Unique identifier for the tool call this response is for.
1364
+ */
1365
+ tool_call_id: string;
1366
+
1367
+ /**
1368
+ * Must be 'tool' to identify this as a tool response.
1369
+ */
1370
+ role?: 'tool';
1371
+ }
1372
+
1373
+ export namespace OpenAIToolMessageParam {
1374
+ /**
1375
+ * Text content part for OpenAI-compatible chat completion messages.
1376
+ */
1377
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1378
+ /**
1379
+ * The text content of the message.
1380
+ */
1381
+ text: string;
1382
+
1383
+ /**
1384
+ * Must be 'text' to identify this as text content.
1385
+ */
1386
+ type?: 'text';
1387
+ }
1388
+ }
1389
+
1390
+ /**
1391
+ * A message from the developer in an OpenAI-compatible chat completion request.
1392
+ */
1393
+ export interface OpenAIDeveloperMessageParam {
1394
+ /**
1395
+ * The content of the developer message.
1396
+ */
1397
+ content: string | Array<OpenAIDeveloperMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
1398
+
1399
+ /**
1400
+ * The name of the developer message participant.
1401
+ */
1402
+ name?: string | null;
1403
+
1404
+ /**
1405
+ * Must be 'developer' to identify this as a developer message.
1406
+ */
1407
+ role?: 'developer';
1408
+ }
1409
+
1410
+ export namespace OpenAIDeveloperMessageParam {
1411
+ /**
1412
+ * Text content part for OpenAI-compatible chat completion messages.
1413
+ */
1414
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1415
+ /**
1416
+ * The text content of the message.
1417
+ */
1418
+ text: string;
1419
+
1420
+ /**
1421
+ * Must be 'text' to identify this as text content.
1422
+ */
1423
+ type?: 'text';
1424
+ }
1425
+ }
1426
+
1427
+ /**
1428
+ * Usage information for OpenAI chat completion.
1429
+ */
1430
+ export interface Usage {
1431
+ /**
1432
+ * Number of tokens in the completion.
1433
+ */
1434
+ completion_tokens: number;
1435
+
1436
+ /**
1437
+ * Number of tokens in the prompt.
1438
+ */
1439
+ prompt_tokens: number;
1440
+
1441
+ /**
1442
+ * Total tokens used (prompt + completion).
1443
+ */
1444
+ total_tokens: number;
1445
+
1446
+ /**
1447
+ * Token details for output tokens in OpenAI chat completion usage.
1448
+ */
1449
+ completion_tokens_details?: Usage.CompletionTokensDetails | null;
1450
+
1451
+ /**
1452
+ * Token details for prompt tokens in OpenAI chat completion usage.
1453
+ */
1454
+ prompt_tokens_details?: Usage.PromptTokensDetails | null;
1455
+ }
1456
+
1457
+ export namespace Usage {
1458
+ /**
1459
+ * Token details for output tokens in OpenAI chat completion usage.
1460
+ */
1461
+ export interface CompletionTokensDetails {
1462
+ /**
1463
+ * Number of tokens used for reasoning (o1/o3 models).
1464
+ */
1465
+ reasoning_tokens?: number | null;
1466
+ }
1467
+
1468
+ /**
1469
+ * Token details for prompt tokens in OpenAI chat completion usage.
1470
+ */
1471
+ export interface PromptTokensDetails {
1472
+ /**
1473
+ * Number of tokens retrieved from cache.
1474
+ */
1475
+ cached_tokens?: number | null;
1476
+ }
1477
+ }
1478
+ }
1479
+
1480
+ /**
1481
+ * Response from listing OpenAI-compatible chat completions.
1482
+ */
1483
+ export interface CompletionListResponse {
1484
+ /**
1485
+ * List of chat completion objects with their input messages.
1486
+ */
1487
+ data: Array<CompletionListResponse.Data>;
1488
+
1489
+ /**
1490
+ * ID of the first completion in this list.
1491
+ */
1492
+ first_id: string;
1493
+
1494
+ /**
1495
+ * Whether there are more completions available beyond this list.
1496
+ */
1497
+ has_more: boolean;
1498
+
1499
+ /**
1500
+ * ID of the last completion in this list.
1501
+ */
1502
+ last_id: string;
1503
+
1504
+ /**
1505
+ * Must be 'list' to identify this as a list response.
1506
+ */
1507
+ object?: 'list';
1508
+ }
1509
+
1510
+ export namespace CompletionListResponse {
1511
+ export interface Data {
1512
+ /**
1513
+ * The ID of the chat completion.
1514
+ */
1515
+ id: string;
1516
+
1517
+ /**
1518
+ * List of choices.
1519
+ */
1520
+ choices: Array<Data.Choice>;
1521
+
1522
+ /**
1523
+ * The Unix timestamp in seconds when the chat completion was created.
1524
+ */
1525
+ created: number;
1526
+
1527
+ /**
1528
+ * The input messages used to generate this completion.
1529
+ */
1530
+ input_messages: Array<
1531
+ | Data.OpenAIUserMessageParamOutput
1532
+ | Data.OpenAISystemMessageParam
1533
+ | Data.OpenAIAssistantMessageParamOutput
1534
+ | Data.OpenAIToolMessageParam
1535
+ | Data.OpenAIDeveloperMessageParam
1536
+ >;
1537
+
1538
+ /**
1539
+ * The model that was used to generate the chat completion.
1540
+ */
1541
+ model: string;
1542
+
1543
+ /**
1544
+ * The object type.
1545
+ */
1546
+ object?: 'chat.completion';
1547
+
1548
+ /**
1549
+ * Usage information for OpenAI chat completion.
1550
+ */
1551
+ usage?: Data.Usage | null;
1552
+ }
1553
+
1554
+ export namespace Data {
1555
+ /**
1556
+ * A choice from an OpenAI-compatible chat completion response.
1557
+ */
1558
+ export interface Choice {
1559
+ /**
1560
+ * The reason the model stopped generating.
1561
+ */
1562
+ finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
1563
+
1564
+ /**
1565
+ * The index of the choice.
1566
+ */
1567
+ index: number;
1568
+
1569
+ /**
1570
+ * The message from the model.
1571
+ */
1572
+ message:
1573
+ | Choice.OpenAIUserMessageParamOutput
1574
+ | Choice.OpenAISystemMessageParam
1575
+ | Choice.OpenAIAssistantMessageParamOutput
1576
+ | Choice.OpenAIToolMessageParam
1577
+ | Choice.OpenAIDeveloperMessageParam;
1578
+
1579
+ /**
1580
+ * The log probabilities for the tokens in the message from an OpenAI-compatible
1581
+ * chat completion response.
1582
+ */
1583
+ logprobs?: Choice.Logprobs | null;
1584
+ }
1585
+
1586
+ export namespace Choice {
1587
+ /**
1588
+ * A message from the user in an OpenAI-compatible chat completion request.
1589
+ */
1590
+ export interface OpenAIUserMessageParamOutput {
1591
+ /**
1592
+ * The content of the message, which can include text and other media.
1593
+ */
1594
+ content:
1595
+ | string
1596
+ | Array<
1597
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartTextParam
1598
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartImageParam
1599
+ | OpenAIUserMessageParamOutput.OpenAIFile
1600
+ >;
1601
+
1602
+ /**
1603
+ * The name of the user message participant.
1604
+ */
1605
+ name?: string | null;
1606
+
1607
+ /**
1608
+ * Must be 'user' to identify this as a user message.
1609
+ */
1610
+ role?: 'user';
1611
+ }
1612
+
1613
+ export namespace OpenAIUserMessageParamOutput {
1614
+ /**
1615
+ * Text content part for OpenAI-compatible chat completion messages.
1616
+ */
1617
+ export interface OpenAIChatCompletionContentPartTextParam {
1618
+ /**
1619
+ * The text content of the message.
1620
+ */
1621
+ text: string;
1622
+
1623
+ /**
1624
+ * Must be 'text' to identify this as text content.
1625
+ */
1626
+ type?: 'text';
1627
+ }
1628
+
1629
+ /**
1630
+ * Image content part for OpenAI-compatible chat completion messages.
1631
+ */
1632
+ export interface OpenAIChatCompletionContentPartImageParam {
1633
+ /**
1634
+ * Image URL specification and processing details.
1635
+ */
1636
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
1637
+
1638
+ /**
1639
+ * Must be 'image_url' to identify this as image content.
1640
+ */
1641
+ type?: 'image_url';
1642
+ }
1643
+
1644
+ export namespace OpenAIChatCompletionContentPartImageParam {
1645
+ /**
1646
+ * Image URL specification and processing details.
1647
+ */
1648
+ export interface ImageURL {
1649
+ /**
1650
+ * URL of the image to include in the message.
1651
+ */
1652
+ url: string;
1653
+
1654
+ /**
1655
+ * Level of detail for image processing. Can be 'low', 'high', or 'auto'.
1656
+ */
1657
+ detail?: 'low' | 'high' | 'auto' | null;
1658
+ }
1659
+ }
1660
+
1661
+ export interface OpenAIFile {
1662
+ /**
1663
+ * File specification.
1664
+ */
1665
+ file: OpenAIFile.File;
1666
+
1667
+ /**
1668
+ * Must be 'file' to identify this as file content.
1669
+ */
1670
+ type?: 'file';
1671
+ }
1672
+
1673
+ export namespace OpenAIFile {
1674
+ /**
1675
+ * File specification.
1676
+ */
1677
+ export interface File {
1678
+ /**
1679
+ * Base64-encoded file data.
1680
+ */
1681
+ file_data?: string | null;
1682
+
1683
+ /**
1684
+ * ID of an uploaded file.
1685
+ */
1686
+ file_id?: string | null;
1687
+
1688
+ /**
1689
+ * Name of the file.
1690
+ */
1691
+ filename?: string | null;
1692
+ }
1693
+ }
1694
+ }
1695
+
1696
+ /**
1697
+ * A system message providing instructions or context to the model.
1698
+ */
1699
+ export interface OpenAISystemMessageParam {
1700
+ /**
1701
+ * The content of the 'system prompt'. If multiple system messages are provided,
1702
+ * they are concatenated.
1703
+ */
1704
+ content: string | Array<OpenAISystemMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
1705
+
1706
+ /**
1707
+ * The name of the system message participant.
1708
+ */
1709
+ name?: string | null;
1710
+
1711
+ /**
1712
+ * Must be 'system' to identify this as a system message.
1713
+ */
1714
+ role?: 'system';
1715
+ }
1716
+
1717
+ export namespace OpenAISystemMessageParam {
1718
+ /**
1719
+ * Text content part for OpenAI-compatible chat completion messages.
1720
+ */
1721
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1722
+ /**
1723
+ * The text content of the message.
1724
+ */
1725
+ text: string;
1726
+
1727
+ /**
1728
+ * Must be 'text' to identify this as text content.
1729
+ */
1730
+ type?: 'text';
1731
+ }
1732
+ }
1733
+
1734
+ /**
1735
+ * A message containing the model's (assistant) response in an OpenAI-compatible
1736
+ * chat completion request.
1737
+ */
1738
+ export interface OpenAIAssistantMessageParamOutput {
1739
+ /**
1740
+ * The content of the model's response.
1741
+ */
1742
+ content?:
1743
+ | string
1744
+ | Array<OpenAIAssistantMessageParamOutput.ListOpenAIChatCompletionContentPartTextParam>
1745
+ | null;
1746
+
1747
+ /**
1748
+ * The name of the assistant message participant.
1749
+ */
1750
+ name?: string | null;
1751
+
1752
+ /**
1753
+ * Must be 'assistant' to identify this as the model's response.
1754
+ */
1755
+ role?: 'assistant';
1756
+
1757
+ /**
1758
+ * List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object.
1759
+ */
1760
+ tool_calls?: Array<OpenAIAssistantMessageParamOutput.ToolCall> | null;
1761
+ }
1762
+
1763
+ export namespace OpenAIAssistantMessageParamOutput {
1764
+ /**
1765
+ * Text content part for OpenAI-compatible chat completion messages.
1766
+ */
1767
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1768
+ /**
1769
+ * The text content of the message.
1770
+ */
1771
+ text: string;
1772
+
1773
+ /**
1774
+ * Must be 'text' to identify this as text content.
1775
+ */
1776
+ type?: 'text';
1777
+ }
1778
+
1779
+ /**
1780
+ * Tool call specification for OpenAI-compatible chat completion responses.
1781
+ */
1782
+ export interface ToolCall {
1783
+ /**
1784
+ * Unique identifier for the tool call.
1785
+ */
1786
+ id?: string | null;
1787
+
1788
+ /**
1789
+ * Function call details for OpenAI-compatible tool calls.
1790
+ */
1791
+ function?: ToolCall.Function | null;
1792
+
1793
+ /**
1794
+ * Index of the tool call in the list.
1795
+ */
1796
+ index?: number | null;
1797
+
1798
+ /**
1799
+ * Must be 'function' to identify this as a function call.
1800
+ */
1801
+ type?: 'function';
1802
+ }
1803
+
1804
+ export namespace ToolCall {
1805
+ /**
1806
+ * Function call details for OpenAI-compatible tool calls.
1807
+ */
1808
+ export interface Function {
1809
+ /**
1810
+ * Arguments to pass to the function as a JSON string.
1811
+ */
1812
+ arguments?: string | null;
1813
+
1814
+ /**
1815
+ * Name of the function to call.
1816
+ */
1817
+ name?: string | null;
1818
+ }
1819
+ }
1820
+ }
1821
+
1822
+ /**
1823
+ * A message representing the result of a tool invocation in an OpenAI-compatible
1824
+ * chat completion request.
1825
+ */
1826
+ export interface OpenAIToolMessageParam {
1827
+ /**
1828
+ * The response content from the tool.
1829
+ */
1830
+ content: string | Array<OpenAIToolMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
1831
+
1832
+ /**
1833
+ * Unique identifier for the tool call this response is for.
1834
+ */
1835
+ tool_call_id: string;
1836
+
1837
+ /**
1838
+ * Must be 'tool' to identify this as a tool response.
1839
+ */
1840
+ role?: 'tool';
1841
+ }
1842
+
1843
+ export namespace OpenAIToolMessageParam {
1844
+ /**
1845
+ * Text content part for OpenAI-compatible chat completion messages.
1846
+ */
1847
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1848
+ /**
1849
+ * The text content of the message.
1850
+ */
1851
+ text: string;
1852
+
1853
+ /**
1854
+ * Must be 'text' to identify this as text content.
1855
+ */
1856
+ type?: 'text';
1857
+ }
1858
+ }
1859
+
1860
+ /**
1861
+ * A message from the developer in an OpenAI-compatible chat completion request.
1862
+ */
1863
+ export interface OpenAIDeveloperMessageParam {
1864
+ /**
1865
+ * The content of the developer message.
1866
+ */
1867
+ content: string | Array<OpenAIDeveloperMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
1868
+
1869
+ /**
1870
+ * The name of the developer message participant.
1871
+ */
1872
+ name?: string | null;
1873
+
1874
+ /**
1875
+ * Must be 'developer' to identify this as a developer message.
1876
+ */
1877
+ role?: 'developer';
1878
+ }
1879
+
1880
+ export namespace OpenAIDeveloperMessageParam {
1881
+ /**
1882
+ * Text content part for OpenAI-compatible chat completion messages.
1883
+ */
1884
+ export interface ListOpenAIChatCompletionContentPartTextParam {
1885
+ /**
1886
+ * The text content of the message.
1887
+ */
1888
+ text: string;
1889
+
1890
+ /**
1891
+ * Must be 'text' to identify this as text content.
1892
+ */
1893
+ type?: 'text';
1894
+ }
1895
+ }
1896
+
1897
+ /**
1898
+ * The log probabilities for the tokens in the message from an OpenAI-compatible
1899
+ * chat completion response.
1900
+ */
1901
+ export interface Logprobs {
1902
+ /**
1903
+ * The log probabilities for the tokens in the message.
1904
+ */
1905
+ content?: Array<Logprobs.Content> | null;
1906
+
1907
+ /**
1908
+ * The log probabilities for the refusal tokens.
1909
+ */
1910
+ refusal?: Array<Logprobs.Refusal> | null;
1911
+ }
1912
+
1913
+ export namespace Logprobs {
1914
+ /**
1915
+ * The log probability for a token from an OpenAI-compatible chat completion
1916
+ * response.
1917
+ */
1918
+ export interface Content {
1919
+ /**
1920
+ * The token.
1921
+ */
1922
+ token: string;
1923
+
1924
+ /**
1925
+ * The log probability of the token.
1926
+ */
1927
+ logprob: number;
1928
+
1929
+ /**
1930
+ * The bytes for the token.
1931
+ */
1932
+ bytes?: Array<number> | null;
1933
+
1934
+ /**
1935
+ * The top log probabilities for the token.
1936
+ */
1937
+ top_logprobs?: Array<Content.TopLogprob> | null;
1938
+ }
1939
+
1940
+ export namespace Content {
1941
+ /**
1942
+ * The top log probability for a token from an OpenAI-compatible chat completion
1943
+ * response.
1944
+ */
1945
+ export interface TopLogprob {
1946
+ /**
1947
+ * The token.
1948
+ */
1949
+ token: string;
1950
+
1951
+ /**
1952
+ * The log probability of the token.
1953
+ */
1954
+ logprob: number;
1955
+
1956
+ /**
1957
+ * The bytes for the token.
1958
+ */
1959
+ bytes?: Array<number> | null;
1960
+ }
1961
+ }
1962
+
1963
+ /**
1964
+ * The log probability for a token from an OpenAI-compatible chat completion
1965
+ * response.
1966
+ */
1967
+ export interface Refusal {
1968
+ /**
1969
+ * The token.
1970
+ */
1971
+ token: string;
1972
+
1973
+ /**
1974
+ * The log probability of the token.
1975
+ */
1976
+ logprob: number;
1977
+
1978
+ /**
1979
+ * The bytes for the token.
1980
+ */
1981
+ bytes?: Array<number> | null;
1982
+
1983
+ /**
1984
+ * The top log probabilities for the token.
1985
+ */
1986
+ top_logprobs?: Array<Refusal.TopLogprob> | null;
1987
+ }
1988
+
1989
+ export namespace Refusal {
1990
+ /**
1991
+ * The top log probability for a token from an OpenAI-compatible chat completion
1992
+ * response.
1993
+ */
1994
+ export interface TopLogprob {
1995
+ /**
1996
+ * The token.
1997
+ */
1998
+ token: string;
1999
+
2000
+ /**
2001
+ * The log probability of the token.
2002
+ */
2003
+ logprob: number;
2004
+
2005
+ /**
2006
+ * The bytes for the token.
2007
+ */
2008
+ bytes?: Array<number> | null;
2009
+ }
2010
+ }
2011
+ }
2012
+ }
2013
+
2014
+ /**
2015
+ * A message from the user in an OpenAI-compatible chat completion request.
2016
+ */
2017
+ export interface OpenAIUserMessageParamOutput {
2018
+ /**
2019
+ * The content of the message, which can include text and other media.
2020
+ */
2021
+ content:
2022
+ | string
2023
+ | Array<
2024
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartTextParam
2025
+ | OpenAIUserMessageParamOutput.OpenAIChatCompletionContentPartImageParam
2026
+ | OpenAIUserMessageParamOutput.OpenAIFile
2027
+ >;
2028
+
2029
+ /**
2030
+ * The name of the user message participant.
2031
+ */
2032
+ name?: string | null;
2033
+
2034
+ /**
2035
+ * Must be 'user' to identify this as a user message.
2036
+ */
2037
+ role?: 'user';
2038
+ }
2039
+
2040
+ export namespace OpenAIUserMessageParamOutput {
2041
+ /**
2042
+ * Text content part for OpenAI-compatible chat completion messages.
2043
+ */
2044
+ export interface OpenAIChatCompletionContentPartTextParam {
2045
+ /**
2046
+ * The text content of the message.
2047
+ */
2048
+ text: string;
2049
+
2050
+ /**
2051
+ * Must be 'text' to identify this as text content.
2052
+ */
2053
+ type?: 'text';
2054
+ }
2055
+
2056
+ /**
2057
+ * Image content part for OpenAI-compatible chat completion messages.
2058
+ */
2059
+ export interface OpenAIChatCompletionContentPartImageParam {
2060
+ /**
2061
+ * Image URL specification and processing details.
2062
+ */
2063
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
2064
+
2065
+ /**
2066
+ * Must be 'image_url' to identify this as image content.
2067
+ */
2068
+ type?: 'image_url';
2069
+ }
2070
+
2071
+ export namespace OpenAIChatCompletionContentPartImageParam {
2072
+ /**
2073
+ * Image URL specification and processing details.
2074
+ */
2075
+ export interface ImageURL {
2076
+ /**
2077
+ * URL of the image to include in the message.
2078
+ */
2079
+ url: string;
2080
+
2081
+ /**
2082
+ * Level of detail for image processing. Can be 'low', 'high', or 'auto'.
2083
+ */
2084
+ detail?: 'low' | 'high' | 'auto' | null;
2085
+ }
2086
+ }
2087
+
2088
+ export interface OpenAIFile {
2089
+ /**
2090
+ * File specification.
2091
+ */
2092
+ file: OpenAIFile.File;
2093
+
2094
+ /**
2095
+ * Must be 'file' to identify this as file content.
2096
+ */
2097
+ type?: 'file';
2098
+ }
2099
+
2100
+ export namespace OpenAIFile {
2101
+ /**
2102
+ * File specification.
2103
+ */
2104
+ export interface File {
2105
+ /**
2106
+ * Base64-encoded file data.
2107
+ */
2108
+ file_data?: string | null;
2109
+
2110
+ /**
2111
+ * ID of an uploaded file.
2112
+ */
2113
+ file_id?: string | null;
2114
+
2115
+ /**
2116
+ * Name of the file.
2117
+ */
2118
+ filename?: string | null;
2119
+ }
2120
+ }
2121
+ }
2122
+
2123
+ /**
2124
+ * A system message providing instructions or context to the model.
2125
+ */
2126
+ export interface OpenAISystemMessageParam {
2127
+ /**
2128
+ * The content of the 'system prompt'. If multiple system messages are provided,
2129
+ * they are concatenated.
2130
+ */
2131
+ content: string | Array<OpenAISystemMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
2132
+
2133
+ /**
2134
+ * The name of the system message participant.
2135
+ */
2136
+ name?: string | null;
2137
+
2138
+ /**
2139
+ * Must be 'system' to identify this as a system message.
2140
+ */
2141
+ role?: 'system';
2142
+ }
2143
+
2144
+ export namespace OpenAISystemMessageParam {
2145
+ /**
2146
+ * Text content part for OpenAI-compatible chat completion messages.
2147
+ */
2148
+ export interface ListOpenAIChatCompletionContentPartTextParam {
2149
+ /**
2150
+ * The text content of the message.
2151
+ */
2152
+ text: string;
2153
+
2154
+ /**
2155
+ * Must be 'text' to identify this as text content.
2156
+ */
2157
+ type?: 'text';
2158
+ }
2159
+ }
2160
+
2161
+ /**
2162
+ * A message containing the model's (assistant) response in an OpenAI-compatible
2163
+ * chat completion request.
2164
+ */
2165
+ export interface OpenAIAssistantMessageParamOutput {
2166
+ /**
2167
+ * The content of the model's response.
2168
+ */
2169
+ content?:
2170
+ | string
2171
+ | Array<OpenAIAssistantMessageParamOutput.ListOpenAIChatCompletionContentPartTextParam>
2172
+ | null;
2173
+
2174
+ /**
2175
+ * The name of the assistant message participant.
2176
+ */
2177
+ name?: string | null;
2178
+
2179
+ /**
2180
+ * Must be 'assistant' to identify this as the model's response.
2181
+ */
2182
+ role?: 'assistant';
2183
+
2184
+ /**
2185
+ * List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object.
2186
+ */
2187
+ tool_calls?: Array<OpenAIAssistantMessageParamOutput.ToolCall> | null;
2188
+ }
2189
+
2190
+ export namespace OpenAIAssistantMessageParamOutput {
2191
+ /**
2192
+ * Text content part for OpenAI-compatible chat completion messages.
2193
+ */
2194
+ export interface ListOpenAIChatCompletionContentPartTextParam {
2195
+ /**
2196
+ * The text content of the message.
2197
+ */
2198
+ text: string;
2199
+
2200
+ /**
2201
+ * Must be 'text' to identify this as text content.
2202
+ */
2203
+ type?: 'text';
2204
+ }
2205
+
2206
+ /**
2207
+ * Tool call specification for OpenAI-compatible chat completion responses.
2208
+ */
2209
+ export interface ToolCall {
2210
+ /**
2211
+ * Unique identifier for the tool call.
2212
+ */
2213
+ id?: string | null;
2214
+
2215
+ /**
2216
+ * Function call details for OpenAI-compatible tool calls.
2217
+ */
2218
+ function?: ToolCall.Function | null;
2219
+
2220
+ /**
2221
+ * Index of the tool call in the list.
2222
+ */
2223
+ index?: number | null;
2224
+
2225
+ /**
2226
+ * Must be 'function' to identify this as a function call.
2227
+ */
2228
+ type?: 'function';
2229
+ }
2230
+
2231
+ export namespace ToolCall {
2232
+ /**
2233
+ * Function call details for OpenAI-compatible tool calls.
2234
+ */
2235
+ export interface Function {
2236
+ /**
2237
+ * Arguments to pass to the function as a JSON string.
2238
+ */
2239
+ arguments?: string | null;
2240
+
2241
+ /**
2242
+ * Name of the function to call.
2243
+ */
2244
+ name?: string | null;
2245
+ }
2246
+ }
2247
+ }
2248
+
2249
+ /**
2250
+ * A message representing the result of a tool invocation in an OpenAI-compatible
2251
+ * chat completion request.
2252
+ */
2253
+ export interface OpenAIToolMessageParam {
2254
+ /**
2255
+ * The response content from the tool.
2256
+ */
2257
+ content: string | Array<OpenAIToolMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
2258
+
2259
+ /**
2260
+ * Unique identifier for the tool call this response is for.
2261
+ */
2262
+ tool_call_id: string;
2263
+
2264
+ /**
2265
+ * Must be 'tool' to identify this as a tool response.
2266
+ */
2267
+ role?: 'tool';
2268
+ }
2269
+
2270
+ export namespace OpenAIToolMessageParam {
2271
+ /**
2272
+ * Text content part for OpenAI-compatible chat completion messages.
2273
+ */
2274
+ export interface ListOpenAIChatCompletionContentPartTextParam {
2275
+ /**
2276
+ * The text content of the message.
2277
+ */
2278
+ text: string;
2279
+
2280
+ /**
2281
+ * Must be 'text' to identify this as text content.
2282
+ */
2283
+ type?: 'text';
2284
+ }
2285
+ }
2286
+
2287
+ /**
2288
+ * A message from the developer in an OpenAI-compatible chat completion request.
2289
+ */
2290
+ export interface OpenAIDeveloperMessageParam {
2291
+ /**
2292
+ * The content of the developer message.
2293
+ */
2294
+ content: string | Array<OpenAIDeveloperMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
2295
+
2296
+ /**
2297
+ * The name of the developer message participant.
2298
+ */
2299
+ name?: string | null;
2300
+
2301
+ /**
2302
+ * Must be 'developer' to identify this as a developer message.
2303
+ */
2304
+ role?: 'developer';
2305
+ }
2306
+
2307
+ export namespace OpenAIDeveloperMessageParam {
2308
+ /**
2309
+ * Text content part for OpenAI-compatible chat completion messages.
2310
+ */
2311
+ export interface ListOpenAIChatCompletionContentPartTextParam {
2312
+ /**
2313
+ * The text content of the message.
2314
+ */
2315
+ text: string;
2316
+
2317
+ /**
2318
+ * Must be 'text' to identify this as text content.
2319
+ */
2320
+ type?: 'text';
2321
+ }
2322
+ }
2323
+
2324
+ /**
2325
+ * Usage information for OpenAI chat completion.
2326
+ */
2327
+ export interface Usage {
2328
+ /**
2329
+ * Number of tokens in the completion.
2330
+ */
2331
+ completion_tokens: number;
2332
+
2333
+ /**
2334
+ * Number of tokens in the prompt.
2335
+ */
2336
+ prompt_tokens: number;
2337
+
2338
+ /**
2339
+ * Total tokens used (prompt + completion).
2340
+ */
2341
+ total_tokens: number;
2342
+
2343
+ /**
2344
+ * Token details for output tokens in OpenAI chat completion usage.
2345
+ */
2346
+ completion_tokens_details?: Usage.CompletionTokensDetails | null;
2347
+
2348
+ /**
2349
+ * Token details for prompt tokens in OpenAI chat completion usage.
2350
+ */
2351
+ prompt_tokens_details?: Usage.PromptTokensDetails | null;
2352
+ }
2353
+
2354
+ export namespace Usage {
2355
+ /**
2356
+ * Token details for output tokens in OpenAI chat completion usage.
2357
+ */
2358
+ export interface CompletionTokensDetails {
2359
+ /**
2360
+ * Number of tokens used for reasoning (o1/o3 models).
2361
+ */
2362
+ reasoning_tokens?: number | null;
2363
+ }
2364
+
2365
+ /**
2366
+ * Token details for prompt tokens in OpenAI chat completion usage.
2367
+ */
2368
+ export interface PromptTokensDetails {
2369
+ /**
2370
+ * Number of tokens retrieved from cache.
2371
+ */
2372
+ cached_tokens?: number | null;
2373
+ }
2374
+ }
2375
+ }
2376
+ }
2377
+
2378
+ export type CompletionCreateParams = CompletionCreateParamsNonStreaming | CompletionCreateParamsStreaming;
2379
+
2380
+ export interface CompletionCreateParamsBase {
2381
+ /**
2382
+ * List of messages in the conversation.
2383
+ */
2384
+ messages: Array<
2385
+ | CompletionCreateParams.OpenAIUserMessageParamInput
2386
+ | CompletionCreateParams.OpenAISystemMessageParam
2387
+ | CompletionCreateParams.OpenAIAssistantMessageParamInput
2388
+ | CompletionCreateParams.OpenAIToolMessageParam
2389
+ | CompletionCreateParams.OpenAIDeveloperMessageParam
2390
+ >;
2391
+
2392
+ /**
2393
+ * The identifier of the model to use.
2394
+ */
2395
+ model: string;
2396
+
2397
+ /**
2398
+ * The penalty for repeated tokens.
2399
+ */
2400
+ frequency_penalty?: number | null;
2401
+
2402
+ /**
2403
+ * The function call to use.
2404
+ */
2405
+ function_call?: string | { [key: string]: unknown } | null;
2406
+
2407
+ /**
2408
+ * List of functions to use.
2409
+ */
2410
+ functions?: Array<{ [key: string]: unknown }> | null;
2411
+
2412
+ /**
2413
+ * The logit bias to use.
2414
+ */
2415
+ logit_bias?: { [key: string]: number } | null;
2416
+
2417
+ /**
2418
+ * The log probabilities to use.
2419
+ */
2420
+ logprobs?: boolean | null;
2421
+
2422
+ /**
2423
+ * The maximum number of tokens to generate.
2424
+ */
2425
+ max_completion_tokens?: number | null;
2426
+
2427
+ /**
2428
+ * The maximum number of tokens to generate.
2429
+ */
2430
+ max_tokens?: number | null;
2431
+
2432
+ /**
2433
+ * The number of completions to generate.
2434
+ */
2435
+ n?: number | null;
2436
+
2437
+ /**
2438
+ * Whether to parallelize tool calls.
2439
+ */
2440
+ parallel_tool_calls?: boolean | null;
2441
+
2442
+ /**
2443
+ * The penalty for repeated tokens.
2444
+ */
2445
+ presence_penalty?: number | null;
2446
+
2447
+ /**
2448
+ * The effort level for reasoning models.
2449
+ */
2450
+ reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null;
2451
+
2452
+ /**
2453
+ * The response format to use.
2454
+ */
2455
+ response_format?:
2456
+ | CompletionCreateParams.OpenAIResponseFormatText
2457
+ | CompletionCreateParams.OpenAIResponseFormatJsonSchema
2458
+ | CompletionCreateParams.OpenAIResponseFormatJsonObject
2459
+ | null;
2460
+
2461
+ /**
2462
+ * A stable identifier used for safety monitoring and abuse detection.
2463
+ */
2464
+ safety_identifier?: string | null;
2465
+
2466
+ /**
2467
+ * The seed to use.
2468
+ */
2469
+ seed?: number | null;
2470
+
2471
+ /**
2472
+ * The stop tokens to use.
2473
+ */
2474
+ stop?: string | Array<string> | null;
2475
+
2476
+ /**
2477
+ * Whether to stream the response.
2478
+ */
2479
+ stream?: boolean | null;
2480
+
2481
+ /**
2482
+ * The stream options to use.
2483
+ */
2484
+ stream_options?: { [key: string]: unknown } | null;
2485
+
2486
+ /**
2487
+ * The temperature to use.
2488
+ */
2489
+ temperature?: number | null;
2490
+
2491
+ /**
2492
+ * The tool choice to use.
2493
+ */
2494
+ tool_choice?: string | { [key: string]: unknown } | null;
2495
+
2496
+ /**
2497
+ * The tools to use.
2498
+ */
2499
+ tools?: Array<{ [key: string]: unknown }> | null;
2500
+
2501
+ /**
2502
+ * The top log probabilities to use.
2503
+ */
2504
+ top_logprobs?: number | null;
2505
+
2506
+ /**
2507
+ * The top p to use.
2508
+ */
2509
+ top_p?: number | null;
2510
+
2511
+ /**
2512
+ * The user to use.
2513
+ */
2514
+ user?: string | null;
2515
+
2516
+ [k: string]: unknown;
2517
+ }
2518
+
2519
+ export namespace CompletionCreateParams {
2520
+ /**
2521
+ * A message from the user in an OpenAI-compatible chat completion request.
2522
+ */
2523
+ export interface OpenAIUserMessageParamInput {
2524
+ /**
2525
+ * The content of the message, which can include text and other media.
2526
+ */
2527
+ content:
2528
+ | string
2529
+ | Array<
2530
+ | OpenAIUserMessageParamInput.OpenAIChatCompletionContentPartTextParam
2531
+ | OpenAIUserMessageParamInput.OpenAIChatCompletionContentPartImageParam
2532
+ | OpenAIUserMessageParamInput.OpenAIFile
2533
+ >;
2534
+
2535
+ /**
2536
+ * The name of the user message participant.
2537
+ */
2538
+ name?: string | null;
2539
+
2540
+ /**
2541
+ * Must be 'user' to identify this as a user message.
2542
+ */
2543
+ role?: 'user';
2544
+ }
2545
+
2546
+ export namespace OpenAIUserMessageParamInput {
2547
+ /**
2548
+ * Text content part for OpenAI-compatible chat completion messages.
2549
+ */
2550
+ export interface OpenAIChatCompletionContentPartTextParam {
2551
+ /**
2552
+ * The text content of the message.
2553
+ */
2554
+ text: string;
2555
+
2556
+ /**
2557
+ * Must be 'text' to identify this as text content.
2558
+ */
2559
+ type?: 'text';
2560
+ }
2561
+
2562
+ /**
2563
+ * Image content part for OpenAI-compatible chat completion messages.
2564
+ */
2565
+ export interface OpenAIChatCompletionContentPartImageParam {
2566
+ /**
2567
+ * Image URL specification and processing details.
2568
+ */
2569
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
2570
+
2571
+ /**
2572
+ * Must be 'image_url' to identify this as image content.
2573
+ */
2574
+ type?: 'image_url';
2575
+ }
2576
+
2577
+ export namespace OpenAIChatCompletionContentPartImageParam {
2578
+ /**
2579
+ * Image URL specification and processing details.
2580
+ */
2581
+ export interface ImageURL {
2582
+ /**
2583
+ * URL of the image to include in the message.
2584
+ */
2585
+ url: string;
2586
+
2587
+ /**
2588
+ * Level of detail for image processing. Can be 'low', 'high', or 'auto'.
2589
+ */
2590
+ detail?: 'low' | 'high' | 'auto' | null;
2591
+ }
2592
+ }
2593
+
2594
+ export interface OpenAIFile {
2595
+ /**
2596
+ * File specification.
2597
+ */
2598
+ file: OpenAIFile.File;
2599
+
2600
+ /**
2601
+ * Must be 'file' to identify this as file content.
2602
+ */
2603
+ type?: 'file';
2604
+ }
2605
+
2606
+ export namespace OpenAIFile {
2607
+ /**
2608
+ * File specification.
2609
+ */
2610
+ export interface File {
2611
+ /**
2612
+ * Base64-encoded file data.
2613
+ */
2614
+ file_data?: string | null;
2615
+
2616
+ /**
2617
+ * ID of an uploaded file.
2618
+ */
2619
+ file_id?: string | null;
2620
+
2621
+ /**
2622
+ * Name of the file.
2623
+ */
2624
+ filename?: string | null;
2625
+ }
2626
+ }
2627
+ }
2628
+
2629
+ /**
2630
+ * A system message providing instructions or context to the model.
2631
+ */
2632
+ export interface OpenAISystemMessageParam {
2633
+ /**
2634
+ * The content of the 'system prompt'. If multiple system messages are provided,
2635
+ * they are concatenated.
2636
+ */
2637
+ content: string | Array<OpenAISystemMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
2638
+
2639
+ /**
2640
+ * The name of the system message participant.
2641
+ */
2642
+ name?: string | null;
2643
+
2644
+ /**
2645
+ * Must be 'system' to identify this as a system message.
2646
+ */
2647
+ role?: 'system';
2648
+ }
2649
+
2650
+ export namespace OpenAISystemMessageParam {
2651
+ /**
2652
+ * Text content part for OpenAI-compatible chat completion messages.
2653
+ */
2654
+ export interface ListOpenAIChatCompletionContentPartTextParam {
2655
+ /**
2656
+ * The text content of the message.
2657
+ */
2658
+ text: string;
2659
+
2660
+ /**
2661
+ * Must be 'text' to identify this as text content.
2662
+ */
2663
+ type?: 'text';
2664
+ }
2665
+ }
2666
+
2667
+ /**
2668
+ * A message containing the model's (assistant) response in an OpenAI-compatible
2669
+ * chat completion request.
2670
+ */
2671
+ export interface OpenAIAssistantMessageParamInput {
2672
+ /**
2673
+ * The content of the model's response.
2674
+ */
2675
+ content?:
2676
+ | string
2677
+ | Array<OpenAIAssistantMessageParamInput.ListOpenAIChatCompletionContentPartTextParam>
2678
+ | null;
2679
+
2680
+ /**
2681
+ * The name of the assistant message participant.
2682
+ */
2683
+ name?: string | null;
2684
+
2685
+ /**
2686
+ * Must be 'assistant' to identify this as the model's response.
2687
+ */
2688
+ role?: 'assistant';
2689
+
2690
+ /**
2691
+ * List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object.
2692
+ */
2693
+ tool_calls?: Array<OpenAIAssistantMessageParamInput.ToolCall> | null;
2694
+ }
2695
+
2696
+ export namespace OpenAIAssistantMessageParamInput {
2697
+ /**
2698
+ * Text content part for OpenAI-compatible chat completion messages.
2699
+ */
2700
+ export interface ListOpenAIChatCompletionContentPartTextParam {
2701
+ /**
2702
+ * The text content of the message.
2703
+ */
2704
+ text: string;
2705
+
2706
+ /**
2707
+ * Must be 'text' to identify this as text content.
2708
+ */
2709
+ type?: 'text';
2710
+ }
2711
+
2712
+ /**
2713
+ * Tool call specification for OpenAI-compatible chat completion responses.
2714
+ */
2715
+ export interface ToolCall {
2716
+ /**
2717
+ * Unique identifier for the tool call.
2718
+ */
2719
+ id?: string | null;
2720
+
2721
+ /**
2722
+ * Function call details for OpenAI-compatible tool calls.
2723
+ */
2724
+ function?: ToolCall.Function | null;
2725
+
2726
+ /**
2727
+ * Index of the tool call in the list.
2728
+ */
2729
+ index?: number | null;
2730
+
2731
+ /**
2732
+ * Must be 'function' to identify this as a function call.
2733
+ */
2734
+ type?: 'function';
2735
+ }
2736
+
2737
+ export namespace ToolCall {
2738
+ /**
2739
+ * Function call details for OpenAI-compatible tool calls.
2740
+ */
2741
+ export interface Function {
2742
+ /**
2743
+ * Arguments to pass to the function as a JSON string.
2744
+ */
2745
+ arguments?: string | null;
2746
+
2747
+ /**
2748
+ * Name of the function to call.
2749
+ */
2750
+ name?: string | null;
2751
+ }
2752
+ }
2753
+ }
2754
+
2755
+ /**
2756
+ * A message representing the result of a tool invocation in an OpenAI-compatible
2757
+ * chat completion request.
2758
+ */
2759
+ export interface OpenAIToolMessageParam {
2760
+ /**
2761
+ * The response content from the tool.
2762
+ */
2763
+ content: string | Array<OpenAIToolMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
2764
+
2765
+ /**
2766
+ * Unique identifier for the tool call this response is for.
2767
+ */
2768
+ tool_call_id: string;
2769
+
2770
+ /**
2771
+ * Must be 'tool' to identify this as a tool response.
2772
+ */
2773
+ role?: 'tool';
2774
+ }
2775
+
2776
+ export namespace OpenAIToolMessageParam {
2777
+ /**
2778
+ * Text content part for OpenAI-compatible chat completion messages.
2779
+ */
2780
+ export interface ListOpenAIChatCompletionContentPartTextParam {
2781
+ /**
2782
+ * The text content of the message.
2783
+ */
2784
+ text: string;
2785
+
2786
+ /**
2787
+ * Must be 'text' to identify this as text content.
2788
+ */
2789
+ type?: 'text';
2790
+ }
2791
+ }
2792
+
2793
+ /**
2794
+ * A message from the developer in an OpenAI-compatible chat completion request.
2795
+ */
2796
+ export interface OpenAIDeveloperMessageParam {
2797
+ /**
2798
+ * The content of the developer message.
2799
+ */
2800
+ content: string | Array<OpenAIDeveloperMessageParam.ListOpenAIChatCompletionContentPartTextParam>;
2801
+
2802
+ /**
2803
+ * The name of the developer message participant.
2804
+ */
2805
+ name?: string | null;
2806
+
2807
+ /**
2808
+ * Must be 'developer' to identify this as a developer message.
2809
+ */
2810
+ role?: 'developer';
2811
+ }
2812
+
2813
+ export namespace OpenAIDeveloperMessageParam {
2814
+ /**
2815
+ * Text content part for OpenAI-compatible chat completion messages.
2816
+ */
2817
+ export interface ListOpenAIChatCompletionContentPartTextParam {
2818
+ /**
2819
+ * The text content of the message.
2820
+ */
2821
+ text: string;
2822
+
2823
+ /**
2824
+ * Must be 'text' to identify this as text content.
2825
+ */
2826
+ type?: 'text';
2827
+ }
2828
+ }
2829
+
2830
+ /**
2831
+ * Text response format for OpenAI-compatible chat completion requests.
2832
+ */
2833
+ export interface OpenAIResponseFormatText {
2834
+ /**
2835
+ * Must be 'text' to indicate plain text response format.
2836
+ */
2837
+ type?: 'text';
2838
+ }
2839
+
2840
+ /**
2841
+ * JSON schema response format for OpenAI-compatible chat completion requests.
2842
+ */
2843
+ export interface OpenAIResponseFormatJsonSchema {
2844
+ /**
2845
+ * The JSON schema specification for the response.
2846
+ */
2847
+ json_schema: OpenAIResponseFormatJsonSchema.JsonSchema;
2848
+
2849
+ /**
2850
+ * Must be 'json_schema' to indicate structured JSON response format.
2851
+ */
2852
+ type?: 'json_schema';
2853
+ }
2854
+
2855
+ export namespace OpenAIResponseFormatJsonSchema {
2856
+ /**
2857
+ * The JSON schema specification for the response.
2858
+ */
2859
+ export interface JsonSchema {
2860
+ description?: string | null;
2861
+
2862
+ name?: string;
2863
+
2864
+ schema?: { [key: string]: unknown } | null;
2865
+
2866
+ strict?: boolean | null;
2867
+ }
2868
+ }
2869
+
2870
+ /**
2871
+ * JSON object response format for OpenAI-compatible chat completion requests.
2872
+ */
2873
+ export interface OpenAIResponseFormatJsonObject {
2874
+ /**
2875
+ * Must be 'json_object' to indicate generic JSON object response format.
2876
+ */
2877
+ type?: 'json_object';
2878
+ }
2879
+
2880
+ export type CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming;
2881
+ export type CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming;
2882
+ }
2883
+
2884
+ export interface CompletionCreateParamsNonStreaming extends CompletionCreateParamsBase {
2885
+ /**
2886
+ * Whether to stream the response.
2887
+ */
2888
+ stream?: false | null;
2889
+
2890
+ [k: string]: unknown;
2891
+ }
2892
+
2893
+ export interface CompletionCreateParamsStreaming extends CompletionCreateParamsBase {
2894
+ /**
2895
+ * Whether to stream the response.
2896
+ */
2897
+ stream: true;
2898
+
2899
+ [k: string]: unknown;
2900
+ }
2901
+
2902
+ export interface CompletionListParams {
2903
+ /**
2904
+ * The ID of the last chat completion to return.
2905
+ */
2906
+ after?: string | null;
2907
+
2908
+ /**
2909
+ * The maximum number of chat completions to return.
2910
+ */
2911
+ limit?: number | null;
2912
+
2913
+ /**
2914
+ * The model to filter by.
2915
+ */
2916
+ model?: string | null;
2917
+
2918
+ /**
2919
+ * Sort order for paginated responses.
2920
+ */
2921
+ order?: 'asc' | 'desc' | null;
2922
+ }
2923
+
2924
+ export declare namespace Completions {
2925
+ export {
2926
+ type CompletionCreateResponse as CompletionCreateResponse,
2927
+ type CompletionRetrieveResponse as CompletionRetrieveResponse,
2928
+ type CompletionListResponse as CompletionListResponse,
2929
+ type CompletionCreateParams as CompletionCreateParams,
2930
+ type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming,
2931
+ type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming,
2932
+ type CompletionListParams as CompletionListParams,
2933
+ };
2934
+ }