modelmix 2.2.8 → 2.3.8

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 (542) hide show
  1. package/README.md +19 -6
  2. package/demo/demo.mjs +24 -16
  3. package/demo/lmstudio.mjs +1 -1
  4. package/demo/node_modules/.package-lock.json +0 -47
  5. package/demo/package-lock.json +1 -50
  6. package/demo/package.json +1 -3
  7. package/demo/prompt.md +25 -0
  8. package/demo/stream.mjs +3 -3
  9. package/index.js +88 -2
  10. package/package.json +4 -2
  11. package/demo/node_modules/debug/LICENSE +0 -20
  12. package/demo/node_modules/debug/README.md +0 -481
  13. package/demo/node_modules/debug/node_modules/ms/index.js +0 -162
  14. package/demo/node_modules/debug/node_modules/ms/license.md +0 -21
  15. package/demo/node_modules/debug/node_modules/ms/package.json +0 -37
  16. package/demo/node_modules/debug/node_modules/ms/readme.md +0 -60
  17. package/demo/node_modules/debug/package.json +0 -59
  18. package/demo/node_modules/debug/src/browser.js +0 -269
  19. package/demo/node_modules/debug/src/common.js +0 -274
  20. package/demo/node_modules/debug/src/index.js +0 -10
  21. package/demo/node_modules/debug/src/node.js +0 -263
  22. package/demo/node_modules/lemonlog/README.md +0 -133
  23. package/demo/node_modules/lemonlog/demo/demo.js +0 -31
  24. package/demo/node_modules/lemonlog/index.js +0 -94
  25. package/demo/node_modules/lemonlog/package.json +0 -31
  26. package/demo/node_modules/openai/CHANGELOG.md +0 -1176
  27. package/demo/node_modules/openai/LICENSE +0 -201
  28. package/demo/node_modules/openai/README.md +0 -616
  29. package/demo/node_modules/openai/_shims/MultipartBody.d.ts +0 -9
  30. package/demo/node_modules/openai/_shims/MultipartBody.d.ts.map +0 -1
  31. package/demo/node_modules/openai/_shims/MultipartBody.js +0 -16
  32. package/demo/node_modules/openai/_shims/MultipartBody.js.map +0 -1
  33. package/demo/node_modules/openai/_shims/MultipartBody.mjs +0 -12
  34. package/demo/node_modules/openai/_shims/MultipartBody.mjs.map +0 -1
  35. package/demo/node_modules/openai/_shims/README.md +0 -46
  36. package/demo/node_modules/openai/_shims/auto/runtime-bun.d.ts +0 -5
  37. package/demo/node_modules/openai/_shims/auto/runtime-bun.d.ts.map +0 -1
  38. package/demo/node_modules/openai/_shims/auto/runtime-bun.js +0 -21
  39. package/demo/node_modules/openai/_shims/auto/runtime-bun.js.map +0 -1
  40. package/demo/node_modules/openai/_shims/auto/runtime-bun.mjs +0 -2
  41. package/demo/node_modules/openai/_shims/auto/runtime-bun.mjs.map +0 -1
  42. package/demo/node_modules/openai/_shims/auto/runtime-node.d.ts +0 -5
  43. package/demo/node_modules/openai/_shims/auto/runtime-node.d.ts.map +0 -1
  44. package/demo/node_modules/openai/_shims/auto/runtime-node.js +0 -21
  45. package/demo/node_modules/openai/_shims/auto/runtime-node.js.map +0 -1
  46. package/demo/node_modules/openai/_shims/auto/runtime-node.mjs +0 -2
  47. package/demo/node_modules/openai/_shims/auto/runtime-node.mjs.map +0 -1
  48. package/demo/node_modules/openai/_shims/auto/runtime.d.ts +0 -5
  49. package/demo/node_modules/openai/_shims/auto/runtime.d.ts.map +0 -1
  50. package/demo/node_modules/openai/_shims/auto/runtime.js +0 -21
  51. package/demo/node_modules/openai/_shims/auto/runtime.js.map +0 -1
  52. package/demo/node_modules/openai/_shims/auto/runtime.mjs +0 -2
  53. package/demo/node_modules/openai/_shims/auto/runtime.mjs.map +0 -1
  54. package/demo/node_modules/openai/_shims/auto/types-node.d.ts +0 -5
  55. package/demo/node_modules/openai/_shims/auto/types-node.d.ts.map +0 -1
  56. package/demo/node_modules/openai/_shims/auto/types-node.js +0 -21
  57. package/demo/node_modules/openai/_shims/auto/types-node.js.map +0 -1
  58. package/demo/node_modules/openai/_shims/auto/types-node.mjs +0 -2
  59. package/demo/node_modules/openai/_shims/auto/types-node.mjs.map +0 -1
  60. package/demo/node_modules/openai/_shims/auto/types.d.ts +0 -101
  61. package/demo/node_modules/openai/_shims/auto/types.js +0 -3
  62. package/demo/node_modules/openai/_shims/auto/types.mjs +0 -3
  63. package/demo/node_modules/openai/_shims/bun-runtime.d.ts +0 -6
  64. package/demo/node_modules/openai/_shims/bun-runtime.d.ts.map +0 -1
  65. package/demo/node_modules/openai/_shims/bun-runtime.js +0 -14
  66. package/demo/node_modules/openai/_shims/bun-runtime.js.map +0 -1
  67. package/demo/node_modules/openai/_shims/bun-runtime.mjs +0 -10
  68. package/demo/node_modules/openai/_shims/bun-runtime.mjs.map +0 -1
  69. package/demo/node_modules/openai/_shims/index.d.ts +0 -81
  70. package/demo/node_modules/openai/_shims/index.js +0 -13
  71. package/demo/node_modules/openai/_shims/index.mjs +0 -7
  72. package/demo/node_modules/openai/_shims/manual-types.d.ts +0 -12
  73. package/demo/node_modules/openai/_shims/manual-types.js +0 -3
  74. package/demo/node_modules/openai/_shims/manual-types.mjs +0 -3
  75. package/demo/node_modules/openai/_shims/node-runtime.d.ts +0 -3
  76. package/demo/node_modules/openai/_shims/node-runtime.d.ts.map +0 -1
  77. package/demo/node_modules/openai/_shims/node-runtime.js +0 -90
  78. package/demo/node_modules/openai/_shims/node-runtime.js.map +0 -1
  79. package/demo/node_modules/openai/_shims/node-runtime.mjs +0 -56
  80. package/demo/node_modules/openai/_shims/node-runtime.mjs.map +0 -1
  81. package/demo/node_modules/openai/_shims/node-types.d.ts +0 -42
  82. package/demo/node_modules/openai/_shims/node-types.js +0 -3
  83. package/demo/node_modules/openai/_shims/node-types.mjs +0 -3
  84. package/demo/node_modules/openai/_shims/registry.d.ts +0 -37
  85. package/demo/node_modules/openai/_shims/registry.d.ts.map +0 -1
  86. package/demo/node_modules/openai/_shims/registry.js +0 -41
  87. package/demo/node_modules/openai/_shims/registry.js.map +0 -1
  88. package/demo/node_modules/openai/_shims/registry.mjs +0 -37
  89. package/demo/node_modules/openai/_shims/registry.mjs.map +0 -1
  90. package/demo/node_modules/openai/_shims/web-runtime.d.ts +0 -5
  91. package/demo/node_modules/openai/_shims/web-runtime.d.ts.map +0 -1
  92. package/demo/node_modules/openai/_shims/web-runtime.js +0 -78
  93. package/demo/node_modules/openai/_shims/web-runtime.js.map +0 -1
  94. package/demo/node_modules/openai/_shims/web-runtime.mjs +0 -71
  95. package/demo/node_modules/openai/_shims/web-runtime.mjs.map +0 -1
  96. package/demo/node_modules/openai/_shims/web-types.d.ts +0 -83
  97. package/demo/node_modules/openai/_shims/web-types.js +0 -3
  98. package/demo/node_modules/openai/_shims/web-types.mjs +0 -3
  99. package/demo/node_modules/openai/bin/cli +0 -49
  100. package/demo/node_modules/openai/core.d.ts +0 -239
  101. package/demo/node_modules/openai/core.d.ts.map +0 -1
  102. package/demo/node_modules/openai/core.js +0 -879
  103. package/demo/node_modules/openai/core.js.map +0 -1
  104. package/demo/node_modules/openai/core.mjs +0 -848
  105. package/demo/node_modules/openai/core.mjs.map +0 -1
  106. package/demo/node_modules/openai/error.d.ts +0 -57
  107. package/demo/node_modules/openai/error.d.ts.map +0 -1
  108. package/demo/node_modules/openai/error.js +0 -148
  109. package/demo/node_modules/openai/error.js.map +0 -1
  110. package/demo/node_modules/openai/error.mjs +0 -132
  111. package/demo/node_modules/openai/error.mjs.map +0 -1
  112. package/demo/node_modules/openai/index.d.mts +0 -267
  113. package/demo/node_modules/openai/index.d.ts +0 -267
  114. package/demo/node_modules/openai/index.d.ts.map +0 -1
  115. package/demo/node_modules/openai/index.js +0 -262
  116. package/demo/node_modules/openai/index.js.map +0 -1
  117. package/demo/node_modules/openai/index.mjs +0 -232
  118. package/demo/node_modules/openai/index.mjs.map +0 -1
  119. package/demo/node_modules/openai/lib/AbstractAssistantStreamRunner.d.ts +0 -74
  120. package/demo/node_modules/openai/lib/AbstractAssistantStreamRunner.d.ts.map +0 -1
  121. package/demo/node_modules/openai/lib/AbstractAssistantStreamRunner.js +0 -246
  122. package/demo/node_modules/openai/lib/AbstractAssistantStreamRunner.js.map +0 -1
  123. package/demo/node_modules/openai/lib/AbstractAssistantStreamRunner.mjs +0 -242
  124. package/demo/node_modules/openai/lib/AbstractAssistantStreamRunner.mjs.map +0 -1
  125. package/demo/node_modules/openai/lib/AbstractChatCompletionRunner.d.ts +0 -114
  126. package/demo/node_modules/openai/lib/AbstractChatCompletionRunner.d.ts.map +0 -1
  127. package/demo/node_modules/openai/lib/AbstractChatCompletionRunner.js +0 -519
  128. package/demo/node_modules/openai/lib/AbstractChatCompletionRunner.js.map +0 -1
  129. package/demo/node_modules/openai/lib/AbstractChatCompletionRunner.mjs +0 -515
  130. package/demo/node_modules/openai/lib/AbstractChatCompletionRunner.mjs.map +0 -1
  131. package/demo/node_modules/openai/lib/AssistantStream.d.ts +0 -58
  132. package/demo/node_modules/openai/lib/AssistantStream.d.ts.map +0 -1
  133. package/demo/node_modules/openai/lib/AssistantStream.js +0 -548
  134. package/demo/node_modules/openai/lib/AssistantStream.js.map +0 -1
  135. package/demo/node_modules/openai/lib/AssistantStream.mjs +0 -521
  136. package/demo/node_modules/openai/lib/AssistantStream.mjs.map +0 -1
  137. package/demo/node_modules/openai/lib/ChatCompletionRunFunctions.test.d.ts +0 -2
  138. package/demo/node_modules/openai/lib/ChatCompletionRunFunctions.test.d.ts.map +0 -1
  139. package/demo/node_modules/openai/lib/ChatCompletionRunFunctions.test.js +0 -2177
  140. package/demo/node_modules/openai/lib/ChatCompletionRunFunctions.test.js.map +0 -1
  141. package/demo/node_modules/openai/lib/ChatCompletionRunFunctions.test.mjs +0 -2172
  142. package/demo/node_modules/openai/lib/ChatCompletionRunFunctions.test.mjs.map +0 -1
  143. package/demo/node_modules/openai/lib/ChatCompletionRunner.d.ts +0 -19
  144. package/demo/node_modules/openai/lib/ChatCompletionRunner.d.ts.map +0 -1
  145. package/demo/node_modules/openai/lib/ChatCompletionRunner.js +0 -34
  146. package/demo/node_modules/openai/lib/ChatCompletionRunner.js.map +0 -1
  147. package/demo/node_modules/openai/lib/ChatCompletionRunner.mjs +0 -30
  148. package/demo/node_modules/openai/lib/ChatCompletionRunner.mjs.map +0 -1
  149. package/demo/node_modules/openai/lib/ChatCompletionStream.d.ts +0 -149
  150. package/demo/node_modules/openai/lib/ChatCompletionStream.d.ts.map +0 -1
  151. package/demo/node_modules/openai/lib/ChatCompletionStream.js +0 -312
  152. package/demo/node_modules/openai/lib/ChatCompletionStream.js.map +0 -1
  153. package/demo/node_modules/openai/lib/ChatCompletionStream.mjs +0 -308
  154. package/demo/node_modules/openai/lib/ChatCompletionStream.mjs.map +0 -1
  155. package/demo/node_modules/openai/lib/ChatCompletionStreamingRunner.d.ts +0 -22
  156. package/demo/node_modules/openai/lib/ChatCompletionStreamingRunner.d.ts.map +0 -1
  157. package/demo/node_modules/openai/lib/ChatCompletionStreamingRunner.js +0 -32
  158. package/demo/node_modules/openai/lib/ChatCompletionStreamingRunner.js.map +0 -1
  159. package/demo/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs +0 -28
  160. package/demo/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs.map +0 -1
  161. package/demo/node_modules/openai/lib/RunnableFunction.d.ts +0 -95
  162. package/demo/node_modules/openai/lib/RunnableFunction.d.ts.map +0 -1
  163. package/demo/node_modules/openai/lib/RunnableFunction.js +0 -35
  164. package/demo/node_modules/openai/lib/RunnableFunction.js.map +0 -1
  165. package/demo/node_modules/openai/lib/RunnableFunction.mjs +0 -29
  166. package/demo/node_modules/openai/lib/RunnableFunction.mjs.map +0 -1
  167. package/demo/node_modules/openai/lib/Util.d.ts +0 -5
  168. package/demo/node_modules/openai/lib/Util.d.ts.map +0 -1
  169. package/demo/node_modules/openai/lib/Util.js +0 -26
  170. package/demo/node_modules/openai/lib/Util.js.map +0 -1
  171. package/demo/node_modules/openai/lib/Util.mjs +0 -22
  172. package/demo/node_modules/openai/lib/Util.mjs.map +0 -1
  173. package/demo/node_modules/openai/lib/chatCompletionUtils.d.ts +0 -6
  174. package/demo/node_modules/openai/lib/chatCompletionUtils.d.ts.map +0 -1
  175. package/demo/node_modules/openai/lib/chatCompletionUtils.js +0 -20
  176. package/demo/node_modules/openai/lib/chatCompletionUtils.js.map +0 -1
  177. package/demo/node_modules/openai/lib/chatCompletionUtils.mjs +0 -13
  178. package/demo/node_modules/openai/lib/chatCompletionUtils.mjs.map +0 -1
  179. package/demo/node_modules/openai/lib/jsonschema.d.ts +0 -106
  180. package/demo/node_modules/openai/lib/jsonschema.d.ts.map +0 -1
  181. package/demo/node_modules/openai/lib/jsonschema.js +0 -11
  182. package/demo/node_modules/openai/lib/jsonschema.js.map +0 -1
  183. package/demo/node_modules/openai/lib/jsonschema.mjs +0 -10
  184. package/demo/node_modules/openai/lib/jsonschema.mjs.map +0 -1
  185. package/demo/node_modules/openai/package.json +0 -105
  186. package/demo/node_modules/openai/pagination.d.ts +0 -37
  187. package/demo/node_modules/openai/pagination.d.ts.map +0 -1
  188. package/demo/node_modules/openai/pagination.js +0 -64
  189. package/demo/node_modules/openai/pagination.js.map +0 -1
  190. package/demo/node_modules/openai/pagination.mjs +0 -59
  191. package/demo/node_modules/openai/pagination.mjs.map +0 -1
  192. package/demo/node_modules/openai/resource.d.ts +0 -6
  193. package/demo/node_modules/openai/resource.d.ts.map +0 -1
  194. package/demo/node_modules/openai/resource.js +0 -11
  195. package/demo/node_modules/openai/resource.js.map +0 -1
  196. package/demo/node_modules/openai/resource.mjs +0 -7
  197. package/demo/node_modules/openai/resource.mjs.map +0 -1
  198. package/demo/node_modules/openai/resources/audio/audio.d.ts +0 -20
  199. package/demo/node_modules/openai/resources/audio/audio.d.ts.map +0 -1
  200. package/demo/node_modules/openai/resources/audio/audio.js +0 -46
  201. package/demo/node_modules/openai/resources/audio/audio.js.map +0 -1
  202. package/demo/node_modules/openai/resources/audio/audio.mjs +0 -19
  203. package/demo/node_modules/openai/resources/audio/audio.mjs.map +0 -1
  204. package/demo/node_modules/openai/resources/audio/index.d.ts +0 -5
  205. package/demo/node_modules/openai/resources/audio/index.d.ts.map +0 -1
  206. package/demo/node_modules/openai/resources/audio/index.js +0 -13
  207. package/demo/node_modules/openai/resources/audio/index.js.map +0 -1
  208. package/demo/node_modules/openai/resources/audio/index.mjs +0 -6
  209. package/demo/node_modules/openai/resources/audio/index.mjs.map +0 -1
  210. package/demo/node_modules/openai/resources/audio/speech.d.ts +0 -42
  211. package/demo/node_modules/openai/resources/audio/speech.d.ts.map +0 -1
  212. package/demo/node_modules/openai/resources/audio/speech.js +0 -17
  213. package/demo/node_modules/openai/resources/audio/speech.js.map +0 -1
  214. package/demo/node_modules/openai/resources/audio/speech.mjs +0 -13
  215. package/demo/node_modules/openai/resources/audio/speech.mjs.map +0 -1
  216. package/demo/node_modules/openai/resources/audio/transcriptions.d.ts +0 -71
  217. package/demo/node_modules/openai/resources/audio/transcriptions.d.ts.map +0 -1
  218. package/demo/node_modules/openai/resources/audio/transcriptions.js +0 -18
  219. package/demo/node_modules/openai/resources/audio/transcriptions.js.map +0 -1
  220. package/demo/node_modules/openai/resources/audio/transcriptions.mjs +0 -14
  221. package/demo/node_modules/openai/resources/audio/transcriptions.mjs.map +0 -1
  222. package/demo/node_modules/openai/resources/audio/translations.d.ts +0 -50
  223. package/demo/node_modules/openai/resources/audio/translations.d.ts.map +0 -1
  224. package/demo/node_modules/openai/resources/audio/translations.js +0 -18
  225. package/demo/node_modules/openai/resources/audio/translations.js.map +0 -1
  226. package/demo/node_modules/openai/resources/audio/translations.mjs +0 -14
  227. package/demo/node_modules/openai/resources/audio/translations.mjs.map +0 -1
  228. package/demo/node_modules/openai/resources/batches.d.ts +0 -189
  229. package/demo/node_modules/openai/resources/batches.d.ts.map +0 -1
  230. package/demo/node_modules/openai/resources/batches.js +0 -65
  231. package/demo/node_modules/openai/resources/batches.js.map +0 -1
  232. package/demo/node_modules/openai/resources/batches.mjs +0 -37
  233. package/demo/node_modules/openai/resources/batches.mjs.map +0 -1
  234. package/demo/node_modules/openai/resources/beta/assistants.d.ts +0 -1048
  235. package/demo/node_modules/openai/resources/beta/assistants.d.ts.map +0 -1
  236. package/demo/node_modules/openai/resources/beta/assistants.js +0 -89
  237. package/demo/node_modules/openai/resources/beta/assistants.js.map +0 -1
  238. package/demo/node_modules/openai/resources/beta/assistants.mjs +0 -61
  239. package/demo/node_modules/openai/resources/beta/assistants.mjs.map +0 -1
  240. package/demo/node_modules/openai/resources/beta/beta.d.ts +0 -53
  241. package/demo/node_modules/openai/resources/beta/beta.d.ts.map +0 -1
  242. package/demo/node_modules/openai/resources/beta/beta.js +0 -51
  243. package/demo/node_modules/openai/resources/beta/beta.js.map +0 -1
  244. package/demo/node_modules/openai/resources/beta/beta.mjs +0 -24
  245. package/demo/node_modules/openai/resources/beta/beta.mjs.map +0 -1
  246. package/demo/node_modules/openai/resources/beta/chat/chat.d.ts +0 -9
  247. package/demo/node_modules/openai/resources/beta/chat/chat.d.ts.map +0 -1
  248. package/demo/node_modules/openai/resources/beta/chat/chat.js +0 -40
  249. package/demo/node_modules/openai/resources/beta/chat/chat.js.map +0 -1
  250. package/demo/node_modules/openai/resources/beta/chat/chat.mjs +0 -13
  251. package/demo/node_modules/openai/resources/beta/chat/chat.mjs.map +0 -1
  252. package/demo/node_modules/openai/resources/beta/chat/completions.d.ts +0 -37
  253. package/demo/node_modules/openai/resources/beta/chat/completions.d.ts.map +0 -1
  254. package/demo/node_modules/openai/resources/beta/chat/completions.js +0 -39
  255. package/demo/node_modules/openai/resources/beta/chat/completions.js.map +0 -1
  256. package/demo/node_modules/openai/resources/beta/chat/completions.mjs +0 -30
  257. package/demo/node_modules/openai/resources/beta/chat/completions.mjs.map +0 -1
  258. package/demo/node_modules/openai/resources/beta/chat/index.d.ts +0 -3
  259. package/demo/node_modules/openai/resources/beta/chat/index.d.ts.map +0 -1
  260. package/demo/node_modules/openai/resources/beta/chat/index.js +0 -9
  261. package/demo/node_modules/openai/resources/beta/chat/index.js.map +0 -1
  262. package/demo/node_modules/openai/resources/beta/chat/index.mjs +0 -4
  263. package/demo/node_modules/openai/resources/beta/chat/index.mjs.map +0 -1
  264. package/demo/node_modules/openai/resources/beta/index.d.ts +0 -6
  265. package/demo/node_modules/openai/resources/beta/index.d.ts.map +0 -1
  266. package/demo/node_modules/openai/resources/beta/index.js +0 -17
  267. package/demo/node_modules/openai/resources/beta/index.js.map +0 -1
  268. package/demo/node_modules/openai/resources/beta/index.mjs +0 -7
  269. package/demo/node_modules/openai/resources/beta/index.mjs.map +0 -1
  270. package/demo/node_modules/openai/resources/beta/threads/index.d.ts +0 -4
  271. package/demo/node_modules/openai/resources/beta/threads/index.d.ts.map +0 -1
  272. package/demo/node_modules/openai/resources/beta/threads/index.js +0 -13
  273. package/demo/node_modules/openai/resources/beta/threads/index.js.map +0 -1
  274. package/demo/node_modules/openai/resources/beta/threads/index.mjs +0 -5
  275. package/demo/node_modules/openai/resources/beta/threads/index.mjs.map +0 -1
  276. package/demo/node_modules/openai/resources/beta/threads/messages.d.ts +0 -552
  277. package/demo/node_modules/openai/resources/beta/threads/messages.d.ts.map +0 -1
  278. package/demo/node_modules/openai/resources/beta/threads/messages.js +0 -89
  279. package/demo/node_modules/openai/resources/beta/threads/messages.js.map +0 -1
  280. package/demo/node_modules/openai/resources/beta/threads/messages.mjs +0 -61
  281. package/demo/node_modules/openai/resources/beta/threads/messages.mjs.map +0 -1
  282. package/demo/node_modules/openai/resources/beta/threads/runs/index.d.ts +0 -3
  283. package/demo/node_modules/openai/resources/beta/threads/runs/index.d.ts.map +0 -1
  284. package/demo/node_modules/openai/resources/beta/threads/runs/index.js +0 -11
  285. package/demo/node_modules/openai/resources/beta/threads/runs/index.js.map +0 -1
  286. package/demo/node_modules/openai/resources/beta/threads/runs/index.mjs +0 -4
  287. package/demo/node_modules/openai/resources/beta/threads/runs/index.mjs.map +0 -1
  288. package/demo/node_modules/openai/resources/beta/threads/runs/runs.d.ts +0 -1194
  289. package/demo/node_modules/openai/resources/beta/threads/runs/runs.d.ts.map +0 -1
  290. package/demo/node_modules/openai/resources/beta/threads/runs/runs.js +0 -190
  291. package/demo/node_modules/openai/resources/beta/threads/runs/runs.js.map +0 -1
  292. package/demo/node_modules/openai/resources/beta/threads/runs/runs.mjs +0 -162
  293. package/demo/node_modules/openai/resources/beta/threads/runs/runs.mjs.map +0 -1
  294. package/demo/node_modules/openai/resources/beta/threads/runs/steps.d.ts +0 -520
  295. package/demo/node_modules/openai/resources/beta/threads/runs/steps.d.ts.map +0 -1
  296. package/demo/node_modules/openai/resources/beta/threads/runs/steps.js +0 -60
  297. package/demo/node_modules/openai/resources/beta/threads/runs/steps.js.map +0 -1
  298. package/demo/node_modules/openai/resources/beta/threads/runs/steps.mjs +0 -32
  299. package/demo/node_modules/openai/resources/beta/threads/runs/steps.mjs.map +0 -1
  300. package/demo/node_modules/openai/resources/beta/threads/threads.d.ts +0 -1240
  301. package/demo/node_modules/openai/resources/beta/threads/threads.d.ts.map +0 -1
  302. package/demo/node_modules/openai/resources/beta/threads/threads.js +0 -108
  303. package/demo/node_modules/openai/resources/beta/threads/threads.js.map +0 -1
  304. package/demo/node_modules/openai/resources/beta/threads/threads.mjs +0 -81
  305. package/demo/node_modules/openai/resources/beta/threads/threads.mjs.map +0 -1
  306. package/demo/node_modules/openai/resources/beta/vector-stores/file-batches.d.ts +0 -142
  307. package/demo/node_modules/openai/resources/beta/vector-stores/file-batches.d.ts.map +0 -1
  308. package/demo/node_modules/openai/resources/beta/vector-stores/file-batches.js +0 -129
  309. package/demo/node_modules/openai/resources/beta/vector-stores/file-batches.js.map +0 -1
  310. package/demo/node_modules/openai/resources/beta/vector-stores/file-batches.mjs +0 -125
  311. package/demo/node_modules/openai/resources/beta/vector-stores/file-batches.mjs.map +0 -1
  312. package/demo/node_modules/openai/resources/beta/vector-stores/files.d.ts +0 -154
  313. package/demo/node_modules/openai/resources/beta/vector-stores/files.d.ts.map +0 -1
  314. package/demo/node_modules/openai/resources/beta/vector-stores/files.js +0 -149
  315. package/demo/node_modules/openai/resources/beta/vector-stores/files.js.map +0 -1
  316. package/demo/node_modules/openai/resources/beta/vector-stores/files.mjs +0 -121
  317. package/demo/node_modules/openai/resources/beta/vector-stores/files.mjs.map +0 -1
  318. package/demo/node_modules/openai/resources/beta/vector-stores/index.d.ts +0 -4
  319. package/demo/node_modules/openai/resources/beta/vector-stores/index.d.ts.map +0 -1
  320. package/demo/node_modules/openai/resources/beta/vector-stores/index.js +0 -13
  321. package/demo/node_modules/openai/resources/beta/vector-stores/index.js.map +0 -1
  322. package/demo/node_modules/openai/resources/beta/vector-stores/index.mjs +0 -5
  323. package/demo/node_modules/openai/resources/beta/vector-stores/index.mjs.map +0 -1
  324. package/demo/node_modules/openai/resources/beta/vector-stores/vector-stores.d.ts +0 -233
  325. package/demo/node_modules/openai/resources/beta/vector-stores/vector-stores.d.ts.map +0 -1
  326. package/demo/node_modules/openai/resources/beta/vector-stores/vector-stores.js +0 -99
  327. package/demo/node_modules/openai/resources/beta/vector-stores/vector-stores.js.map +0 -1
  328. package/demo/node_modules/openai/resources/beta/vector-stores/vector-stores.mjs +0 -71
  329. package/demo/node_modules/openai/resources/beta/vector-stores/vector-stores.mjs.map +0 -1
  330. package/demo/node_modules/openai/resources/chat/chat.d.ts +0 -42
  331. package/demo/node_modules/openai/resources/chat/chat.d.ts.map +0 -1
  332. package/demo/node_modules/openai/resources/chat/chat.js +0 -40
  333. package/demo/node_modules/openai/resources/chat/chat.js.map +0 -1
  334. package/demo/node_modules/openai/resources/chat/chat.mjs +0 -13
  335. package/demo/node_modules/openai/resources/chat/chat.mjs.map +0 -1
  336. package/demo/node_modules/openai/resources/chat/completions.d.ts +0 -845
  337. package/demo/node_modules/openai/resources/chat/completions.d.ts.map +0 -1
  338. package/demo/node_modules/openai/resources/chat/completions.js +0 -14
  339. package/demo/node_modules/openai/resources/chat/completions.js.map +0 -1
  340. package/demo/node_modules/openai/resources/chat/completions.mjs +0 -10
  341. package/demo/node_modules/openai/resources/chat/completions.mjs.map +0 -1
  342. package/demo/node_modules/openai/resources/chat/index.d.ts +0 -3
  343. package/demo/node_modules/openai/resources/chat/index.d.ts.map +0 -1
  344. package/demo/node_modules/openai/resources/chat/index.js +0 -9
  345. package/demo/node_modules/openai/resources/chat/index.js.map +0 -1
  346. package/demo/node_modules/openai/resources/chat/index.mjs +0 -4
  347. package/demo/node_modules/openai/resources/chat/index.mjs.map +0 -1
  348. package/demo/node_modules/openai/resources/completions.d.ts +0 -272
  349. package/demo/node_modules/openai/resources/completions.d.ts.map +0 -1
  350. package/demo/node_modules/openai/resources/completions.js +0 -14
  351. package/demo/node_modules/openai/resources/completions.js.map +0 -1
  352. package/demo/node_modules/openai/resources/completions.mjs +0 -10
  353. package/demo/node_modules/openai/resources/completions.mjs.map +0 -1
  354. package/demo/node_modules/openai/resources/embeddings.d.ts +0 -103
  355. package/demo/node_modules/openai/resources/embeddings.d.ts.map +0 -1
  356. package/demo/node_modules/openai/resources/embeddings.js +0 -17
  357. package/demo/node_modules/openai/resources/embeddings.js.map +0 -1
  358. package/demo/node_modules/openai/resources/embeddings.mjs +0 -13
  359. package/demo/node_modules/openai/resources/embeddings.mjs.map +0 -1
  360. package/demo/node_modules/openai/resources/files.d.ts +0 -140
  361. package/demo/node_modules/openai/resources/files.d.ts.map +0 -1
  362. package/demo/node_modules/openai/resources/files.js +0 -120
  363. package/demo/node_modules/openai/resources/files.js.map +0 -1
  364. package/demo/node_modules/openai/resources/files.mjs +0 -92
  365. package/demo/node_modules/openai/resources/files.mjs.map +0 -1
  366. package/demo/node_modules/openai/resources/fine-tuning/fine-tuning.d.ts +0 -19
  367. package/demo/node_modules/openai/resources/fine-tuning/fine-tuning.d.ts.map +0 -1
  368. package/demo/node_modules/openai/resources/fine-tuning/fine-tuning.js +0 -42
  369. package/demo/node_modules/openai/resources/fine-tuning/fine-tuning.js.map +0 -1
  370. package/demo/node_modules/openai/resources/fine-tuning/fine-tuning.mjs +0 -15
  371. package/demo/node_modules/openai/resources/fine-tuning/fine-tuning.mjs.map +0 -1
  372. package/demo/node_modules/openai/resources/fine-tuning/index.d.ts +0 -3
  373. package/demo/node_modules/openai/resources/fine-tuning/index.d.ts.map +0 -1
  374. package/demo/node_modules/openai/resources/fine-tuning/index.js +0 -11
  375. package/demo/node_modules/openai/resources/fine-tuning/index.js.map +0 -1
  376. package/demo/node_modules/openai/resources/fine-tuning/index.mjs +0 -4
  377. package/demo/node_modules/openai/resources/fine-tuning/index.mjs.map +0 -1
  378. package/demo/node_modules/openai/resources/fine-tuning/jobs/checkpoints.d.ts +0 -69
  379. package/demo/node_modules/openai/resources/fine-tuning/jobs/checkpoints.d.ts.map +0 -1
  380. package/demo/node_modules/openai/resources/fine-tuning/jobs/checkpoints.js +0 -47
  381. package/demo/node_modules/openai/resources/fine-tuning/jobs/checkpoints.js.map +0 -1
  382. package/demo/node_modules/openai/resources/fine-tuning/jobs/checkpoints.mjs +0 -19
  383. package/demo/node_modules/openai/resources/fine-tuning/jobs/checkpoints.mjs.map +0 -1
  384. package/demo/node_modules/openai/resources/fine-tuning/jobs/index.d.ts +0 -3
  385. package/demo/node_modules/openai/resources/fine-tuning/jobs/index.d.ts.map +0 -1
  386. package/demo/node_modules/openai/resources/fine-tuning/jobs/index.js +0 -12
  387. package/demo/node_modules/openai/resources/fine-tuning/jobs/index.js.map +0 -1
  388. package/demo/node_modules/openai/resources/fine-tuning/jobs/index.mjs +0 -4
  389. package/demo/node_modules/openai/resources/fine-tuning/jobs/index.mjs.map +0 -1
  390. package/demo/node_modules/openai/resources/fine-tuning/jobs/jobs.d.ts +0 -362
  391. package/demo/node_modules/openai/resources/fine-tuning/jobs/jobs.d.ts.map +0 -1
  392. package/demo/node_modules/openai/resources/fine-tuning/jobs/jobs.js +0 -93
  393. package/demo/node_modules/openai/resources/fine-tuning/jobs/jobs.js.map +0 -1
  394. package/demo/node_modules/openai/resources/fine-tuning/jobs/jobs.mjs +0 -64
  395. package/demo/node_modules/openai/resources/fine-tuning/jobs/jobs.mjs.map +0 -1
  396. package/demo/node_modules/openai/resources/images.d.ts +0 -174
  397. package/demo/node_modules/openai/resources/images.d.ts.map +0 -1
  398. package/demo/node_modules/openai/resources/images.js +0 -30
  399. package/demo/node_modules/openai/resources/images.js.map +0 -1
  400. package/demo/node_modules/openai/resources/images.mjs +0 -26
  401. package/demo/node_modules/openai/resources/images.mjs.map +0 -1
  402. package/demo/node_modules/openai/resources/index.d.ts +0 -13
  403. package/demo/node_modules/openai/resources/index.d.ts.map +0 -1
  404. package/demo/node_modules/openai/resources/index.js +0 -44
  405. package/demo/node_modules/openai/resources/index.js.map +0 -1
  406. package/demo/node_modules/openai/resources/index.mjs +0 -14
  407. package/demo/node_modules/openai/resources/index.mjs.map +0 -1
  408. package/demo/node_modules/openai/resources/models.d.ts +0 -58
  409. package/demo/node_modules/openai/resources/models.d.ts.map +0 -1
  410. package/demo/node_modules/openai/resources/models.js +0 -64
  411. package/demo/node_modules/openai/resources/models.js.map +0 -1
  412. package/demo/node_modules/openai/resources/models.mjs +0 -36
  413. package/demo/node_modules/openai/resources/models.mjs.map +0 -1
  414. package/demo/node_modules/openai/resources/moderations.d.ts +0 -176
  415. package/demo/node_modules/openai/resources/moderations.d.ts.map +0 -1
  416. package/demo/node_modules/openai/resources/moderations.js +0 -17
  417. package/demo/node_modules/openai/resources/moderations.js.map +0 -1
  418. package/demo/node_modules/openai/resources/moderations.mjs +0 -13
  419. package/demo/node_modules/openai/resources/moderations.mjs.map +0 -1
  420. package/demo/node_modules/openai/resources/shared.d.ts +0 -39
  421. package/demo/node_modules/openai/resources/shared.d.ts.map +0 -1
  422. package/demo/node_modules/openai/resources/shared.js +0 -4
  423. package/demo/node_modules/openai/resources/shared.js.map +0 -1
  424. package/demo/node_modules/openai/resources/shared.mjs +0 -3
  425. package/demo/node_modules/openai/resources/shared.mjs.map +0 -1
  426. package/demo/node_modules/openai/shims/node.d.ts +0 -29
  427. package/demo/node_modules/openai/shims/node.d.ts.map +0 -1
  428. package/demo/node_modules/openai/shims/node.js +0 -31
  429. package/demo/node_modules/openai/shims/node.js.map +0 -1
  430. package/demo/node_modules/openai/shims/node.mjs +0 -5
  431. package/demo/node_modules/openai/shims/node.mjs.map +0 -1
  432. package/demo/node_modules/openai/shims/web.d.ts +0 -26
  433. package/demo/node_modules/openai/shims/web.d.ts.map +0 -1
  434. package/demo/node_modules/openai/shims/web.js +0 -31
  435. package/demo/node_modules/openai/shims/web.js.map +0 -1
  436. package/demo/node_modules/openai/shims/web.mjs +0 -5
  437. package/demo/node_modules/openai/shims/web.mjs.map +0 -1
  438. package/demo/node_modules/openai/src/_shims/MultipartBody.ts +0 -9
  439. package/demo/node_modules/openai/src/_shims/README.md +0 -46
  440. package/demo/node_modules/openai/src/_shims/auto/runtime-bun.ts +0 -4
  441. package/demo/node_modules/openai/src/_shims/auto/runtime-node.ts +0 -4
  442. package/demo/node_modules/openai/src/_shims/auto/runtime.ts +0 -4
  443. package/demo/node_modules/openai/src/_shims/auto/types-node.ts +0 -4
  444. package/demo/node_modules/openai/src/_shims/auto/types.d.ts +0 -101
  445. package/demo/node_modules/openai/src/_shims/auto/types.js +0 -3
  446. package/demo/node_modules/openai/src/_shims/auto/types.mjs +0 -3
  447. package/demo/node_modules/openai/src/_shims/bun-runtime.ts +0 -14
  448. package/demo/node_modules/openai/src/_shims/index.d.ts +0 -81
  449. package/demo/node_modules/openai/src/_shims/index.js +0 -13
  450. package/demo/node_modules/openai/src/_shims/index.mjs +0 -7
  451. package/demo/node_modules/openai/src/_shims/manual-types.d.ts +0 -12
  452. package/demo/node_modules/openai/src/_shims/manual-types.js +0 -3
  453. package/demo/node_modules/openai/src/_shims/manual-types.mjs +0 -3
  454. package/demo/node_modules/openai/src/_shims/node-runtime.ts +0 -83
  455. package/demo/node_modules/openai/src/_shims/node-types.d.ts +0 -42
  456. package/demo/node_modules/openai/src/_shims/node-types.js +0 -3
  457. package/demo/node_modules/openai/src/_shims/node-types.mjs +0 -3
  458. package/demo/node_modules/openai/src/_shims/registry.ts +0 -65
  459. package/demo/node_modules/openai/src/_shims/web-runtime.ts +0 -103
  460. package/demo/node_modules/openai/src/_shims/web-types.d.ts +0 -83
  461. package/demo/node_modules/openai/src/_shims/web-types.js +0 -3
  462. package/demo/node_modules/openai/src/_shims/web-types.mjs +0 -3
  463. package/demo/node_modules/openai/src/core.ts +0 -1162
  464. package/demo/node_modules/openai/src/error.ts +0 -158
  465. package/demo/node_modules/openai/src/index.ts +0 -502
  466. package/demo/node_modules/openai/src/lib/.keep +0 -4
  467. package/demo/node_modules/openai/src/lib/AbstractAssistantStreamRunner.ts +0 -340
  468. package/demo/node_modules/openai/src/lib/AbstractChatCompletionRunner.ts +0 -682
  469. package/demo/node_modules/openai/src/lib/AssistantStream.ts +0 -723
  470. package/demo/node_modules/openai/src/lib/ChatCompletionRunFunctions.test.ts +0 -2328
  471. package/demo/node_modules/openai/src/lib/ChatCompletionRunner.ts +0 -68
  472. package/demo/node_modules/openai/src/lib/ChatCompletionStream.ts +0 -494
  473. package/demo/node_modules/openai/src/lib/ChatCompletionStreamingRunner.ts +0 -68
  474. package/demo/node_modules/openai/src/lib/RunnableFunction.ts +0 -134
  475. package/demo/node_modules/openai/src/lib/Util.ts +0 -23
  476. package/demo/node_modules/openai/src/lib/chatCompletionUtils.ts +0 -28
  477. package/demo/node_modules/openai/src/lib/jsonschema.ts +0 -148
  478. package/demo/node_modules/openai/src/pagination.ts +0 -98
  479. package/demo/node_modules/openai/src/resource.ts +0 -11
  480. package/demo/node_modules/openai/src/resources/audio/audio.ts +0 -23
  481. package/demo/node_modules/openai/src/resources/audio/index.ts +0 -6
  482. package/demo/node_modules/openai/src/resources/audio/speech.ts +0 -52
  483. package/demo/node_modules/openai/src/resources/audio/transcriptions.ts +0 -84
  484. package/demo/node_modules/openai/src/resources/audio/translations.ts +0 -61
  485. package/demo/node_modules/openai/src/resources/batches.ts +0 -252
  486. package/demo/node_modules/openai/src/resources/beta/assistants.ts +0 -1315
  487. package/demo/node_modules/openai/src/resources/beta/beta.ts +0 -56
  488. package/demo/node_modules/openai/src/resources/beta/chat/chat.ts +0 -12
  489. package/demo/node_modules/openai/src/resources/beta/chat/completions.ts +0 -106
  490. package/demo/node_modules/openai/src/resources/beta/chat/index.ts +0 -4
  491. package/demo/node_modules/openai/src/resources/beta/index.ts +0 -48
  492. package/demo/node_modules/openai/src/resources/beta/threads/index.ts +0 -72
  493. package/demo/node_modules/openai/src/resources/beta/threads/messages.ts +0 -706
  494. package/demo/node_modules/openai/src/resources/beta/threads/runs/index.ts +0 -44
  495. package/demo/node_modules/openai/src/resources/beta/threads/runs/runs.ts +0 -1627
  496. package/demo/node_modules/openai/src/resources/beta/threads/runs/steps.ts +0 -641
  497. package/demo/node_modules/openai/src/resources/beta/threads/threads.ts +0 -1536
  498. package/demo/node_modules/openai/src/resources/beta/vector-stores/file-batches.ts +0 -293
  499. package/demo/node_modules/openai/src/resources/beta/vector-stores/files.ts +0 -284
  500. package/demo/node_modules/openai/src/resources/beta/vector-stores/index.ts +0 -25
  501. package/demo/node_modules/openai/src/resources/beta/vector-stores/vector-stores.ts +0 -318
  502. package/demo/node_modules/openai/src/resources/chat/chat.ts +0 -67
  503. package/demo/node_modules/openai/src/resources/chat/completions.ts +0 -996
  504. package/demo/node_modules/openai/src/resources/chat/index.ts +0 -33
  505. package/demo/node_modules/openai/src/resources/completions.ts +0 -329
  506. package/demo/node_modules/openai/src/resources/embeddings.ts +0 -125
  507. package/demo/node_modules/openai/src/resources/files.ts +0 -214
  508. package/demo/node_modules/openai/src/resources/fine-tuning/fine-tuning.ts +0 -22
  509. package/demo/node_modules/openai/src/resources/fine-tuning/index.ts +0 -16
  510. package/demo/node_modules/openai/src/resources/fine-tuning/jobs/checkpoints.ts +0 -108
  511. package/demo/node_modules/openai/src/resources/fine-tuning/jobs/index.ts +0 -21
  512. package/demo/node_modules/openai/src/resources/fine-tuning/jobs/jobs.ts +0 -458
  513. package/demo/node_modules/openai/src/resources/images.ts +0 -215
  514. package/demo/node_modules/openai/src/resources/index.ts +0 -45
  515. package/demo/node_modules/openai/src/resources/models.ts +0 -76
  516. package/demo/node_modules/openai/src/resources/moderations.ts +0 -214
  517. package/demo/node_modules/openai/src/resources/shared.ts +0 -47
  518. package/demo/node_modules/openai/src/shims/node.ts +0 -50
  519. package/demo/node_modules/openai/src/shims/web.ts +0 -50
  520. package/demo/node_modules/openai/src/streaming.ts +0 -508
  521. package/demo/node_modules/openai/src/tsconfig.json +0 -11
  522. package/demo/node_modules/openai/src/uploads.ts +0 -248
  523. package/demo/node_modules/openai/src/version.ts +0 -1
  524. package/demo/node_modules/openai/streaming.d.ts +0 -41
  525. package/demo/node_modules/openai/streaming.d.ts.map +0 -1
  526. package/demo/node_modules/openai/streaming.js +0 -433
  527. package/demo/node_modules/openai/streaming.js.map +0 -1
  528. package/demo/node_modules/openai/streaming.mjs +0 -426
  529. package/demo/node_modules/openai/streaming.mjs.map +0 -1
  530. package/demo/node_modules/openai/uploads.d.ts +0 -75
  531. package/demo/node_modules/openai/uploads.d.ts.map +0 -1
  532. package/demo/node_modules/openai/uploads.js +0 -165
  533. package/demo/node_modules/openai/uploads.js.map +0 -1
  534. package/demo/node_modules/openai/uploads.mjs +0 -152
  535. package/demo/node_modules/openai/uploads.mjs.map +0 -1
  536. package/demo/node_modules/openai/version.d.ts +0 -2
  537. package/demo/node_modules/openai/version.d.ts.map +0 -1
  538. package/demo/node_modules/openai/version.js +0 -5
  539. package/demo/node_modules/openai/version.js.map +0 -1
  540. package/demo/node_modules/openai/version.mjs +0 -2
  541. package/demo/node_modules/openai/version.mjs.map +0 -1
  542. package/demo/watson.png +0 -0
