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,1048 +0,0 @@
1
- import * as Core from "../../core.js";
2
- import { APIResource } from "../../resource.js";
3
- import * as AssistantsAPI from "./assistants.js";
4
- import * as Shared from "../shared.js";
5
- import * as MessagesAPI from "./threads/messages.js";
6
- import * as ThreadsAPI from "./threads/threads.js";
7
- import * as RunsAPI from "./threads/runs/runs.js";
8
- import * as StepsAPI from "./threads/runs/steps.js";
9
- import { CursorPage, type CursorPageParams } from "../../pagination.js";
10
- export declare class Assistants extends APIResource {
11
- /**
12
- * Create an assistant with a model and instructions.
13
- */
14
- create(body: AssistantCreateParams, options?: Core.RequestOptions): Core.APIPromise<Assistant>;
15
- /**
16
- * Retrieves an assistant.
17
- */
18
- retrieve(assistantId: string, options?: Core.RequestOptions): Core.APIPromise<Assistant>;
19
- /**
20
- * Modifies an assistant.
21
- */
22
- update(assistantId: string, body: AssistantUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Assistant>;
23
- /**
24
- * Returns a list of assistants.
25
- */
26
- list(query?: AssistantListParams, options?: Core.RequestOptions): Core.PagePromise<AssistantsPage, Assistant>;
27
- list(options?: Core.RequestOptions): Core.PagePromise<AssistantsPage, Assistant>;
28
- /**
29
- * Delete an assistant.
30
- */
31
- del(assistantId: string, options?: Core.RequestOptions): Core.APIPromise<AssistantDeleted>;
32
- }
33
- export declare class AssistantsPage extends CursorPage<Assistant> {
34
- }
35
- /**
36
- * Represents an `assistant` that can call the model and use tools.
37
- */
38
- export interface Assistant {
39
- /**
40
- * The identifier, which can be referenced in API endpoints.
41
- */
42
- id: string;
43
- /**
44
- * The Unix timestamp (in seconds) for when the assistant was created.
45
- */
46
- created_at: number;
47
- /**
48
- * The description of the assistant. The maximum length is 512 characters.
49
- */
50
- description: string | null;
51
- /**
52
- * The system instructions that the assistant uses. The maximum length is 256,000
53
- * characters.
54
- */
55
- instructions: string | null;
56
- /**
57
- * Set of 16 key-value pairs that can be attached to an object. This can be useful
58
- * for storing additional information about the object in a structured format. Keys
59
- * can be a maximum of 64 characters long and values can be a maxium of 512
60
- * characters long.
61
- */
62
- metadata: unknown | null;
63
- /**
64
- * ID of the model to use. You can use the
65
- * [List models](https://platform.openai.com/docs/api-reference/models/list) API to
66
- * see all of your available models, or see our
67
- * [Model overview](https://platform.openai.com/docs/models/overview) for
68
- * descriptions of them.
69
- */
70
- model: string;
71
- /**
72
- * The name of the assistant. The maximum length is 256 characters.
73
- */
74
- name: string | null;
75
- /**
76
- * The object type, which is always `assistant`.
77
- */
78
- object: 'assistant';
79
- /**
80
- * A list of tool enabled on the assistant. There can be a maximum of 128 tools per
81
- * assistant. Tools can be of types `code_interpreter`, `file_search`, or
82
- * `function`.
83
- */
84
- tools: Array<AssistantTool>;
85
- /**
86
- * Specifies the format that the model must output. Compatible with
87
- * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
88
- * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
89
- * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
90
- *
91
- * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
92
- * message the model generates is valid JSON.
93
- *
94
- * **Important:** when using JSON mode, you **must** also instruct the model to
95
- * produce JSON yourself via a system or user message. Without this, the model may
96
- * generate an unending stream of whitespace until the generation reaches the token
97
- * limit, resulting in a long-running and seemingly "stuck" request. Also note that
98
- * the message content may be partially cut off if `finish_reason="length"`, which
99
- * indicates the generation exceeded `max_tokens` or the conversation exceeded the
100
- * max context length.
101
- */
102
- response_format?: ThreadsAPI.AssistantResponseFormatOption | null;
103
- /**
104
- * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
105
- * make the output more random, while lower values like 0.2 will make it more
106
- * focused and deterministic.
107
- */
108
- temperature?: number | null;
109
- /**
110
- * A set of resources that are used by the assistant's tools. The resources are
111
- * specific to the type of tool. For example, the `code_interpreter` tool requires
112
- * a list of file IDs, while the `file_search` tool requires a list of vector store
113
- * IDs.
114
- */
115
- tool_resources?: Assistant.ToolResources | null;
116
- /**
117
- * An alternative to sampling with temperature, called nucleus sampling, where the
118
- * model considers the results of the tokens with top_p probability mass. So 0.1
119
- * means only the tokens comprising the top 10% probability mass are considered.
120
- *
121
- * We generally recommend altering this or temperature but not both.
122
- */
123
- top_p?: number | null;
124
- }
125
- export declare namespace Assistant {
126
- /**
127
- * A set of resources that are used by the assistant's tools. The resources are
128
- * specific to the type of tool. For example, the `code_interpreter` tool requires
129
- * a list of file IDs, while the `file_search` tool requires a list of vector store
130
- * IDs.
131
- */
132
- interface ToolResources {
133
- code_interpreter?: ToolResources.CodeInterpreter;
134
- file_search?: ToolResources.FileSearch;
135
- }
136
- namespace ToolResources {
137
- interface CodeInterpreter {
138
- /**
139
- * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made
140
- * available to the `code_interpreter`` tool. There can be a maximum of 20 files
141
- * associated with the tool.
142
- */
143
- file_ids?: Array<string>;
144
- }
145
- interface FileSearch {
146
- /**
147
- * The ID of the
148
- * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
149
- * attached to this assistant. There can be a maximum of 1 vector store attached to
150
- * the assistant.
151
- */
152
- vector_store_ids?: Array<string>;
153
- }
154
- }
155
- }
156
- export interface AssistantDeleted {
157
- id: string;
158
- deleted: boolean;
159
- object: 'assistant.deleted';
160
- }
161
- /**
162
- * Represents an event emitted when streaming a Run.
163
- *
164
- * Each event in a server-sent events stream has an `event` and `data` property:
165
- *
166
- * ```
167
- * event: thread.created
168
- * data: {"id": "thread_123", "object": "thread", ...}
169
- * ```
170
- *
171
- * We emit events whenever a new object is created, transitions to a new state, or
172
- * is being streamed in parts (deltas). For example, we emit `thread.run.created`
173
- * when a new run is created, `thread.run.completed` when a run completes, and so
174
- * on. When an Assistant chooses to create a message during a run, we emit a
175
- * `thread.message.created event`, a `thread.message.in_progress` event, many
176
- * `thread.message.delta` events, and finally a `thread.message.completed` event.
177
- *
178
- * We may add additional events over time, so we recommend handling unknown events
179
- * gracefully in your code. See the
180
- * [Assistants API quickstart](https://platform.openai.com/docs/assistants/overview)
181
- * to learn how to integrate the Assistants API with streaming.
182
- */
183
- export type AssistantStreamEvent = AssistantStreamEvent.ThreadCreated | AssistantStreamEvent.ThreadRunCreated | AssistantStreamEvent.ThreadRunQueued | AssistantStreamEvent.ThreadRunInProgress | AssistantStreamEvent.ThreadRunRequiresAction | AssistantStreamEvent.ThreadRunCompleted | AssistantStreamEvent.ThreadRunFailed | AssistantStreamEvent.ThreadRunCancelling | AssistantStreamEvent.ThreadRunCancelled | AssistantStreamEvent.ThreadRunExpired | AssistantStreamEvent.ThreadRunStepCreated | AssistantStreamEvent.ThreadRunStepInProgress | AssistantStreamEvent.ThreadRunStepDelta | AssistantStreamEvent.ThreadRunStepCompleted | AssistantStreamEvent.ThreadRunStepFailed | AssistantStreamEvent.ThreadRunStepCancelled | AssistantStreamEvent.ThreadRunStepExpired | AssistantStreamEvent.ThreadMessageCreated | AssistantStreamEvent.ThreadMessageInProgress | AssistantStreamEvent.ThreadMessageDelta | AssistantStreamEvent.ThreadMessageCompleted | AssistantStreamEvent.ThreadMessageIncomplete | AssistantStreamEvent.ErrorEvent;
184
- export declare namespace AssistantStreamEvent {
185
- /**
186
- * Occurs when a new
187
- * [thread](https://platform.openai.com/docs/api-reference/threads/object) is
188
- * created.
189
- */
190
- interface ThreadCreated {
191
- /**
192
- * Represents a thread that contains
193
- * [messages](https://platform.openai.com/docs/api-reference/messages).
194
- */
195
- data: ThreadsAPI.Thread;
196
- event: 'thread.created';
197
- }
198
- /**
199
- * Occurs when a new
200
- * [run](https://platform.openai.com/docs/api-reference/runs/object) is created.
201
- */
202
- interface ThreadRunCreated {
203
- /**
204
- * Represents an execution run on a
205
- * [thread](https://platform.openai.com/docs/api-reference/threads).
206
- */
207
- data: RunsAPI.Run;
208
- event: 'thread.run.created';
209
- }
210
- /**
211
- * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
212
- * moves to a `queued` status.
213
- */
214
- interface ThreadRunQueued {
215
- /**
216
- * Represents an execution run on a
217
- * [thread](https://platform.openai.com/docs/api-reference/threads).
218
- */
219
- data: RunsAPI.Run;
220
- event: 'thread.run.queued';
221
- }
222
- /**
223
- * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
224
- * moves to an `in_progress` status.
225
- */
226
- interface ThreadRunInProgress {
227
- /**
228
- * Represents an execution run on a
229
- * [thread](https://platform.openai.com/docs/api-reference/threads).
230
- */
231
- data: RunsAPI.Run;
232
- event: 'thread.run.in_progress';
233
- }
234
- /**
235
- * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
236
- * moves to a `requires_action` status.
237
- */
238
- interface ThreadRunRequiresAction {
239
- /**
240
- * Represents an execution run on a
241
- * [thread](https://platform.openai.com/docs/api-reference/threads).
242
- */
243
- data: RunsAPI.Run;
244
- event: 'thread.run.requires_action';
245
- }
246
- /**
247
- * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
248
- * is completed.
249
- */
250
- interface ThreadRunCompleted {
251
- /**
252
- * Represents an execution run on a
253
- * [thread](https://platform.openai.com/docs/api-reference/threads).
254
- */
255
- data: RunsAPI.Run;
256
- event: 'thread.run.completed';
257
- }
258
- /**
259
- * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
260
- * fails.
261
- */
262
- interface ThreadRunFailed {
263
- /**
264
- * Represents an execution run on a
265
- * [thread](https://platform.openai.com/docs/api-reference/threads).
266
- */
267
- data: RunsAPI.Run;
268
- event: 'thread.run.failed';
269
- }
270
- /**
271
- * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
272
- * moves to a `cancelling` status.
273
- */
274
- interface ThreadRunCancelling {
275
- /**
276
- * Represents an execution run on a
277
- * [thread](https://platform.openai.com/docs/api-reference/threads).
278
- */
279
- data: RunsAPI.Run;
280
- event: 'thread.run.cancelling';
281
- }
282
- /**
283
- * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
284
- * is cancelled.
285
- */
286
- interface ThreadRunCancelled {
287
- /**
288
- * Represents an execution run on a
289
- * [thread](https://platform.openai.com/docs/api-reference/threads).
290
- */
291
- data: RunsAPI.Run;
292
- event: 'thread.run.cancelled';
293
- }
294
- /**
295
- * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
296
- * expires.
297
- */
298
- interface ThreadRunExpired {
299
- /**
300
- * Represents an execution run on a
301
- * [thread](https://platform.openai.com/docs/api-reference/threads).
302
- */
303
- data: RunsAPI.Run;
304
- event: 'thread.run.expired';
305
- }
306
- /**
307
- * Occurs when a
308
- * [run step](https://platform.openai.com/docs/api-reference/runs/step-object) is
309
- * created.
310
- */
311
- interface ThreadRunStepCreated {
312
- /**
313
- * Represents a step in execution of a run.
314
- */
315
- data: StepsAPI.RunStep;
316
- event: 'thread.run.step.created';
317
- }
318
- /**
319
- * Occurs when a
320
- * [run step](https://platform.openai.com/docs/api-reference/runs/step-object)
321
- * moves to an `in_progress` state.
322
- */
323
- interface ThreadRunStepInProgress {
324
- /**
325
- * Represents a step in execution of a run.
326
- */
327
- data: StepsAPI.RunStep;
328
- event: 'thread.run.step.in_progress';
329
- }
330
- /**
331
- * Occurs when parts of a
332
- * [run step](https://platform.openai.com/docs/api-reference/runs/step-object) are
333
- * being streamed.
334
- */
335
- interface ThreadRunStepDelta {
336
- /**
337
- * Represents a run step delta i.e. any changed fields on a run step during
338
- * streaming.
339
- */
340
- data: StepsAPI.RunStepDeltaEvent;
341
- event: 'thread.run.step.delta';
342
- }
343
- /**
344
- * Occurs when a
345
- * [run step](https://platform.openai.com/docs/api-reference/runs/step-object) is
346
- * completed.
347
- */
348
- interface ThreadRunStepCompleted {
349
- /**
350
- * Represents a step in execution of a run.
351
- */
352
- data: StepsAPI.RunStep;
353
- event: 'thread.run.step.completed';
354
- }
355
- /**
356
- * Occurs when a
357
- * [run step](https://platform.openai.com/docs/api-reference/runs/step-object)
358
- * fails.
359
- */
360
- interface ThreadRunStepFailed {
361
- /**
362
- * Represents a step in execution of a run.
363
- */
364
- data: StepsAPI.RunStep;
365
- event: 'thread.run.step.failed';
366
- }
367
- /**
368
- * Occurs when a
369
- * [run step](https://platform.openai.com/docs/api-reference/runs/step-object) is
370
- * cancelled.
371
- */
372
- interface ThreadRunStepCancelled {
373
- /**
374
- * Represents a step in execution of a run.
375
- */
376
- data: StepsAPI.RunStep;
377
- event: 'thread.run.step.cancelled';
378
- }
379
- /**
380
- * Occurs when a
381
- * [run step](https://platform.openai.com/docs/api-reference/runs/step-object)
382
- * expires.
383
- */
384
- interface ThreadRunStepExpired {
385
- /**
386
- * Represents a step in execution of a run.
387
- */
388
- data: StepsAPI.RunStep;
389
- event: 'thread.run.step.expired';
390
- }
391
- /**
392
- * Occurs when a
393
- * [message](https://platform.openai.com/docs/api-reference/messages/object) is
394
- * created.
395
- */
396
- interface ThreadMessageCreated {
397
- /**
398
- * Represents a message within a
399
- * [thread](https://platform.openai.com/docs/api-reference/threads).
400
- */
401
- data: MessagesAPI.Message;
402
- event: 'thread.message.created';
403
- }
404
- /**
405
- * Occurs when a
406
- * [message](https://platform.openai.com/docs/api-reference/messages/object) moves
407
- * to an `in_progress` state.
408
- */
409
- interface ThreadMessageInProgress {
410
- /**
411
- * Represents a message within a
412
- * [thread](https://platform.openai.com/docs/api-reference/threads).
413
- */
414
- data: MessagesAPI.Message;
415
- event: 'thread.message.in_progress';
416
- }
417
- /**
418
- * Occurs when parts of a
419
- * [Message](https://platform.openai.com/docs/api-reference/messages/object) are
420
- * being streamed.
421
- */
422
- interface ThreadMessageDelta {
423
- /**
424
- * Represents a message delta i.e. any changed fields on a message during
425
- * streaming.
426
- */
427
- data: MessagesAPI.MessageDeltaEvent;
428
- event: 'thread.message.delta';
429
- }
430
- /**
431
- * Occurs when a
432
- * [message](https://platform.openai.com/docs/api-reference/messages/object) is
433
- * completed.
434
- */
435
- interface ThreadMessageCompleted {
436
- /**
437
- * Represents a message within a
438
- * [thread](https://platform.openai.com/docs/api-reference/threads).
439
- */
440
- data: MessagesAPI.Message;
441
- event: 'thread.message.completed';
442
- }
443
- /**
444
- * Occurs when a
445
- * [message](https://platform.openai.com/docs/api-reference/messages/object) ends
446
- * before it is completed.
447
- */
448
- interface ThreadMessageIncomplete {
449
- /**
450
- * Represents a message within a
451
- * [thread](https://platform.openai.com/docs/api-reference/threads).
452
- */
453
- data: MessagesAPI.Message;
454
- event: 'thread.message.incomplete';
455
- }
456
- /**
457
- * Occurs when an
458
- * [error](https://platform.openai.com/docs/guides/error-codes/api-errors) occurs.
459
- * This can happen due to an internal server error or a timeout.
460
- */
461
- interface ErrorEvent {
462
- data: Shared.ErrorObject;
463
- event: 'error';
464
- }
465
- }
466
- export type AssistantTool = CodeInterpreterTool | FileSearchTool | FunctionTool;
467
- export interface CodeInterpreterTool {
468
- /**
469
- * The type of tool being defined: `code_interpreter`
470
- */
471
- type: 'code_interpreter';
472
- }
473
- export interface FileSearchTool {
474
- /**
475
- * The type of tool being defined: `file_search`
476
- */
477
- type: 'file_search';
478
- }
479
- export interface FunctionTool {
480
- function: Shared.FunctionDefinition;
481
- /**
482
- * The type of tool being defined: `function`
483
- */
484
- type: 'function';
485
- }
486
- /**
487
- * Occurs when a
488
- * [message](https://platform.openai.com/docs/api-reference/messages/object) is
489
- * created.
490
- */
491
- export type MessageStreamEvent = MessageStreamEvent.ThreadMessageCreated | MessageStreamEvent.ThreadMessageInProgress | MessageStreamEvent.ThreadMessageDelta | MessageStreamEvent.ThreadMessageCompleted | MessageStreamEvent.ThreadMessageIncomplete;
492
- export declare namespace MessageStreamEvent {
493
- /**
494
- * Occurs when a
495
- * [message](https://platform.openai.com/docs/api-reference/messages/object) is
496
- * created.
497
- */
498
- interface ThreadMessageCreated {
499
- /**
500
- * Represents a message within a
501
- * [thread](https://platform.openai.com/docs/api-reference/threads).
502
- */
503
- data: MessagesAPI.Message;
504
- event: 'thread.message.created';
505
- }
506
- /**
507
- * Occurs when a
508
- * [message](https://platform.openai.com/docs/api-reference/messages/object) moves
509
- * to an `in_progress` state.
510
- */
511
- interface ThreadMessageInProgress {
512
- /**
513
- * Represents a message within a
514
- * [thread](https://platform.openai.com/docs/api-reference/threads).
515
- */
516
- data: MessagesAPI.Message;
517
- event: 'thread.message.in_progress';
518
- }
519
- /**
520
- * Occurs when parts of a
521
- * [Message](https://platform.openai.com/docs/api-reference/messages/object) are
522
- * being streamed.
523
- */
524
- interface ThreadMessageDelta {
525
- /**
526
- * Represents a message delta i.e. any changed fields on a message during
527
- * streaming.
528
- */
529
- data: MessagesAPI.MessageDeltaEvent;
530
- event: 'thread.message.delta';
531
- }
532
- /**
533
- * Occurs when a
534
- * [message](https://platform.openai.com/docs/api-reference/messages/object) is
535
- * completed.
536
- */
537
- interface ThreadMessageCompleted {
538
- /**
539
- * Represents a message within a
540
- * [thread](https://platform.openai.com/docs/api-reference/threads).
541
- */
542
- data: MessagesAPI.Message;
543
- event: 'thread.message.completed';
544
- }
545
- /**
546
- * Occurs when a
547
- * [message](https://platform.openai.com/docs/api-reference/messages/object) ends
548
- * before it is completed.
549
- */
550
- interface ThreadMessageIncomplete {
551
- /**
552
- * Represents a message within a
553
- * [thread](https://platform.openai.com/docs/api-reference/threads).
554
- */
555
- data: MessagesAPI.Message;
556
- event: 'thread.message.incomplete';
557
- }
558
- }
559
- /**
560
- * Occurs when a
561
- * [run step](https://platform.openai.com/docs/api-reference/runs/step-object) is
562
- * created.
563
- */
564
- export type RunStepStreamEvent = RunStepStreamEvent.ThreadRunStepCreated | RunStepStreamEvent.ThreadRunStepInProgress | RunStepStreamEvent.ThreadRunStepDelta | RunStepStreamEvent.ThreadRunStepCompleted | RunStepStreamEvent.ThreadRunStepFailed | RunStepStreamEvent.ThreadRunStepCancelled | RunStepStreamEvent.ThreadRunStepExpired;
565
- export declare namespace RunStepStreamEvent {
566
- /**
567
- * Occurs when a
568
- * [run step](https://platform.openai.com/docs/api-reference/runs/step-object) is
569
- * created.
570
- */
571
- interface ThreadRunStepCreated {
572
- /**
573
- * Represents a step in execution of a run.
574
- */
575
- data: StepsAPI.RunStep;
576
- event: 'thread.run.step.created';
577
- }
578
- /**
579
- * Occurs when a
580
- * [run step](https://platform.openai.com/docs/api-reference/runs/step-object)
581
- * moves to an `in_progress` state.
582
- */
583
- interface ThreadRunStepInProgress {
584
- /**
585
- * Represents a step in execution of a run.
586
- */
587
- data: StepsAPI.RunStep;
588
- event: 'thread.run.step.in_progress';
589
- }
590
- /**
591
- * Occurs when parts of a
592
- * [run step](https://platform.openai.com/docs/api-reference/runs/step-object) are
593
- * being streamed.
594
- */
595
- interface ThreadRunStepDelta {
596
- /**
597
- * Represents a run step delta i.e. any changed fields on a run step during
598
- * streaming.
599
- */
600
- data: StepsAPI.RunStepDeltaEvent;
601
- event: 'thread.run.step.delta';
602
- }
603
- /**
604
- * Occurs when a
605
- * [run step](https://platform.openai.com/docs/api-reference/runs/step-object) is
606
- * completed.
607
- */
608
- interface ThreadRunStepCompleted {
609
- /**
610
- * Represents a step in execution of a run.
611
- */
612
- data: StepsAPI.RunStep;
613
- event: 'thread.run.step.completed';
614
- }
615
- /**
616
- * Occurs when a
617
- * [run step](https://platform.openai.com/docs/api-reference/runs/step-object)
618
- * fails.
619
- */
620
- interface ThreadRunStepFailed {
621
- /**
622
- * Represents a step in execution of a run.
623
- */
624
- data: StepsAPI.RunStep;
625
- event: 'thread.run.step.failed';
626
- }
627
- /**
628
- * Occurs when a
629
- * [run step](https://platform.openai.com/docs/api-reference/runs/step-object) is
630
- * cancelled.
631
- */
632
- interface ThreadRunStepCancelled {
633
- /**
634
- * Represents a step in execution of a run.
635
- */
636
- data: StepsAPI.RunStep;
637
- event: 'thread.run.step.cancelled';
638
- }
639
- /**
640
- * Occurs when a
641
- * [run step](https://platform.openai.com/docs/api-reference/runs/step-object)
642
- * expires.
643
- */
644
- interface ThreadRunStepExpired {
645
- /**
646
- * Represents a step in execution of a run.
647
- */
648
- data: StepsAPI.RunStep;
649
- event: 'thread.run.step.expired';
650
- }
651
- }
652
- /**
653
- * Occurs when a new
654
- * [run](https://platform.openai.com/docs/api-reference/runs/object) is created.
655
- */
656
- export type RunStreamEvent = RunStreamEvent.ThreadRunCreated | RunStreamEvent.ThreadRunQueued | RunStreamEvent.ThreadRunInProgress | RunStreamEvent.ThreadRunRequiresAction | RunStreamEvent.ThreadRunCompleted | RunStreamEvent.ThreadRunFailed | RunStreamEvent.ThreadRunCancelling | RunStreamEvent.ThreadRunCancelled | RunStreamEvent.ThreadRunExpired;
657
- export declare namespace RunStreamEvent {
658
- /**
659
- * Occurs when a new
660
- * [run](https://platform.openai.com/docs/api-reference/runs/object) is created.
661
- */
662
- interface ThreadRunCreated {
663
- /**
664
- * Represents an execution run on a
665
- * [thread](https://platform.openai.com/docs/api-reference/threads).
666
- */
667
- data: RunsAPI.Run;
668
- event: 'thread.run.created';
669
- }
670
- /**
671
- * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
672
- * moves to a `queued` status.
673
- */
674
- interface ThreadRunQueued {
675
- /**
676
- * Represents an execution run on a
677
- * [thread](https://platform.openai.com/docs/api-reference/threads).
678
- */
679
- data: RunsAPI.Run;
680
- event: 'thread.run.queued';
681
- }
682
- /**
683
- * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
684
- * moves to an `in_progress` status.
685
- */
686
- interface ThreadRunInProgress {
687
- /**
688
- * Represents an execution run on a
689
- * [thread](https://platform.openai.com/docs/api-reference/threads).
690
- */
691
- data: RunsAPI.Run;
692
- event: 'thread.run.in_progress';
693
- }
694
- /**
695
- * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
696
- * moves to a `requires_action` status.
697
- */
698
- interface ThreadRunRequiresAction {
699
- /**
700
- * Represents an execution run on a
701
- * [thread](https://platform.openai.com/docs/api-reference/threads).
702
- */
703
- data: RunsAPI.Run;
704
- event: 'thread.run.requires_action';
705
- }
706
- /**
707
- * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
708
- * is completed.
709
- */
710
- interface ThreadRunCompleted {
711
- /**
712
- * Represents an execution run on a
713
- * [thread](https://platform.openai.com/docs/api-reference/threads).
714
- */
715
- data: RunsAPI.Run;
716
- event: 'thread.run.completed';
717
- }
718
- /**
719
- * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
720
- * fails.
721
- */
722
- interface ThreadRunFailed {
723
- /**
724
- * Represents an execution run on a
725
- * [thread](https://platform.openai.com/docs/api-reference/threads).
726
- */
727
- data: RunsAPI.Run;
728
- event: 'thread.run.failed';
729
- }
730
- /**
731
- * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
732
- * moves to a `cancelling` status.
733
- */
734
- interface ThreadRunCancelling {
735
- /**
736
- * Represents an execution run on a
737
- * [thread](https://platform.openai.com/docs/api-reference/threads).
738
- */
739
- data: RunsAPI.Run;
740
- event: 'thread.run.cancelling';
741
- }
742
- /**
743
- * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
744
- * is cancelled.
745
- */
746
- interface ThreadRunCancelled {
747
- /**
748
- * Represents an execution run on a
749
- * [thread](https://platform.openai.com/docs/api-reference/threads).
750
- */
751
- data: RunsAPI.Run;
752
- event: 'thread.run.cancelled';
753
- }
754
- /**
755
- * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
756
- * expires.
757
- */
758
- interface ThreadRunExpired {
759
- /**
760
- * Represents an execution run on a
761
- * [thread](https://platform.openai.com/docs/api-reference/threads).
762
- */
763
- data: RunsAPI.Run;
764
- event: 'thread.run.expired';
765
- }
766
- }
767
- /**
768
- * Occurs when a new
769
- * [thread](https://platform.openai.com/docs/api-reference/threads/object) is
770
- * created.
771
- */
772
- export interface ThreadStreamEvent {
773
- /**
774
- * Represents a thread that contains
775
- * [messages](https://platform.openai.com/docs/api-reference/messages).
776
- */
777
- data: ThreadsAPI.Thread;
778
- event: 'thread.created';
779
- }
780
- export interface AssistantCreateParams {
781
- /**
782
- * ID of the model to use. You can use the
783
- * [List models](https://platform.openai.com/docs/api-reference/models/list) API to
784
- * see all of your available models, or see our
785
- * [Model overview](https://platform.openai.com/docs/models/overview) for
786
- * descriptions of them.
787
- */
788
- model: (string & {}) | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' | 'gpt-4-turbo-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613';
789
- /**
790
- * The description of the assistant. The maximum length is 512 characters.
791
- */
792
- description?: string | null;
793
- /**
794
- * The system instructions that the assistant uses. The maximum length is 256,000
795
- * characters.
796
- */
797
- instructions?: string | null;
798
- /**
799
- * Set of 16 key-value pairs that can be attached to an object. This can be useful
800
- * for storing additional information about the object in a structured format. Keys
801
- * can be a maximum of 64 characters long and values can be a maxium of 512
802
- * characters long.
803
- */
804
- metadata?: unknown | null;
805
- /**
806
- * The name of the assistant. The maximum length is 256 characters.
807
- */
808
- name?: string | null;
809
- /**
810
- * Specifies the format that the model must output. Compatible with
811
- * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
812
- * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
813
- * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
814
- *
815
- * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
816
- * message the model generates is valid JSON.
817
- *
818
- * **Important:** when using JSON mode, you **must** also instruct the model to
819
- * produce JSON yourself via a system or user message. Without this, the model may
820
- * generate an unending stream of whitespace until the generation reaches the token
821
- * limit, resulting in a long-running and seemingly "stuck" request. Also note that
822
- * the message content may be partially cut off if `finish_reason="length"`, which
823
- * indicates the generation exceeded `max_tokens` or the conversation exceeded the
824
- * max context length.
825
- */
826
- response_format?: ThreadsAPI.AssistantResponseFormatOption | null;
827
- /**
828
- * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
829
- * make the output more random, while lower values like 0.2 will make it more
830
- * focused and deterministic.
831
- */
832
- temperature?: number | null;
833
- /**
834
- * A set of resources that are used by the assistant's tools. The resources are
835
- * specific to the type of tool. For example, the `code_interpreter` tool requires
836
- * a list of file IDs, while the `file_search` tool requires a list of vector store
837
- * IDs.
838
- */
839
- tool_resources?: AssistantCreateParams.ToolResources | null;
840
- /**
841
- * A list of tool enabled on the assistant. There can be a maximum of 128 tools per
842
- * assistant. Tools can be of types `code_interpreter`, `file_search`, or
843
- * `function`.
844
- */
845
- tools?: Array<AssistantTool>;
846
- /**
847
- * An alternative to sampling with temperature, called nucleus sampling, where the
848
- * model considers the results of the tokens with top_p probability mass. So 0.1
849
- * means only the tokens comprising the top 10% probability mass are considered.
850
- *
851
- * We generally recommend altering this or temperature but not both.
852
- */
853
- top_p?: number | null;
854
- }
855
- export declare namespace AssistantCreateParams {
856
- /**
857
- * A set of resources that are used by the assistant's tools. The resources are
858
- * specific to the type of tool. For example, the `code_interpreter` tool requires
859
- * a list of file IDs, while the `file_search` tool requires a list of vector store
860
- * IDs.
861
- */
862
- interface ToolResources {
863
- code_interpreter?: ToolResources.CodeInterpreter;
864
- file_search?: ToolResources.FileSearch;
865
- }
866
- namespace ToolResources {
867
- interface CodeInterpreter {
868
- /**
869
- * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made
870
- * available to the `code_interpreter` tool. There can be a maximum of 20 files
871
- * associated with the tool.
872
- */
873
- file_ids?: Array<string>;
874
- }
875
- interface FileSearch {
876
- /**
877
- * The
878
- * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
879
- * attached to this assistant. There can be a maximum of 1 vector store attached to
880
- * the assistant.
881
- */
882
- vector_store_ids?: Array<string>;
883
- /**
884
- * A helper to create a
885
- * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
886
- * with file_ids and attach it to this assistant. There can be a maximum of 1
887
- * vector store attached to the assistant.
888
- */
889
- vector_stores?: Array<FileSearch.VectorStore>;
890
- }
891
- namespace FileSearch {
892
- interface VectorStore {
893
- /**
894
- * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
895
- * add to the vector store. There can be a maximum of 10000 files in a vector
896
- * store.
897
- */
898
- file_ids?: Array<string>;
899
- /**
900
- * Set of 16 key-value pairs that can be attached to a vector store. This can be
901
- * useful for storing additional information about the vector store in a structured
902
- * format. Keys can be a maximum of 64 characters long and values can be a maxium
903
- * of 512 characters long.
904
- */
905
- metadata?: unknown;
906
- }
907
- }
908
- }
909
- }
910
- export interface AssistantUpdateParams {
911
- /**
912
- * The description of the assistant. The maximum length is 512 characters.
913
- */
914
- description?: string | null;
915
- /**
916
- * The system instructions that the assistant uses. The maximum length is 256,000
917
- * characters.
918
- */
919
- instructions?: string | null;
920
- /**
921
- * Set of 16 key-value pairs that can be attached to an object. This can be useful
922
- * for storing additional information about the object in a structured format. Keys
923
- * can be a maximum of 64 characters long and values can be a maxium of 512
924
- * characters long.
925
- */
926
- metadata?: unknown | null;
927
- /**
928
- * ID of the model to use. You can use the
929
- * [List models](https://platform.openai.com/docs/api-reference/models/list) API to
930
- * see all of your available models, or see our
931
- * [Model overview](https://platform.openai.com/docs/models/overview) for
932
- * descriptions of them.
933
- */
934
- model?: string;
935
- /**
936
- * The name of the assistant. The maximum length is 256 characters.
937
- */
938
- name?: string | null;
939
- /**
940
- * Specifies the format that the model must output. Compatible with
941
- * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
942
- * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
943
- * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
944
- *
945
- * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
946
- * message the model generates is valid JSON.
947
- *
948
- * **Important:** when using JSON mode, you **must** also instruct the model to
949
- * produce JSON yourself via a system or user message. Without this, the model may
950
- * generate an unending stream of whitespace until the generation reaches the token
951
- * limit, resulting in a long-running and seemingly "stuck" request. Also note that
952
- * the message content may be partially cut off if `finish_reason="length"`, which
953
- * indicates the generation exceeded `max_tokens` or the conversation exceeded the
954
- * max context length.
955
- */
956
- response_format?: ThreadsAPI.AssistantResponseFormatOption | null;
957
- /**
958
- * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
959
- * make the output more random, while lower values like 0.2 will make it more
960
- * focused and deterministic.
961
- */
962
- temperature?: number | null;
963
- /**
964
- * A set of resources that are used by the assistant's tools. The resources are
965
- * specific to the type of tool. For example, the `code_interpreter` tool requires
966
- * a list of file IDs, while the `file_search` tool requires a list of vector store
967
- * IDs.
968
- */
969
- tool_resources?: AssistantUpdateParams.ToolResources | null;
970
- /**
971
- * A list of tool enabled on the assistant. There can be a maximum of 128 tools per
972
- * assistant. Tools can be of types `code_interpreter`, `file_search`, or
973
- * `function`.
974
- */
975
- tools?: Array<AssistantTool>;
976
- /**
977
- * An alternative to sampling with temperature, called nucleus sampling, where the
978
- * model considers the results of the tokens with top_p probability mass. So 0.1
979
- * means only the tokens comprising the top 10% probability mass are considered.
980
- *
981
- * We generally recommend altering this or temperature but not both.
982
- */
983
- top_p?: number | null;
984
- }
985
- export declare namespace AssistantUpdateParams {
986
- /**
987
- * A set of resources that are used by the assistant's tools. The resources are
988
- * specific to the type of tool. For example, the `code_interpreter` tool requires
989
- * a list of file IDs, while the `file_search` tool requires a list of vector store
990
- * IDs.
991
- */
992
- interface ToolResources {
993
- code_interpreter?: ToolResources.CodeInterpreter;
994
- file_search?: ToolResources.FileSearch;
995
- }
996
- namespace ToolResources {
997
- interface CodeInterpreter {
998
- /**
999
- * Overrides the list of
1000
- * [file](https://platform.openai.com/docs/api-reference/files) IDs made available
1001
- * to the `code_interpreter` tool. There can be a maximum of 20 files associated
1002
- * with the tool.
1003
- */
1004
- file_ids?: Array<string>;
1005
- }
1006
- interface FileSearch {
1007
- /**
1008
- * Overrides the
1009
- * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
1010
- * attached to this assistant. There can be a maximum of 1 vector store attached to
1011
- * the assistant.
1012
- */
1013
- vector_store_ids?: Array<string>;
1014
- }
1015
- }
1016
- }
1017
- export interface AssistantListParams extends CursorPageParams {
1018
- /**
1019
- * A cursor for use in pagination. `before` is an object ID that defines your place
1020
- * in the list. For instance, if you make a list request and receive 100 objects,
1021
- * ending with obj_foo, your subsequent call can include before=obj_foo in order to
1022
- * fetch the previous page of the list.
1023
- */
1024
- before?: string;
1025
- /**
1026
- * Sort order by the `created_at` timestamp of the objects. `asc` for ascending
1027
- * order and `desc` for descending order.
1028
- */
1029
- order?: 'asc' | 'desc';
1030
- }
1031
- export declare namespace Assistants {
1032
- export import Assistant = AssistantsAPI.Assistant;
1033
- export import AssistantDeleted = AssistantsAPI.AssistantDeleted;
1034
- export import AssistantStreamEvent = AssistantsAPI.AssistantStreamEvent;
1035
- export import AssistantTool = AssistantsAPI.AssistantTool;
1036
- export import CodeInterpreterTool = AssistantsAPI.CodeInterpreterTool;
1037
- export import FileSearchTool = AssistantsAPI.FileSearchTool;
1038
- export import FunctionTool = AssistantsAPI.FunctionTool;
1039
- export import MessageStreamEvent = AssistantsAPI.MessageStreamEvent;
1040
- export import RunStepStreamEvent = AssistantsAPI.RunStepStreamEvent;
1041
- export import RunStreamEvent = AssistantsAPI.RunStreamEvent;
1042
- export import ThreadStreamEvent = AssistantsAPI.ThreadStreamEvent;
1043
- export import AssistantsPage = AssistantsAPI.AssistantsPage;
1044
- export import AssistantCreateParams = AssistantsAPI.AssistantCreateParams;
1045
- export import AssistantUpdateParams = AssistantsAPI.AssistantUpdateParams;
1046
- export import AssistantListParams = AssistantsAPI.AssistantListParams;
1047
- }
1048
- //# sourceMappingURL=assistants.d.ts.map