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