@@ -1,845 +0,0 @@
1
- import * as Core from "../../core.js";
2
- import { APIPromise } from "../../core.js";
3
- import { APIResource } from "../../resource.js";
4
- import * as ChatCompletionsAPI from "./completions.js";
5
- import * as CompletionsAPI from "../completions.js";
6
- import * as Shared from "../shared.js";
7
- import * as ChatAPI from "./chat.js";
8
- import { Stream } from "../../streaming.js";
9
- export declare class Completions extends APIResource {
10
- /**
11
- * Creates a model response for the given chat conversation.
12
- */
13
- create(body: ChatCompletionCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<ChatCompletion>;
14
- create(body: ChatCompletionCreateParamsStreaming, options?: Core.RequestOptions): APIPromise<Stream<ChatCompletionChunk>>;
15
- create(body: ChatCompletionCreateParamsBase, options?: Core.RequestOptions): APIPromise<Stream<ChatCompletionChunk> | ChatCompletion>;
16
- }
17
- /**
18
- * Represents a chat completion response returned by model, based on the provided
19
- * input.
20
- */
21
- export interface ChatCompletion {
22
- /**
23
- * A unique identifier for the chat completion.
24
- */
25
- id: string;
26
- /**
27
- * A list of chat completion choices. Can be more than one if `n` is greater
28
- * than 1.
29
- */
30
- choices: Array<ChatCompletion.Choice>;
31
- /**
32
- * The Unix timestamp (in seconds) of when the chat completion was created.
33
- */
34
- created: number;
35
- /**
36
- * The model used for the chat completion.
37
- */
38
- model: string;
39
- /**
40
- * The object type, which is always `chat.completion`.
41
- */
42
- object: 'chat.completion';
43
- /**
44
- * This fingerprint represents the backend configuration that the model runs with.
45
- *
46
- * Can be used in conjunction with the `seed` request parameter to understand when
47
- * backend changes have been made that might impact determinism.
48
- */
49
- system_fingerprint?: string;
50
- /**
51
- * Usage statistics for the completion request.
52
- */
53
- usage?: CompletionsAPI.CompletionUsage;
54
- }
55
- export declare namespace ChatCompletion {
56
- interface Choice {
57
- /**
58
- * The reason the model stopped generating tokens. This will be `stop` if the model
59
- * hit a natural stop point or a provided stop sequence, `length` if the maximum
60
- * number of tokens specified in the request was reached, `content_filter` if
61
- * content was omitted due to a flag from our content filters, `tool_calls` if the
62
- * model called a tool, or `function_call` (deprecated) if the model called a
63
- * function.
64
- */
65
- finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
66
- /**
67
- * The index of the choice in the list of choices.
68
- */
69
- index: number;
70
- /**
71
- * Log probability information for the choice.
72
- */
73
- logprobs: Choice.Logprobs | null;
74
- /**
75
- * A chat completion message generated by the model.
76
- */
77
- message: ChatCompletionsAPI.ChatCompletionMessage;
78
- }
79
- namespace Choice {
80
- /**
81
- * Log probability information for the choice.
82
- */
83
- interface Logprobs {
84
- /**
85
- * A list of message content tokens with log probability information.
86
- */
87
- content: Array<ChatCompletionsAPI.ChatCompletionTokenLogprob> | null;
88
- }
89
- }
90
- }
91
- export interface ChatCompletionAssistantMessageParam {
92
- /**
93
- * The role of the messages author, in this case `assistant`.
94
- */
95
- role: 'assistant';
96
- /**
97
- * The contents of the assistant message. Required unless `tool_calls` or
98
- * `function_call` is specified.
99
- */
100
- content?: string | null;
101
- /**
102
- * @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
103
- * a function that should be called, as generated by the model.
104
- */
105
- function_call?: ChatCompletionAssistantMessageParam.FunctionCall;
106
- /**
107
- * An optional name for the participant. Provides the model information to
108
- * differentiate between participants of the same role.
109
- */
110
- name?: string;
111
- /**
112
- * The tool calls generated by the model, such as function calls.
113
- */
114
- tool_calls?: Array<ChatCompletionMessageToolCall>;
115
- }
116
- export declare namespace ChatCompletionAssistantMessageParam {
117
- /**
118
- * @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
119
- * a function that should be called, as generated by the model.
120
- */
121
- interface FunctionCall {
122
- /**
123
- * The arguments to call the function with, as generated by the model in JSON
124
- * format. Note that the model does not always generate valid JSON, and may
125
- * hallucinate parameters not defined by your function schema. Validate the
126
- * arguments in your code before calling your function.
127
- */
128
- arguments: string;
129
- /**
130
- * The name of the function to call.
131
- */
132
- name: string;
133
- }
134
- }
135
- /**
136
- * Represents a streamed chunk of a chat completion response returned by model,
137
- * based on the provided input.
138
- */
139
- export interface ChatCompletionChunk {
140
- /**
141
- * A unique identifier for the chat completion. Each chunk has the same ID.
142
- */
143
- id: string;
144
- /**
145
- * A list of chat completion choices. Can contain more than one elements if `n` is
146
- * greater than 1. Can also be empty for the last chunk if you set
147
- * `stream_options: {"include_usage": true}`.
148
- */
149
- choices: Array<ChatCompletionChunk.Choice>;
150
- /**
151
- * The Unix timestamp (in seconds) of when the chat completion was created. Each
152
- * chunk has the same timestamp.
153
- */
154
- created: number;
155
- /**
156
- * The model to generate the completion.
157
- */
158
- model: string;
159
- /**
160
- * The object type, which is always `chat.completion.chunk`.
161
- */
162
- object: 'chat.completion.chunk';
163
- /**
164
- * This fingerprint represents the backend configuration that the model runs with.
165
- * Can be used in conjunction with the `seed` request parameter to understand when
166
- * backend changes have been made that might impact determinism.
167
- */
168
- system_fingerprint?: string;
169
- /**
170
- * An optional field that will only be present when you set
171
- * `stream_options: {"include_usage": true}` in your request. When present, it
172
- * contains a null value except for the last chunk which contains the token usage
173
- * statistics for the entire request.
174
- */
175
- usage?: CompletionsAPI.CompletionUsage;
176
- }
177
- export declare namespace ChatCompletionChunk {
178
- interface Choice {
179
- /**
180
- * A chat completion delta generated by streamed model responses.
181
- */
182
- delta: Choice.Delta;
183
- /**
184
- * The reason the model stopped generating tokens. This will be `stop` if the model
185
- * hit a natural stop point or a provided stop sequence, `length` if the maximum
186
- * number of tokens specified in the request was reached, `content_filter` if
187
- * content was omitted due to a flag from our content filters, `tool_calls` if the
188
- * model called a tool, or `function_call` (deprecated) if the model called a
189
- * function.
190
- */
191
- finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call' | null;
192
- /**
193
- * The index of the choice in the list of choices.
194
- */
195
- index: number;
196
- /**
197
- * Log probability information for the choice.
198
- */
199
- logprobs?: Choice.Logprobs | null;
200
- }
201
- namespace Choice {
202
- /**
203
- * A chat completion delta generated by streamed model responses.
204
- */
205
- interface Delta {
206
- /**
207
- * The contents of the chunk message.
208
- */
209
- content?: string | null;
210
- /**
211
- * @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
212
- * a function that should be called, as generated by the model.
213
- */
214
- function_call?: Delta.FunctionCall;
215
- /**
216
- * The role of the author of this message.
217
- */
218
- role?: 'system' | 'user' | 'assistant' | 'tool';
219
- tool_calls?: Array<Delta.ToolCall>;
220
- }
221
- namespace Delta {
222
- /**
223
- * @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
224
- * a function that should be called, as generated by the model.
225
- */
226
- interface FunctionCall {
227
- /**
228
- * The arguments to call the function with, as generated by the model in JSON
229
- * format. Note that the model does not always generate valid JSON, and may
230
- * hallucinate parameters not defined by your function schema. Validate the
231
- * arguments in your code before calling your function.
232
- */
233
- arguments?: string;
234
- /**
235
- * The name of the function to call.
236
- */
237
- name?: string;
238
- }
239
- interface ToolCall {
240
- index: number;
241
- /**
242
- * The ID of the tool call.
243
- */
244
- id?: string;
245
- function?: ToolCall.Function;
246
- /**
247
- * The type of the tool. Currently, only `function` is supported.
248
- */
249
- type?: 'function';
250
- }
251
- namespace ToolCall {
252
- interface Function {
253
- /**
254
- * The arguments to call the function with, as generated by the model in JSON
255
- * format. Note that the model does not always generate valid JSON, and may
256
- * hallucinate parameters not defined by your function schema. Validate the
257
- * arguments in your code before calling your function.
258
- */
259
- arguments?: string;
260
- /**
261
- * The name of the function to call.
262
- */
263
- name?: string;
264
- }
265
- }
266
- }
267
- /**
268
- * Log probability information for the choice.
269
- */
270
- interface Logprobs {
271
- /**
272
- * A list of message content tokens with log probability information.
273
- */
274
- content: Array<ChatCompletionsAPI.ChatCompletionTokenLogprob> | null;
275
- }
276
- }
277
- }
278
- export type ChatCompletionContentPart = ChatCompletionContentPartText | ChatCompletionContentPartImage;
279
- export interface ChatCompletionContentPartImage {
280
- image_url: ChatCompletionContentPartImage.ImageURL;
281
- /**
282
- * The type of the content part.
283
- */
284
- type: 'image_url';
285
- }
286
- export declare namespace ChatCompletionContentPartImage {
287
- interface ImageURL {
288
- /**
289
- * Either a URL of the image or the base64 encoded image data.
290
- */
291
- url: string;
292
- /**
293
- * Specifies the detail level of the image. Learn more in the
294
- * [Vision guide](https://platform.openai.com/docs/guides/vision/low-or-high-fidelity-image-understanding).
295
- */
296
- detail?: 'auto' | 'low' | 'high';
297
- }
298
- }
299
- export interface ChatCompletionContentPartText {
300
- /**
301
- * The text content.
302
- */
303
- text: string;
304
- /**
305
- * The type of the content part.
306
- */
307
- type: 'text';
308
- }
309
- /**
310
- * Specifying a particular function via `{"name": "my_function"}` forces the model
311
- * to call that function.
312
- */
313
- export interface ChatCompletionFunctionCallOption {
314
- /**
315
- * The name of the function to call.
316
- */
317
- name: string;
318
- }
319
- /**
320
- * @deprecated
321
- */
322
- export interface ChatCompletionFunctionMessageParam {
323
- /**
324
- * The contents of the function message.
325
- */
326
- content: string | null;
327
- /**
328
- * The name of the function to call.
329
- */
330
- name: string;
331
- /**
332
- * The role of the messages author, in this case `function`.
333
- */
334
- role: 'function';
335
- }
336
- /**
337
- * A chat completion message generated by the model.
338
- */
339
- export interface ChatCompletionMessage {
340
- /**
341
- * The contents of the message.
342
- */
343
- content: string | null;
344
- /**
345
- * The role of the author of this message.
346
- */
347
- role: 'assistant';
348
- /**
349
- * @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
350
- * a function that should be called, as generated by the model.
351
- */
352
- function_call?: ChatCompletionMessage.FunctionCall;
353
- /**
354
- * The tool calls generated by the model, such as function calls.
355
- */
356
- tool_calls?: Array<ChatCompletionMessageToolCall>;
357
- }
358
- export declare namespace ChatCompletionMessage {
359
- /**
360
- * @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
361
- * a function that should be called, as generated by the model.
362
- */
363
- interface FunctionCall {
364
- /**
365
- * The arguments to call the function with, as generated by the model in JSON
366
- * format. Note that the model does not always generate valid JSON, and may
367
- * hallucinate parameters not defined by your function schema. Validate the
368
- * arguments in your code before calling your function.
369
- */
370
- arguments: string;
371
- /**
372
- * The name of the function to call.
373
- */
374
- name: string;
375
- }
376
- }
377
- export type ChatCompletionMessageParam = ChatCompletionSystemMessageParam | ChatCompletionUserMessageParam | ChatCompletionAssistantMessageParam | ChatCompletionToolMessageParam | ChatCompletionFunctionMessageParam;
378
- export interface ChatCompletionMessageToolCall {
379
- /**
380
- * The ID of the tool call.
381
- */
382
- id: string;
383
- /**
384
- * The function that the model called.
385
- */
386
- function: ChatCompletionMessageToolCall.Function;
387
- /**
388
- * The type of the tool. Currently, only `function` is supported.
389
- */
390
- type: 'function';
391
- }
392
- export declare namespace ChatCompletionMessageToolCall {
393
- /**
394
- * The function that the model called.
395
- */
396
- interface Function {
397
- /**
398
- * The arguments to call the function with, as generated by the model in JSON
399
- * format. Note that the model does not always generate valid JSON, and may
400
- * hallucinate parameters not defined by your function schema. Validate the
401
- * arguments in your code before calling your function.
402
- */
403
- arguments: string;
404
- /**
405
- * The name of the function to call.
406
- */
407
- name: string;
408
- }
409
- }
410
- /**
411
- * Specifies a tool the model should use. Use to force the model to call a specific
412
- * function.
413
- */
414
- export interface ChatCompletionNamedToolChoice {
415
- function: ChatCompletionNamedToolChoice.Function;
416
- /**
417
- * The type of the tool. Currently, only `function` is supported.
418
- */
419
- type: 'function';
420
- }
421
- export declare namespace ChatCompletionNamedToolChoice {
422
- interface Function {
423
- /**
424
- * The name of the function to call.
425
- */
426
- name: string;
427
- }
428
- }
429
- /**
430
- * The role of the author of a message
431
- */
432
- export type ChatCompletionRole = 'system' | 'user' | 'assistant' | 'tool' | 'function';
433
- /**
434
- * Options for streaming response. Only set this when you set `stream: true`.
435
- */
436
- export interface ChatCompletionStreamOptions {
437
- /**
438
- * If set, an additional chunk will be streamed before the `data: [DONE]` message.
439
- * The `usage` field on this chunk shows the token usage statistics for the entire
440
- * request, and the `choices` field will always be an empty array. All other chunks
441
- * will also include a `usage` field, but with a null value.
442
- */
443
- include_usage?: boolean;
444
- }
445
- export interface ChatCompletionSystemMessageParam {
446
- /**
447
- * The contents of the system message.
448
- */
449
- content: string;
450
- /**
451
- * The role of the messages author, in this case `system`.
452
- */
453
- role: 'system';
454
- /**
455
- * An optional name for the participant. Provides the model information to
456
- * differentiate between participants of the same role.
457
- */
458
- name?: string;
459
- }
460
- export interface ChatCompletionTokenLogprob {
461
- /**
462
- * The token.
463
- */
464
- token: string;
465
- /**
466
- * A list of integers representing the UTF-8 bytes representation of the token.
467
- * Useful in instances where characters are represented by multiple tokens and
468
- * their byte representations must be combined to generate the correct text
469
- * representation. Can be `null` if there is no bytes representation for the token.
470
- */
471
- bytes: Array<number> | null;
472
- /**
473
- * The log probability of this token, if it is within the top 20 most likely
474
- * tokens. Otherwise, the value `-9999.0` is used to signify that the token is very
475
- * unlikely.
476
- */
477
- logprob: number;
478
- /**
479
- * List of the most likely tokens and their log probability, at this token
480
- * position. In rare cases, there may be fewer than the number of requested
481
- * `top_logprobs` returned.
482
- */
483
- top_logprobs: Array<ChatCompletionTokenLogprob.TopLogprob>;
484
- }
485
- export declare namespace ChatCompletionTokenLogprob {
486
- interface TopLogprob {
487
- /**
488
- * The token.
489
- */
490
- token: string;
491
- /**
492
- * A list of integers representing the UTF-8 bytes representation of the token.
493
- * Useful in instances where characters are represented by multiple tokens and
494
- * their byte representations must be combined to generate the correct text
495
- * representation. Can be `null` if there is no bytes representation for the token.
496
- */
497
- bytes: Array<number> | null;
498
- /**
499
- * The log probability of this token, if it is within the top 20 most likely
500
- * tokens. Otherwise, the value `-9999.0` is used to signify that the token is very
501
- * unlikely.
502
- */
503
- logprob: number;
504
- }
505
- }
506
- export interface ChatCompletionTool {
507
- function: Shared.FunctionDefinition;
508
- /**
509
- * The type of the tool. Currently, only `function` is supported.
510
- */
511
- type: 'function';
512
- }
513
- /**
514
- * Controls which (if any) tool is called by the model. `none` means the model will
515
- * not call any tool and instead generates a message. `auto` means the model can
516
- * pick between generating a message or calling one or more tools. `required` means
517
- * the model must call one or more tools. Specifying a particular tool via
518
- * `{"type": "function", "function": {"name": "my_function"}}` forces the model to
519
- * call that tool.
520
- *
521
- * `none` is the default when no tools are present. `auto` is the default if tools
522
- * are present.
523
- */
524
- export type ChatCompletionToolChoiceOption = 'none' | 'auto' | 'required' | ChatCompletionNamedToolChoice;
525
- export interface ChatCompletionToolMessageParam {
526
- /**
527
- * The contents of the tool message.
528
- */
529
- content: string;
530
- /**
531
- * The role of the messages author, in this case `tool`.
532
- */
533
- role: 'tool';
534
- /**
535
- * Tool call that this message is responding to.
536
- */
537
- tool_call_id: string;
538
- }
539
- export interface ChatCompletionUserMessageParam {
540
- /**
541
- * The contents of the user message.
542
- */
543
- content: string | Array<ChatCompletionContentPart>;
544
- /**
545
- * The role of the messages author, in this case `user`.
546
- */
547
- role: 'user';
548
- /**
549
- * An optional name for the participant. Provides the model information to
550
- * differentiate between participants of the same role.
551
- */
552
- name?: string;
553
- }
554
- /**
555
- * @deprecated ChatCompletionMessageParam should be used instead
556
- */
557
- export type CreateChatCompletionRequestMessage = ChatCompletionMessageParam;
558
- export type ChatCompletionCreateParams = ChatCompletionCreateParamsNonStreaming | ChatCompletionCreateParamsStreaming;
559
- export interface ChatCompletionCreateParamsBase {
560
- /**
561
- * A list of messages comprising the conversation so far.
562
- * [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models).
563
- */
564
- messages: Array<ChatCompletionMessageParam>;
565
- /**
566
- * ID of the model to use. See the
567
- * [model endpoint compatibility](https://platform.openai.com/docs/models/model-endpoint-compatibility)
568
- * table for details on which models work with the Chat API.
569
- */
570
- model: (string & {}) | ChatAPI.ChatModel;
571
- /**
572
- * Number between -2.0 and 2.0. Positive values penalize new tokens based on their
573
- * existing frequency in the text so far, decreasing the model's likelihood to
574
- * repeat the same line verbatim.
575
- *
576
- * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details)
577
- */
578
- frequency_penalty?: number | null;
579
- /**
580
- * Deprecated in favor of `tool_choice`.
581
- *
582
- * Controls which (if any) function is called by the model. `none` means the model
583
- * will not call a function and instead generates a message. `auto` means the model
584
- * can pick between generating a message or calling a function. Specifying a
585
- * particular function via `{"name": "my_function"}` forces the model to call that
586
- * function.
587
- *
588
- * `none` is the default when no functions are present. `auto` is the default if
589
- * functions are present.
590
- */
591
- function_call?: 'none' | 'auto' | ChatCompletionFunctionCallOption;
592
- /**
593
- * Deprecated in favor of `tools`.
594
- *
595
- * A list of functions the model may generate JSON inputs for.
596
- */
597
- functions?: Array<ChatCompletionCreateParams.Function>;
598
- /**
599
- * Modify the likelihood of specified tokens appearing in the completion.
600
- *
601
- * Accepts a JSON object that maps tokens (specified by their token ID in the
602
- * tokenizer) to an associated bias value from -100 to 100. Mathematically, the
603
- * bias is added to the logits generated by the model prior to sampling. The exact
604
- * effect will vary per model, but values between -1 and 1 should decrease or
605
- * increase likelihood of selection; values like -100 or 100 should result in a ban
606
- * or exclusive selection of the relevant token.
607
- */
608
- logit_bias?: Record<string, number> | null;
609
- /**
610
- * Whether to return log probabilities of the output tokens or not. If true,
611
- * returns the log probabilities of each output token returned in the `content` of
612
- * `message`.
613
- */
614
- logprobs?: boolean | null;
615
- /**
616
- * The maximum number of [tokens](/tokenizer) that can be generated in the chat
617
- * completion.
618
- *
619
- * The total length of input tokens and generated tokens is limited by the model's
620
- * context length.
621
- * [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken)
622
- * for counting tokens.
623
- */
624
- max_tokens?: number | null;
625
- /**
626
- * How many chat completion choices to generate for each input message. Note that
627
- * you will be charged based on the number of generated tokens across all of the
628
- * choices. Keep `n` as `1` to minimize costs.
629
- */
630
- n?: number | null;
631
- /**
632
- * Number between -2.0 and 2.0. Positive values penalize new tokens based on
633
- * whether they appear in the text so far, increasing the model's likelihood to
634
- * talk about new topics.
635
- *
636
- * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details)
637
- */
638
- presence_penalty?: number | null;
639
- /**
640
- * An object specifying the format that the model must output. Compatible with
641
- * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
642
- * all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
643
- *
644
- * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
645
- * message the model generates is valid JSON.
646
- *
647
- * **Important:** when using JSON mode, you **must** also instruct the model to
648
- * produce JSON yourself via a system or user message. Without this, the model may
649
- * generate an unending stream of whitespace until the generation reaches the token
650
- * limit, resulting in a long-running and seemingly "stuck" request. Also note that
651
- * the message content may be partially cut off if `finish_reason="length"`, which
652
- * indicates the generation exceeded `max_tokens` or the conversation exceeded the
653
- * max context length.
654
- */
655
- response_format?: ChatCompletionCreateParams.ResponseFormat;
656
- /**
657
- * This feature is in Beta. If specified, our system will make a best effort to
658
- * sample deterministically, such that repeated requests with the same `seed` and
659
- * parameters should return the same result. Determinism is not guaranteed, and you
660
- * should refer to the `system_fingerprint` response parameter to monitor changes
661
- * in the backend.
662
- */
663
- seed?: number | null;
664
- /**
665
- * Up to 4 sequences where the API will stop generating further tokens.
666
- */
667
- stop?: string | null | Array<string>;
668
- /**
669
- * If set, partial message deltas will be sent, like in ChatGPT. Tokens will be
670
- * sent as data-only
671
- * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
672
- * as they become available, with the stream terminated by a `data: [DONE]`
673
- * message.
674
- * [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).
675
- */
676
- stream?: boolean | null;
677
- /**
678
- * Options for streaming response. Only set this when you set `stream: true`.
679
- */
680
- stream_options?: ChatCompletionStreamOptions | null;
681
- /**
682
- * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
683
- * make the output more random, while lower values like 0.2 will make it more
684
- * focused and deterministic.
685
- *
686
- * We generally recommend altering this or `top_p` but not both.
687
- */
688
- temperature?: number | null;
689
- /**
690
- * Controls which (if any) tool is called by the model. `none` means the model will
691
- * not call any tool and instead generates a message. `auto` means the model can
692
- * pick between generating a message or calling one or more tools. `required` means
693
- * the model must call one or more tools. Specifying a particular tool via
694
- * `{"type": "function", "function": {"name": "my_function"}}` forces the model to
695
- * call that tool.
696
- *
697
- * `none` is the default when no tools are present. `auto` is the default if tools
698
- * are present.
699
- */
700
- tool_choice?: ChatCompletionToolChoiceOption;
701
- /**
702
- * A list of tools the model may call. Currently, only functions are supported as a
703
- * tool. Use this to provide a list of functions the model may generate JSON inputs
704
- * for. A max of 128 functions are supported.
705
- */
706
- tools?: Array<ChatCompletionTool>;
707
- /**
708
- * An integer between 0 and 20 specifying the number of most likely tokens to
709
- * return at each token position, each with an associated log probability.
710
- * `logprobs` must be set to `true` if this parameter is used.
711
- */
712
- top_logprobs?: number | null;
713
- /**
714
- * An alternative to sampling with temperature, called nucleus sampling, where the
715
- * model considers the results of the tokens with top_p probability mass. So 0.1
716
- * means only the tokens comprising the top 10% probability mass are considered.
717
- *
718
- * We generally recommend altering this or `temperature` but not both.
719
- */
720
- top_p?: number | null;
721
- /**
722
- * A unique identifier representing your end-user, which can help OpenAI to monitor
723
- * and detect abuse.
724
- * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).
725
- */
726
- user?: string;
727
- }
728
- export declare namespace ChatCompletionCreateParams {
729
- /**
730
- * @deprecated
731
- */
732
- interface Function {
733
- /**
734
- * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
735
- * underscores and dashes, with a maximum length of 64.
736
- */
737
- name: string;
738
- /**
739
- * A description of what the function does, used by the model to choose when and
740
- * how to call the function.
741
- */
742
- description?: string;
743
- /**
744
- * The parameters the functions accepts, described as a JSON Schema object. See the
745
- * [guide](https://platform.openai.com/docs/guides/text-generation/function-calling)
746
- * for examples, and the
747
- * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
748
- * documentation about the format.
749
- *
750
- * Omitting `parameters` defines a function with an empty parameter list.
751
- */
752
- parameters?: Shared.FunctionParameters;
753
- }
754
- /**
755
- * An object specifying the format that the model must output. Compatible with
756
- * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
757
- * all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
758
- *
759
- * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
760
- * message the model generates is valid JSON.
761
- *
762
- * **Important:** when using JSON mode, you **must** also instruct the model to
763
- * produce JSON yourself via a system or user message. Without this, the model may
764
- * generate an unending stream of whitespace until the generation reaches the token
765
- * limit, resulting in a long-running and seemingly "stuck" request. Also note that
766
- * the message content may be partially cut off if `finish_reason="length"`, which
767
- * indicates the generation exceeded `max_tokens` or the conversation exceeded the
768
- * max context length.
769
- */
770
- interface ResponseFormat {
771
- /**
772
- * Must be one of `text` or `json_object`.
773
- */
774
- type?: 'text' | 'json_object';
775
- }
776
- type ChatCompletionCreateParamsNonStreaming = ChatCompletionsAPI.ChatCompletionCreateParamsNonStreaming;
777
- type ChatCompletionCreateParamsStreaming = ChatCompletionsAPI.ChatCompletionCreateParamsStreaming;
778
- }
779
- /**
780
- * @deprecated Use ChatCompletionCreateParams instead
781
- */
782
- export type CompletionCreateParams = ChatCompletionCreateParams;
783
- export interface ChatCompletionCreateParamsNonStreaming extends ChatCompletionCreateParamsBase {
784
- /**
785
- * If set, partial message deltas will be sent, like in ChatGPT. Tokens will be
786
- * sent as data-only
787
- * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
788
- * as they become available, with the stream terminated by a `data: [DONE]`
789
- * message.
790
- * [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).
791
- */
792
- stream?: false | null;
793
- }
794
- /**
795
- * @deprecated Use ChatCompletionCreateParamsNonStreaming instead
796
- */
797
- export type CompletionCreateParamsNonStreaming = ChatCompletionCreateParamsNonStreaming;
798
- export interface ChatCompletionCreateParamsStreaming extends ChatCompletionCreateParamsBase {
799
- /**
800
- * If set, partial message deltas will be sent, like in ChatGPT. Tokens will be
801
- * sent as data-only
802
- * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
803
- * as they become available, with the stream terminated by a `data: [DONE]`
804
- * message.
805
- * [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).
806
- */
807
- stream: true;
808
- }
809
- /**
810
- * @deprecated Use ChatCompletionCreateParamsStreaming instead
811
- */
812
- export type CompletionCreateParamsStreaming = ChatCompletionCreateParamsStreaming;
813
- export declare namespace Completions {
814
- export import ChatCompletion = ChatCompletionsAPI.ChatCompletion;
815
- export import ChatCompletionAssistantMessageParam = ChatCompletionsAPI.ChatCompletionAssistantMessageParam;
816
- export import ChatCompletionChunk = ChatCompletionsAPI.ChatCompletionChunk;
817
- export import ChatCompletionContentPart = ChatCompletionsAPI.ChatCompletionContentPart;
818
- export import ChatCompletionContentPartImage = ChatCompletionsAPI.ChatCompletionContentPartImage;
819
- export import ChatCompletionContentPartText = ChatCompletionsAPI.ChatCompletionContentPartText;
820
- export import ChatCompletionFunctionCallOption = ChatCompletionsAPI.ChatCompletionFunctionCallOption;
821
- export import ChatCompletionFunctionMessageParam = ChatCompletionsAPI.ChatCompletionFunctionMessageParam;
822
- export import ChatCompletionMessage = ChatCompletionsAPI.ChatCompletionMessage;
823
- export import ChatCompletionMessageParam = ChatCompletionsAPI.ChatCompletionMessageParam;
824
- export import ChatCompletionMessageToolCall = ChatCompletionsAPI.ChatCompletionMessageToolCall;
825
- export import ChatCompletionNamedToolChoice = ChatCompletionsAPI.ChatCompletionNamedToolChoice;
826
- export import ChatCompletionRole = ChatCompletionsAPI.ChatCompletionRole;
827
- export import ChatCompletionStreamOptions = ChatCompletionsAPI.ChatCompletionStreamOptions;
828
- export import ChatCompletionSystemMessageParam = ChatCompletionsAPI.ChatCompletionSystemMessageParam;
829
- export import ChatCompletionTokenLogprob = ChatCompletionsAPI.ChatCompletionTokenLogprob;
830
- export import ChatCompletionTool = ChatCompletionsAPI.ChatCompletionTool;
831
- export import ChatCompletionToolChoiceOption = ChatCompletionsAPI.ChatCompletionToolChoiceOption;
832
- export import ChatCompletionToolMessageParam = ChatCompletionsAPI.ChatCompletionToolMessageParam;
833
- export import ChatCompletionUserMessageParam = ChatCompletionsAPI.ChatCompletionUserMessageParam;
834
- /**
835
- * @deprecated ChatCompletionMessageParam should be used instead
836
- */
837
- export import CreateChatCompletionRequestMessage = ChatCompletionsAPI.CreateChatCompletionRequestMessage;
838
- export import ChatCompletionCreateParams = ChatCompletionsAPI.ChatCompletionCreateParams;
839
- export import CompletionCreateParams = ChatCompletionsAPI.CompletionCreateParams;
840
- export import ChatCompletionCreateParamsNonStreaming = ChatCompletionsAPI.ChatCompletionCreateParamsNonStreaming;
841
- export import CompletionCreateParamsNonStreaming = ChatCompletionsAPI.CompletionCreateParamsNonStreaming;
842
- export import ChatCompletionCreateParamsStreaming = ChatCompletionsAPI.ChatCompletionCreateParamsStreaming;
843
- export import CompletionCreateParamsStreaming = ChatCompletionsAPI.CompletionCreateParamsStreaming;
844
- }
845
- //# sourceMappingURL=completions.d.ts.map