@superinterface/react 5.1.2 → 5.2.0-beta.0

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 (417) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +5 -5
  4. package/dist/index.d.ts +5 -5
  5. package/dist/index.js +1 -1
  6. package/dist/index.js.map +1 -1
  7. package/dist/server.d.cts +1 -1
  8. package/dist/server.d.ts +1 -1
  9. package/package.json +8 -6
  10. package/types/index.d.ts +4 -0
  11. package/types/node_modules/openai/LICENSE +201 -0
  12. package/types/node_modules/openai/_vendor/partial-json-parser/parser.d.mts +7 -0
  13. package/types/node_modules/openai/_vendor/partial-json-parser/parser.d.ts +7 -0
  14. package/types/node_modules/openai/_vendor/zod-to-json-schema/Options.d.mts +32 -0
  15. package/types/node_modules/openai/_vendor/zod-to-json-schema/Options.d.ts +32 -0
  16. package/types/node_modules/openai/_vendor/zod-to-json-schema/Refs.d.mts +21 -0
  17. package/types/node_modules/openai/_vendor/zod-to-json-schema/Refs.d.ts +21 -0
  18. package/types/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.d.mts +12 -0
  19. package/types/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.d.ts +12 -0
  20. package/types/node_modules/openai/_vendor/zod-to-json-schema/index.d.mts +38 -0
  21. package/types/node_modules/openai/_vendor/zod-to-json-schema/index.d.ts +38 -0
  22. package/types/node_modules/openai/_vendor/zod-to-json-schema/parseDef.d.mts +38 -0
  23. package/types/node_modules/openai/_vendor/zod-to-json-schema/parseDef.d.ts +38 -0
  24. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/any.d.mts +3 -0
  25. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/any.d.ts +3 -0
  26. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/array.d.mts +13 -0
  27. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/array.d.ts +13 -0
  28. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/bigint.d.mts +15 -0
  29. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/bigint.d.ts +15 -0
  30. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/boolean.d.mts +5 -0
  31. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/boolean.d.ts +5 -0
  32. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/branded.d.mts +4 -0
  33. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/branded.d.ts +4 -0
  34. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/catch.d.mts +4 -0
  35. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/catch.d.ts +4 -0
  36. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/date.d.mts +16 -0
  37. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/date.d.ts +16 -0
  38. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/default.d.mts +7 -0
  39. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/default.d.ts +7 -0
  40. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/effects.d.mts +5 -0
  41. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/effects.d.ts +5 -0
  42. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/enum.d.mts +7 -0
  43. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/enum.d.ts +7 -0
  44. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/intersection.d.mts +9 -0
  45. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/intersection.d.ts +9 -0
  46. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/literal.d.mts +10 -0
  47. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/literal.d.ts +10 -0
  48. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/map.d.mts +16 -0
  49. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/map.d.ts +16 -0
  50. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/nativeEnum.d.mts +7 -0
  51. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/nativeEnum.d.ts +7 -0
  52. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/never.d.mts +5 -0
  53. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/never.d.ts +5 -0
  54. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/null.d.mts +6 -0
  55. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/null.d.ts +6 -0
  56. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/nullable.d.mts +11 -0
  57. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/nullable.d.ts +11 -0
  58. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/number.d.mts +14 -0
  59. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/number.d.ts +14 -0
  60. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/object.d.mts +11 -0
  61. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/object.d.ts +11 -0
  62. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/optional.d.mts +5 -0
  63. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/optional.d.ts +5 -0
  64. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/pipeline.d.mts +6 -0
  65. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/pipeline.d.ts +6 -0
  66. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/promise.d.mts +5 -0
  67. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/promise.d.ts +5 -0
  68. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/readonly.d.mts +4 -0
  69. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/readonly.d.ts +4 -0
  70. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/record.d.mts +14 -0
  71. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/record.d.ts +14 -0
  72. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/set.d.mts +14 -0
  73. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/set.d.ts +14 -0
  74. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/string.d.mts +70 -0
  75. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/string.d.ts +70 -0
  76. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/tuple.d.mts +14 -0
  77. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/tuple.d.ts +14 -0
  78. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/undefined.d.mts +5 -0
  79. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/undefined.d.ts +5 -0
  80. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/union.d.mts +24 -0
  81. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/union.d.ts +24 -0
  82. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/unknown.d.mts +3 -0
  83. package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/unknown.d.ts +3 -0
  84. package/types/node_modules/openai/_vendor/zod-to-json-schema/util.d.mts +4 -0
  85. package/types/node_modules/openai/_vendor/zod-to-json-schema/util.d.ts +4 -0
  86. package/types/node_modules/openai/_vendor/zod-to-json-schema/zodToJsonSchema.d.mts +11 -0
  87. package/types/node_modules/openai/_vendor/zod-to-json-schema/zodToJsonSchema.d.ts +11 -0
  88. package/types/node_modules/openai/api-promise.d.mts +2 -0
  89. package/types/node_modules/openai/api-promise.d.ts +2 -0
  90. package/types/node_modules/openai/azure.d.mts +63 -0
  91. package/types/node_modules/openai/azure.d.ts +63 -0
  92. package/types/node_modules/openai/beta/realtime/index.d.mts +2 -0
  93. package/types/node_modules/openai/beta/realtime/index.d.ts +2 -0
  94. package/types/node_modules/openai/beta/realtime/internal-base.d.mts +45 -0
  95. package/types/node_modules/openai/beta/realtime/internal-base.d.ts +45 -0
  96. package/types/node_modules/openai/beta/realtime/websocket.d.mts +36 -0
  97. package/types/node_modules/openai/beta/realtime/websocket.d.ts +36 -0
  98. package/types/node_modules/openai/beta/realtime/ws.d.mts +27 -0
  99. package/types/node_modules/openai/beta/realtime/ws.d.ts +27 -0
  100. package/types/node_modules/openai/client.d.mts +297 -0
  101. package/types/node_modules/openai/client.d.ts +297 -0
  102. package/types/node_modules/openai/core/api-promise.d.mts +49 -0
  103. package/types/node_modules/openai/core/api-promise.d.ts +49 -0
  104. package/types/node_modules/openai/core/error.d.mts +59 -0
  105. package/types/node_modules/openai/core/error.d.ts +59 -0
  106. package/types/node_modules/openai/core/pagination.d.mts +89 -0
  107. package/types/node_modules/openai/core/pagination.d.ts +89 -0
  108. package/types/node_modules/openai/core/resource.d.mts +6 -0
  109. package/types/node_modules/openai/core/resource.d.ts +6 -0
  110. package/types/node_modules/openai/core/streaming.d.mts +33 -0
  111. package/types/node_modules/openai/core/streaming.d.ts +33 -0
  112. package/types/node_modules/openai/core/uploads.d.mts +3 -0
  113. package/types/node_modules/openai/core/uploads.d.ts +3 -0
  114. package/types/node_modules/openai/error.d.mts +2 -0
  115. package/types/node_modules/openai/error.d.ts +2 -0
  116. package/types/node_modules/openai/helpers/audio.d.mts +9 -0
  117. package/types/node_modules/openai/helpers/audio.d.ts +9 -0
  118. package/types/node_modules/openai/helpers/zod.d.mts +70 -0
  119. package/types/node_modules/openai/helpers/zod.d.ts +70 -0
  120. package/types/node_modules/openai/index.d.mts +8 -0
  121. package/types/node_modules/openai/index.d.ts +8 -0
  122. package/types/node_modules/openai/internal/builtin-types.d.mts +73 -0
  123. package/types/node_modules/openai/internal/builtin-types.d.ts +73 -0
  124. package/types/node_modules/openai/internal/decoders/line.d.mts +17 -0
  125. package/types/node_modules/openai/internal/decoders/line.d.ts +17 -0
  126. package/types/node_modules/openai/internal/detect-platform.d.mts +15 -0
  127. package/types/node_modules/openai/internal/detect-platform.d.ts +15 -0
  128. package/types/node_modules/openai/internal/errors.d.mts +3 -0
  129. package/types/node_modules/openai/internal/errors.d.ts +3 -0
  130. package/types/node_modules/openai/internal/headers.d.mts +20 -0
  131. package/types/node_modules/openai/internal/headers.d.ts +20 -0
  132. package/types/node_modules/openai/internal/parse.d.mts +17 -0
  133. package/types/node_modules/openai/internal/parse.d.ts +17 -0
  134. package/types/node_modules/openai/internal/qs/formats.d.mts +7 -0
  135. package/types/node_modules/openai/internal/qs/formats.d.ts +7 -0
  136. package/types/node_modules/openai/internal/qs/index.d.mts +10 -0
  137. package/types/node_modules/openai/internal/qs/index.d.ts +10 -0
  138. package/types/node_modules/openai/internal/qs/stringify.d.mts +3 -0
  139. package/types/node_modules/openai/internal/qs/stringify.d.ts +3 -0
  140. package/types/node_modules/openai/internal/qs/types.d.mts +57 -0
  141. package/types/node_modules/openai/internal/qs/types.d.ts +57 -0
  142. package/types/node_modules/openai/internal/qs/utils.d.mts +15 -0
  143. package/types/node_modules/openai/internal/qs/utils.d.ts +15 -0
  144. package/types/node_modules/openai/internal/request-options.d.mts +78 -0
  145. package/types/node_modules/openai/internal/request-options.d.ts +78 -0
  146. package/types/node_modules/openai/internal/shim-types.d.mts +17 -0
  147. package/types/node_modules/openai/internal/shim-types.d.ts +17 -0
  148. package/types/node_modules/openai/internal/shims.d.mts +20 -0
  149. package/types/node_modules/openai/internal/shims.d.ts +20 -0
  150. package/types/node_modules/openai/internal/stream-utils.d.mts +8 -0
  151. package/types/node_modules/openai/internal/stream-utils.d.ts +8 -0
  152. package/types/node_modules/openai/internal/to-file.d.mts +45 -0
  153. package/types/node_modules/openai/internal/to-file.d.ts +45 -0
  154. package/types/node_modules/openai/internal/types.d.mts +69 -0
  155. package/types/node_modules/openai/internal/types.d.ts +69 -0
  156. package/types/node_modules/openai/internal/uploads.d.mts +42 -0
  157. package/types/node_modules/openai/internal/uploads.d.ts +42 -0
  158. package/types/node_modules/openai/internal/utils/base64.d.mts +9 -0
  159. package/types/node_modules/openai/internal/utils/base64.d.ts +9 -0
  160. package/types/node_modules/openai/internal/utils/bytes.d.mts +4 -0
  161. package/types/node_modules/openai/internal/utils/bytes.d.ts +4 -0
  162. package/types/node_modules/openai/internal/utils/env.d.mts +9 -0
  163. package/types/node_modules/openai/internal/utils/env.d.ts +9 -0
  164. package/types/node_modules/openai/internal/utils/log.d.mts +37 -0
  165. package/types/node_modules/openai/internal/utils/log.d.ts +37 -0
  166. package/types/node_modules/openai/internal/utils/path.d.mts +15 -0
  167. package/types/node_modules/openai/internal/utils/path.d.ts +15 -0
  168. package/types/node_modules/openai/internal/utils/sleep.d.mts +2 -0
  169. package/types/node_modules/openai/internal/utils/sleep.d.ts +2 -0
  170. package/types/node_modules/openai/internal/utils/uuid.d.mts +5 -0
  171. package/types/node_modules/openai/internal/utils/uuid.d.ts +5 -0
  172. package/types/node_modules/openai/internal/utils/values.d.mts +18 -0
  173. package/types/node_modules/openai/internal/utils/values.d.ts +18 -0
  174. package/types/node_modules/openai/internal/utils.d.mts +7 -0
  175. package/types/node_modules/openai/internal/utils.d.ts +7 -0
  176. package/types/node_modules/openai/lib/AbstractChatCompletionRunner.d.mts +59 -0
  177. package/types/node_modules/openai/lib/AbstractChatCompletionRunner.d.ts +59 -0
  178. package/types/node_modules/openai/lib/AssistantStream.d.mts +60 -0
  179. package/types/node_modules/openai/lib/AssistantStream.d.ts +60 -0
  180. package/types/node_modules/openai/lib/ChatCompletionRunner.d.mts +16 -0
  181. package/types/node_modules/openai/lib/ChatCompletionRunner.d.ts +16 -0
  182. package/types/node_modules/openai/lib/ChatCompletionStream.d.mts +208 -0
  183. package/types/node_modules/openai/lib/ChatCompletionStream.d.ts +208 -0
  184. package/types/node_modules/openai/lib/ChatCompletionStreamingRunner.d.mts +19 -0
  185. package/types/node_modules/openai/lib/ChatCompletionStreamingRunner.d.ts +19 -0
  186. package/types/node_modules/openai/lib/EventEmitter.d.mts +45 -0
  187. package/types/node_modules/openai/lib/EventEmitter.d.ts +45 -0
  188. package/types/node_modules/openai/lib/EventStream.d.mts +62 -0
  189. package/types/node_modules/openai/lib/EventStream.d.ts +62 -0
  190. package/types/node_modules/openai/lib/ResponsesParser.d.mts +36 -0
  191. package/types/node_modules/openai/lib/ResponsesParser.d.ts +36 -0
  192. package/types/node_modules/openai/lib/RunnableFunction.d.mts +83 -0
  193. package/types/node_modules/openai/lib/RunnableFunction.d.ts +83 -0
  194. package/types/node_modules/openai/lib/Util.d.mts +5 -0
  195. package/types/node_modules/openai/lib/Util.d.ts +5 -0
  196. package/types/node_modules/openai/lib/chatCompletionUtils.d.mts +5 -0
  197. package/types/node_modules/openai/lib/chatCompletionUtils.d.ts +5 -0
  198. package/types/node_modules/openai/lib/jsonschema.d.mts +106 -0
  199. package/types/node_modules/openai/lib/jsonschema.d.ts +106 -0
  200. package/types/node_modules/openai/lib/parser.d.mts +47 -0
  201. package/types/node_modules/openai/lib/parser.d.ts +47 -0
  202. package/types/node_modules/openai/lib/responses/EventTypes.d.mts +9 -0
  203. package/types/node_modules/openai/lib/responses/EventTypes.d.ts +9 -0
  204. package/types/node_modules/openai/lib/responses/ResponseStream.d.mts +59 -0
  205. package/types/node_modules/openai/lib/responses/ResponseStream.d.ts +59 -0
  206. package/types/node_modules/openai/package.json +233 -0
  207. package/types/node_modules/openai/pagination.d.mts +2 -0
  208. package/types/node_modules/openai/pagination.d.ts +2 -0
  209. package/types/node_modules/openai/realtime/index.d.mts +2 -0
  210. package/types/node_modules/openai/realtime/index.d.ts +2 -0
  211. package/types/node_modules/openai/realtime/internal-base.d.mts +45 -0
  212. package/types/node_modules/openai/realtime/internal-base.d.ts +45 -0
  213. package/types/node_modules/openai/realtime/websocket.d.mts +36 -0
  214. package/types/node_modules/openai/realtime/websocket.d.ts +36 -0
  215. package/types/node_modules/openai/realtime/ws.d.mts +27 -0
  216. package/types/node_modules/openai/realtime/ws.d.ts +27 -0
  217. package/types/node_modules/openai/resource.d.mts +2 -0
  218. package/types/node_modules/openai/resource.d.ts +2 -0
  219. package/types/node_modules/openai/resources/audio/audio.d.mts +26 -0
  220. package/types/node_modules/openai/resources/audio/audio.d.ts +26 -0
  221. package/types/node_modules/openai/resources/audio/index.d.mts +5 -0
  222. package/types/node_modules/openai/resources/audio/index.d.ts +5 -0
  223. package/types/node_modules/openai/resources/audio/speech.d.mts +64 -0
  224. package/types/node_modules/openai/resources/audio/speech.d.ts +64 -0
  225. package/types/node_modules/openai/resources/audio/transcriptions.d.mts +485 -0
  226. package/types/node_modules/openai/resources/audio/transcriptions.d.ts +485 -0
  227. package/types/node_modules/openai/resources/audio/translations.d.mts +81 -0
  228. package/types/node_modules/openai/resources/audio/translations.d.ts +81 -0
  229. package/types/node_modules/openai/resources/audio.d.mts +2 -0
  230. package/types/node_modules/openai/resources/audio.d.ts +2 -0
  231. package/types/node_modules/openai/resources/batches.d.mts +279 -0
  232. package/types/node_modules/openai/resources/batches.d.ts +279 -0
  233. package/types/node_modules/openai/resources/beta/assistants.d.mts +1232 -0
  234. package/types/node_modules/openai/resources/beta/assistants.d.ts +1232 -0
  235. package/types/node_modules/openai/resources/beta/beta.d.mts +18 -0
  236. package/types/node_modules/openai/resources/beta/beta.d.ts +18 -0
  237. package/types/node_modules/openai/resources/beta/index.d.mts +5 -0
  238. package/types/node_modules/openai/resources/beta/index.d.ts +5 -0
  239. package/types/node_modules/openai/resources/beta/realtime/index.d.mts +4 -0
  240. package/types/node_modules/openai/resources/beta/realtime/index.d.ts +4 -0
  241. package/types/node_modules/openai/resources/beta/realtime/realtime.d.mts +2332 -0
  242. package/types/node_modules/openai/resources/beta/realtime/realtime.d.ts +2332 -0
  243. package/types/node_modules/openai/resources/beta/realtime/sessions.d.mts +744 -0
  244. package/types/node_modules/openai/resources/beta/realtime/sessions.d.ts +744 -0
  245. package/types/node_modules/openai/resources/beta/realtime/transcription-sessions.d.mts +299 -0
  246. package/types/node_modules/openai/resources/beta/realtime/transcription-sessions.d.ts +299 -0
  247. package/types/node_modules/openai/resources/beta/realtime.d.mts +2 -0
  248. package/types/node_modules/openai/resources/beta/realtime.d.ts +2 -0
  249. package/types/node_modules/openai/resources/beta/threads/index.d.mts +4 -0
  250. package/types/node_modules/openai/resources/beta/threads/index.d.ts +4 -0
  251. package/types/node_modules/openai/resources/beta/threads/messages.d.mts +594 -0
  252. package/types/node_modules/openai/resources/beta/threads/messages.d.ts +594 -0
  253. package/types/node_modules/openai/resources/beta/threads/runs/index.d.mts +3 -0
  254. package/types/node_modules/openai/resources/beta/threads/runs/index.d.ts +3 -0
  255. package/types/node_modules/openai/resources/beta/threads/runs/runs.d.mts +733 -0
  256. package/types/node_modules/openai/resources/beta/threads/runs/runs.d.ts +733 -0
  257. package/types/node_modules/openai/resources/beta/threads/runs/steps.d.mts +615 -0
  258. package/types/node_modules/openai/resources/beta/threads/runs/steps.d.ts +615 -0
  259. package/types/node_modules/openai/resources/beta/threads/runs.d.mts +2 -0
  260. package/types/node_modules/openai/resources/beta/threads/runs.d.ts +2 -0
  261. package/types/node_modules/openai/resources/beta/threads/threads.d.mts +1044 -0
  262. package/types/node_modules/openai/resources/beta/threads/threads.d.ts +1044 -0
  263. package/types/node_modules/openai/resources/beta/threads.d.mts +2 -0
  264. package/types/node_modules/openai/resources/beta/threads.d.ts +2 -0
  265. package/types/node_modules/openai/resources/beta.d.mts +2 -0
  266. package/types/node_modules/openai/resources/beta.d.ts +2 -0
  267. package/types/node_modules/openai/resources/chat/chat.d.mts +13 -0
  268. package/types/node_modules/openai/resources/chat/chat.d.ts +13 -0
  269. package/types/node_modules/openai/resources/chat/completions/completions.d.mts +1627 -0
  270. package/types/node_modules/openai/resources/chat/completions/completions.d.ts +1627 -0
  271. package/types/node_modules/openai/resources/chat/completions/index.d.mts +4 -0
  272. package/types/node_modules/openai/resources/chat/completions/index.d.ts +4 -0
  273. package/types/node_modules/openai/resources/chat/completions/messages.d.mts +34 -0
  274. package/types/node_modules/openai/resources/chat/completions/messages.d.ts +34 -0
  275. package/types/node_modules/openai/resources/chat/completions.d.mts +2 -0
  276. package/types/node_modules/openai/resources/chat/completions.d.ts +2 -0
  277. package/types/node_modules/openai/resources/chat/index.d.mts +3 -0
  278. package/types/node_modules/openai/resources/chat/index.d.ts +3 -0
  279. package/types/node_modules/openai/resources/chat.d.mts +2 -0
  280. package/types/node_modules/openai/resources/chat.d.ts +2 -0
  281. package/types/node_modules/openai/resources/completions.d.mts +329 -0
  282. package/types/node_modules/openai/resources/completions.d.ts +329 -0
  283. package/types/node_modules/openai/resources/containers/containers.d.mts +200 -0
  284. package/types/node_modules/openai/resources/containers/containers.d.ts +200 -0
  285. package/types/node_modules/openai/resources/containers/files/content.d.mts +16 -0
  286. package/types/node_modules/openai/resources/containers/files/content.d.ts +16 -0
  287. package/types/node_modules/openai/resources/containers/files/files.d.mts +148 -0
  288. package/types/node_modules/openai/resources/containers/files/files.d.ts +148 -0
  289. package/types/node_modules/openai/resources/containers/files/index.d.mts +3 -0
  290. package/types/node_modules/openai/resources/containers/files/index.d.ts +3 -0
  291. package/types/node_modules/openai/resources/containers/files.d.mts +2 -0
  292. package/types/node_modules/openai/resources/containers/files.d.ts +2 -0
  293. package/types/node_modules/openai/resources/containers/index.d.mts +3 -0
  294. package/types/node_modules/openai/resources/containers/index.d.ts +3 -0
  295. package/types/node_modules/openai/resources/containers.d.mts +2 -0
  296. package/types/node_modules/openai/resources/containers.d.ts +2 -0
  297. package/types/node_modules/openai/resources/conversations/conversations.d.mts +176 -0
  298. package/types/node_modules/openai/resources/conversations/conversations.d.ts +176 -0
  299. package/types/node_modules/openai/resources/conversations/index.d.mts +3 -0
  300. package/types/node_modules/openai/resources/conversations/index.d.ts +3 -0
  301. package/types/node_modules/openai/resources/conversations/items.d.mts +367 -0
  302. package/types/node_modules/openai/resources/conversations/items.d.ts +367 -0
  303. package/types/node_modules/openai/resources/conversations.d.mts +2 -0
  304. package/types/node_modules/openai/resources/conversations.d.ts +2 -0
  305. package/types/node_modules/openai/resources/embeddings.d.mts +113 -0
  306. package/types/node_modules/openai/resources/embeddings.d.ts +113 -0
  307. package/types/node_modules/openai/resources/evals/evals.d.mts +735 -0
  308. package/types/node_modules/openai/resources/evals/evals.d.ts +735 -0
  309. package/types/node_modules/openai/resources/evals/index.d.mts +3 -0
  310. package/types/node_modules/openai/resources/evals/index.d.ts +3 -0
  311. package/types/node_modules/openai/resources/evals/runs/index.d.mts +3 -0
  312. package/types/node_modules/openai/resources/evals/runs/index.d.ts +3 -0
  313. package/types/node_modules/openai/resources/evals/runs/output-items.d.mts +382 -0
  314. package/types/node_modules/openai/resources/evals/runs/output-items.d.ts +382 -0
  315. package/types/node_modules/openai/resources/evals/runs/runs.d.mts +2290 -0
  316. package/types/node_modules/openai/resources/evals/runs/runs.d.ts +2290 -0
  317. package/types/node_modules/openai/resources/evals/runs.d.mts +2 -0
  318. package/types/node_modules/openai/resources/evals/runs.d.ts +2 -0
  319. package/types/node_modules/openai/resources/evals.d.mts +2 -0
  320. package/types/node_modules/openai/resources/evals.d.ts +2 -0
  321. package/types/node_modules/openai/resources/files.d.mts +164 -0
  322. package/types/node_modules/openai/resources/files.d.ts +164 -0
  323. package/types/node_modules/openai/resources/fine-tuning/alpha/alpha.d.mts +10 -0
  324. package/types/node_modules/openai/resources/fine-tuning/alpha/alpha.d.ts +10 -0
  325. package/types/node_modules/openai/resources/fine-tuning/alpha/graders.d.mts +119 -0
  326. package/types/node_modules/openai/resources/fine-tuning/alpha/graders.d.ts +119 -0
  327. package/types/node_modules/openai/resources/fine-tuning/alpha/index.d.mts +3 -0
  328. package/types/node_modules/openai/resources/fine-tuning/alpha/index.d.ts +3 -0
  329. package/types/node_modules/openai/resources/fine-tuning/alpha.d.mts +2 -0
  330. package/types/node_modules/openai/resources/fine-tuning/alpha.d.ts +2 -0
  331. package/types/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.d.mts +10 -0
  332. package/types/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.d.ts +10 -0
  333. package/types/node_modules/openai/resources/fine-tuning/checkpoints/index.d.mts +3 -0
  334. package/types/node_modules/openai/resources/fine-tuning/checkpoints/index.d.ts +3 -0
  335. package/types/node_modules/openai/resources/fine-tuning/checkpoints/permissions.d.mts +160 -0
  336. package/types/node_modules/openai/resources/fine-tuning/checkpoints/permissions.d.ts +160 -0
  337. package/types/node_modules/openai/resources/fine-tuning/checkpoints.d.mts +2 -0
  338. package/types/node_modules/openai/resources/fine-tuning/checkpoints.d.ts +2 -0
  339. package/types/node_modules/openai/resources/fine-tuning/fine-tuning.d.mts +22 -0
  340. package/types/node_modules/openai/resources/fine-tuning/fine-tuning.d.ts +22 -0
  341. package/types/node_modules/openai/resources/fine-tuning/index.d.mts +6 -0
  342. package/types/node_modules/openai/resources/fine-tuning/index.d.ts +6 -0
  343. package/types/node_modules/openai/resources/fine-tuning/jobs/checkpoints.d.mts +74 -0
  344. package/types/node_modules/openai/resources/fine-tuning/jobs/checkpoints.d.ts +74 -0
  345. package/types/node_modules/openai/resources/fine-tuning/jobs/index.d.mts +3 -0
  346. package/types/node_modules/openai/resources/fine-tuning/jobs/index.d.ts +3 -0
  347. package/types/node_modules/openai/resources/fine-tuning/jobs/jobs.d.mts +528 -0
  348. package/types/node_modules/openai/resources/fine-tuning/jobs/jobs.d.ts +528 -0
  349. package/types/node_modules/openai/resources/fine-tuning/jobs.d.mts +2 -0
  350. package/types/node_modules/openai/resources/fine-tuning/jobs.d.ts +2 -0
  351. package/types/node_modules/openai/resources/fine-tuning/methods.d.mts +120 -0
  352. package/types/node_modules/openai/resources/fine-tuning/methods.d.ts +120 -0
  353. package/types/node_modules/openai/resources/fine-tuning.d.mts +2 -0
  354. package/types/node_modules/openai/resources/fine-tuning.d.ts +2 -0
  355. package/types/node_modules/openai/resources/graders/grader-models.d.mts +304 -0
  356. package/types/node_modules/openai/resources/graders/grader-models.d.ts +304 -0
  357. package/types/node_modules/openai/resources/graders/graders.d.mts +10 -0
  358. package/types/node_modules/openai/resources/graders/graders.d.ts +10 -0
  359. package/types/node_modules/openai/resources/graders/index.d.mts +3 -0
  360. package/types/node_modules/openai/resources/graders/index.d.ts +3 -0
  361. package/types/node_modules/openai/resources/graders.d.mts +2 -0
  362. package/types/node_modules/openai/resources/graders.d.ts +2 -0
  363. package/types/node_modules/openai/resources/images.d.mts +653 -0
  364. package/types/node_modules/openai/resources/images.d.ts +653 -0
  365. package/types/node_modules/openai/resources/index.d.mts +22 -0
  366. package/types/node_modules/openai/resources/index.d.ts +22 -0
  367. package/types/node_modules/openai/resources/models.d.mts +52 -0
  368. package/types/node_modules/openai/resources/models.d.ts +52 -0
  369. package/types/node_modules/openai/resources/moderations.d.mts +295 -0
  370. package/types/node_modules/openai/resources/moderations.d.ts +295 -0
  371. package/types/node_modules/openai/resources/realtime/client-secrets.d.mts +594 -0
  372. package/types/node_modules/openai/resources/realtime/client-secrets.d.ts +594 -0
  373. package/types/node_modules/openai/resources/realtime/index.d.mts +3 -0
  374. package/types/node_modules/openai/resources/realtime/index.d.ts +3 -0
  375. package/types/node_modules/openai/resources/realtime/realtime.d.mts +3828 -0
  376. package/types/node_modules/openai/resources/realtime/realtime.d.ts +3828 -0
  377. package/types/node_modules/openai/resources/realtime.d.mts +2 -0
  378. package/types/node_modules/openai/resources/realtime.d.ts +2 -0
  379. package/types/node_modules/openai/resources/responses/index.d.mts +3 -0
  380. package/types/node_modules/openai/resources/responses/index.d.ts +3 -0
  381. package/types/node_modules/openai/resources/responses/input-items.d.mts +65 -0
  382. package/types/node_modules/openai/resources/responses/input-items.d.ts +65 -0
  383. package/types/node_modules/openai/resources/responses/responses.d.mts +4705 -0
  384. package/types/node_modules/openai/resources/responses/responses.d.ts +4705 -0
  385. package/types/node_modules/openai/resources/responses.d.mts +2 -0
  386. package/types/node_modules/openai/resources/responses.d.ts +2 -0
  387. package/types/node_modules/openai/resources/shared.d.mts +265 -0
  388. package/types/node_modules/openai/resources/shared.d.ts +265 -0
  389. package/types/node_modules/openai/resources/uploads/index.d.mts +3 -0
  390. package/types/node_modules/openai/resources/uploads/index.d.ts +3 -0
  391. package/types/node_modules/openai/resources/uploads/parts.d.mts +51 -0
  392. package/types/node_modules/openai/resources/uploads/parts.d.ts +51 -0
  393. package/types/node_modules/openai/resources/uploads/uploads.d.mts +157 -0
  394. package/types/node_modules/openai/resources/uploads/uploads.d.ts +157 -0
  395. package/types/node_modules/openai/resources/uploads.d.mts +2 -0
  396. package/types/node_modules/openai/resources/uploads.d.ts +2 -0
  397. package/types/node_modules/openai/resources/vector-stores/file-batches.d.mts +172 -0
  398. package/types/node_modules/openai/resources/vector-stores/file-batches.d.ts +172 -0
  399. package/types/node_modules/openai/resources/vector-stores/files.d.mts +231 -0
  400. package/types/node_modules/openai/resources/vector-stores/files.d.ts +231 -0
  401. package/types/node_modules/openai/resources/vector-stores/index.d.mts +4 -0
  402. package/types/node_modules/openai/resources/vector-stores/index.d.ts +4 -0
  403. package/types/node_modules/openai/resources/vector-stores/vector-stores.d.mts +373 -0
  404. package/types/node_modules/openai/resources/vector-stores/vector-stores.d.ts +373 -0
  405. package/types/node_modules/openai/resources/vector-stores.d.mts +2 -0
  406. package/types/node_modules/openai/resources/vector-stores.d.ts +2 -0
  407. package/types/node_modules/openai/resources/webhooks.d.mts +587 -0
  408. package/types/node_modules/openai/resources/webhooks.d.ts +587 -0
  409. package/types/node_modules/openai/resources.d.mts +2 -0
  410. package/types/node_modules/openai/resources.d.ts +2 -0
  411. package/types/node_modules/openai/src/_vendor/zod-to-json-schema/LICENSE +15 -0
  412. package/types/node_modules/openai/streaming.d.mts +2 -0
  413. package/types/node_modules/openai/streaming.d.ts +2 -0
  414. package/types/node_modules/openai/uploads.d.mts +2 -0
  415. package/types/node_modules/openai/uploads.d.ts +2 -0
  416. package/types/node_modules/openai/version.d.mts +2 -0
  417. package/types/node_modules/openai/version.d.ts +2 -0
