openai 4.46.0 → 4.47.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 (204) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +1 -1
  3. package/index.d.mts +2 -2
  4. package/index.d.ts +2 -2
  5. package/index.d.ts.map +1 -1
  6. package/index.js +2 -2
  7. package/index.js.map +1 -1
  8. package/index.mjs +2 -2
  9. package/index.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/audio/audio.d.ts +4 -4
  12. package/resources/audio/audio.d.ts.map +1 -1
  13. package/resources/audio/audio.js +4 -4
  14. package/resources/audio/audio.js.map +1 -1
  15. package/resources/audio/audio.mjs +4 -4
  16. package/resources/audio/audio.mjs.map +1 -1
  17. package/resources/audio/speech.d.ts +4 -4
  18. package/resources/audio/speech.d.ts.map +1 -1
  19. package/resources/audio/speech.js +1 -1
  20. package/resources/audio/speech.js.map +1 -1
  21. package/resources/audio/speech.mjs +1 -1
  22. package/resources/audio/speech.mjs.map +1 -1
  23. package/resources/audio/transcriptions.d.ts +4 -4
  24. package/resources/audio/transcriptions.d.ts.map +1 -1
  25. package/resources/audio/transcriptions.js +2 -2
  26. package/resources/audio/transcriptions.js.map +1 -1
  27. package/resources/audio/transcriptions.mjs +2 -2
  28. package/resources/audio/transcriptions.mjs.map +1 -1
  29. package/resources/audio/translations.d.ts +4 -4
  30. package/resources/audio/translations.d.ts.map +1 -1
  31. package/resources/audio/translations.js +2 -2
  32. package/resources/audio/translations.js.map +1 -1
  33. package/resources/audio/translations.mjs +2 -2
  34. package/resources/audio/translations.mjs.map +1 -1
  35. package/resources/batches.d.ts +10 -7
  36. package/resources/batches.d.ts.map +1 -1
  37. package/resources/batches.js +4 -4
  38. package/resources/batches.js.map +1 -1
  39. package/resources/batches.mjs +4 -4
  40. package/resources/batches.mjs.map +1 -1
  41. package/resources/beta/assistants.d.ts +18 -15
  42. package/resources/beta/assistants.d.ts.map +1 -1
  43. package/resources/beta/assistants.js +4 -4
  44. package/resources/beta/assistants.js.map +1 -1
  45. package/resources/beta/assistants.mjs +4 -4
  46. package/resources/beta/assistants.mjs.map +1 -1
  47. package/resources/beta/beta.d.ts +5 -5
  48. package/resources/beta/beta.d.ts.map +1 -1
  49. package/resources/beta/beta.js +5 -5
  50. package/resources/beta/beta.js.map +1 -1
  51. package/resources/beta/beta.mjs +5 -5
  52. package/resources/beta/beta.mjs.map +1 -1
  53. package/resources/beta/chat/chat.d.ts +2 -2
  54. package/resources/beta/chat/chat.d.ts.map +1 -1
  55. package/resources/beta/chat/chat.js +2 -2
  56. package/resources/beta/chat/chat.js.map +1 -1
  57. package/resources/beta/chat/chat.mjs +2 -2
  58. package/resources/beta/chat/chat.mjs.map +1 -1
  59. package/resources/beta/chat/completions.d.ts +14 -14
  60. package/resources/beta/chat/completions.d.ts.map +1 -1
  61. package/resources/beta/chat/completions.js +8 -8
  62. package/resources/beta/chat/completions.js.map +1 -1
  63. package/resources/beta/chat/completions.mjs +8 -8
  64. package/resources/beta/chat/completions.mjs.map +1 -1
  65. package/resources/beta/threads/messages.d.ts +5 -5
  66. package/resources/beta/threads/messages.d.ts.map +1 -1
  67. package/resources/beta/threads/messages.js +4 -4
  68. package/resources/beta/threads/messages.js.map +1 -1
  69. package/resources/beta/threads/messages.mjs +4 -4
  70. package/resources/beta/threads/messages.mjs.map +1 -1
  71. package/resources/beta/threads/runs/runs.d.ts +32 -27
  72. package/resources/beta/threads/runs/runs.d.ts.map +1 -1
  73. package/resources/beta/threads/runs/runs.js +8 -7
  74. package/resources/beta/threads/runs/runs.js.map +1 -1
  75. package/resources/beta/threads/runs/runs.mjs +8 -7
  76. package/resources/beta/threads/runs/runs.mjs.map +1 -1
  77. package/resources/beta/threads/runs/steps.d.ts +4 -4
  78. package/resources/beta/threads/runs/steps.d.ts.map +1 -1
  79. package/resources/beta/threads/runs/steps.js +4 -4
  80. package/resources/beta/threads/runs/steps.js.map +1 -1
  81. package/resources/beta/threads/runs/steps.mjs +4 -4
  82. package/resources/beta/threads/runs/steps.mjs.map +1 -1
  83. package/resources/beta/threads/threads.d.ts +21 -17
  84. package/resources/beta/threads/threads.d.ts.map +1 -1
  85. package/resources/beta/threads/threads.js +5 -5
  86. package/resources/beta/threads/threads.js.map +1 -1
  87. package/resources/beta/threads/threads.mjs +5 -5
  88. package/resources/beta/threads/threads.mjs.map +1 -1
  89. package/resources/beta/vector-stores/file-batches.d.ts +7 -7
  90. package/resources/beta/vector-stores/file-batches.d.ts.map +1 -1
  91. package/resources/beta/vector-stores/file-batches.js +6 -5
  92. package/resources/beta/vector-stores/file-batches.js.map +1 -1
  93. package/resources/beta/vector-stores/file-batches.mjs +6 -5
  94. package/resources/beta/vector-stores/file-batches.mjs.map +1 -1
  95. package/resources/beta/vector-stores/files.d.ts +5 -5
  96. package/resources/beta/vector-stores/files.d.ts.map +1 -1
  97. package/resources/beta/vector-stores/files.js +5 -5
  98. package/resources/beta/vector-stores/files.js.map +1 -1
  99. package/resources/beta/vector-stores/files.mjs +5 -5
  100. package/resources/beta/vector-stores/files.mjs.map +1 -1
  101. package/resources/beta/vector-stores/vector-stores.d.ts +6 -6
  102. package/resources/beta/vector-stores/vector-stores.d.ts.map +1 -1
  103. package/resources/beta/vector-stores/vector-stores.js +6 -6
  104. package/resources/beta/vector-stores/vector-stores.js.map +1 -1
  105. package/resources/beta/vector-stores/vector-stores.mjs +6 -6
  106. package/resources/beta/vector-stores/vector-stores.mjs.map +1 -1
  107. package/resources/chat/chat.d.ts +3 -3
  108. package/resources/chat/chat.d.ts.map +1 -1
  109. package/resources/chat/chat.js +2 -2
  110. package/resources/chat/chat.js.map +1 -1
  111. package/resources/chat/chat.mjs +2 -2
  112. package/resources/chat/chat.mjs.map +1 -1
  113. package/resources/chat/completions.d.ts +8 -8
  114. package/resources/chat/completions.d.ts.map +1 -1
  115. package/resources/chat/completions.js +1 -1
  116. package/resources/chat/completions.js.map +1 -1
  117. package/resources/chat/completions.mjs +1 -1
  118. package/resources/chat/completions.mjs.map +1 -1
  119. package/resources/completions.d.ts +6 -6
  120. package/resources/completions.d.ts.map +1 -1
  121. package/resources/completions.js +1 -1
  122. package/resources/completions.js.map +1 -1
  123. package/resources/completions.mjs +1 -1
  124. package/resources/completions.mjs.map +1 -1
  125. package/resources/embeddings.d.ts +3 -3
  126. package/resources/embeddings.d.ts.map +1 -1
  127. package/resources/embeddings.js +1 -1
  128. package/resources/embeddings.js.map +1 -1
  129. package/resources/embeddings.mjs +1 -1
  130. package/resources/embeddings.mjs.map +1 -1
  131. package/resources/files.d.ts +17 -13
  132. package/resources/files.d.ts.map +1 -1
  133. package/resources/files.js +18 -14
  134. package/resources/files.js.map +1 -1
  135. package/resources/files.mjs +18 -14
  136. package/resources/files.mjs.map +1 -1
  137. package/resources/fine-tuning/fine-tuning.d.ts +2 -2
  138. package/resources/fine-tuning/fine-tuning.d.ts.map +1 -1
  139. package/resources/fine-tuning/fine-tuning.js +2 -2
  140. package/resources/fine-tuning/fine-tuning.js.map +1 -1
  141. package/resources/fine-tuning/fine-tuning.mjs +2 -2
  142. package/resources/fine-tuning/fine-tuning.mjs.map +1 -1
  143. package/resources/fine-tuning/jobs/checkpoints.d.ts +4 -4
  144. package/resources/fine-tuning/jobs/checkpoints.d.ts.map +1 -1
  145. package/resources/fine-tuning/jobs/checkpoints.js +4 -4
  146. package/resources/fine-tuning/jobs/checkpoints.js.map +1 -1
  147. package/resources/fine-tuning/jobs/checkpoints.mjs +4 -4
  148. package/resources/fine-tuning/jobs/checkpoints.mjs.map +1 -1
  149. package/resources/fine-tuning/jobs/jobs.d.ts +5 -5
  150. package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
  151. package/resources/fine-tuning/jobs/jobs.js +5 -5
  152. package/resources/fine-tuning/jobs/jobs.js.map +1 -1
  153. package/resources/fine-tuning/jobs/jobs.mjs +5 -5
  154. package/resources/fine-tuning/jobs/jobs.mjs.map +1 -1
  155. package/resources/images.d.ts +4 -4
  156. package/resources/images.d.ts.map +1 -1
  157. package/resources/images.js +2 -2
  158. package/resources/images.js.map +1 -1
  159. package/resources/images.mjs +2 -2
  160. package/resources/images.mjs.map +1 -1
  161. package/resources/models.d.ts +4 -4
  162. package/resources/models.d.ts.map +1 -1
  163. package/resources/models.js +3 -3
  164. package/resources/models.js.map +1 -1
  165. package/resources/models.mjs +3 -3
  166. package/resources/models.mjs.map +1 -1
  167. package/resources/moderations.d.ts +3 -3
  168. package/resources/moderations.d.ts.map +1 -1
  169. package/resources/moderations.js +1 -1
  170. package/resources/moderations.js.map +1 -1
  171. package/resources/moderations.mjs +1 -1
  172. package/resources/moderations.mjs.map +1 -1
  173. package/src/index.ts +2 -2
  174. package/src/resources/audio/audio.ts +4 -4
  175. package/src/resources/audio/speech.ts +4 -4
  176. package/src/resources/audio/transcriptions.ts +4 -4
  177. package/src/resources/audio/translations.ts +4 -4
  178. package/src/resources/batches.ts +11 -8
  179. package/src/resources/beta/assistants.ts +19 -16
  180. package/src/resources/beta/beta.ts +5 -5
  181. package/src/resources/beta/chat/chat.ts +2 -2
  182. package/src/resources/beta/chat/completions.ts +14 -14
  183. package/src/resources/beta/threads/messages.ts +6 -6
  184. package/src/resources/beta/threads/runs/runs.ts +35 -28
  185. package/src/resources/beta/threads/runs/steps.ts +5 -5
  186. package/src/resources/beta/threads/threads.ts +22 -18
  187. package/src/resources/beta/vector-stores/file-batches.ts +11 -10
  188. package/src/resources/beta/vector-stores/files.ts +6 -6
  189. package/src/resources/beta/vector-stores/vector-stores.ts +7 -7
  190. package/src/resources/chat/chat.ts +3 -3
  191. package/src/resources/chat/completions.ts +8 -8
  192. package/src/resources/completions.ts +6 -6
  193. package/src/resources/embeddings.ts +3 -3
  194. package/src/resources/files.ts +20 -16
  195. package/src/resources/fine-tuning/fine-tuning.ts +2 -2
  196. package/src/resources/fine-tuning/jobs/checkpoints.ts +5 -5
  197. package/src/resources/fine-tuning/jobs/jobs.ts +6 -6
  198. package/src/resources/images.ts +4 -4
  199. package/src/resources/models.ts +4 -4
  200. package/src/resources/moderations.ts +3 -3
  201. package/src/version.ts +1 -1
  202. package/version.d.ts +1 -1
  203. package/version.js +1 -1
  204. package/version.mjs +1 -1
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from 'openai/resource';
3
- import * as ModelsAPI from 'openai/resources/models';
4
- import { Page } from 'openai/pagination';
2
+ import { APIResource } from "../resource.mjs";
3
+ import * as ModelsAPI from "./models.mjs";
4
+ import { Page } from "../pagination.mjs";
5
5
  export class Models extends APIResource {
6
6
  /**
7
7
  * Retrieves a model instance, providing basic information about the model such as
@@ -1 +1 @@
1
- {"version":3,"file":"models.mjs","sourceRoot":"","sources":["../src/resources/models.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,WAAW,EAAE,MAAM,iBAAiB;OACtC,KAAK,SAAS,MAAM,yBAAyB;OAC7C,EAAE,IAAI,EAAE,MAAM,mBAAmB;AAExC,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,QAAQ,CAAC,KAAa,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,OAA6B;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,KAAa,EAAE,OAA6B;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,IAAW;CAAG;AAmC9C,WAAiB,MAAM;IAGP,iBAAU,GAAG,SAAS,CAAC,UAAU,CAAC;AAClD,CAAC,EAJgB,MAAM,KAAN,MAAM,QAItB"}
1
+ {"version":3,"file":"models.mjs","sourceRoot":"","sources":["../src/resources/models.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,QAAQ,CAAC,KAAa,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,OAA6B;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,KAAa,EAAE,OAA6B;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,IAAW;CAAG;AAmC9C,WAAiB,MAAM;IAGP,iBAAU,GAAG,SAAS,CAAC,UAAU,CAAC;AAClD,CAAC,EAJgB,MAAM,KAAN,MAAM,QAItB"}
@@ -1,6 +1,6 @@
1
- import * as Core from 'openai/core';
2
- import { APIResource } from 'openai/resource';
3
- import * as ModerationsAPI from 'openai/resources/moderations';
1
+ import * as Core from "../core.js";
2
+ import { APIResource } from "../resource.js";
3
+ import * as ModerationsAPI from "./moderations.js";
4
4
  export declare class Moderations extends APIResource {
5
5
  /**
6
6
  * Classifies if text is potentially harmful.
@@ -1 +1 @@
1
- {"version":3,"file":"moderations.d.ts","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EA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;QAExB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,kBAAkB,EAAE,MAAM,CAAC;KAC5B;CACF;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAE9B;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,wBAAwB,GAAG,wBAAwB,CAAC;CAC7E;AAED,yBAAiB,WAAW,CAAC;IAC3B,MAAM,QAAQ,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC;IACrD,MAAM,QAAQ,wBAAwB,GAAG,cAAc,CAAC,wBAAwB,CAAC;IACjF,MAAM,QAAQ,sBAAsB,GAAG,cAAc,CAAC,sBAAsB,CAAC;CAC9E"}
@@ -2,7 +2,7 @@
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Moderations = void 0;
5
- const resource_1 = require("openai/resource");
5
+ const resource_1 = require("../resource.js");
6
6
  class Moderations extends resource_1.APIResource {
7
7
  /**
8
8
  * Classifies if text is potentially harmful.
@@ -1 +1 @@
1
- {"version":3,"file":"moderations.js","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAGtF,8CAA8C;AAG9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AAVD,kCAUC;AAiMD,WAAiB,WAAW;AAI5B,CAAC,EAJgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAI3B"}
1
+ {"version":3,"file":"moderations.js","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAGtF,6CAA0C;AAG1C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AAVD,kCAUC;AAiMD,WAAiB,WAAW;AAI5B,CAAC,EAJgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAI3B"}
@@ -1,5 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from 'openai/resource';
2
+ import { APIResource } from "../resource.mjs";
3
3
  export class Moderations extends APIResource {
4
4
  /**
5
5
  * Classifies if text is potentially harmful.
@@ -1 +1 @@
1
- {"version":3,"file":"moderations.mjs","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,WAAW,EAAE,MAAM,iBAAiB;AAG7C,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AAiMD,WAAiB,WAAW;AAI5B,CAAC,EAJgB,WAAW,KAAX,WAAW,QAI3B"}
1
+ {"version":3,"file":"moderations.mjs","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AAiMD,WAAiB,WAAW;AAI5B,CAAC,EAJgB,WAAW,KAAX,WAAW,QAI3B"}
package/src/index.ts CHANGED
@@ -4,8 +4,8 @@ import * as Core from './core';
4
4
  import * as Errors from './error';
5
5
  import { type Agent, type RequestInit } from './_shims/index';
6
6
  import * as Uploads from './uploads';
7
- import * as Pagination from "./pagination";
8
- import * as API from "./resources/index";
7
+ import * as Pagination from './pagination';
8
+ import * as API from './resources/index';
9
9
 
10
10
  export interface ClientOptions {
11
11
  /**
@@ -1,9 +1,9 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from "../../resource";
4
- import * as SpeechAPI from "./speech";
5
- import * as TranscriptionsAPI from "./transcriptions";
6
- import * as TranslationsAPI from "./translations";
3
+ import { APIResource } from '../../resource';
4
+ import * as SpeechAPI from './speech';
5
+ import * as TranscriptionsAPI from './transcriptions';
6
+ import * as TranslationsAPI from './translations';
7
7
 
8
8
  export class Audio extends APIResource {
9
9
  transcriptions: TranscriptionsAPI.Transcriptions = new TranscriptionsAPI.Transcriptions(this._client);
@@ -1,9 +1,9 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import * as Core from "../../core";
4
- import { APIResource } from "../../resource";
5
- import { type Response } from "../../_shims/index";
6
- import * as SpeechAPI from "./speech";
3
+ import * as Core from '../../core';
4
+ import { APIResource } from '../../resource';
5
+ import { type Response } from '../../_shims/index';
6
+ import * as SpeechAPI from './speech';
7
7
 
8
8
  export class Speech extends APIResource {
9
9
  /**
@@ -1,9 +1,9 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import * as Core from "../../core";
4
- import { APIResource } from "../../resource";
5
- import * as TranscriptionsAPI from "./transcriptions";
6
- import { type Uploadable, multipartFormRequestOptions } from "../../core";
3
+ import * as Core from '../../core';
4
+ import { APIResource } from '../../resource';
5
+ import * as TranscriptionsAPI from './transcriptions';
6
+ import { type Uploadable, multipartFormRequestOptions } from '../../core';
7
7
 
8
8
  export class Transcriptions extends APIResource {
9
9
  /**
@@ -1,9 +1,9 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import * as Core from "../../core";
4
- import { APIResource } from "../../resource";
5
- import * as TranslationsAPI from "./translations";
6
- import { type Uploadable, multipartFormRequestOptions } from "../../core";
3
+ import * as Core from '../../core';
4
+ import { APIResource } from '../../resource';
5
+ import * as TranslationsAPI from './translations';
6
+ import { type Uploadable, multipartFormRequestOptions } from '../../core';
7
7
 
8
8
  export class Translations extends APIResource {
9
9
  /**
@@ -1,10 +1,10 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import * as Core from "../core";
4
- import { APIResource } from "../resource";
5
- import { isRequestOptions } from "../core";
6
- import * as BatchesAPI from "./batches";
7
- import { CursorPage, type CursorPageParams } from "../pagination";
3
+ import * as Core from '../core';
4
+ import { APIResource } from '../resource';
5
+ import { isRequestOptions } from '../core';
6
+ import * as BatchesAPI from './batches';
7
+ import { CursorPage, type CursorPageParams } from '../pagination';
8
8
 
9
9
  export class Batches extends APIResource {
10
10
  /**
@@ -215,9 +215,11 @@ export interface BatchCreateParams {
215
215
 
216
216
  /**
217
217
  * The endpoint to be used for all requests in the batch. Currently
218
- * `/v1/chat/completions` and `/v1/embeddings` are supported.
218
+ * `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.
219
+ * Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000
220
+ * embedding inputs across all requests in the batch.
219
221
  */
220
- endpoint: '/v1/chat/completions' | '/v1/embeddings';
222
+ endpoint: '/v1/chat/completions' | '/v1/embeddings' | '/v1/completions';
221
223
 
222
224
  /**
223
225
  * The ID of an uploaded file that contains requests for the new batch.
@@ -227,7 +229,8 @@ export interface BatchCreateParams {
227
229
  *
228
230
  * Your input file must be formatted as a
229
231
  * [JSONL file](https://platform.openai.com/docs/api-reference/batch/requestInput),
230
- * and must be uploaded with the purpose `batch`.
232
+ * and must be uploaded with the purpose `batch`. The file can contain up to 50,000
233
+ * requests, and can be up to 100 MB in size.
231
234
  */
232
235
  input_file_id: string;
233
236
 
@@ -1,15 +1,15 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import * as Core from "../../core";
4
- import { APIResource } from "../../resource";
5
- import { isRequestOptions } from "../../core";
6
- import * as AssistantsAPI from "./assistants";
7
- import * as Shared from "../shared";
8
- import * as MessagesAPI from "./threads/messages";
9
- import * as ThreadsAPI from "./threads/threads";
10
- import * as RunsAPI from "./threads/runs/runs";
11
- import * as StepsAPI from "./threads/runs/steps";
12
- import { CursorPage, type CursorPageParams } from "../../pagination";
3
+ import * as Core from '../../core';
4
+ import { APIResource } from '../../resource';
5
+ import { isRequestOptions } from '../../core';
6
+ import * as AssistantsAPI from './assistants';
7
+ import * as Shared from '../shared';
8
+ import * as MessagesAPI from './threads/messages';
9
+ import * as ThreadsAPI from './threads/threads';
10
+ import * as RunsAPI from './threads/runs/runs';
11
+ import * as StepsAPI from './threads/runs/steps';
12
+ import { CursorPage, type CursorPageParams } from '../../pagination';
13
13
 
14
14
  export class Assistants extends APIResource {
15
15
  /**
@@ -144,8 +144,9 @@ export interface Assistant {
144
144
 
145
145
  /**
146
146
  * Specifies the format that the model must output. Compatible with
147
- * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
148
- * all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
147
+ * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
148
+ * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
149
+ * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
149
150
  *
150
151
  * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
151
152
  * message the model generates is valid JSON.
@@ -1047,8 +1048,9 @@ export interface AssistantCreateParams {
1047
1048
 
1048
1049
  /**
1049
1050
  * Specifies the format that the model must output. Compatible with
1050
- * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
1051
- * all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
1051
+ * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
1052
+ * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
1053
+ * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
1052
1054
  *
1053
1055
  * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
1054
1056
  * message the model generates is valid JSON.
@@ -1193,8 +1195,9 @@ export interface AssistantUpdateParams {
1193
1195
 
1194
1196
  /**
1195
1197
  * Specifies the format that the model must output. Compatible with
1196
- * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
1197
- * all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
1198
+ * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
1199
+ * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
1200
+ * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
1198
1201
  *
1199
1202
  * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
1200
1203
  * message the model generates is valid JSON.
@@ -1,10 +1,10 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from "../../resource";
4
- import * as AssistantsAPI from "./assistants";
5
- import * as ChatAPI from "./chat/chat";
6
- import * as ThreadsAPI from "./threads/threads";
7
- import * as VectorStoresAPI from "./vector-stores/vector-stores";
3
+ import { APIResource } from '../../resource';
4
+ import * as AssistantsAPI from './assistants';
5
+ import * as ChatAPI from './chat/chat';
6
+ import * as ThreadsAPI from './threads/threads';
7
+ import * as VectorStoresAPI from './vector-stores/vector-stores';
8
8
 
9
9
  export class Beta extends APIResource {
10
10
  vectorStores: VectorStoresAPI.VectorStores = new VectorStoresAPI.VectorStores(this._client);
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from "../../../resource";
4
- import * as CompletionsAPI from "./completions";
3
+ import { APIResource } from '../../../resource';
4
+ import * as CompletionsAPI from './completions';
5
5
 
6
6
  export class Chat extends APIResource {
7
7
  completions: CompletionsAPI.Completions = new CompletionsAPI.Completions(this._client);
@@ -1,18 +1,18 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import * as Core from "../../../core";
4
- import { APIResource } from "../../../resource";
5
- import { ChatCompletionRunner, ChatCompletionFunctionRunnerParams } from "../../../lib/ChatCompletionRunner";
6
- export { ChatCompletionRunner, ChatCompletionFunctionRunnerParams } from "../../../lib/ChatCompletionRunner";
3
+ import * as Core from '../../../core';
4
+ import { APIResource } from '../../../resource';
5
+ import { ChatCompletionRunner, ChatCompletionFunctionRunnerParams } from '../../../lib/ChatCompletionRunner';
6
+ export { ChatCompletionRunner, ChatCompletionFunctionRunnerParams } from '../../../lib/ChatCompletionRunner';
7
7
  import {
8
8
  ChatCompletionStreamingRunner,
9
9
  ChatCompletionStreamingFunctionRunnerParams,
10
- } from "../../../lib/ChatCompletionStreamingRunner";
10
+ } from '../../../lib/ChatCompletionStreamingRunner';
11
11
  export {
12
12
  ChatCompletionStreamingRunner,
13
13
  ChatCompletionStreamingFunctionRunnerParams,
14
- } from "../../../lib/ChatCompletionStreamingRunner";
15
- import { BaseFunctionsArgs } from "../../../lib/RunnableFunction";
14
+ } from '../../../lib/ChatCompletionStreamingRunner';
15
+ import { BaseFunctionsArgs } from '../../../lib/RunnableFunction';
16
16
  export {
17
17
  RunnableFunction,
18
18
  RunnableFunctions,
@@ -20,13 +20,13 @@ export {
20
20
  RunnableFunctionWithoutParse,
21
21
  ParsingFunction,
22
22
  ParsingToolFunction,
23
- } from "../../../lib/RunnableFunction";
24
- import { ChatCompletionToolRunnerParams } from "../../../lib/ChatCompletionRunner";
25
- export { ChatCompletionToolRunnerParams } from "../../../lib/ChatCompletionRunner";
26
- import { ChatCompletionStreamingToolRunnerParams } from "../../../lib/ChatCompletionStreamingRunner";
27
- export { ChatCompletionStreamingToolRunnerParams } from "../../../lib/ChatCompletionStreamingRunner";
28
- import { ChatCompletionStream, type ChatCompletionStreamParams } from "../../../lib/ChatCompletionStream";
29
- export { ChatCompletionStream, type ChatCompletionStreamParams } from "../../../lib/ChatCompletionStream";
23
+ } from '../../../lib/RunnableFunction';
24
+ import { ChatCompletionToolRunnerParams } from '../../../lib/ChatCompletionRunner';
25
+ export { ChatCompletionToolRunnerParams } from '../../../lib/ChatCompletionRunner';
26
+ import { ChatCompletionStreamingToolRunnerParams } from '../../../lib/ChatCompletionStreamingRunner';
27
+ export { ChatCompletionStreamingToolRunnerParams } from '../../../lib/ChatCompletionStreamingRunner';
28
+ import { ChatCompletionStream, type ChatCompletionStreamParams } from '../../../lib/ChatCompletionStream';
29
+ export { ChatCompletionStream, type ChatCompletionStreamParams } from '../../../lib/ChatCompletionStream';
30
30
 
31
31
  export class Completions extends APIResource {
32
32
  /**
@@ -1,11 +1,11 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import * as Core from "../../../core";
4
- import { APIResource } from "../../../resource";
5
- import { isRequestOptions } from "../../../core";
6
- import * as MessagesAPI from "./messages";
7
- import * as AssistantsAPI from "../assistants";
8
- import { CursorPage, type CursorPageParams } from "../../../pagination";
3
+ import * as Core from '../../../core';
4
+ import { APIResource } from '../../../resource';
5
+ import { isRequestOptions } from '../../../core';
6
+ import * as MessagesAPI from './messages';
7
+ import * as AssistantsAPI from '../assistants';
8
+ import { CursorPage, type CursorPageParams } from '../../../pagination';
9
9
 
10
10
  export class Messages extends APIResource {
11
11
  /**
@@ -1,19 +1,19 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import * as Core from "../../../../core";
4
- import { APIPromise } from "../../../../core";
5
- import { APIResource } from "../../../../resource";
6
- import { isRequestOptions } from "../../../../core";
7
- import { AssistantStream, RunCreateParamsBaseStream } from "../../../../lib/AssistantStream";
8
- import { sleep } from "../../../../core";
9
- import { RunSubmitToolOutputsParamsStream } from "../../../../lib/AssistantStream";
10
- import * as RunsAPI from "./runs";
11
- import * as AssistantsAPI from "../../assistants";
12
- import * as MessagesAPI from "../messages";
13
- import * as ThreadsAPI from "../threads";
14
- import * as StepsAPI from "./steps";
15
- import { CursorPage, type CursorPageParams } from "../../../../pagination";
16
- import { Stream } from "../../../../streaming";
3
+ import * as Core from '../../../../core';
4
+ import { APIPromise } from '../../../../core';
5
+ import { APIResource } from '../../../../resource';
6
+ import { isRequestOptions } from '../../../../core';
7
+ import { AssistantStream, RunCreateParamsBaseStream } from '../../../../lib/AssistantStream';
8
+ import { sleep } from '../../../../core';
9
+ import { RunSubmitToolOutputsParamsStream } from '../../../../lib/AssistantStream';
10
+ import * as RunsAPI from './runs';
11
+ import * as AssistantsAPI from '../../assistants';
12
+ import * as MessagesAPI from '../messages';
13
+ import * as ThreadsAPI from '../threads';
14
+ import * as StepsAPI from './steps';
15
+ import { CursorPage, type CursorPageParams } from '../../../../pagination';
16
+ import { Stream } from '../../../../streaming';
17
17
 
18
18
  export class Runs extends APIResource {
19
19
  steps: StepsAPI.Steps = new StepsAPI.Steps(this._client);
@@ -176,6 +176,7 @@ export class Runs extends APIResource {
176
176
  break;
177
177
  //We return the run in any terminal state.
178
178
  case 'requires_action':
179
+ case 'incomplete':
179
180
  case 'cancelled':
180
181
  case 'completed':
181
182
  case 'failed':
@@ -409,8 +410,9 @@ export interface Run {
409
410
 
410
411
  /**
411
412
  * Specifies the format that the model must output. Compatible with
412
- * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
413
- * all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
413
+ * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
414
+ * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
415
+ * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
414
416
  *
415
417
  * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
416
418
  * message the model generates is valid JSON.
@@ -432,8 +434,8 @@ export interface Run {
432
434
 
433
435
  /**
434
436
  * The status of the run, which can be either `queued`, `in_progress`,
435
- * `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, or
436
- * `expired`.
437
+ * `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`,
438
+ * `incomplete`, or `expired`.
437
439
  */
438
440
  status: RunStatus;
439
441
 
@@ -584,8 +586,8 @@ export namespace Run {
584
586
 
585
587
  /**
586
588
  * The status of the run, which can be either `queued`, `in_progress`,
587
- * `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, or
588
- * `expired`.
589
+ * `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`,
590
+ * `incomplete`, or `expired`.
589
591
  */
590
592
  export type RunStatus =
591
593
  | 'queued'
@@ -595,6 +597,7 @@ export type RunStatus =
595
597
  | 'cancelled'
596
598
  | 'failed'
597
599
  | 'completed'
600
+ | 'incomplete'
598
601
  | 'expired';
599
602
 
600
603
  export type RunCreateParams = RunCreateParamsNonStreaming | RunCreateParamsStreaming;
@@ -684,8 +687,9 @@ export interface RunCreateParamsBase {
684
687
 
685
688
  /**
686
689
  * Specifies the format that the model must output. Compatible with
687
- * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
688
- * all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
690
+ * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
691
+ * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
692
+ * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
689
693
  *
690
694
  * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
691
695
  * message the model generates is valid JSON.
@@ -945,8 +949,9 @@ export interface RunCreateAndPollParams {
945
949
 
946
950
  /**
947
951
  * Specifies the format that the model must output. Compatible with
948
- * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
949
- * all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
952
+ * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
953
+ * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
954
+ * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
950
955
  *
951
956
  * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
952
957
  * message the model generates is valid JSON.
@@ -1152,8 +1157,9 @@ export interface RunCreateAndStreamParams {
1152
1157
 
1153
1158
  /**
1154
1159
  * Specifies the format that the model must output. Compatible with
1155
- * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
1156
- * all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
1160
+ * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
1161
+ * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
1162
+ * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
1157
1163
  *
1158
1164
  * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
1159
1165
  * message the model generates is valid JSON.
@@ -1359,8 +1365,9 @@ export interface RunStreamParams {
1359
1365
 
1360
1366
  /**
1361
1367
  * Specifies the format that the model must output. Compatible with
1362
- * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
1363
- * all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
1368
+ * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
1369
+ * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
1370
+ * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
1364
1371
  *
1365
1372
  * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
1366
1373
  * message the model generates is valid JSON.
@@ -1,10 +1,10 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import * as Core from "../../../../core";
4
- import { APIResource } from "../../../../resource";
5
- import { isRequestOptions } from "../../../../core";
6
- import * as StepsAPI from "./steps";
7
- import { CursorPage, type CursorPageParams } from "../../../../pagination";
3
+ import * as Core from '../../../../core';
4
+ import { APIResource } from '../../../../resource';
5
+ import { isRequestOptions } from '../../../../core';
6
+ import * as StepsAPI from './steps';
7
+ import { CursorPage, type CursorPageParams } from '../../../../pagination';
8
8
 
9
9
  export class Steps extends APIResource {
10
10
  /**
@@ -1,15 +1,15 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import * as Core from "../../../core";
4
- import { APIPromise } from "../../../core";
5
- import { APIResource } from "../../../resource";
6
- import { isRequestOptions } from "../../../core";
7
- import { AssistantStream, ThreadCreateAndRunParamsBaseStream } from "../../../lib/AssistantStream";
8
- import * as ThreadsAPI from "./threads";
9
- import * as AssistantsAPI from "../assistants";
10
- import * as MessagesAPI from "./messages";
11
- import * as RunsAPI from "./runs/runs";
12
- import { Stream } from "../../../streaming";
3
+ import * as Core from '../../../core';
4
+ import { APIPromise } from '../../../core';
5
+ import { APIResource } from '../../../resource';
6
+ import { isRequestOptions } from '../../../core';
7
+ import { AssistantStream, ThreadCreateAndRunParamsBaseStream } from '../../../lib/AssistantStream';
8
+ import * as ThreadsAPI from './threads';
9
+ import * as AssistantsAPI from '../assistants';
10
+ import * as MessagesAPI from './messages';
11
+ import * as RunsAPI from './runs/runs';
12
+ import { Stream } from '../../../streaming';
13
13
 
14
14
  export class Threads extends APIResource {
15
15
  runs: RunsAPI.Runs = new RunsAPI.Runs(this._client);
@@ -130,8 +130,9 @@ export interface AssistantResponseFormat {
130
130
 
131
131
  /**
132
132
  * Specifies the format that the model must output. Compatible with
133
- * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
134
- * all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
133
+ * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
134
+ * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
135
+ * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
135
136
  *
136
137
  * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
137
138
  * message the model generates is valid JSON.
@@ -516,8 +517,9 @@ export interface ThreadCreateAndRunParamsBase {
516
517
 
517
518
  /**
518
519
  * Specifies the format that the model must output. Compatible with
519
- * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
520
- * all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
520
+ * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
521
+ * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
522
+ * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
521
523
  *
522
524
  * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
523
525
  * message the model generates is valid JSON.
@@ -875,8 +877,9 @@ export interface ThreadCreateAndRunPollParams {
875
877
 
876
878
  /**
877
879
  * Specifies the format that the model must output. Compatible with
878
- * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
879
- * all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
880
+ * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
881
+ * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
882
+ * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
880
883
  *
881
884
  * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
882
885
  * message the model generates is valid JSON.
@@ -1206,8 +1209,9 @@ export interface ThreadCreateAndRunStreamParams {
1206
1209
 
1207
1210
  /**
1208
1211
  * Specifies the format that the model must output. Compatible with
1209
- * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
1210
- * all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
1212
+ * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
1213
+ * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
1214
+ * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
1211
1215
  *
1212
1216
  * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
1213
1217
  * message the model generates is valid JSON.
@@ -1,15 +1,15 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import * as Core from "../../../core";
4
- import { APIResource } from "../../../resource";
5
- import { isRequestOptions } from "../../../core";
6
- import { sleep } from "../../../core";
7
- import { Uploadable } from "../../../core";
8
- import { allSettledWithThrow } from "../../../lib/Util";
9
- import * as FileBatchesAPI from "./file-batches";
10
- import * as FilesAPI from "./files";
11
- import { VectorStoreFilesPage } from "./files";
12
- import { type CursorPageParams } from "../../../pagination";
3
+ import * as Core from '../../../core';
4
+ import { APIResource } from '../../../resource';
5
+ import { isRequestOptions } from '../../../core';
6
+ import { sleep } from '../../../core';
7
+ import { Uploadable } from '../../../core';
8
+ import { allSettledWithThrow } from '../../../lib/Util';
9
+ import * as FileBatchesAPI from './file-batches';
10
+ import * as FilesAPI from './files';
11
+ import { VectorStoreFilesPage } from './files';
12
+ import { type CursorPageParams } from '../../../pagination';
13
13
 
14
14
  export class FileBatches extends APIResource {
15
15
  /**
@@ -138,6 +138,7 @@ export class FileBatches extends APIResource {
138
138
  await sleep(sleepInterval);
139
139
  break;
140
140
  case 'failed':
141
+ case 'cancelled':
141
142
  case 'completed':
142
143
  return batch;
143
144
  }