@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,2290 @@
1
+ import { APIResource } from "../../../core/resource.mjs";
2
+ import * as Shared from "../../shared.mjs";
3
+ import * as ResponsesAPI from "../../responses/responses.mjs";
4
+ import * as CompletionsAPI from "../../chat/completions/completions.mjs";
5
+ import * as OutputItemsAPI from "./output-items.mjs";
6
+ import { OutputItemListParams, OutputItemListResponse, OutputItemListResponsesPage, OutputItemRetrieveParams, OutputItemRetrieveResponse, OutputItems } from "./output-items.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
+ export declare class Runs extends APIResource {
11
+ outputItems: OutputItemsAPI.OutputItems;
12
+ /**
13
+ * Kicks off a new run for a given evaluation, specifying the data source, and what
14
+ * model configuration to use to test. The datasource will be validated against the
15
+ * schema specified in the config of the evaluation.
16
+ */
17
+ create(evalID: string, body: RunCreateParams, options?: RequestOptions): APIPromise<RunCreateResponse>;
18
+ /**
19
+ * Get an evaluation run by ID.
20
+ */
21
+ retrieve(runID: string, params: RunRetrieveParams, options?: RequestOptions): APIPromise<RunRetrieveResponse>;
22
+ /**
23
+ * Get a list of runs for an evaluation.
24
+ */
25
+ list(evalID: string, query?: RunListParams | null | undefined, options?: RequestOptions): PagePromise<RunListResponsesPage, RunListResponse>;
26
+ /**
27
+ * Delete an eval run.
28
+ */
29
+ delete(runID: string, params: RunDeleteParams, options?: RequestOptions): APIPromise<RunDeleteResponse>;
30
+ /**
31
+ * Cancel an ongoing evaluation run.
32
+ */
33
+ cancel(runID: string, params: RunCancelParams, options?: RequestOptions): APIPromise<RunCancelResponse>;
34
+ }
35
+ export type RunListResponsesPage = CursorPage<RunListResponse>;
36
+ /**
37
+ * A CompletionsRunDataSource object describing a model sampling configuration.
38
+ */
39
+ export interface CreateEvalCompletionsRunDataSource {
40
+ /**
41
+ * Determines what populates the `item` namespace in this run's data source.
42
+ */
43
+ source: CreateEvalCompletionsRunDataSource.FileContent | CreateEvalCompletionsRunDataSource.FileID | CreateEvalCompletionsRunDataSource.StoredCompletions;
44
+ /**
45
+ * The type of run data source. Always `completions`.
46
+ */
47
+ type: 'completions';
48
+ /**
49
+ * Used when sampling from a model. Dictates the structure of the messages passed
50
+ * into the model. Can either be a reference to a prebuilt trajectory (ie,
51
+ * `item.input_trajectory`), or a template with variable references to the `item`
52
+ * namespace.
53
+ */
54
+ input_messages?: CreateEvalCompletionsRunDataSource.Template | CreateEvalCompletionsRunDataSource.ItemReference;
55
+ /**
56
+ * The name of the model to use for generating completions (e.g. "o3-mini").
57
+ */
58
+ model?: string;
59
+ sampling_params?: CreateEvalCompletionsRunDataSource.SamplingParams;
60
+ }
61
+ export declare namespace CreateEvalCompletionsRunDataSource {
62
+ interface FileContent {
63
+ /**
64
+ * The content of the jsonl file.
65
+ */
66
+ content: Array<FileContent.Content>;
67
+ /**
68
+ * The type of jsonl source. Always `file_content`.
69
+ */
70
+ type: 'file_content';
71
+ }
72
+ namespace FileContent {
73
+ interface Content {
74
+ item: {
75
+ [key: string]: unknown;
76
+ };
77
+ sample?: {
78
+ [key: string]: unknown;
79
+ };
80
+ }
81
+ }
82
+ interface FileID {
83
+ /**
84
+ * The identifier of the file.
85
+ */
86
+ id: string;
87
+ /**
88
+ * The type of jsonl source. Always `file_id`.
89
+ */
90
+ type: 'file_id';
91
+ }
92
+ /**
93
+ * A StoredCompletionsRunDataSource configuration describing a set of filters
94
+ */
95
+ interface StoredCompletions {
96
+ /**
97
+ * The type of source. Always `stored_completions`.
98
+ */
99
+ type: 'stored_completions';
100
+ /**
101
+ * An optional Unix timestamp to filter items created after this time.
102
+ */
103
+ created_after?: number | null;
104
+ /**
105
+ * An optional Unix timestamp to filter items created before this time.
106
+ */
107
+ created_before?: number | null;
108
+ /**
109
+ * An optional maximum number of items to return.
110
+ */
111
+ limit?: number | null;
112
+ /**
113
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
114
+ * for storing additional information about the object in a structured format, and
115
+ * querying for objects via API or the dashboard.
116
+ *
117
+ * Keys are strings with a maximum length of 64 characters. Values are strings with
118
+ * a maximum length of 512 characters.
119
+ */
120
+ metadata?: Shared.Metadata | null;
121
+ /**
122
+ * An optional model to filter by (e.g., 'gpt-4o').
123
+ */
124
+ model?: string | null;
125
+ }
126
+ interface Template {
127
+ /**
128
+ * A list of chat messages forming the prompt or context. May include variable
129
+ * references to the `item` namespace, ie {{item.name}}.
130
+ */
131
+ template: Array<ResponsesAPI.EasyInputMessage | Template.EvalItem>;
132
+ /**
133
+ * The type of input messages. Always `template`.
134
+ */
135
+ type: 'template';
136
+ }
137
+ namespace Template {
138
+ /**
139
+ * A message input to the model with a role indicating instruction following
140
+ * hierarchy. Instructions given with the `developer` or `system` role take
141
+ * precedence over instructions given with the `user` role. Messages with the
142
+ * `assistant` role are presumed to have been generated by the model in previous
143
+ * interactions.
144
+ */
145
+ interface EvalItem {
146
+ /**
147
+ * Inputs to the model - can contain template strings.
148
+ */
149
+ content: string | ResponsesAPI.ResponseInputText | EvalItem.OutputText | EvalItem.InputImage | ResponsesAPI.ResponseInputAudio | Array<unknown>;
150
+ /**
151
+ * The role of the message input. One of `user`, `assistant`, `system`, or
152
+ * `developer`.
153
+ */
154
+ role: 'user' | 'assistant' | 'system' | 'developer';
155
+ /**
156
+ * The type of the message input. Always `message`.
157
+ */
158
+ type?: 'message';
159
+ }
160
+ namespace EvalItem {
161
+ /**
162
+ * A text output from the model.
163
+ */
164
+ interface OutputText {
165
+ /**
166
+ * The text output from the model.
167
+ */
168
+ text: string;
169
+ /**
170
+ * The type of the output text. Always `output_text`.
171
+ */
172
+ type: 'output_text';
173
+ }
174
+ /**
175
+ * An image input to the model.
176
+ */
177
+ interface InputImage {
178
+ /**
179
+ * The URL of the image input.
180
+ */
181
+ image_url: string;
182
+ /**
183
+ * The type of the image input. Always `input_image`.
184
+ */
185
+ type: 'input_image';
186
+ /**
187
+ * The detail level of the image to be sent to the model. One of `high`, `low`, or
188
+ * `auto`. Defaults to `auto`.
189
+ */
190
+ detail?: string;
191
+ }
192
+ }
193
+ }
194
+ interface ItemReference {
195
+ /**
196
+ * A reference to a variable in the `item` namespace. Ie, "item.input_trajectory"
197
+ */
198
+ item_reference: string;
199
+ /**
200
+ * The type of input messages. Always `item_reference`.
201
+ */
202
+ type: 'item_reference';
203
+ }
204
+ interface SamplingParams {
205
+ /**
206
+ * The maximum number of tokens in the generated output.
207
+ */
208
+ max_completion_tokens?: number;
209
+ /**
210
+ * Constrains effort on reasoning for
211
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
212
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
213
+ * effort can result in faster responses and fewer tokens used on reasoning in a
214
+ * response.
215
+ */
216
+ reasoning_effort?: Shared.ReasoningEffort | null;
217
+ /**
218
+ * An object specifying the format that the model must output.
219
+ *
220
+ * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
221
+ * Outputs which ensures the model will match your supplied JSON schema. Learn more
222
+ * in the
223
+ * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
224
+ *
225
+ * Setting to `{ "type": "json_object" }` enables the older JSON mode, which
226
+ * ensures the message the model generates is valid JSON. Using `json_schema` is
227
+ * preferred for models that support it.
228
+ */
229
+ response_format?: Shared.ResponseFormatText | Shared.ResponseFormatJSONSchema | Shared.ResponseFormatJSONObject;
230
+ /**
231
+ * A seed value to initialize the randomness, during sampling.
232
+ */
233
+ seed?: number;
234
+ /**
235
+ * A higher temperature increases randomness in the outputs.
236
+ */
237
+ temperature?: number;
238
+ /**
239
+ * A list of tools the model may call. Currently, only functions are supported as a
240
+ * tool. Use this to provide a list of functions the model may generate JSON inputs
241
+ * for. A max of 128 functions are supported.
242
+ */
243
+ tools?: Array<CompletionsAPI.ChatCompletionFunctionTool>;
244
+ /**
245
+ * An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
246
+ */
247
+ top_p?: number;
248
+ }
249
+ }
250
+ /**
251
+ * A JsonlRunDataSource object with that specifies a JSONL file that matches the
252
+ * eval
253
+ */
254
+ export interface CreateEvalJSONLRunDataSource {
255
+ /**
256
+ * Determines what populates the `item` namespace in the data source.
257
+ */
258
+ source: CreateEvalJSONLRunDataSource.FileContent | CreateEvalJSONLRunDataSource.FileID;
259
+ /**
260
+ * The type of data source. Always `jsonl`.
261
+ */
262
+ type: 'jsonl';
263
+ }
264
+ export declare namespace CreateEvalJSONLRunDataSource {
265
+ interface FileContent {
266
+ /**
267
+ * The content of the jsonl file.
268
+ */
269
+ content: Array<FileContent.Content>;
270
+ /**
271
+ * The type of jsonl source. Always `file_content`.
272
+ */
273
+ type: 'file_content';
274
+ }
275
+ namespace FileContent {
276
+ interface Content {
277
+ item: {
278
+ [key: string]: unknown;
279
+ };
280
+ sample?: {
281
+ [key: string]: unknown;
282
+ };
283
+ }
284
+ }
285
+ interface FileID {
286
+ /**
287
+ * The identifier of the file.
288
+ */
289
+ id: string;
290
+ /**
291
+ * The type of jsonl source. Always `file_id`.
292
+ */
293
+ type: 'file_id';
294
+ }
295
+ }
296
+ /**
297
+ * An object representing an error response from the Eval API.
298
+ */
299
+ export interface EvalAPIError {
300
+ /**
301
+ * The error code.
302
+ */
303
+ code: string;
304
+ /**
305
+ * The error message.
306
+ */
307
+ message: string;
308
+ }
309
+ /**
310
+ * A schema representing an evaluation run.
311
+ */
312
+ export interface RunCreateResponse {
313
+ /**
314
+ * Unique identifier for the evaluation run.
315
+ */
316
+ id: string;
317
+ /**
318
+ * Unix timestamp (in seconds) when the evaluation run was created.
319
+ */
320
+ created_at: number;
321
+ /**
322
+ * Information about the run's data source.
323
+ */
324
+ data_source: CreateEvalJSONLRunDataSource | CreateEvalCompletionsRunDataSource | RunCreateResponse.Responses;
325
+ /**
326
+ * An object representing an error response from the Eval API.
327
+ */
328
+ error: EvalAPIError;
329
+ /**
330
+ * The identifier of the associated evaluation.
331
+ */
332
+ eval_id: string;
333
+ /**
334
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
335
+ * for storing additional information about the object in a structured format, and
336
+ * querying for objects via API or the dashboard.
337
+ *
338
+ * Keys are strings with a maximum length of 64 characters. Values are strings with
339
+ * a maximum length of 512 characters.
340
+ */
341
+ metadata: Shared.Metadata | null;
342
+ /**
343
+ * The model that is evaluated, if applicable.
344
+ */
345
+ model: string;
346
+ /**
347
+ * The name of the evaluation run.
348
+ */
349
+ name: string;
350
+ /**
351
+ * The type of the object. Always "eval.run".
352
+ */
353
+ object: 'eval.run';
354
+ /**
355
+ * Usage statistics for each model during the evaluation run.
356
+ */
357
+ per_model_usage: Array<RunCreateResponse.PerModelUsage>;
358
+ /**
359
+ * Results per testing criteria applied during the evaluation run.
360
+ */
361
+ per_testing_criteria_results: Array<RunCreateResponse.PerTestingCriteriaResult>;
362
+ /**
363
+ * The URL to the rendered evaluation run report on the UI dashboard.
364
+ */
365
+ report_url: string;
366
+ /**
367
+ * Counters summarizing the outcomes of the evaluation run.
368
+ */
369
+ result_counts: RunCreateResponse.ResultCounts;
370
+ /**
371
+ * The status of the evaluation run.
372
+ */
373
+ status: string;
374
+ }
375
+ export declare namespace RunCreateResponse {
376
+ /**
377
+ * A ResponsesRunDataSource object describing a model sampling configuration.
378
+ */
379
+ interface Responses {
380
+ /**
381
+ * Determines what populates the `item` namespace in this run's data source.
382
+ */
383
+ source: Responses.FileContent | Responses.FileID | Responses.Responses;
384
+ /**
385
+ * The type of run data source. Always `responses`.
386
+ */
387
+ type: 'responses';
388
+ /**
389
+ * Used when sampling from a model. Dictates the structure of the messages passed
390
+ * into the model. Can either be a reference to a prebuilt trajectory (ie,
391
+ * `item.input_trajectory`), or a template with variable references to the `item`
392
+ * namespace.
393
+ */
394
+ input_messages?: Responses.Template | Responses.ItemReference;
395
+ /**
396
+ * The name of the model to use for generating completions (e.g. "o3-mini").
397
+ */
398
+ model?: string;
399
+ sampling_params?: Responses.SamplingParams;
400
+ }
401
+ namespace Responses {
402
+ interface FileContent {
403
+ /**
404
+ * The content of the jsonl file.
405
+ */
406
+ content: Array<FileContent.Content>;
407
+ /**
408
+ * The type of jsonl source. Always `file_content`.
409
+ */
410
+ type: 'file_content';
411
+ }
412
+ namespace FileContent {
413
+ interface Content {
414
+ item: {
415
+ [key: string]: unknown;
416
+ };
417
+ sample?: {
418
+ [key: string]: unknown;
419
+ };
420
+ }
421
+ }
422
+ interface FileID {
423
+ /**
424
+ * The identifier of the file.
425
+ */
426
+ id: string;
427
+ /**
428
+ * The type of jsonl source. Always `file_id`.
429
+ */
430
+ type: 'file_id';
431
+ }
432
+ /**
433
+ * A EvalResponsesSource object describing a run data source configuration.
434
+ */
435
+ interface Responses {
436
+ /**
437
+ * The type of run data source. Always `responses`.
438
+ */
439
+ type: 'responses';
440
+ /**
441
+ * Only include items created after this timestamp (inclusive). This is a query
442
+ * parameter used to select responses.
443
+ */
444
+ created_after?: number | null;
445
+ /**
446
+ * Only include items created before this timestamp (inclusive). This is a query
447
+ * parameter used to select responses.
448
+ */
449
+ created_before?: number | null;
450
+ /**
451
+ * Optional string to search the 'instructions' field. This is a query parameter
452
+ * used to select responses.
453
+ */
454
+ instructions_search?: string | null;
455
+ /**
456
+ * Metadata filter for the responses. This is a query parameter used to select
457
+ * responses.
458
+ */
459
+ metadata?: unknown | null;
460
+ /**
461
+ * The name of the model to find responses for. This is a query parameter used to
462
+ * select responses.
463
+ */
464
+ model?: string | null;
465
+ /**
466
+ * Constrains effort on reasoning for
467
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
468
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
469
+ * effort can result in faster responses and fewer tokens used on reasoning in a
470
+ * response.
471
+ */
472
+ reasoning_effort?: Shared.ReasoningEffort | null;
473
+ /**
474
+ * Sampling temperature. This is a query parameter used to select responses.
475
+ */
476
+ temperature?: number | null;
477
+ /**
478
+ * List of tool names. This is a query parameter used to select responses.
479
+ */
480
+ tools?: Array<string> | null;
481
+ /**
482
+ * Nucleus sampling parameter. This is a query parameter used to select responses.
483
+ */
484
+ top_p?: number | null;
485
+ /**
486
+ * List of user identifiers. This is a query parameter used to select responses.
487
+ */
488
+ users?: Array<string> | null;
489
+ }
490
+ interface Template {
491
+ /**
492
+ * A list of chat messages forming the prompt or context. May include variable
493
+ * references to the `item` namespace, ie {{item.name}}.
494
+ */
495
+ template: Array<Template.ChatMessage | Template.EvalItem>;
496
+ /**
497
+ * The type of input messages. Always `template`.
498
+ */
499
+ type: 'template';
500
+ }
501
+ namespace Template {
502
+ interface ChatMessage {
503
+ /**
504
+ * The content of the message.
505
+ */
506
+ content: string;
507
+ /**
508
+ * The role of the message (e.g. "system", "assistant", "user").
509
+ */
510
+ role: string;
511
+ }
512
+ /**
513
+ * A message input to the model with a role indicating instruction following
514
+ * hierarchy. Instructions given with the `developer` or `system` role take
515
+ * precedence over instructions given with the `user` role. Messages with the
516
+ * `assistant` role are presumed to have been generated by the model in previous
517
+ * interactions.
518
+ */
519
+ interface EvalItem {
520
+ /**
521
+ * Inputs to the model - can contain template strings.
522
+ */
523
+ content: string | ResponsesAPI.ResponseInputText | EvalItem.OutputText | EvalItem.InputImage | ResponsesAPI.ResponseInputAudio | Array<unknown>;
524
+ /**
525
+ * The role of the message input. One of `user`, `assistant`, `system`, or
526
+ * `developer`.
527
+ */
528
+ role: 'user' | 'assistant' | 'system' | 'developer';
529
+ /**
530
+ * The type of the message input. Always `message`.
531
+ */
532
+ type?: 'message';
533
+ }
534
+ namespace EvalItem {
535
+ /**
536
+ * A text output from the model.
537
+ */
538
+ interface OutputText {
539
+ /**
540
+ * The text output from the model.
541
+ */
542
+ text: string;
543
+ /**
544
+ * The type of the output text. Always `output_text`.
545
+ */
546
+ type: 'output_text';
547
+ }
548
+ /**
549
+ * An image input to the model.
550
+ */
551
+ interface InputImage {
552
+ /**
553
+ * The URL of the image input.
554
+ */
555
+ image_url: string;
556
+ /**
557
+ * The type of the image input. Always `input_image`.
558
+ */
559
+ type: 'input_image';
560
+ /**
561
+ * The detail level of the image to be sent to the model. One of `high`, `low`, or
562
+ * `auto`. Defaults to `auto`.
563
+ */
564
+ detail?: string;
565
+ }
566
+ }
567
+ }
568
+ interface ItemReference {
569
+ /**
570
+ * A reference to a variable in the `item` namespace. Ie, "item.name"
571
+ */
572
+ item_reference: string;
573
+ /**
574
+ * The type of input messages. Always `item_reference`.
575
+ */
576
+ type: 'item_reference';
577
+ }
578
+ interface SamplingParams {
579
+ /**
580
+ * The maximum number of tokens in the generated output.
581
+ */
582
+ max_completion_tokens?: number;
583
+ /**
584
+ * Constrains effort on reasoning for
585
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
586
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
587
+ * effort can result in faster responses and fewer tokens used on reasoning in a
588
+ * response.
589
+ */
590
+ reasoning_effort?: Shared.ReasoningEffort | null;
591
+ /**
592
+ * A seed value to initialize the randomness, during sampling.
593
+ */
594
+ seed?: number;
595
+ /**
596
+ * A higher temperature increases randomness in the outputs.
597
+ */
598
+ temperature?: number;
599
+ /**
600
+ * Configuration options for a text response from the model. Can be plain text or
601
+ * structured JSON data. Learn more:
602
+ *
603
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
604
+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
605
+ */
606
+ text?: SamplingParams.Text;
607
+ /**
608
+ * An array of tools the model may call while generating a response. You can
609
+ * specify which tool to use by setting the `tool_choice` parameter.
610
+ *
611
+ * The two categories of tools you can provide the model are:
612
+ *
613
+ * - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
614
+ * capabilities, like
615
+ * [web search](https://platform.openai.com/docs/guides/tools-web-search) or
616
+ * [file search](https://platform.openai.com/docs/guides/tools-file-search).
617
+ * Learn more about
618
+ * [built-in tools](https://platform.openai.com/docs/guides/tools).
619
+ * - **Function calls (custom tools)**: Functions that are defined by you, enabling
620
+ * the model to call your own code. Learn more about
621
+ * [function calling](https://platform.openai.com/docs/guides/function-calling).
622
+ */
623
+ tools?: Array<ResponsesAPI.Tool>;
624
+ /**
625
+ * An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
626
+ */
627
+ top_p?: number;
628
+ }
629
+ namespace SamplingParams {
630
+ /**
631
+ * Configuration options for a text response from the model. Can be plain text or
632
+ * structured JSON data. Learn more:
633
+ *
634
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
635
+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
636
+ */
637
+ interface Text {
638
+ /**
639
+ * An object specifying the format that the model must output.
640
+ *
641
+ * Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
642
+ * ensures the model will match your supplied JSON schema. Learn more in the
643
+ * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
644
+ *
645
+ * The default format is `{ "type": "text" }` with no additional options.
646
+ *
647
+ * **Not recommended for gpt-4o and newer models:**
648
+ *
649
+ * Setting to `{ "type": "json_object" }` enables the older JSON mode, which
650
+ * ensures the message the model generates is valid JSON. Using `json_schema` is
651
+ * preferred for models that support it.
652
+ */
653
+ format?: ResponsesAPI.ResponseFormatTextConfig;
654
+ }
655
+ }
656
+ }
657
+ interface PerModelUsage {
658
+ /**
659
+ * The number of tokens retrieved from cache.
660
+ */
661
+ cached_tokens: number;
662
+ /**
663
+ * The number of completion tokens generated.
664
+ */
665
+ completion_tokens: number;
666
+ /**
667
+ * The number of invocations.
668
+ */
669
+ invocation_count: number;
670
+ /**
671
+ * The name of the model.
672
+ */
673
+ model_name: string;
674
+ /**
675
+ * The number of prompt tokens used.
676
+ */
677
+ prompt_tokens: number;
678
+ /**
679
+ * The total number of tokens used.
680
+ */
681
+ total_tokens: number;
682
+ }
683
+ interface PerTestingCriteriaResult {
684
+ /**
685
+ * Number of tests failed for this criteria.
686
+ */
687
+ failed: number;
688
+ /**
689
+ * Number of tests passed for this criteria.
690
+ */
691
+ passed: number;
692
+ /**
693
+ * A description of the testing criteria.
694
+ */
695
+ testing_criteria: string;
696
+ }
697
+ /**
698
+ * Counters summarizing the outcomes of the evaluation run.
699
+ */
700
+ interface ResultCounts {
701
+ /**
702
+ * Number of output items that resulted in an error.
703
+ */
704
+ errored: number;
705
+ /**
706
+ * Number of output items that failed to pass the evaluation.
707
+ */
708
+ failed: number;
709
+ /**
710
+ * Number of output items that passed the evaluation.
711
+ */
712
+ passed: number;
713
+ /**
714
+ * Total number of executed output items.
715
+ */
716
+ total: number;
717
+ }
718
+ }
719
+ /**
720
+ * A schema representing an evaluation run.
721
+ */
722
+ export interface RunRetrieveResponse {
723
+ /**
724
+ * Unique identifier for the evaluation run.
725
+ */
726
+ id: string;
727
+ /**
728
+ * Unix timestamp (in seconds) when the evaluation run was created.
729
+ */
730
+ created_at: number;
731
+ /**
732
+ * Information about the run's data source.
733
+ */
734
+ data_source: CreateEvalJSONLRunDataSource | CreateEvalCompletionsRunDataSource | RunRetrieveResponse.Responses;
735
+ /**
736
+ * An object representing an error response from the Eval API.
737
+ */
738
+ error: EvalAPIError;
739
+ /**
740
+ * The identifier of the associated evaluation.
741
+ */
742
+ eval_id: string;
743
+ /**
744
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
745
+ * for storing additional information about the object in a structured format, and
746
+ * querying for objects via API or the dashboard.
747
+ *
748
+ * Keys are strings with a maximum length of 64 characters. Values are strings with
749
+ * a maximum length of 512 characters.
750
+ */
751
+ metadata: Shared.Metadata | null;
752
+ /**
753
+ * The model that is evaluated, if applicable.
754
+ */
755
+ model: string;
756
+ /**
757
+ * The name of the evaluation run.
758
+ */
759
+ name: string;
760
+ /**
761
+ * The type of the object. Always "eval.run".
762
+ */
763
+ object: 'eval.run';
764
+ /**
765
+ * Usage statistics for each model during the evaluation run.
766
+ */
767
+ per_model_usage: Array<RunRetrieveResponse.PerModelUsage>;
768
+ /**
769
+ * Results per testing criteria applied during the evaluation run.
770
+ */
771
+ per_testing_criteria_results: Array<RunRetrieveResponse.PerTestingCriteriaResult>;
772
+ /**
773
+ * The URL to the rendered evaluation run report on the UI dashboard.
774
+ */
775
+ report_url: string;
776
+ /**
777
+ * Counters summarizing the outcomes of the evaluation run.
778
+ */
779
+ result_counts: RunRetrieveResponse.ResultCounts;
780
+ /**
781
+ * The status of the evaluation run.
782
+ */
783
+ status: string;
784
+ }
785
+ export declare namespace RunRetrieveResponse {
786
+ /**
787
+ * A ResponsesRunDataSource object describing a model sampling configuration.
788
+ */
789
+ interface Responses {
790
+ /**
791
+ * Determines what populates the `item` namespace in this run's data source.
792
+ */
793
+ source: Responses.FileContent | Responses.FileID | Responses.Responses;
794
+ /**
795
+ * The type of run data source. Always `responses`.
796
+ */
797
+ type: 'responses';
798
+ /**
799
+ * Used when sampling from a model. Dictates the structure of the messages passed
800
+ * into the model. Can either be a reference to a prebuilt trajectory (ie,
801
+ * `item.input_trajectory`), or a template with variable references to the `item`
802
+ * namespace.
803
+ */
804
+ input_messages?: Responses.Template | Responses.ItemReference;
805
+ /**
806
+ * The name of the model to use for generating completions (e.g. "o3-mini").
807
+ */
808
+ model?: string;
809
+ sampling_params?: Responses.SamplingParams;
810
+ }
811
+ namespace Responses {
812
+ interface FileContent {
813
+ /**
814
+ * The content of the jsonl file.
815
+ */
816
+ content: Array<FileContent.Content>;
817
+ /**
818
+ * The type of jsonl source. Always `file_content`.
819
+ */
820
+ type: 'file_content';
821
+ }
822
+ namespace FileContent {
823
+ interface Content {
824
+ item: {
825
+ [key: string]: unknown;
826
+ };
827
+ sample?: {
828
+ [key: string]: unknown;
829
+ };
830
+ }
831
+ }
832
+ interface FileID {
833
+ /**
834
+ * The identifier of the file.
835
+ */
836
+ id: string;
837
+ /**
838
+ * The type of jsonl source. Always `file_id`.
839
+ */
840
+ type: 'file_id';
841
+ }
842
+ /**
843
+ * A EvalResponsesSource object describing a run data source configuration.
844
+ */
845
+ interface Responses {
846
+ /**
847
+ * The type of run data source. Always `responses`.
848
+ */
849
+ type: 'responses';
850
+ /**
851
+ * Only include items created after this timestamp (inclusive). This is a query
852
+ * parameter used to select responses.
853
+ */
854
+ created_after?: number | null;
855
+ /**
856
+ * Only include items created before this timestamp (inclusive). This is a query
857
+ * parameter used to select responses.
858
+ */
859
+ created_before?: number | null;
860
+ /**
861
+ * Optional string to search the 'instructions' field. This is a query parameter
862
+ * used to select responses.
863
+ */
864
+ instructions_search?: string | null;
865
+ /**
866
+ * Metadata filter for the responses. This is a query parameter used to select
867
+ * responses.
868
+ */
869
+ metadata?: unknown | null;
870
+ /**
871
+ * The name of the model to find responses for. This is a query parameter used to
872
+ * select responses.
873
+ */
874
+ model?: string | null;
875
+ /**
876
+ * Constrains effort on reasoning for
877
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
878
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
879
+ * effort can result in faster responses and fewer tokens used on reasoning in a
880
+ * response.
881
+ */
882
+ reasoning_effort?: Shared.ReasoningEffort | null;
883
+ /**
884
+ * Sampling temperature. This is a query parameter used to select responses.
885
+ */
886
+ temperature?: number | null;
887
+ /**
888
+ * List of tool names. This is a query parameter used to select responses.
889
+ */
890
+ tools?: Array<string> | null;
891
+ /**
892
+ * Nucleus sampling parameter. This is a query parameter used to select responses.
893
+ */
894
+ top_p?: number | null;
895
+ /**
896
+ * List of user identifiers. This is a query parameter used to select responses.
897
+ */
898
+ users?: Array<string> | null;
899
+ }
900
+ interface Template {
901
+ /**
902
+ * A list of chat messages forming the prompt or context. May include variable
903
+ * references to the `item` namespace, ie {{item.name}}.
904
+ */
905
+ template: Array<Template.ChatMessage | Template.EvalItem>;
906
+ /**
907
+ * The type of input messages. Always `template`.
908
+ */
909
+ type: 'template';
910
+ }
911
+ namespace Template {
912
+ interface ChatMessage {
913
+ /**
914
+ * The content of the message.
915
+ */
916
+ content: string;
917
+ /**
918
+ * The role of the message (e.g. "system", "assistant", "user").
919
+ */
920
+ role: string;
921
+ }
922
+ /**
923
+ * A message input to the model with a role indicating instruction following
924
+ * hierarchy. Instructions given with the `developer` or `system` role take
925
+ * precedence over instructions given with the `user` role. Messages with the
926
+ * `assistant` role are presumed to have been generated by the model in previous
927
+ * interactions.
928
+ */
929
+ interface EvalItem {
930
+ /**
931
+ * Inputs to the model - can contain template strings.
932
+ */
933
+ content: string | ResponsesAPI.ResponseInputText | EvalItem.OutputText | EvalItem.InputImage | ResponsesAPI.ResponseInputAudio | Array<unknown>;
934
+ /**
935
+ * The role of the message input. One of `user`, `assistant`, `system`, or
936
+ * `developer`.
937
+ */
938
+ role: 'user' | 'assistant' | 'system' | 'developer';
939
+ /**
940
+ * The type of the message input. Always `message`.
941
+ */
942
+ type?: 'message';
943
+ }
944
+ namespace EvalItem {
945
+ /**
946
+ * A text output from the model.
947
+ */
948
+ interface OutputText {
949
+ /**
950
+ * The text output from the model.
951
+ */
952
+ text: string;
953
+ /**
954
+ * The type of the output text. Always `output_text`.
955
+ */
956
+ type: 'output_text';
957
+ }
958
+ /**
959
+ * An image input to the model.
960
+ */
961
+ interface InputImage {
962
+ /**
963
+ * The URL of the image input.
964
+ */
965
+ image_url: string;
966
+ /**
967
+ * The type of the image input. Always `input_image`.
968
+ */
969
+ type: 'input_image';
970
+ /**
971
+ * The detail level of the image to be sent to the model. One of `high`, `low`, or
972
+ * `auto`. Defaults to `auto`.
973
+ */
974
+ detail?: string;
975
+ }
976
+ }
977
+ }
978
+ interface ItemReference {
979
+ /**
980
+ * A reference to a variable in the `item` namespace. Ie, "item.name"
981
+ */
982
+ item_reference: string;
983
+ /**
984
+ * The type of input messages. Always `item_reference`.
985
+ */
986
+ type: 'item_reference';
987
+ }
988
+ interface SamplingParams {
989
+ /**
990
+ * The maximum number of tokens in the generated output.
991
+ */
992
+ max_completion_tokens?: number;
993
+ /**
994
+ * Constrains effort on reasoning for
995
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
996
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
997
+ * effort can result in faster responses and fewer tokens used on reasoning in a
998
+ * response.
999
+ */
1000
+ reasoning_effort?: Shared.ReasoningEffort | null;
1001
+ /**
1002
+ * A seed value to initialize the randomness, during sampling.
1003
+ */
1004
+ seed?: number;
1005
+ /**
1006
+ * A higher temperature increases randomness in the outputs.
1007
+ */
1008
+ temperature?: number;
1009
+ /**
1010
+ * Configuration options for a text response from the model. Can be plain text or
1011
+ * structured JSON data. Learn more:
1012
+ *
1013
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
1014
+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
1015
+ */
1016
+ text?: SamplingParams.Text;
1017
+ /**
1018
+ * An array of tools the model may call while generating a response. You can
1019
+ * specify which tool to use by setting the `tool_choice` parameter.
1020
+ *
1021
+ * The two categories of tools you can provide the model are:
1022
+ *
1023
+ * - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
1024
+ * capabilities, like
1025
+ * [web search](https://platform.openai.com/docs/guides/tools-web-search) or
1026
+ * [file search](https://platform.openai.com/docs/guides/tools-file-search).
1027
+ * Learn more about
1028
+ * [built-in tools](https://platform.openai.com/docs/guides/tools).
1029
+ * - **Function calls (custom tools)**: Functions that are defined by you, enabling
1030
+ * the model to call your own code. Learn more about
1031
+ * [function calling](https://platform.openai.com/docs/guides/function-calling).
1032
+ */
1033
+ tools?: Array<ResponsesAPI.Tool>;
1034
+ /**
1035
+ * An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
1036
+ */
1037
+ top_p?: number;
1038
+ }
1039
+ namespace SamplingParams {
1040
+ /**
1041
+ * Configuration options for a text response from the model. Can be plain text or
1042
+ * structured JSON data. Learn more:
1043
+ *
1044
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
1045
+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
1046
+ */
1047
+ interface Text {
1048
+ /**
1049
+ * An object specifying the format that the model must output.
1050
+ *
1051
+ * Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
1052
+ * ensures the model will match your supplied JSON schema. Learn more in the
1053
+ * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
1054
+ *
1055
+ * The default format is `{ "type": "text" }` with no additional options.
1056
+ *
1057
+ * **Not recommended for gpt-4o and newer models:**
1058
+ *
1059
+ * Setting to `{ "type": "json_object" }` enables the older JSON mode, which
1060
+ * ensures the message the model generates is valid JSON. Using `json_schema` is
1061
+ * preferred for models that support it.
1062
+ */
1063
+ format?: ResponsesAPI.ResponseFormatTextConfig;
1064
+ }
1065
+ }
1066
+ }
1067
+ interface PerModelUsage {
1068
+ /**
1069
+ * The number of tokens retrieved from cache.
1070
+ */
1071
+ cached_tokens: number;
1072
+ /**
1073
+ * The number of completion tokens generated.
1074
+ */
1075
+ completion_tokens: number;
1076
+ /**
1077
+ * The number of invocations.
1078
+ */
1079
+ invocation_count: number;
1080
+ /**
1081
+ * The name of the model.
1082
+ */
1083
+ model_name: string;
1084
+ /**
1085
+ * The number of prompt tokens used.
1086
+ */
1087
+ prompt_tokens: number;
1088
+ /**
1089
+ * The total number of tokens used.
1090
+ */
1091
+ total_tokens: number;
1092
+ }
1093
+ interface PerTestingCriteriaResult {
1094
+ /**
1095
+ * Number of tests failed for this criteria.
1096
+ */
1097
+ failed: number;
1098
+ /**
1099
+ * Number of tests passed for this criteria.
1100
+ */
1101
+ passed: number;
1102
+ /**
1103
+ * A description of the testing criteria.
1104
+ */
1105
+ testing_criteria: string;
1106
+ }
1107
+ /**
1108
+ * Counters summarizing the outcomes of the evaluation run.
1109
+ */
1110
+ interface ResultCounts {
1111
+ /**
1112
+ * Number of output items that resulted in an error.
1113
+ */
1114
+ errored: number;
1115
+ /**
1116
+ * Number of output items that failed to pass the evaluation.
1117
+ */
1118
+ failed: number;
1119
+ /**
1120
+ * Number of output items that passed the evaluation.
1121
+ */
1122
+ passed: number;
1123
+ /**
1124
+ * Total number of executed output items.
1125
+ */
1126
+ total: number;
1127
+ }
1128
+ }
1129
+ /**
1130
+ * A schema representing an evaluation run.
1131
+ */
1132
+ export interface RunListResponse {
1133
+ /**
1134
+ * Unique identifier for the evaluation run.
1135
+ */
1136
+ id: string;
1137
+ /**
1138
+ * Unix timestamp (in seconds) when the evaluation run was created.
1139
+ */
1140
+ created_at: number;
1141
+ /**
1142
+ * Information about the run's data source.
1143
+ */
1144
+ data_source: CreateEvalJSONLRunDataSource | CreateEvalCompletionsRunDataSource | RunListResponse.Responses;
1145
+ /**
1146
+ * An object representing an error response from the Eval API.
1147
+ */
1148
+ error: EvalAPIError;
1149
+ /**
1150
+ * The identifier of the associated evaluation.
1151
+ */
1152
+ eval_id: string;
1153
+ /**
1154
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
1155
+ * for storing additional information about the object in a structured format, and
1156
+ * querying for objects via API or the dashboard.
1157
+ *
1158
+ * Keys are strings with a maximum length of 64 characters. Values are strings with
1159
+ * a maximum length of 512 characters.
1160
+ */
1161
+ metadata: Shared.Metadata | null;
1162
+ /**
1163
+ * The model that is evaluated, if applicable.
1164
+ */
1165
+ model: string;
1166
+ /**
1167
+ * The name of the evaluation run.
1168
+ */
1169
+ name: string;
1170
+ /**
1171
+ * The type of the object. Always "eval.run".
1172
+ */
1173
+ object: 'eval.run';
1174
+ /**
1175
+ * Usage statistics for each model during the evaluation run.
1176
+ */
1177
+ per_model_usage: Array<RunListResponse.PerModelUsage>;
1178
+ /**
1179
+ * Results per testing criteria applied during the evaluation run.
1180
+ */
1181
+ per_testing_criteria_results: Array<RunListResponse.PerTestingCriteriaResult>;
1182
+ /**
1183
+ * The URL to the rendered evaluation run report on the UI dashboard.
1184
+ */
1185
+ report_url: string;
1186
+ /**
1187
+ * Counters summarizing the outcomes of the evaluation run.
1188
+ */
1189
+ result_counts: RunListResponse.ResultCounts;
1190
+ /**
1191
+ * The status of the evaluation run.
1192
+ */
1193
+ status: string;
1194
+ }
1195
+ export declare namespace RunListResponse {
1196
+ /**
1197
+ * A ResponsesRunDataSource object describing a model sampling configuration.
1198
+ */
1199
+ interface Responses {
1200
+ /**
1201
+ * Determines what populates the `item` namespace in this run's data source.
1202
+ */
1203
+ source: Responses.FileContent | Responses.FileID | Responses.Responses;
1204
+ /**
1205
+ * The type of run data source. Always `responses`.
1206
+ */
1207
+ type: 'responses';
1208
+ /**
1209
+ * Used when sampling from a model. Dictates the structure of the messages passed
1210
+ * into the model. Can either be a reference to a prebuilt trajectory (ie,
1211
+ * `item.input_trajectory`), or a template with variable references to the `item`
1212
+ * namespace.
1213
+ */
1214
+ input_messages?: Responses.Template | Responses.ItemReference;
1215
+ /**
1216
+ * The name of the model to use for generating completions (e.g. "o3-mini").
1217
+ */
1218
+ model?: string;
1219
+ sampling_params?: Responses.SamplingParams;
1220
+ }
1221
+ namespace Responses {
1222
+ interface FileContent {
1223
+ /**
1224
+ * The content of the jsonl file.
1225
+ */
1226
+ content: Array<FileContent.Content>;
1227
+ /**
1228
+ * The type of jsonl source. Always `file_content`.
1229
+ */
1230
+ type: 'file_content';
1231
+ }
1232
+ namespace FileContent {
1233
+ interface Content {
1234
+ item: {
1235
+ [key: string]: unknown;
1236
+ };
1237
+ sample?: {
1238
+ [key: string]: unknown;
1239
+ };
1240
+ }
1241
+ }
1242
+ interface FileID {
1243
+ /**
1244
+ * The identifier of the file.
1245
+ */
1246
+ id: string;
1247
+ /**
1248
+ * The type of jsonl source. Always `file_id`.
1249
+ */
1250
+ type: 'file_id';
1251
+ }
1252
+ /**
1253
+ * A EvalResponsesSource object describing a run data source configuration.
1254
+ */
1255
+ interface Responses {
1256
+ /**
1257
+ * The type of run data source. Always `responses`.
1258
+ */
1259
+ type: 'responses';
1260
+ /**
1261
+ * Only include items created after this timestamp (inclusive). This is a query
1262
+ * parameter used to select responses.
1263
+ */
1264
+ created_after?: number | null;
1265
+ /**
1266
+ * Only include items created before this timestamp (inclusive). This is a query
1267
+ * parameter used to select responses.
1268
+ */
1269
+ created_before?: number | null;
1270
+ /**
1271
+ * Optional string to search the 'instructions' field. This is a query parameter
1272
+ * used to select responses.
1273
+ */
1274
+ instructions_search?: string | null;
1275
+ /**
1276
+ * Metadata filter for the responses. This is a query parameter used to select
1277
+ * responses.
1278
+ */
1279
+ metadata?: unknown | null;
1280
+ /**
1281
+ * The name of the model to find responses for. This is a query parameter used to
1282
+ * select responses.
1283
+ */
1284
+ model?: string | null;
1285
+ /**
1286
+ * Constrains effort on reasoning for
1287
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1288
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
1289
+ * effort can result in faster responses and fewer tokens used on reasoning in a
1290
+ * response.
1291
+ */
1292
+ reasoning_effort?: Shared.ReasoningEffort | null;
1293
+ /**
1294
+ * Sampling temperature. This is a query parameter used to select responses.
1295
+ */
1296
+ temperature?: number | null;
1297
+ /**
1298
+ * List of tool names. This is a query parameter used to select responses.
1299
+ */
1300
+ tools?: Array<string> | null;
1301
+ /**
1302
+ * Nucleus sampling parameter. This is a query parameter used to select responses.
1303
+ */
1304
+ top_p?: number | null;
1305
+ /**
1306
+ * List of user identifiers. This is a query parameter used to select responses.
1307
+ */
1308
+ users?: Array<string> | null;
1309
+ }
1310
+ interface Template {
1311
+ /**
1312
+ * A list of chat messages forming the prompt or context. May include variable
1313
+ * references to the `item` namespace, ie {{item.name}}.
1314
+ */
1315
+ template: Array<Template.ChatMessage | Template.EvalItem>;
1316
+ /**
1317
+ * The type of input messages. Always `template`.
1318
+ */
1319
+ type: 'template';
1320
+ }
1321
+ namespace Template {
1322
+ interface ChatMessage {
1323
+ /**
1324
+ * The content of the message.
1325
+ */
1326
+ content: string;
1327
+ /**
1328
+ * The role of the message (e.g. "system", "assistant", "user").
1329
+ */
1330
+ role: string;
1331
+ }
1332
+ /**
1333
+ * A message input to the model with a role indicating instruction following
1334
+ * hierarchy. Instructions given with the `developer` or `system` role take
1335
+ * precedence over instructions given with the `user` role. Messages with the
1336
+ * `assistant` role are presumed to have been generated by the model in previous
1337
+ * interactions.
1338
+ */
1339
+ interface EvalItem {
1340
+ /**
1341
+ * Inputs to the model - can contain template strings.
1342
+ */
1343
+ content: string | ResponsesAPI.ResponseInputText | EvalItem.OutputText | EvalItem.InputImage | ResponsesAPI.ResponseInputAudio | Array<unknown>;
1344
+ /**
1345
+ * The role of the message input. One of `user`, `assistant`, `system`, or
1346
+ * `developer`.
1347
+ */
1348
+ role: 'user' | 'assistant' | 'system' | 'developer';
1349
+ /**
1350
+ * The type of the message input. Always `message`.
1351
+ */
1352
+ type?: 'message';
1353
+ }
1354
+ namespace EvalItem {
1355
+ /**
1356
+ * A text output from the model.
1357
+ */
1358
+ interface OutputText {
1359
+ /**
1360
+ * The text output from the model.
1361
+ */
1362
+ text: string;
1363
+ /**
1364
+ * The type of the output text. Always `output_text`.
1365
+ */
1366
+ type: 'output_text';
1367
+ }
1368
+ /**
1369
+ * An image input to the model.
1370
+ */
1371
+ interface InputImage {
1372
+ /**
1373
+ * The URL of the image input.
1374
+ */
1375
+ image_url: string;
1376
+ /**
1377
+ * The type of the image input. Always `input_image`.
1378
+ */
1379
+ type: 'input_image';
1380
+ /**
1381
+ * The detail level of the image to be sent to the model. One of `high`, `low`, or
1382
+ * `auto`. Defaults to `auto`.
1383
+ */
1384
+ detail?: string;
1385
+ }
1386
+ }
1387
+ }
1388
+ interface ItemReference {
1389
+ /**
1390
+ * A reference to a variable in the `item` namespace. Ie, "item.name"
1391
+ */
1392
+ item_reference: string;
1393
+ /**
1394
+ * The type of input messages. Always `item_reference`.
1395
+ */
1396
+ type: 'item_reference';
1397
+ }
1398
+ interface SamplingParams {
1399
+ /**
1400
+ * The maximum number of tokens in the generated output.
1401
+ */
1402
+ max_completion_tokens?: number;
1403
+ /**
1404
+ * Constrains effort on reasoning for
1405
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1406
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
1407
+ * effort can result in faster responses and fewer tokens used on reasoning in a
1408
+ * response.
1409
+ */
1410
+ reasoning_effort?: Shared.ReasoningEffort | null;
1411
+ /**
1412
+ * A seed value to initialize the randomness, during sampling.
1413
+ */
1414
+ seed?: number;
1415
+ /**
1416
+ * A higher temperature increases randomness in the outputs.
1417
+ */
1418
+ temperature?: number;
1419
+ /**
1420
+ * Configuration options for a text response from the model. Can be plain text or
1421
+ * structured JSON data. Learn more:
1422
+ *
1423
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
1424
+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
1425
+ */
1426
+ text?: SamplingParams.Text;
1427
+ /**
1428
+ * An array of tools the model may call while generating a response. You can
1429
+ * specify which tool to use by setting the `tool_choice` parameter.
1430
+ *
1431
+ * The two categories of tools you can provide the model are:
1432
+ *
1433
+ * - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
1434
+ * capabilities, like
1435
+ * [web search](https://platform.openai.com/docs/guides/tools-web-search) or
1436
+ * [file search](https://platform.openai.com/docs/guides/tools-file-search).
1437
+ * Learn more about
1438
+ * [built-in tools](https://platform.openai.com/docs/guides/tools).
1439
+ * - **Function calls (custom tools)**: Functions that are defined by you, enabling
1440
+ * the model to call your own code. Learn more about
1441
+ * [function calling](https://platform.openai.com/docs/guides/function-calling).
1442
+ */
1443
+ tools?: Array<ResponsesAPI.Tool>;
1444
+ /**
1445
+ * An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
1446
+ */
1447
+ top_p?: number;
1448
+ }
1449
+ namespace SamplingParams {
1450
+ /**
1451
+ * Configuration options for a text response from the model. Can be plain text or
1452
+ * structured JSON data. Learn more:
1453
+ *
1454
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
1455
+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
1456
+ */
1457
+ interface Text {
1458
+ /**
1459
+ * An object specifying the format that the model must output.
1460
+ *
1461
+ * Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
1462
+ * ensures the model will match your supplied JSON schema. Learn more in the
1463
+ * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
1464
+ *
1465
+ * The default format is `{ "type": "text" }` with no additional options.
1466
+ *
1467
+ * **Not recommended for gpt-4o and newer models:**
1468
+ *
1469
+ * Setting to `{ "type": "json_object" }` enables the older JSON mode, which
1470
+ * ensures the message the model generates is valid JSON. Using `json_schema` is
1471
+ * preferred for models that support it.
1472
+ */
1473
+ format?: ResponsesAPI.ResponseFormatTextConfig;
1474
+ }
1475
+ }
1476
+ }
1477
+ interface PerModelUsage {
1478
+ /**
1479
+ * The number of tokens retrieved from cache.
1480
+ */
1481
+ cached_tokens: number;
1482
+ /**
1483
+ * The number of completion tokens generated.
1484
+ */
1485
+ completion_tokens: number;
1486
+ /**
1487
+ * The number of invocations.
1488
+ */
1489
+ invocation_count: number;
1490
+ /**
1491
+ * The name of the model.
1492
+ */
1493
+ model_name: string;
1494
+ /**
1495
+ * The number of prompt tokens used.
1496
+ */
1497
+ prompt_tokens: number;
1498
+ /**
1499
+ * The total number of tokens used.
1500
+ */
1501
+ total_tokens: number;
1502
+ }
1503
+ interface PerTestingCriteriaResult {
1504
+ /**
1505
+ * Number of tests failed for this criteria.
1506
+ */
1507
+ failed: number;
1508
+ /**
1509
+ * Number of tests passed for this criteria.
1510
+ */
1511
+ passed: number;
1512
+ /**
1513
+ * A description of the testing criteria.
1514
+ */
1515
+ testing_criteria: string;
1516
+ }
1517
+ /**
1518
+ * Counters summarizing the outcomes of the evaluation run.
1519
+ */
1520
+ interface ResultCounts {
1521
+ /**
1522
+ * Number of output items that resulted in an error.
1523
+ */
1524
+ errored: number;
1525
+ /**
1526
+ * Number of output items that failed to pass the evaluation.
1527
+ */
1528
+ failed: number;
1529
+ /**
1530
+ * Number of output items that passed the evaluation.
1531
+ */
1532
+ passed: number;
1533
+ /**
1534
+ * Total number of executed output items.
1535
+ */
1536
+ total: number;
1537
+ }
1538
+ }
1539
+ export interface RunDeleteResponse {
1540
+ deleted?: boolean;
1541
+ object?: string;
1542
+ run_id?: string;
1543
+ }
1544
+ /**
1545
+ * A schema representing an evaluation run.
1546
+ */
1547
+ export interface RunCancelResponse {
1548
+ /**
1549
+ * Unique identifier for the evaluation run.
1550
+ */
1551
+ id: string;
1552
+ /**
1553
+ * Unix timestamp (in seconds) when the evaluation run was created.
1554
+ */
1555
+ created_at: number;
1556
+ /**
1557
+ * Information about the run's data source.
1558
+ */
1559
+ data_source: CreateEvalJSONLRunDataSource | CreateEvalCompletionsRunDataSource | RunCancelResponse.Responses;
1560
+ /**
1561
+ * An object representing an error response from the Eval API.
1562
+ */
1563
+ error: EvalAPIError;
1564
+ /**
1565
+ * The identifier of the associated evaluation.
1566
+ */
1567
+ eval_id: string;
1568
+ /**
1569
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
1570
+ * for storing additional information about the object in a structured format, and
1571
+ * querying for objects via API or the dashboard.
1572
+ *
1573
+ * Keys are strings with a maximum length of 64 characters. Values are strings with
1574
+ * a maximum length of 512 characters.
1575
+ */
1576
+ metadata: Shared.Metadata | null;
1577
+ /**
1578
+ * The model that is evaluated, if applicable.
1579
+ */
1580
+ model: string;
1581
+ /**
1582
+ * The name of the evaluation run.
1583
+ */
1584
+ name: string;
1585
+ /**
1586
+ * The type of the object. Always "eval.run".
1587
+ */
1588
+ object: 'eval.run';
1589
+ /**
1590
+ * Usage statistics for each model during the evaluation run.
1591
+ */
1592
+ per_model_usage: Array<RunCancelResponse.PerModelUsage>;
1593
+ /**
1594
+ * Results per testing criteria applied during the evaluation run.
1595
+ */
1596
+ per_testing_criteria_results: Array<RunCancelResponse.PerTestingCriteriaResult>;
1597
+ /**
1598
+ * The URL to the rendered evaluation run report on the UI dashboard.
1599
+ */
1600
+ report_url: string;
1601
+ /**
1602
+ * Counters summarizing the outcomes of the evaluation run.
1603
+ */
1604
+ result_counts: RunCancelResponse.ResultCounts;
1605
+ /**
1606
+ * The status of the evaluation run.
1607
+ */
1608
+ status: string;
1609
+ }
1610
+ export declare namespace RunCancelResponse {
1611
+ /**
1612
+ * A ResponsesRunDataSource object describing a model sampling configuration.
1613
+ */
1614
+ interface Responses {
1615
+ /**
1616
+ * Determines what populates the `item` namespace in this run's data source.
1617
+ */
1618
+ source: Responses.FileContent | Responses.FileID | Responses.Responses;
1619
+ /**
1620
+ * The type of run data source. Always `responses`.
1621
+ */
1622
+ type: 'responses';
1623
+ /**
1624
+ * Used when sampling from a model. Dictates the structure of the messages passed
1625
+ * into the model. Can either be a reference to a prebuilt trajectory (ie,
1626
+ * `item.input_trajectory`), or a template with variable references to the `item`
1627
+ * namespace.
1628
+ */
1629
+ input_messages?: Responses.Template | Responses.ItemReference;
1630
+ /**
1631
+ * The name of the model to use for generating completions (e.g. "o3-mini").
1632
+ */
1633
+ model?: string;
1634
+ sampling_params?: Responses.SamplingParams;
1635
+ }
1636
+ namespace Responses {
1637
+ interface FileContent {
1638
+ /**
1639
+ * The content of the jsonl file.
1640
+ */
1641
+ content: Array<FileContent.Content>;
1642
+ /**
1643
+ * The type of jsonl source. Always `file_content`.
1644
+ */
1645
+ type: 'file_content';
1646
+ }
1647
+ namespace FileContent {
1648
+ interface Content {
1649
+ item: {
1650
+ [key: string]: unknown;
1651
+ };
1652
+ sample?: {
1653
+ [key: string]: unknown;
1654
+ };
1655
+ }
1656
+ }
1657
+ interface FileID {
1658
+ /**
1659
+ * The identifier of the file.
1660
+ */
1661
+ id: string;
1662
+ /**
1663
+ * The type of jsonl source. Always `file_id`.
1664
+ */
1665
+ type: 'file_id';
1666
+ }
1667
+ /**
1668
+ * A EvalResponsesSource object describing a run data source configuration.
1669
+ */
1670
+ interface Responses {
1671
+ /**
1672
+ * The type of run data source. Always `responses`.
1673
+ */
1674
+ type: 'responses';
1675
+ /**
1676
+ * Only include items created after this timestamp (inclusive). This is a query
1677
+ * parameter used to select responses.
1678
+ */
1679
+ created_after?: number | null;
1680
+ /**
1681
+ * Only include items created before this timestamp (inclusive). This is a query
1682
+ * parameter used to select responses.
1683
+ */
1684
+ created_before?: number | null;
1685
+ /**
1686
+ * Optional string to search the 'instructions' field. This is a query parameter
1687
+ * used to select responses.
1688
+ */
1689
+ instructions_search?: string | null;
1690
+ /**
1691
+ * Metadata filter for the responses. This is a query parameter used to select
1692
+ * responses.
1693
+ */
1694
+ metadata?: unknown | null;
1695
+ /**
1696
+ * The name of the model to find responses for. This is a query parameter used to
1697
+ * select responses.
1698
+ */
1699
+ model?: string | null;
1700
+ /**
1701
+ * Constrains effort on reasoning for
1702
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1703
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
1704
+ * effort can result in faster responses and fewer tokens used on reasoning in a
1705
+ * response.
1706
+ */
1707
+ reasoning_effort?: Shared.ReasoningEffort | null;
1708
+ /**
1709
+ * Sampling temperature. This is a query parameter used to select responses.
1710
+ */
1711
+ temperature?: number | null;
1712
+ /**
1713
+ * List of tool names. This is a query parameter used to select responses.
1714
+ */
1715
+ tools?: Array<string> | null;
1716
+ /**
1717
+ * Nucleus sampling parameter. This is a query parameter used to select responses.
1718
+ */
1719
+ top_p?: number | null;
1720
+ /**
1721
+ * List of user identifiers. This is a query parameter used to select responses.
1722
+ */
1723
+ users?: Array<string> | null;
1724
+ }
1725
+ interface Template {
1726
+ /**
1727
+ * A list of chat messages forming the prompt or context. May include variable
1728
+ * references to the `item` namespace, ie {{item.name}}.
1729
+ */
1730
+ template: Array<Template.ChatMessage | Template.EvalItem>;
1731
+ /**
1732
+ * The type of input messages. Always `template`.
1733
+ */
1734
+ type: 'template';
1735
+ }
1736
+ namespace Template {
1737
+ interface ChatMessage {
1738
+ /**
1739
+ * The content of the message.
1740
+ */
1741
+ content: string;
1742
+ /**
1743
+ * The role of the message (e.g. "system", "assistant", "user").
1744
+ */
1745
+ role: string;
1746
+ }
1747
+ /**
1748
+ * A message input to the model with a role indicating instruction following
1749
+ * hierarchy. Instructions given with the `developer` or `system` role take
1750
+ * precedence over instructions given with the `user` role. Messages with the
1751
+ * `assistant` role are presumed to have been generated by the model in previous
1752
+ * interactions.
1753
+ */
1754
+ interface EvalItem {
1755
+ /**
1756
+ * Inputs to the model - can contain template strings.
1757
+ */
1758
+ content: string | ResponsesAPI.ResponseInputText | EvalItem.OutputText | EvalItem.InputImage | ResponsesAPI.ResponseInputAudio | Array<unknown>;
1759
+ /**
1760
+ * The role of the message input. One of `user`, `assistant`, `system`, or
1761
+ * `developer`.
1762
+ */
1763
+ role: 'user' | 'assistant' | 'system' | 'developer';
1764
+ /**
1765
+ * The type of the message input. Always `message`.
1766
+ */
1767
+ type?: 'message';
1768
+ }
1769
+ namespace EvalItem {
1770
+ /**
1771
+ * A text output from the model.
1772
+ */
1773
+ interface OutputText {
1774
+ /**
1775
+ * The text output from the model.
1776
+ */
1777
+ text: string;
1778
+ /**
1779
+ * The type of the output text. Always `output_text`.
1780
+ */
1781
+ type: 'output_text';
1782
+ }
1783
+ /**
1784
+ * An image input to the model.
1785
+ */
1786
+ interface InputImage {
1787
+ /**
1788
+ * The URL of the image input.
1789
+ */
1790
+ image_url: string;
1791
+ /**
1792
+ * The type of the image input. Always `input_image`.
1793
+ */
1794
+ type: 'input_image';
1795
+ /**
1796
+ * The detail level of the image to be sent to the model. One of `high`, `low`, or
1797
+ * `auto`. Defaults to `auto`.
1798
+ */
1799
+ detail?: string;
1800
+ }
1801
+ }
1802
+ }
1803
+ interface ItemReference {
1804
+ /**
1805
+ * A reference to a variable in the `item` namespace. Ie, "item.name"
1806
+ */
1807
+ item_reference: string;
1808
+ /**
1809
+ * The type of input messages. Always `item_reference`.
1810
+ */
1811
+ type: 'item_reference';
1812
+ }
1813
+ interface SamplingParams {
1814
+ /**
1815
+ * The maximum number of tokens in the generated output.
1816
+ */
1817
+ max_completion_tokens?: number;
1818
+ /**
1819
+ * Constrains effort on reasoning for
1820
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1821
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
1822
+ * effort can result in faster responses and fewer tokens used on reasoning in a
1823
+ * response.
1824
+ */
1825
+ reasoning_effort?: Shared.ReasoningEffort | null;
1826
+ /**
1827
+ * A seed value to initialize the randomness, during sampling.
1828
+ */
1829
+ seed?: number;
1830
+ /**
1831
+ * A higher temperature increases randomness in the outputs.
1832
+ */
1833
+ temperature?: number;
1834
+ /**
1835
+ * Configuration options for a text response from the model. Can be plain text or
1836
+ * structured JSON data. Learn more:
1837
+ *
1838
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
1839
+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
1840
+ */
1841
+ text?: SamplingParams.Text;
1842
+ /**
1843
+ * An array of tools the model may call while generating a response. You can
1844
+ * specify which tool to use by setting the `tool_choice` parameter.
1845
+ *
1846
+ * The two categories of tools you can provide the model are:
1847
+ *
1848
+ * - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
1849
+ * capabilities, like
1850
+ * [web search](https://platform.openai.com/docs/guides/tools-web-search) or
1851
+ * [file search](https://platform.openai.com/docs/guides/tools-file-search).
1852
+ * Learn more about
1853
+ * [built-in tools](https://platform.openai.com/docs/guides/tools).
1854
+ * - **Function calls (custom tools)**: Functions that are defined by you, enabling
1855
+ * the model to call your own code. Learn more about
1856
+ * [function calling](https://platform.openai.com/docs/guides/function-calling).
1857
+ */
1858
+ tools?: Array<ResponsesAPI.Tool>;
1859
+ /**
1860
+ * An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
1861
+ */
1862
+ top_p?: number;
1863
+ }
1864
+ namespace SamplingParams {
1865
+ /**
1866
+ * Configuration options for a text response from the model. Can be plain text or
1867
+ * structured JSON data. Learn more:
1868
+ *
1869
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
1870
+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
1871
+ */
1872
+ interface Text {
1873
+ /**
1874
+ * An object specifying the format that the model must output.
1875
+ *
1876
+ * Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
1877
+ * ensures the model will match your supplied JSON schema. Learn more in the
1878
+ * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
1879
+ *
1880
+ * The default format is `{ "type": "text" }` with no additional options.
1881
+ *
1882
+ * **Not recommended for gpt-4o and newer models:**
1883
+ *
1884
+ * Setting to `{ "type": "json_object" }` enables the older JSON mode, which
1885
+ * ensures the message the model generates is valid JSON. Using `json_schema` is
1886
+ * preferred for models that support it.
1887
+ */
1888
+ format?: ResponsesAPI.ResponseFormatTextConfig;
1889
+ }
1890
+ }
1891
+ }
1892
+ interface PerModelUsage {
1893
+ /**
1894
+ * The number of tokens retrieved from cache.
1895
+ */
1896
+ cached_tokens: number;
1897
+ /**
1898
+ * The number of completion tokens generated.
1899
+ */
1900
+ completion_tokens: number;
1901
+ /**
1902
+ * The number of invocations.
1903
+ */
1904
+ invocation_count: number;
1905
+ /**
1906
+ * The name of the model.
1907
+ */
1908
+ model_name: string;
1909
+ /**
1910
+ * The number of prompt tokens used.
1911
+ */
1912
+ prompt_tokens: number;
1913
+ /**
1914
+ * The total number of tokens used.
1915
+ */
1916
+ total_tokens: number;
1917
+ }
1918
+ interface PerTestingCriteriaResult {
1919
+ /**
1920
+ * Number of tests failed for this criteria.
1921
+ */
1922
+ failed: number;
1923
+ /**
1924
+ * Number of tests passed for this criteria.
1925
+ */
1926
+ passed: number;
1927
+ /**
1928
+ * A description of the testing criteria.
1929
+ */
1930
+ testing_criteria: string;
1931
+ }
1932
+ /**
1933
+ * Counters summarizing the outcomes of the evaluation run.
1934
+ */
1935
+ interface ResultCounts {
1936
+ /**
1937
+ * Number of output items that resulted in an error.
1938
+ */
1939
+ errored: number;
1940
+ /**
1941
+ * Number of output items that failed to pass the evaluation.
1942
+ */
1943
+ failed: number;
1944
+ /**
1945
+ * Number of output items that passed the evaluation.
1946
+ */
1947
+ passed: number;
1948
+ /**
1949
+ * Total number of executed output items.
1950
+ */
1951
+ total: number;
1952
+ }
1953
+ }
1954
+ export interface RunCreateParams {
1955
+ /**
1956
+ * Details about the run's data source.
1957
+ */
1958
+ data_source: CreateEvalJSONLRunDataSource | CreateEvalCompletionsRunDataSource | RunCreateParams.CreateEvalResponsesRunDataSource;
1959
+ /**
1960
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
1961
+ * for storing additional information about the object in a structured format, and
1962
+ * querying for objects via API or the dashboard.
1963
+ *
1964
+ * Keys are strings with a maximum length of 64 characters. Values are strings with
1965
+ * a maximum length of 512 characters.
1966
+ */
1967
+ metadata?: Shared.Metadata | null;
1968
+ /**
1969
+ * The name of the run.
1970
+ */
1971
+ name?: string;
1972
+ }
1973
+ export declare namespace RunCreateParams {
1974
+ /**
1975
+ * A ResponsesRunDataSource object describing a model sampling configuration.
1976
+ */
1977
+ interface CreateEvalResponsesRunDataSource {
1978
+ /**
1979
+ * Determines what populates the `item` namespace in this run's data source.
1980
+ */
1981
+ source: CreateEvalResponsesRunDataSource.FileContent | CreateEvalResponsesRunDataSource.FileID | CreateEvalResponsesRunDataSource.Responses;
1982
+ /**
1983
+ * The type of run data source. Always `responses`.
1984
+ */
1985
+ type: 'responses';
1986
+ /**
1987
+ * Used when sampling from a model. Dictates the structure of the messages passed
1988
+ * into the model. Can either be a reference to a prebuilt trajectory (ie,
1989
+ * `item.input_trajectory`), or a template with variable references to the `item`
1990
+ * namespace.
1991
+ */
1992
+ input_messages?: CreateEvalResponsesRunDataSource.Template | CreateEvalResponsesRunDataSource.ItemReference;
1993
+ /**
1994
+ * The name of the model to use for generating completions (e.g. "o3-mini").
1995
+ */
1996
+ model?: string;
1997
+ sampling_params?: CreateEvalResponsesRunDataSource.SamplingParams;
1998
+ }
1999
+ namespace CreateEvalResponsesRunDataSource {
2000
+ interface FileContent {
2001
+ /**
2002
+ * The content of the jsonl file.
2003
+ */
2004
+ content: Array<FileContent.Content>;
2005
+ /**
2006
+ * The type of jsonl source. Always `file_content`.
2007
+ */
2008
+ type: 'file_content';
2009
+ }
2010
+ namespace FileContent {
2011
+ interface Content {
2012
+ item: {
2013
+ [key: string]: unknown;
2014
+ };
2015
+ sample?: {
2016
+ [key: string]: unknown;
2017
+ };
2018
+ }
2019
+ }
2020
+ interface FileID {
2021
+ /**
2022
+ * The identifier of the file.
2023
+ */
2024
+ id: string;
2025
+ /**
2026
+ * The type of jsonl source. Always `file_id`.
2027
+ */
2028
+ type: 'file_id';
2029
+ }
2030
+ /**
2031
+ * A EvalResponsesSource object describing a run data source configuration.
2032
+ */
2033
+ interface Responses {
2034
+ /**
2035
+ * The type of run data source. Always `responses`.
2036
+ */
2037
+ type: 'responses';
2038
+ /**
2039
+ * Only include items created after this timestamp (inclusive). This is a query
2040
+ * parameter used to select responses.
2041
+ */
2042
+ created_after?: number | null;
2043
+ /**
2044
+ * Only include items created before this timestamp (inclusive). This is a query
2045
+ * parameter used to select responses.
2046
+ */
2047
+ created_before?: number | null;
2048
+ /**
2049
+ * Optional string to search the 'instructions' field. This is a query parameter
2050
+ * used to select responses.
2051
+ */
2052
+ instructions_search?: string | null;
2053
+ /**
2054
+ * Metadata filter for the responses. This is a query parameter used to select
2055
+ * responses.
2056
+ */
2057
+ metadata?: unknown | null;
2058
+ /**
2059
+ * The name of the model to find responses for. This is a query parameter used to
2060
+ * select responses.
2061
+ */
2062
+ model?: string | null;
2063
+ /**
2064
+ * Constrains effort on reasoning for
2065
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
2066
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
2067
+ * effort can result in faster responses and fewer tokens used on reasoning in a
2068
+ * response.
2069
+ */
2070
+ reasoning_effort?: Shared.ReasoningEffort | null;
2071
+ /**
2072
+ * Sampling temperature. This is a query parameter used to select responses.
2073
+ */
2074
+ temperature?: number | null;
2075
+ /**
2076
+ * List of tool names. This is a query parameter used to select responses.
2077
+ */
2078
+ tools?: Array<string> | null;
2079
+ /**
2080
+ * Nucleus sampling parameter. This is a query parameter used to select responses.
2081
+ */
2082
+ top_p?: number | null;
2083
+ /**
2084
+ * List of user identifiers. This is a query parameter used to select responses.
2085
+ */
2086
+ users?: Array<string> | null;
2087
+ }
2088
+ interface Template {
2089
+ /**
2090
+ * A list of chat messages forming the prompt or context. May include variable
2091
+ * references to the `item` namespace, ie {{item.name}}.
2092
+ */
2093
+ template: Array<Template.ChatMessage | Template.EvalItem>;
2094
+ /**
2095
+ * The type of input messages. Always `template`.
2096
+ */
2097
+ type: 'template';
2098
+ }
2099
+ namespace Template {
2100
+ interface ChatMessage {
2101
+ /**
2102
+ * The content of the message.
2103
+ */
2104
+ content: string;
2105
+ /**
2106
+ * The role of the message (e.g. "system", "assistant", "user").
2107
+ */
2108
+ role: string;
2109
+ }
2110
+ /**
2111
+ * A message input to the model with a role indicating instruction following
2112
+ * hierarchy. Instructions given with the `developer` or `system` role take
2113
+ * precedence over instructions given with the `user` role. Messages with the
2114
+ * `assistant` role are presumed to have been generated by the model in previous
2115
+ * interactions.
2116
+ */
2117
+ interface EvalItem {
2118
+ /**
2119
+ * Inputs to the model - can contain template strings.
2120
+ */
2121
+ content: string | ResponsesAPI.ResponseInputText | EvalItem.OutputText | EvalItem.InputImage | ResponsesAPI.ResponseInputAudio | Array<unknown>;
2122
+ /**
2123
+ * The role of the message input. One of `user`, `assistant`, `system`, or
2124
+ * `developer`.
2125
+ */
2126
+ role: 'user' | 'assistant' | 'system' | 'developer';
2127
+ /**
2128
+ * The type of the message input. Always `message`.
2129
+ */
2130
+ type?: 'message';
2131
+ }
2132
+ namespace EvalItem {
2133
+ /**
2134
+ * A text output from the model.
2135
+ */
2136
+ interface OutputText {
2137
+ /**
2138
+ * The text output from the model.
2139
+ */
2140
+ text: string;
2141
+ /**
2142
+ * The type of the output text. Always `output_text`.
2143
+ */
2144
+ type: 'output_text';
2145
+ }
2146
+ /**
2147
+ * An image input to the model.
2148
+ */
2149
+ interface InputImage {
2150
+ /**
2151
+ * The URL of the image input.
2152
+ */
2153
+ image_url: string;
2154
+ /**
2155
+ * The type of the image input. Always `input_image`.
2156
+ */
2157
+ type: 'input_image';
2158
+ /**
2159
+ * The detail level of the image to be sent to the model. One of `high`, `low`, or
2160
+ * `auto`. Defaults to `auto`.
2161
+ */
2162
+ detail?: string;
2163
+ }
2164
+ }
2165
+ }
2166
+ interface ItemReference {
2167
+ /**
2168
+ * A reference to a variable in the `item` namespace. Ie, "item.name"
2169
+ */
2170
+ item_reference: string;
2171
+ /**
2172
+ * The type of input messages. Always `item_reference`.
2173
+ */
2174
+ type: 'item_reference';
2175
+ }
2176
+ interface SamplingParams {
2177
+ /**
2178
+ * The maximum number of tokens in the generated output.
2179
+ */
2180
+ max_completion_tokens?: number;
2181
+ /**
2182
+ * Constrains effort on reasoning for
2183
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
2184
+ * supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
2185
+ * effort can result in faster responses and fewer tokens used on reasoning in a
2186
+ * response.
2187
+ */
2188
+ reasoning_effort?: Shared.ReasoningEffort | null;
2189
+ /**
2190
+ * A seed value to initialize the randomness, during sampling.
2191
+ */
2192
+ seed?: number;
2193
+ /**
2194
+ * A higher temperature increases randomness in the outputs.
2195
+ */
2196
+ temperature?: number;
2197
+ /**
2198
+ * Configuration options for a text response from the model. Can be plain text or
2199
+ * structured JSON data. Learn more:
2200
+ *
2201
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
2202
+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
2203
+ */
2204
+ text?: SamplingParams.Text;
2205
+ /**
2206
+ * An array of tools the model may call while generating a response. You can
2207
+ * specify which tool to use by setting the `tool_choice` parameter.
2208
+ *
2209
+ * The two categories of tools you can provide the model are:
2210
+ *
2211
+ * - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
2212
+ * capabilities, like
2213
+ * [web search](https://platform.openai.com/docs/guides/tools-web-search) or
2214
+ * [file search](https://platform.openai.com/docs/guides/tools-file-search).
2215
+ * Learn more about
2216
+ * [built-in tools](https://platform.openai.com/docs/guides/tools).
2217
+ * - **Function calls (custom tools)**: Functions that are defined by you, enabling
2218
+ * the model to call your own code. Learn more about
2219
+ * [function calling](https://platform.openai.com/docs/guides/function-calling).
2220
+ */
2221
+ tools?: Array<ResponsesAPI.Tool>;
2222
+ /**
2223
+ * An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
2224
+ */
2225
+ top_p?: number;
2226
+ }
2227
+ namespace SamplingParams {
2228
+ /**
2229
+ * Configuration options for a text response from the model. Can be plain text or
2230
+ * structured JSON data. Learn more:
2231
+ *
2232
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
2233
+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
2234
+ */
2235
+ interface Text {
2236
+ /**
2237
+ * An object specifying the format that the model must output.
2238
+ *
2239
+ * Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
2240
+ * ensures the model will match your supplied JSON schema. Learn more in the
2241
+ * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
2242
+ *
2243
+ * The default format is `{ "type": "text" }` with no additional options.
2244
+ *
2245
+ * **Not recommended for gpt-4o and newer models:**
2246
+ *
2247
+ * Setting to `{ "type": "json_object" }` enables the older JSON mode, which
2248
+ * ensures the message the model generates is valid JSON. Using `json_schema` is
2249
+ * preferred for models that support it.
2250
+ */
2251
+ format?: ResponsesAPI.ResponseFormatTextConfig;
2252
+ }
2253
+ }
2254
+ }
2255
+ }
2256
+ export interface RunRetrieveParams {
2257
+ /**
2258
+ * The ID of the evaluation to retrieve runs for.
2259
+ */
2260
+ eval_id: string;
2261
+ }
2262
+ export interface RunListParams extends CursorPageParams {
2263
+ /**
2264
+ * Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for
2265
+ * descending order. Defaults to `asc`.
2266
+ */
2267
+ order?: 'asc' | 'desc';
2268
+ /**
2269
+ * Filter runs by status. One of `queued` | `in_progress` | `failed` | `completed`
2270
+ * | `canceled`.
2271
+ */
2272
+ status?: 'queued' | 'in_progress' | 'completed' | 'canceled' | 'failed';
2273
+ }
2274
+ export interface RunDeleteParams {
2275
+ /**
2276
+ * The ID of the evaluation to delete the run from.
2277
+ */
2278
+ eval_id: string;
2279
+ }
2280
+ export interface RunCancelParams {
2281
+ /**
2282
+ * The ID of the evaluation whose run you want to cancel.
2283
+ */
2284
+ eval_id: string;
2285
+ }
2286
+ export declare namespace Runs {
2287
+ export { type CreateEvalCompletionsRunDataSource as CreateEvalCompletionsRunDataSource, type CreateEvalJSONLRunDataSource as CreateEvalJSONLRunDataSource, type EvalAPIError as EvalAPIError, type RunCreateResponse as RunCreateResponse, type RunRetrieveResponse as RunRetrieveResponse, type RunListResponse as RunListResponse, type RunDeleteResponse as RunDeleteResponse, type RunCancelResponse as RunCancelResponse, type RunListResponsesPage as RunListResponsesPage, type RunCreateParams as RunCreateParams, type RunRetrieveParams as RunRetrieveParams, type RunListParams as RunListParams, type RunDeleteParams as RunDeleteParams, type RunCancelParams as RunCancelParams, };
2288
+ export { OutputItems as OutputItems, type OutputItemRetrieveResponse as OutputItemRetrieveResponse, type OutputItemListResponse as OutputItemListResponse, type OutputItemListResponsesPage as OutputItemListResponsesPage, type OutputItemRetrieveParams as OutputItemRetrieveParams, type OutputItemListParams as OutputItemListParams, };
2289
+ }
2290
+ //# sourceMappingURL=runs.d.mts.map