@@ -0,0 +1,733 @@
1
+ import { APIResource } from "../../../../core/resource.mjs";
2
+ import * as RunsAPI from "./runs.mjs";
3
+ import * as Shared from "../../../shared.mjs";
4
+ import * as AssistantsAPI from "../../assistants.mjs";
5
+ import * as MessagesAPI from "../messages.mjs";
6
+ import * as ThreadsAPI from "../threads.mjs";
7
+ import * as StepsAPI from "./steps.mjs";
8
+ import { CodeInterpreterLogs, CodeInterpreterOutputImage, CodeInterpreterToolCall, CodeInterpreterToolCallDelta, FileSearchToolCall, FileSearchToolCallDelta, FunctionToolCall, FunctionToolCallDelta, MessageCreationStepDetails, RunStep, RunStepDelta, RunStepDeltaEvent, RunStepDeltaMessageDelta, RunStepInclude, RunStepsPage, StepListParams, StepRetrieveParams, Steps, ToolCall, ToolCallDelta, ToolCallDeltaObject, ToolCallsStepDetails } from "./steps.mjs";
9
+ import { APIPromise } from "../../../../core/api-promise.mjs";
10
+ import { CursorPage, type CursorPageParams, PagePromise } from "../../../../core/pagination.mjs";
11
+ import { Stream } from "../../../../core/streaming.mjs";
12
+ import { RequestOptions } from "../../../../internal/request-options.mjs";
13
+ import { AssistantStream, RunCreateParamsBaseStream } from "../../../../lib/AssistantStream.mjs";
14
+ import { RunSubmitToolOutputsParamsStream } from "../../../../lib/AssistantStream.mjs";
15
+ /**
16
+ * @deprecated The Assistants API is deprecated in favor of the Responses API
17
+ */
18
+ export declare class Runs extends APIResource {
19
+ steps: StepsAPI.Steps;
20
+ /**
21
+ * Create a run.
22
+ *
23
+ * @deprecated The Assistants API is deprecated in favor of the Responses API
24
+ */
25
+ create(threadID: string, params: RunCreateParamsNonStreaming, options?: RequestOptions): APIPromise<Run>;
26
+ create(threadID: string, params: RunCreateParamsStreaming, options?: RequestOptions): APIPromise<Stream<AssistantsAPI.AssistantStreamEvent>>;
27
+ create(threadID: string, params: RunCreateParamsBase, options?: RequestOptions): APIPromise<Stream<AssistantsAPI.AssistantStreamEvent> | Run>;
28
+ /**
29
+ * Retrieves a run.
30
+ *
31
+ * @deprecated The Assistants API is deprecated in favor of the Responses API
32
+ */
33
+ retrieve(runID: string, params: RunRetrieveParams, options?: RequestOptions): APIPromise<Run>;
34
+ /**
35
+ * Modifies a run.
36
+ *
37
+ * @deprecated The Assistants API is deprecated in favor of the Responses API
38
+ */
39
+ update(runID: string, params: RunUpdateParams, options?: RequestOptions): APIPromise<Run>;
40
+ /**
41
+ * Returns a list of runs belonging to a thread.
42
+ *
43
+ * @deprecated The Assistants API is deprecated in favor of the Responses API
44
+ */
45
+ list(threadID: string, query?: RunListParams | null | undefined, options?: RequestOptions): PagePromise<RunsPage, Run>;
46
+ /**
47
+ * Cancels a run that is `in_progress`.
48
+ *
49
+ * @deprecated The Assistants API is deprecated in favor of the Responses API
50
+ */
51
+ cancel(runID: string, params: RunCancelParams, options?: RequestOptions): APIPromise<Run>;
52
+ /**
53
+ * A helper to create a run an poll for a terminal state. More information on Run
54
+ * lifecycles can be found here:
55
+ * https://platform.openai.com/docs/assistants/how-it-works/runs-and-run-steps
56
+ */
57
+ createAndPoll(threadId: string, body: RunCreateParamsNonStreaming, options?: RequestOptions & {
58
+ pollIntervalMs?: number;
59
+ }): Promise<Run>;
60
+ /**
61
+ * Create a Run stream
62
+ *
63
+ * @deprecated use `stream` instead
64
+ */
65
+ createAndStream(threadId: string, body: RunCreateParamsBaseStream, options?: RequestOptions): AssistantStream;
66
+ /**
67
+ * A helper to poll a run status until it reaches a terminal state. More
68
+ * information on Run lifecycles can be found here:
69
+ * https://platform.openai.com/docs/assistants/how-it-works/runs-and-run-steps
70
+ */
71
+ poll(runId: string, params: RunRetrieveParams, options?: RequestOptions & {
72
+ pollIntervalMs?: number;
73
+ }): Promise<Run>;
74
+ /**
75
+ * Create a Run stream
76
+ */
77
+ stream(threadId: string, body: RunCreateParamsBaseStream, options?: RequestOptions): AssistantStream;
78
+ /**
79
+ * When a run has the `status: "requires_action"` and `required_action.type` is
80
+ * `submit_tool_outputs`, this endpoint can be used to submit the outputs from the
81
+ * tool calls once they're all completed. All outputs must be submitted in a single
82
+ * request.
83
+ *
84
+ * @deprecated The Assistants API is deprecated in favor of the Responses API
85
+ */
86
+ submitToolOutputs(runID: string, params: RunSubmitToolOutputsParamsNonStreaming, options?: RequestOptions): APIPromise<Run>;
87
+ submitToolOutputs(runID: string, params: RunSubmitToolOutputsParamsStreaming, options?: RequestOptions): APIPromise<Stream<AssistantsAPI.AssistantStreamEvent>>;
88
+ submitToolOutputs(runID: string, params: RunSubmitToolOutputsParamsBase, options?: RequestOptions): APIPromise<Stream<AssistantsAPI.AssistantStreamEvent> | Run>;
89
+ /**
90
+ * A helper to submit a tool output to a run and poll for a terminal run state.
91
+ * More information on Run lifecycles can be found here:
92
+ * https://platform.openai.com/docs/assistants/how-it-works/runs-and-run-steps
93
+ */
94
+ submitToolOutputsAndPoll(runId: string, params: RunSubmitToolOutputsParamsNonStreaming, options?: RequestOptions & {
95
+ pollIntervalMs?: number;
96
+ }): Promise<Run>;
97
+ /**
98
+ * Submit the tool outputs from a previous run and stream the run to a terminal
99
+ * state. More information on Run lifecycles can be found here:
100
+ * https://platform.openai.com/docs/assistants/how-it-works/runs-and-run-steps
101
+ */
102
+ submitToolOutputsStream(runId: string, params: RunSubmitToolOutputsParamsStream, options?: RequestOptions): AssistantStream;
103
+ }
104
+ export type RunsPage = CursorPage<Run>;
105
+ /**
106
+ * Tool call objects
107
+ */
108
+ export interface RequiredActionFunctionToolCall {
109
+ /**
110
+ * The ID of the tool call. This ID must be referenced when you submit the tool
111
+ * outputs in using the
112
+ * [Submit tool outputs to run](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs)
113
+ * endpoint.
114
+ */
115
+ id: string;
116
+ /**
117
+ * The function definition.
118
+ */
119
+ function: RequiredActionFunctionToolCall.Function;
120
+ /**
121
+ * The type of tool call the output is required for. For now, this is always
122
+ * `function`.
123
+ */
124
+ type: 'function';
125
+ }
126
+ export declare namespace RequiredActionFunctionToolCall {
127
+ /**
128
+ * The function definition.
129
+ */
130
+ interface Function {
131
+ /**
132
+ * The arguments that the model expects you to pass to the function.
133
+ */
134
+ arguments: string;
135
+ /**
136
+ * The name of the function.
137
+ */
138
+ name: string;
139
+ }
140
+ }
141
+ /**
142
+ * Represents an execution run on a
143
+ * [thread](https://platform.openai.com/docs/api-reference/threads).
144
+ */
145
+ export interface Run {
146
+ /**
147
+ * The identifier, which can be referenced in API endpoints.
148
+ */
149
+ id: string;
150
+ /**
151
+ * The ID of the
152
+ * [assistant](https://platform.openai.com/docs/api-reference/assistants) used for
153
+ * execution of this run.
154
+ */
155
+ assistant_id: string;
156
+ /**
157
+ * The Unix timestamp (in seconds) for when the run was cancelled.
158
+ */
159
+ cancelled_at: number | null;
160
+ /**
161
+ * The Unix timestamp (in seconds) for when the run was completed.
162
+ */
163
+ completed_at: number | null;
164
+ /**
165
+ * The Unix timestamp (in seconds) for when the run was created.
166
+ */
167
+ created_at: number;
168
+ /**
169
+ * The Unix timestamp (in seconds) for when the run will expire.
170
+ */
171
+ expires_at: number | null;
172
+ /**
173
+ * The Unix timestamp (in seconds) for when the run failed.
174
+ */
175
+ failed_at: number | null;
176
+ /**
177
+ * Details on why the run is incomplete. Will be `null` if the run is not
178
+ * incomplete.
179
+ */
180
+ incomplete_details: Run.IncompleteDetails | null;
181
+ /**
182
+ * The instructions that the
183
+ * [assistant](https://platform.openai.com/docs/api-reference/assistants) used for
184
+ * this run.
185
+ */
186
+ instructions: string;
187
+ /**
188
+ * The last error associated with this run. Will be `null` if there are no errors.
189
+ */
190
+ last_error: Run.LastError | null;
191
+ /**
192
+ * The maximum number of completion tokens specified to have been used over the
193
+ * course of the run.
194
+ */
195
+ max_completion_tokens: number | null;
196
+ /**
197
+ * The maximum number of prompt tokens specified to have been used over the course
198
+ * of the run.
199
+ */
200
+ max_prompt_tokens: number | null;
201
+ /**
202
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
203
+ * for storing additional information about the object in a structured format, and
204
+ * querying for objects via API or the dashboard.
205
+ *
206
+ * Keys are strings with a maximum length of 64 characters. Values are strings with
207
+ * a maximum length of 512 characters.
208
+ */
209
+ metadata: Shared.Metadata | null;
210
+ /**
211
+ * The model that the
212
+ * [assistant](https://platform.openai.com/docs/api-reference/assistants) used for
213
+ * this run.
214
+ */
215
+ model: string;
216
+ /**
217
+ * The object type, which is always `thread.run`.
218
+ */
219
+ object: 'thread.run';
220
+ /**
221
+ * Whether to enable
222
+ * [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling)
223
+ * during tool use.
224
+ */
225
+ parallel_tool_calls: boolean;
226
+ /**
227
+ * Details on the action required to continue the run. Will be `null` if no action
228
+ * is required.
229
+ */
230
+ required_action: Run.RequiredAction | null;
231
+ /**
232
+ * Specifies the format that the model must output. Compatible with
233
+ * [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
234
+ * [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4),
235
+ * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
236
+ *
237
+ * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
238
+ * Outputs which ensures the model will match your supplied JSON schema. Learn more
239
+ * in the
240
+ * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
241
+ *
242
+ * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
243
+ * message the model generates is valid JSON.
244
+ *
245
+ * **Important:** when using JSON mode, you **must** also instruct the model to
246
+ * produce JSON yourself via a system or user message. Without this, the model may
247
+ * generate an unending stream of whitespace until the generation reaches the token
248
+ * limit, resulting in a long-running and seemingly "stuck" request. Also note that
249
+ * the message content may be partially cut off if `finish_reason="length"`, which
250
+ * indicates the generation exceeded `max_tokens` or the conversation exceeded the
251
+ * max context length.
252
+ */
253
+ response_format: ThreadsAPI.AssistantResponseFormatOption | null;
254
+ /**
255
+ * The Unix timestamp (in seconds) for when the run was started.
256
+ */
257
+ started_at: number | null;
258
+ /**
259
+ * The status of the run, which can be either `queued`, `in_progress`,
260
+ * `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`,
261
+ * `incomplete`, or `expired`.
262
+ */
263
+ status: RunStatus;
264
+ /**
265
+ * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads)
266
+ * that was executed on as a part of this run.
267
+ */
268
+ thread_id: string;
269
+ /**
270
+ * Controls which (if any) tool is called by the model. `none` means the model will
271
+ * not call any tools and instead generates a message. `auto` is the default value
272
+ * and means the model can pick between generating a message or calling one or more
273
+ * tools. `required` means the model must call one or more tools before responding
274
+ * to the user. Specifying a particular tool like `{"type": "file_search"}` or
275
+ * `{"type": "function", "function": {"name": "my_function"}}` forces the model to
276
+ * call that tool.
277
+ */
278
+ tool_choice: ThreadsAPI.AssistantToolChoiceOption | null;
279
+ /**
280
+ * The list of tools that the
281
+ * [assistant](https://platform.openai.com/docs/api-reference/assistants) used for
282
+ * this run.
283
+ */
284
+ tools: Array<AssistantsAPI.AssistantTool>;
285
+ /**
286
+ * Controls for how a thread will be truncated prior to the run. Use this to
287
+ * control the initial context window of the run.
288
+ */
289
+ truncation_strategy: Run.TruncationStrategy | null;
290
+ /**
291
+ * Usage statistics related to the run. This value will be `null` if the run is not
292
+ * in a terminal state (i.e. `in_progress`, `queued`, etc.).
293
+ */
294
+ usage: Run.Usage | null;
295
+ /**
296
+ * The sampling temperature used for this run. If not set, defaults to 1.
297
+ */
298
+ temperature?: number | null;
299
+ /**
300
+ * The nucleus sampling value used for this run. If not set, defaults to 1.
301
+ */
302
+ top_p?: number | null;
303
+ }
304
+ export declare namespace Run {
305
+ /**
306
+ * Details on why the run is incomplete. Will be `null` if the run is not
307
+ * incomplete.
308
+ */
309
+ interface IncompleteDetails {
310
+ /**
311
+ * The reason why the run is incomplete. This will point to which specific token
312
+ * limit was reached over the course of the run.
313
+ */
314
+ reason?: 'max_completion_tokens' | 'max_prompt_tokens';
315
+ }
316
+ /**
317
+ * The last error associated with this run. Will be `null` if there are no errors.
318
+ */
319
+ interface LastError {
320
+ /**
321
+ * One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.
322
+ */
323
+ code: 'server_error' | 'rate_limit_exceeded' | 'invalid_prompt';
324
+ /**
325
+ * A human-readable description of the error.
326
+ */
327
+ message: string;
328
+ }
329
+ /**
330
+ * Details on the action required to continue the run. Will be `null` if no action
331
+ * is required.
332
+ */
333
+ interface RequiredAction {
334
+ /**
335
+ * Details on the tool outputs needed for this run to continue.
336
+ */
337
+ submit_tool_outputs: RequiredAction.SubmitToolOutputs;
338
+ /**
339
+ * For now, this is always `submit_tool_outputs`.
340
+ */
341
+ type: 'submit_tool_outputs';
342
+ }
343
+ namespace RequiredAction {
344
+ /**
345
+ * Details on the tool outputs needed for this run to continue.
346
+ */
347
+ interface SubmitToolOutputs {
348
+ /**
349
+ * A list of the relevant tool calls.
350
+ */
351
+ tool_calls: Array<RunsAPI.RequiredActionFunctionToolCall>;
352
+ }
353
+ }
354
+ /**
355
+ * Controls for how a thread will be truncated prior to the run. Use this to
356
+ * control the initial context window of the run.
357
+ */
358
+ interface TruncationStrategy {
359
+ /**
360
+ * The truncation strategy to use for the thread. The default is `auto`. If set to
361
+ * `last_messages`, the thread will be truncated to the n most recent messages in
362
+ * the thread. When set to `auto`, messages in the middle of the thread will be
363
+ * dropped to fit the context length of the model, `max_prompt_tokens`.
364
+ */
365
+ type: 'auto' | 'last_messages';
366
+ /**
367
+ * The number of most recent messages from the thread when constructing the context
368
+ * for the run.
369
+ */
370
+ last_messages?: number | null;
371
+ }
372
+ /**
373
+ * Usage statistics related to the run. This value will be `null` if the run is not
374
+ * in a terminal state (i.e. `in_progress`, `queued`, etc.).
375
+ */
376
+ interface Usage {
377
+ /**
378
+ * Number of completion tokens used over the course of the run.
379
+ */
380
+ completion_tokens: number;
381
+ /**
382
+ * Number of prompt tokens used over the course of the run.
383
+ */
384
+ prompt_tokens: number;
385
+ /**
386
+ * Total number of tokens used (prompt + completion).
387
+ */
388
+ total_tokens: number;
389
+ }
390
+ }
391
+ /**
392
+ * The status of the run, which can be either `queued`, `in_progress`,
393
+ * `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`,
394
+ * `incomplete`, or `expired`.
395
+ */
396
+ export type RunStatus = 'queued' | 'in_progress' | 'requires_action' | 'cancelling' | 'cancelled' | 'failed' | 'completed' | 'incomplete' | 'expired';
397
+ export type RunCreateParams = RunCreateParamsNonStreaming | RunCreateParamsStreaming;
398
+ export interface RunCreateParamsBase {
399
+ /**
400
+ * Body param: The ID of the
401
+ * [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to
402
+ * execute this run.
403
+ */
404
+ assistant_id: string;
405
+ /**
406
+ * Query param: A list of additional fields to include in the response. Currently
407
+ * the only supported value is
408
+ * `step_details.tool_calls[*].file_search.results[*].content` to fetch the file
409
+ * search result content.
410
+ *
411
+ * See the
412
+ * [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)
413
+ * for more information.
414
+ */
415
+ include?: Array<StepsAPI.RunStepInclude>;
416
+ /**
417
+ * Body param: Appends additional instructions at the end of the instructions for
418
+ * the run. This is useful for modifying the behavior on a per-run basis without
419
+ * overriding other instructions.
420
+ */
421
+ additional_instructions?: string | null;
422
+ /**
423
+ * Body param: Adds additional messages to the thread before creating the run.
424
+ */
425
+ additional_messages?: Array<RunCreateParams.AdditionalMessage> | null;
426
+ /**
427
+ * Body param: Overrides the
428
+ * [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant)
429
+ * of the assistant. This is useful for modifying the behavior on a per-run basis.
430
+ */
431
+ instructions?: string | null;
432
+ /**
433
+ * Body param: The maximum number of completion tokens that may be used over the
434
+ * course of the run. The run will make a best effort to use only the number of
435
+ * completion tokens specified, across multiple turns of the run. If the run
436
+ * exceeds the number of completion tokens specified, the run will end with status
437
+ * `incomplete`. See `incomplete_details` for more info.
438
+ */
439
+ max_completion_tokens?: number | null;
440
+ /**
441
+ * Body param: The maximum number of prompt tokens that may be used over the course
442
+ * of the run. The run will make a best effort to use only the number of prompt
443
+ * tokens specified, across multiple turns of the run. If the run exceeds the
444
+ * number of prompt tokens specified, the run will end with status `incomplete`.
445
+ * See `incomplete_details` for more info.
446
+ */
447
+ max_prompt_tokens?: number | null;
448
+ /**
449
+ * Body param: Set of 16 key-value pairs that can be attached to an object. This
450
+ * can be useful for storing additional information about the object in a
451
+ * structured format, and querying for objects via API or the dashboard.
452
+ *
453
+ * Keys are strings with a maximum length of 64 characters. Values are strings with
454
+ * a maximum length of 512 characters.
455
+ */
456
+ metadata?: Shared.Metadata | null;
457
+ /**
458
+ * Body param: The ID of the
459
+ * [Model](https://platform.openai.com/docs/api-reference/models) to be used to
460
+ * execute this run. If a value is provided here, it will override the model
461
+ * associated with the assistant. If not, the model associated with the assistant
462
+ * will be used.
463
+ */
464
+ model?: (string & {}) | Shared.ChatModel | null;
465
+ /**
466
+ * Body param: Whether to enable
467
+ * [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling)
468
+ * during tool use.
469
+ */
470
+ parallel_tool_calls?: boolean;
471
+ /**
472
+ * Body param: Constrains effort on reasoning for
473
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
474
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
475
+ * effort can result in faster responses and fewer tokens used on reasoning in a
476
+ * response.
477
+ */
478
+ reasoning_effort?: Shared.ReasoningEffort | null;
479
+ /**
480
+ * Body param: Specifies the format that the model must output. Compatible with
481
+ * [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
482
+ * [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4),
483
+ * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
484
+ *
485
+ * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
486
+ * Outputs which ensures the model will match your supplied JSON schema. Learn more
487
+ * in the
488
+ * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
489
+ *
490
+ * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
491
+ * message the model generates is valid JSON.
492
+ *
493
+ * **Important:** when using JSON mode, you **must** also instruct the model to
494
+ * produce JSON yourself via a system or user message. Without this, the model may
495
+ * generate an unending stream of whitespace until the generation reaches the token
496
+ * limit, resulting in a long-running and seemingly "stuck" request. Also note that
497
+ * the message content may be partially cut off if `finish_reason="length"`, which
498
+ * indicates the generation exceeded `max_tokens` or the conversation exceeded the
499
+ * max context length.
500
+ */
501
+ response_format?: ThreadsAPI.AssistantResponseFormatOption | null;
502
+ /**
503
+ * Body param: If `true`, returns a stream of events that happen during the Run as
504
+ * server-sent events, terminating when the Run enters a terminal state with a
505
+ * `data: [DONE]` message.
506
+ */
507
+ stream?: boolean | null;
508
+ /**
509
+ * Body param: What sampling temperature to use, between 0 and 2. Higher values
510
+ * like 0.8 will make the output more random, while lower values like 0.2 will make
511
+ * it more focused and deterministic.
512
+ */
513
+ temperature?: number | null;
514
+ /**
515
+ * Body param: Controls which (if any) tool is called by the model. `none` means
516
+ * the model will not call any tools and instead generates a message. `auto` is the
517
+ * default value and means the model can pick between generating a message or
518
+ * calling one or more tools. `required` means the model must call one or more
519
+ * tools before responding to the user. Specifying a particular tool like
520
+ * `{"type": "file_search"}` or
521
+ * `{"type": "function", "function": {"name": "my_function"}}` forces the model to
522
+ * call that tool.
523
+ */
524
+ tool_choice?: ThreadsAPI.AssistantToolChoiceOption | null;
525
+ /**
526
+ * Body param: Override the tools the assistant can use for this run. This is
527
+ * useful for modifying the behavior on a per-run basis.
528
+ */
529
+ tools?: Array<AssistantsAPI.AssistantTool> | null;
530
+ /**
531
+ * Body param: An alternative to sampling with temperature, called nucleus
532
+ * sampling, where the model considers the results of the tokens with top_p
533
+ * probability mass. So 0.1 means only the tokens comprising the top 10%
534
+ * probability mass are considered.
535
+ *
536
+ * We generally recommend altering this or temperature but not both.
537
+ */
538
+ top_p?: number | null;
539
+ /**
540
+ * Body param: Controls for how a thread will be truncated prior to the run. Use
541
+ * this to control the initial context window of the run.
542
+ */
543
+ truncation_strategy?: RunCreateParams.TruncationStrategy | null;
544
+ }
545
+ export declare namespace RunCreateParams {
546
+ interface AdditionalMessage {
547
+ /**
548
+ * The text contents of the message.
549
+ */
550
+ content: string | Array<MessagesAPI.MessageContentPartParam>;
551
+ /**
552
+ * The role of the entity that is creating the message. Allowed values include:
553
+ *
554
+ * - `user`: Indicates the message is sent by an actual user and should be used in
555
+ * most cases to represent user-generated messages.
556
+ * - `assistant`: Indicates the message is generated by the assistant. Use this
557
+ * value to insert messages from the assistant into the conversation.
558
+ */
559
+ role: 'user' | 'assistant';
560
+ /**
561
+ * A list of files attached to the message, and the tools they should be added to.
562
+ */
563
+ attachments?: Array<AdditionalMessage.Attachment> | null;
564
+ /**
565
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
566
+ * for storing additional information about the object in a structured format, and
567
+ * querying for objects via API or the dashboard.
568
+ *
569
+ * Keys are strings with a maximum length of 64 characters. Values are strings with
570
+ * a maximum length of 512 characters.
571
+ */
572
+ metadata?: Shared.Metadata | null;
573
+ }
574
+ namespace AdditionalMessage {
575
+ interface Attachment {
576
+ /**
577
+ * The ID of the file to attach to the message.
578
+ */
579
+ file_id?: string;
580
+ /**
581
+ * The tools to add this file to.
582
+ */
583
+ tools?: Array<AssistantsAPI.CodeInterpreterTool | Attachment.FileSearch>;
584
+ }
585
+ namespace Attachment {
586
+ interface FileSearch {
587
+ /**
588
+ * The type of tool being defined: `file_search`
589
+ */
590
+ type: 'file_search';
591
+ }
592
+ }
593
+ }
594
+ /**
595
+ * Controls for how a thread will be truncated prior to the run. Use this to
596
+ * control the initial context window of the run.
597
+ */
598
+ interface TruncationStrategy {
599
+ /**
600
+ * The truncation strategy to use for the thread. The default is `auto`. If set to
601
+ * `last_messages`, the thread will be truncated to the n most recent messages in
602
+ * the thread. When set to `auto`, messages in the middle of the thread will be
603
+ * dropped to fit the context length of the model, `max_prompt_tokens`.
604
+ */
605
+ type: 'auto' | 'last_messages';
606
+ /**
607
+ * The number of most recent messages from the thread when constructing the context
608
+ * for the run.
609
+ */
610
+ last_messages?: number | null;
611
+ }
612
+ type RunCreateParamsNonStreaming = RunsAPI.RunCreateParamsNonStreaming;
613
+ type RunCreateParamsStreaming = RunsAPI.RunCreateParamsStreaming;
614
+ }
615
+ export interface RunCreateParamsNonStreaming extends RunCreateParamsBase {
616
+ /**
617
+ * Body param: If `true`, returns a stream of events that happen during the Run as
618
+ * server-sent events, terminating when the Run enters a terminal state with a
619
+ * `data: [DONE]` message.
620
+ */
621
+ stream?: false | null;
622
+ }
623
+ export interface RunCreateParamsStreaming extends RunCreateParamsBase {
624
+ /**
625
+ * Body param: If `true`, returns a stream of events that happen during the Run as
626
+ * server-sent events, terminating when the Run enters a terminal state with a
627
+ * `data: [DONE]` message.
628
+ */
629
+ stream: true;
630
+ }
631
+ export interface RunRetrieveParams {
632
+ /**
633
+ * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads)
634
+ * that was run.
635
+ */
636
+ thread_id: string;
637
+ }
638
+ export interface RunUpdateParams {
639
+ /**
640
+ * Path param: The ID of the
641
+ * [thread](https://platform.openai.com/docs/api-reference/threads) that was run.
642
+ */
643
+ thread_id: string;
644
+ /**
645
+ * Body param: Set of 16 key-value pairs that can be attached to an object. This
646
+ * can be useful for storing additional information about the object in a
647
+ * structured format, and querying for objects via API or the dashboard.
648
+ *
649
+ * Keys are strings with a maximum length of 64 characters. Values are strings with
650
+ * a maximum length of 512 characters.
651
+ */
652
+ metadata?: Shared.Metadata | null;
653
+ }
654
+ export interface RunListParams extends CursorPageParams {
655
+ /**
656
+ * A cursor for use in pagination. `before` is an object ID that defines your place
657
+ * in the list. For instance, if you make a list request and receive 100 objects,
658
+ * starting with obj_foo, your subsequent call can include before=obj_foo in order
659
+ * to fetch the previous page of the list.
660
+ */
661
+ before?: string;
662
+ /**
663
+ * Sort order by the `created_at` timestamp of the objects. `asc` for ascending
664
+ * order and `desc` for descending order.
665
+ */
666
+ order?: 'asc' | 'desc';
667
+ }
668
+ export interface RunCancelParams {
669
+ /**
670
+ * The ID of the thread to which this run belongs.
671
+ */
672
+ thread_id: string;
673
+ }
674
+ export type RunCreateAndPollParams = ThreadsAPI.ThreadCreateAndRunParamsNonStreaming;
675
+ export type RunCreateAndStreamParams = RunCreateParamsBaseStream;
676
+ export type RunStreamParams = RunCreateParamsBaseStream;
677
+ export type RunSubmitToolOutputsParams = RunSubmitToolOutputsParamsNonStreaming | RunSubmitToolOutputsParamsStreaming;
678
+ export interface RunSubmitToolOutputsParamsBase {
679
+ /**
680
+ * Path param: The ID of the
681
+ * [thread](https://platform.openai.com/docs/api-reference/threads) to which this
682
+ * run belongs.
683
+ */
684
+ thread_id: string;
685
+ /**
686
+ * Body param: A list of tools for which the outputs are being submitted.
687
+ */
688
+ tool_outputs: Array<RunSubmitToolOutputsParams.ToolOutput>;
689
+ /**
690
+ * Body param: If `true`, returns a stream of events that happen during the Run as
691
+ * server-sent events, terminating when the Run enters a terminal state with a
692
+ * `data: [DONE]` message.
693
+ */
694
+ stream?: boolean | null;
695
+ }
696
+ export declare namespace RunSubmitToolOutputsParams {
697
+ interface ToolOutput {
698
+ /**
699
+ * The output of the tool call to be submitted to continue the run.
700
+ */
701
+ output?: string;
702
+ /**
703
+ * The ID of the tool call in the `required_action` object within the run object
704
+ * the output is being submitted for.
705
+ */
706
+ tool_call_id?: string;
707
+ }
708
+ type RunSubmitToolOutputsParamsNonStreaming = RunsAPI.RunSubmitToolOutputsParamsNonStreaming;
709
+ type RunSubmitToolOutputsParamsStreaming = RunsAPI.RunSubmitToolOutputsParamsStreaming;
710
+ }
711
+ export interface RunSubmitToolOutputsParamsNonStreaming extends RunSubmitToolOutputsParamsBase {
712
+ /**
713
+ * Body param: If `true`, returns a stream of events that happen during the Run as
714
+ * server-sent events, terminating when the Run enters a terminal state with a
715
+ * `data: [DONE]` message.
716
+ */
717
+ stream?: false | null;
718
+ }
719
+ export interface RunSubmitToolOutputsParamsStreaming extends RunSubmitToolOutputsParamsBase {
720
+ /**
721
+ * Body param: If `true`, returns a stream of events that happen during the Run as
722
+ * server-sent events, terminating when the Run enters a terminal state with a
723
+ * `data: [DONE]` message.
724
+ */
725
+ stream: true;
726
+ }
727
+ export type RunSubmitToolOutputsAndPollParams = RunSubmitToolOutputsParamsNonStreaming;
728
+ export type RunSubmitToolOutputsStreamParams = RunSubmitToolOutputsParamsStream;
729
+ export declare namespace Runs {
730
+ export { type RequiredActionFunctionToolCall as RequiredActionFunctionToolCall, type Run as Run, type RunStatus as RunStatus, type RunsPage as RunsPage, type RunCreateParams as RunCreateParams, type RunCreateParamsNonStreaming as RunCreateParamsNonStreaming, type RunCreateParamsStreaming as RunCreateParamsStreaming, type RunRetrieveParams as RunRetrieveParams, type RunUpdateParams as RunUpdateParams, type RunListParams as RunListParams, type RunCreateAndPollParams, type RunCreateAndStreamParams, type RunStreamParams, type RunSubmitToolOutputsParams as RunSubmitToolOutputsParams, type RunSubmitToolOutputsParamsNonStreaming as RunSubmitToolOutputsParamsNonStreaming, type RunSubmitToolOutputsParamsStreaming as RunSubmitToolOutputsParamsStreaming, type RunSubmitToolOutputsAndPollParams, type RunSubmitToolOutputsStreamParams, };
731
+ export { Steps as Steps, type CodeInterpreterLogs as CodeInterpreterLogs, type CodeInterpreterOutputImage as CodeInterpreterOutputImage, type CodeInterpreterToolCall as CodeInterpreterToolCall, type CodeInterpreterToolCallDelta as CodeInterpreterToolCallDelta, type FileSearchToolCall as FileSearchToolCall, type FileSearchToolCallDelta as FileSearchToolCallDelta, type FunctionToolCall as FunctionToolCall, type FunctionToolCallDelta as FunctionToolCallDelta, type MessageCreationStepDetails as MessageCreationStepDetails, type RunStep as RunStep, type RunStepDelta as RunStepDelta, type RunStepDeltaEvent as RunStepDeltaEvent, type RunStepDeltaMessageDelta as RunStepDeltaMessageDelta, type RunStepInclude as RunStepInclude, type ToolCall as ToolCall, type ToolCallDelta as ToolCallDelta, type ToolCallDeltaObject as ToolCallDeltaObject, type ToolCallsStepDetails as ToolCallsStepDetails, type RunStepsPage as RunStepsPage, type StepRetrieveParams as StepRetrieveParams, type StepListParams as StepListParams, };
732
+ }
733
+ //# sourceMappingURL=runs.d.mts.map