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