openai 4.8.0 → 4.9.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 (319) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +4 -0
  3. package/_shims/MultipartBody.d.ts +9 -0
  4. package/_shims/MultipartBody.d.ts.map +1 -0
  5. package/_shims/MultipartBody.js +16 -0
  6. package/_shims/MultipartBody.js.map +1 -0
  7. package/_shims/MultipartBody.mjs +12 -0
  8. package/_shims/MultipartBody.mjs.map +1 -0
  9. package/_shims/README.md +46 -0
  10. package/{src/_shims/ReadableStream-node.ts → _shims/auto/runtime-bun.d.ts} +2 -3
  11. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  12. package/_shims/auto/runtime-bun.js +21 -0
  13. package/_shims/auto/runtime-bun.js.map +1 -0
  14. package/_shims/auto/runtime-bun.mjs +2 -0
  15. package/_shims/auto/runtime-bun.mjs.map +1 -0
  16. package/_shims/auto/runtime-node.d.ts +5 -0
  17. package/_shims/auto/runtime-node.d.ts.map +1 -0
  18. package/_shims/auto/runtime-node.js +21 -0
  19. package/_shims/auto/runtime-node.js.map +1 -0
  20. package/_shims/auto/runtime-node.mjs +2 -0
  21. package/_shims/auto/runtime-node.mjs.map +1 -0
  22. package/_shims/auto/runtime.d.ts +5 -0
  23. package/_shims/auto/runtime.d.ts.map +1 -0
  24. package/_shims/auto/runtime.js +21 -0
  25. package/_shims/auto/runtime.js.map +1 -0
  26. package/_shims/auto/runtime.mjs +2 -0
  27. package/_shims/auto/runtime.mjs.map +1 -0
  28. package/_shims/auto/types-node.d.ts +5 -0
  29. package/_shims/auto/types-node.d.ts.map +1 -0
  30. package/_shims/auto/types-node.js +21 -0
  31. package/_shims/auto/types-node.js.map +1 -0
  32. package/_shims/auto/types-node.mjs +2 -0
  33. package/_shims/auto/types-node.mjs.map +1 -0
  34. package/_shims/auto/types.d.ts +99 -0
  35. package/_shims/{ReadableStream.js → auto/types.js} +0 -2
  36. package/{src/_shims/ReadableStream.js → _shims/auto/types.mjs} +0 -2
  37. package/_shims/bun-runtime.d.ts +6 -0
  38. package/_shims/bun-runtime.d.ts.map +1 -0
  39. package/_shims/bun-runtime.js +14 -0
  40. package/_shims/bun-runtime.js.map +1 -0
  41. package/_shims/bun-runtime.mjs +10 -0
  42. package/_shims/bun-runtime.mjs.map +1 -0
  43. package/_shims/index.d.ts +79 -0
  44. package/_shims/index.js +13 -0
  45. package/_shims/index.mjs +7 -0
  46. package/_shims/manual-types.d.ts +12 -0
  47. package/_shims/manual-types.js +3 -0
  48. package/_shims/manual-types.mjs +3 -0
  49. package/_shims/node-runtime.d.ts +3 -0
  50. package/_shims/node-runtime.d.ts.map +1 -0
  51. package/_shims/node-runtime.js +87 -0
  52. package/_shims/node-runtime.js.map +1 -0
  53. package/_shims/node-runtime.mjs +54 -0
  54. package/_shims/node-runtime.mjs.map +1 -0
  55. package/_shims/node-types.d.ts +42 -0
  56. package/_shims/node-types.js +3 -0
  57. package/_shims/node-types.mjs +3 -0
  58. package/_shims/registry.d.ts +35 -0
  59. package/_shims/registry.d.ts.map +1 -0
  60. package/_shims/registry.js +39 -0
  61. package/_shims/registry.js.map +1 -0
  62. package/_shims/registry.mjs +35 -0
  63. package/_shims/registry.mjs.map +1 -0
  64. package/_shims/web-runtime.d.ts +5 -0
  65. package/_shims/web-runtime.d.ts.map +1 -0
  66. package/_shims/web-runtime.js +70 -0
  67. package/_shims/web-runtime.js.map +1 -0
  68. package/_shims/web-runtime.mjs +63 -0
  69. package/_shims/web-runtime.mjs.map +1 -0
  70. package/_shims/web-types.d.ts +82 -0
  71. package/_shims/web-types.js +3 -0
  72. package/_shims/web-types.mjs +3 -0
  73. package/core.d.ts +170 -218
  74. package/core.d.ts.map +1 -1
  75. package/core.js +679 -737
  76. package/core.js.map +1 -1
  77. package/core.mjs +673 -688
  78. package/core.mjs.map +1 -1
  79. package/error.d.ts +32 -34
  80. package/error.js +95 -109
  81. package/error.mjs +92 -94
  82. package/index.d.mts +164 -175
  83. package/index.d.ts +164 -175
  84. package/index.d.ts.map +1 -1
  85. package/index.js +110 -161
  86. package/index.mjs +88 -109
  87. package/package.json +31 -58
  88. package/pagination.d.ts +31 -41
  89. package/pagination.js +52 -48
  90. package/pagination.mjs +50 -46
  91. package/resource.d.ts +10 -10
  92. package/resource.js +12 -12
  93. package/resource.mjs +10 -10
  94. package/resources/audio/audio.d.ts +12 -12
  95. package/resources/audio/audio.js +33 -50
  96. package/resources/audio/audio.mjs +11 -11
  97. package/resources/audio/index.d.ts +4 -4
  98. package/resources/audio/index.js +9 -24
  99. package/resources/audio/index.mjs +4 -4
  100. package/resources/audio/transcriptions.d.ts +44 -44
  101. package/resources/audio/transcriptions.js +13 -12
  102. package/resources/audio/transcriptions.mjs +9 -8
  103. package/resources/audio/translations.d.ts +38 -38
  104. package/resources/audio/translations.js +13 -12
  105. package/resources/audio/translations.mjs +9 -8
  106. package/resources/chat/chat.d.ts +17 -17
  107. package/resources/chat/chat.js +30 -47
  108. package/resources/chat/chat.mjs +8 -8
  109. package/resources/chat/completions.d.ts +330 -353
  110. package/resources/chat/completions.js +10 -13
  111. package/resources/chat/completions.mjs +7 -10
  112. package/resources/chat/index.d.ts +3 -17
  113. package/resources/chat/index.js +7 -17
  114. package/resources/chat/index.mjs +3 -3
  115. package/resources/completions.d.ts +216 -232
  116. package/resources/completions.js +10 -13
  117. package/resources/completions.mjs +7 -10
  118. package/resources/edits.d.ts +73 -73
  119. package/resources/edits.js +16 -15
  120. package/resources/edits.mjs +13 -12
  121. package/resources/embeddings.d.ts +73 -76
  122. package/resources/embeddings.js +12 -11
  123. package/resources/embeddings.mjs +9 -8
  124. package/resources/files.d.ts +91 -96
  125. package/resources/files.js +64 -65
  126. package/resources/files.mjs +57 -58
  127. package/resources/fine-tunes.d.ts +277 -290
  128. package/resources/fine-tunes.js +49 -50
  129. package/resources/fine-tunes.mjs +45 -46
  130. package/resources/fine-tuning/fine-tuning.d.ts +12 -12
  131. package/resources/fine-tuning/fine-tuning.js +32 -49
  132. package/resources/fine-tuning/fine-tuning.mjs +10 -10
  133. package/resources/fine-tuning/index.d.ts +3 -12
  134. package/resources/fine-tuning/index.js +9 -29
  135. package/resources/fine-tuning/index.mjs +3 -3
  136. package/resources/fine-tuning/jobs.d.ts +173 -179
  137. package/resources/fine-tuning/jobs.js +50 -47
  138. package/resources/fine-tuning/jobs.mjs +45 -42
  139. package/resources/images.d.ts +116 -119
  140. package/resources/images.js +25 -24
  141. package/resources/images.mjs +21 -20
  142. package/resources/index.d.ts +12 -37
  143. package/resources/index.js +29 -113
  144. package/resources/index.mjs +12 -12
  145. package/resources/models.d.ts +41 -40
  146. package/resources/models.js +30 -28
  147. package/resources/models.mjs +26 -24
  148. package/resources/moderations.d.ts +153 -156
  149. package/resources/moderations.js +12 -11
  150. package/resources/moderations.mjs +9 -8
  151. package/shims/node.d.ts +29 -0
  152. package/shims/node.d.ts.map +1 -0
  153. package/shims/node.js +31 -0
  154. package/shims/node.js.map +1 -0
  155. package/shims/node.mjs +5 -0
  156. package/shims/node.mjs.map +1 -0
  157. package/shims/web.d.ts +26 -0
  158. package/shims/web.d.ts.map +1 -0
  159. package/shims/web.js +31 -0
  160. package/shims/web.js.map +1 -0
  161. package/shims/web.mjs +5 -0
  162. package/shims/web.mjs.map +1 -0
  163. package/src/_shims/MultipartBody.ts +9 -0
  164. package/src/_shims/README.md +46 -0
  165. package/src/_shims/auto/runtime-bun.ts +4 -0
  166. package/src/_shims/auto/runtime-node.ts +4 -0
  167. package/src/_shims/auto/runtime.ts +4 -0
  168. package/src/_shims/auto/types-node.ts +4 -0
  169. package/src/_shims/auto/types.d.ts +99 -0
  170. package/src/_shims/auto/types.js +3 -0
  171. package/src/_shims/auto/types.mjs +3 -0
  172. package/src/_shims/bun-runtime.ts +14 -0
  173. package/src/_shims/index.d.ts +79 -0
  174. package/src/_shims/index.js +13 -0
  175. package/src/_shims/index.mjs +7 -0
  176. package/src/_shims/manual-types.d.ts +12 -0
  177. package/src/_shims/manual-types.js +3 -0
  178. package/src/_shims/manual-types.mjs +3 -0
  179. package/src/_shims/node-runtime.ts +79 -0
  180. package/src/_shims/node-types.d.ts +42 -0
  181. package/src/_shims/node-types.js +3 -0
  182. package/src/_shims/node-types.mjs +3 -0
  183. package/src/_shims/registry.ts +62 -0
  184. package/src/_shims/web-runtime.ts +91 -0
  185. package/src/_shims/web-types.d.ts +82 -0
  186. package/src/_shims/web-types.js +3 -0
  187. package/src/_shims/web-types.mjs +3 -0
  188. package/src/core.ts +34 -17
  189. package/src/error.ts +1 -1
  190. package/src/index.ts +6 -6
  191. package/src/pagination.ts +1 -1
  192. package/src/resource.ts +1 -1
  193. package/src/resources/audio/audio.ts +4 -4
  194. package/src/resources/audio/index.ts +3 -3
  195. package/src/resources/audio/transcriptions.ts +4 -4
  196. package/src/resources/audio/translations.ts +4 -4
  197. package/src/resources/chat/chat.ts +3 -3
  198. package/src/resources/chat/completions.ts +6 -6
  199. package/src/resources/chat/index.ts +2 -2
  200. package/src/resources/completions.ts +5 -5
  201. package/src/resources/edits.ts +4 -4
  202. package/src/resources/embeddings.ts +3 -3
  203. package/src/resources/files.ts +7 -7
  204. package/src/resources/fine-tunes.ts +7 -7
  205. package/src/resources/fine-tuning/fine-tuning.ts +3 -3
  206. package/src/resources/fine-tuning/index.ts +2 -2
  207. package/src/resources/fine-tuning/jobs.ts +6 -6
  208. package/src/resources/images.ts +4 -4
  209. package/src/resources/index.ts +11 -11
  210. package/src/resources/models.ts +4 -4
  211. package/src/resources/moderations.ts +3 -3
  212. package/src/shims/node.ts +50 -0
  213. package/src/shims/web.ts +50 -0
  214. package/src/streaming.ts +1 -1
  215. package/src/uploads.ts +12 -16
  216. package/src/version.ts +1 -1
  217. package/streaming.d.ts +9 -8
  218. package/streaming.d.ts.map +1 -1
  219. package/streaming.js +194 -185
  220. package/streaming.mjs +192 -183
  221. package/uploads.d.ts +23 -39
  222. package/uploads.d.ts.map +1 -1
  223. package/uploads.js +115 -157
  224. package/uploads.js.map +1 -1
  225. package/uploads.mjs +111 -133
  226. package/uploads.mjs.map +1 -1
  227. package/version.d.ts +2 -2
  228. package/version.js +4 -4
  229. package/version.mjs +2 -2
  230. package/_shims/ReadableStream-node.d.ts +0 -6
  231. package/_shims/ReadableStream-node.d.ts.map +0 -1
  232. package/_shims/ReadableStream-node.js +0 -14
  233. package/_shims/ReadableStream-node.js.map +0 -1
  234. package/_shims/ReadableStream-node.mjs +0 -3
  235. package/_shims/ReadableStream-node.mjs.map +0 -1
  236. package/_shims/ReadableStream.d.ts +0 -38
  237. package/_shims/ReadableStream.mjs +0 -7
  238. package/_shims/agent-node.d.ts +0 -7
  239. package/_shims/agent-node.d.ts.map +0 -1
  240. package/_shims/agent-node.js +0 -28
  241. package/_shims/agent-node.js.map +0 -1
  242. package/_shims/agent-node.mjs +0 -16
  243. package/_shims/agent-node.mjs.map +0 -1
  244. package/_shims/agent.d.ts +0 -9
  245. package/_shims/agent.d.ts.map +0 -1
  246. package/_shims/agent.js +0 -14
  247. package/_shims/agent.js.map +0 -1
  248. package/_shims/agent.mjs +0 -10
  249. package/_shims/agent.mjs.map +0 -1
  250. package/_shims/fetch-node.d.ts +0 -64
  251. package/_shims/fetch-node.js +0 -12
  252. package/_shims/fetch-node.mjs +0 -14
  253. package/_shims/fetch.d.ts +0 -60
  254. package/_shims/fetch.js +0 -13
  255. package/_shims/fetch.mjs +0 -15
  256. package/_shims/fileFromPath-node.d.ts +0 -17
  257. package/_shims/fileFromPath-node.d.ts.map +0 -1
  258. package/_shims/fileFromPath-node.js +0 -17
  259. package/_shims/fileFromPath-node.js.map +0 -1
  260. package/_shims/fileFromPath-node.mjs +0 -13
  261. package/_shims/fileFromPath-node.mjs.map +0 -1
  262. package/_shims/fileFromPath.d.ts +0 -22
  263. package/_shims/fileFromPath.d.ts.map +0 -1
  264. package/_shims/fileFromPath.js +0 -16
  265. package/_shims/fileFromPath.js.map +0 -1
  266. package/_shims/fileFromPath.mjs +0 -12
  267. package/_shims/fileFromPath.mjs.map +0 -1
  268. package/_shims/form-data-node.d.ts +0 -45
  269. package/_shims/form-data-node.js +0 -11
  270. package/_shims/form-data-node.mjs +0 -9
  271. package/_shims/form-data.d.ts +0 -43
  272. package/_shims/form-data.js +0 -17
  273. package/_shims/form-data.mjs +0 -20
  274. package/_shims/getMultipartRequestOptions-node.d.ts +0 -10
  275. package/_shims/getMultipartRequestOptions-node.d.ts.map +0 -1
  276. package/_shims/getMultipartRequestOptions-node.js +0 -22
  277. package/_shims/getMultipartRequestOptions-node.js.map +0 -1
  278. package/_shims/getMultipartRequestOptions-node.mjs +0 -18
  279. package/_shims/getMultipartRequestOptions-node.mjs.map +0 -1
  280. package/_shims/getMultipartRequestOptions.d.ts +0 -10
  281. package/_shims/getMultipartRequestOptions.d.ts.map +0 -1
  282. package/_shims/getMultipartRequestOptions.js +0 -12
  283. package/_shims/getMultipartRequestOptions.js.map +0 -1
  284. package/_shims/getMultipartRequestOptions.mjs +0 -8
  285. package/_shims/getMultipartRequestOptions.mjs.map +0 -1
  286. package/_shims/node-readable-node.d.ts +0 -8
  287. package/_shims/node-readable-node.d.ts.map +0 -1
  288. package/_shims/node-readable-node.js +0 -9
  289. package/_shims/node-readable-node.js.map +0 -1
  290. package/_shims/node-readable-node.mjs +0 -5
  291. package/_shims/node-readable-node.mjs.map +0 -1
  292. package/_shims/node-readable.d.ts +0 -23
  293. package/_shims/node-readable.d.ts.map +0 -1
  294. package/_shims/node-readable.js +0 -11
  295. package/_shims/node-readable.js.map +0 -1
  296. package/_shims/node-readable.mjs +0 -7
  297. package/_shims/node-readable.mjs.map +0 -1
  298. package/src/_shims/ReadableStream.d.ts +0 -38
  299. package/src/_shims/ReadableStream.mjs +0 -7
  300. package/src/_shims/agent-node.ts +0 -22
  301. package/src/_shims/agent.ts +0 -12
  302. package/src/_shims/fetch-node.d.ts +0 -64
  303. package/src/_shims/fetch-node.js +0 -12
  304. package/src/_shims/fetch-node.mjs +0 -14
  305. package/src/_shims/fetch.d.ts +0 -60
  306. package/src/_shims/fetch.js +0 -13
  307. package/src/_shims/fetch.mjs +0 -15
  308. package/src/_shims/fileFromPath-node.ts +0 -29
  309. package/src/_shims/fileFromPath.ts +0 -29
  310. package/src/_shims/form-data-node.d.ts +0 -45
  311. package/src/_shims/form-data-node.js +0 -11
  312. package/src/_shims/form-data-node.mjs +0 -9
  313. package/src/_shims/form-data.d.ts +0 -43
  314. package/src/_shims/form-data.js +0 -17
  315. package/src/_shims/form-data.mjs +0 -20
  316. package/src/_shims/getMultipartRequestOptions-node.ts +0 -25
  317. package/src/_shims/getMultipartRequestOptions.ts +0 -14
  318. package/src/_shims/node-readable-node.ts +0 -10
  319. package/src/_shims/node-readable.ts +0 -30
@@ -2,239 +2,230 @@ import * as Core from 'openai/core';
2
2
  import { APIPromise } from 'openai/core';
3
3
  import { APIResource } from 'openai/resource';
4
4
  import * as Completions_ from 'openai/resources/completions';
5
- import * as API from './index.js';
5
+ import * as API from "./index.js";
6
6
  import { Stream } from 'openai/streaming';
7
7
  export declare class Completions extends APIResource {
8
- /**
9
- * Creates a model response for the given chat conversation.
10
- */
11
- create(
12
- body: ChatCompletionCreateParamsNonStreaming,
13
- options?: Core.RequestOptions,
14
- ): APIPromise<ChatCompletion>;
15
- create(
16
- body: ChatCompletionCreateParamsStreaming,
17
- options?: Core.RequestOptions,
18
- ): APIPromise<Stream<ChatCompletionChunk>>;
19
- create(
20
- body: ChatCompletionCreateParamsBase,
21
- options?: Core.RequestOptions,
22
- ): APIPromise<Stream<ChatCompletionChunk> | ChatCompletion>;
8
+ /**
9
+ * Creates a model response for the given chat conversation.
10
+ */
11
+ create(body: ChatCompletionCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<ChatCompletion>;
12
+ create(body: ChatCompletionCreateParamsStreaming, options?: Core.RequestOptions): APIPromise<Stream<ChatCompletionChunk>>;
13
+ create(body: ChatCompletionCreateParamsBase, options?: Core.RequestOptions): APIPromise<Stream<ChatCompletionChunk> | ChatCompletion>;
23
14
  }
24
15
  /**
25
16
  * Represents a chat completion response returned by model, based on the provided
26
17
  * input.
27
18
  */
28
19
  export interface ChatCompletion {
29
- /**
30
- * A unique identifier for the chat completion.
31
- */
32
- id: string;
33
- /**
34
- * A list of chat completion choices. Can be more than one if `n` is greater
35
- * than 1.
36
- */
37
- choices: Array<ChatCompletion.Choice>;
38
- /**
39
- * The Unix timestamp (in seconds) of when the chat completion was created.
40
- */
41
- created: number;
42
- /**
43
- * The model used for the chat completion.
44
- */
45
- model: string;
46
- /**
47
- * The object type, which is always `chat.completion`.
48
- */
49
- object: string;
50
- /**
51
- * Usage statistics for the completion request.
52
- */
53
- usage?: Completions_.CompletionUsage;
54
- }
55
- export declare namespace ChatCompletion {
56
- interface Choice {
57
20
  /**
58
- * The reason the model stopped generating tokens. This will be `stop` if the model
59
- * hit a natural stop point or a provided stop sequence, `length` if the maximum
60
- * number of tokens specified in the request was reached, or `function_call` if the
61
- * model called a function.
21
+ * A unique identifier for the chat completion.
22
+ */
23
+ id: string;
24
+ /**
25
+ * A list of chat completion choices. Can be more than one if `n` is greater
26
+ * than 1.
27
+ */
28
+ choices: Array<ChatCompletion.Choice>;
29
+ /**
30
+ * The Unix timestamp (in seconds) of when the chat completion was created.
62
31
  */
63
- finish_reason: 'stop' | 'length' | 'function_call';
32
+ created: number;
64
33
  /**
65
- * The index of the choice in the list of choices.
34
+ * The model used for the chat completion.
66
35
  */
67
- index: number;
36
+ model: string;
68
37
  /**
69
- * A chat completion message generated by the model.
38
+ * The object type, which is always `chat.completion`.
70
39
  */
71
- message: ChatCompletionMessage;
72
- }
40
+ object: string;
41
+ /**
42
+ * Usage statistics for the completion request.
43
+ */
44
+ usage?: Completions_.CompletionUsage;
45
+ }
46
+ export declare namespace ChatCompletion {
47
+ interface Choice {
48
+ /**
49
+ * The reason the model stopped generating tokens. This will be `stop` if the model
50
+ * hit a natural stop point or a provided stop sequence, `length` if the maximum
51
+ * number of tokens specified in the request was reached, or `function_call` if the
52
+ * model called a function.
53
+ */
54
+ finish_reason: 'stop' | 'length' | 'function_call';
55
+ /**
56
+ * The index of the choice in the list of choices.
57
+ */
58
+ index: number;
59
+ /**
60
+ * A chat completion message generated by the model.
61
+ */
62
+ message: ChatCompletionMessage;
63
+ }
73
64
  }
74
65
  /**
75
66
  * Represents a streamed chunk of a chat completion response returned by model,
76
67
  * based on the provided input.
77
68
  */
78
69
  export interface ChatCompletionChunk {
79
- /**
80
- * A unique identifier for the chat completion chunk.
81
- */
82
- id: string;
83
- /**
84
- * A list of chat completion choices. Can be more than one if `n` is greater
85
- * than 1.
86
- */
87
- choices: Array<ChatCompletionChunk.Choice>;
88
- /**
89
- * The Unix timestamp (in seconds) of when the chat completion chunk was created.
90
- */
91
- created: number;
92
- /**
93
- * The model to generate the completion.
94
- */
95
- model: string;
96
- /**
97
- * The object type, which is always `chat.completion.chunk`.
98
- */
99
- object: string;
70
+ /**
71
+ * A unique identifier for the chat completion chunk.
72
+ */
73
+ id: string;
74
+ /**
75
+ * A list of chat completion choices. Can be more than one if `n` is greater
76
+ * than 1.
77
+ */
78
+ choices: Array<ChatCompletionChunk.Choice>;
79
+ /**
80
+ * The Unix timestamp (in seconds) of when the chat completion chunk was created.
81
+ */
82
+ created: number;
83
+ /**
84
+ * The model to generate the completion.
85
+ */
86
+ model: string;
87
+ /**
88
+ * The object type, which is always `chat.completion.chunk`.
89
+ */
90
+ object: string;
100
91
  }
101
92
  export declare namespace ChatCompletionChunk {
102
- interface Choice {
93
+ interface Choice {
94
+ /**
95
+ * A chat completion delta generated by streamed model responses.
96
+ */
97
+ delta: Choice.Delta;
98
+ /**
99
+ * The reason the model stopped generating tokens. This will be `stop` if the model
100
+ * hit a natural stop point or a provided stop sequence, `length` if the maximum
101
+ * number of tokens specified in the request was reached, or `function_call` if the
102
+ * model called a function.
103
+ */
104
+ finish_reason: 'stop' | 'length' | 'function_call' | null;
105
+ /**
106
+ * The index of the choice in the list of choices.
107
+ */
108
+ index: number;
109
+ }
110
+ namespace Choice {
111
+ /**
112
+ * A chat completion delta generated by streamed model responses.
113
+ */
114
+ interface Delta {
115
+ /**
116
+ * The contents of the chunk message.
117
+ */
118
+ content?: string | null;
119
+ /**
120
+ * The name and arguments of a function that should be called, as generated by the
121
+ * model.
122
+ */
123
+ function_call?: Delta.FunctionCall;
124
+ /**
125
+ * The role of the author of this message.
126
+ */
127
+ role?: ChatCompletionRole;
128
+ }
129
+ namespace Delta {
130
+ /**
131
+ * The name and arguments of a function that should be called, as generated by the
132
+ * model.
133
+ */
134
+ interface FunctionCall {
135
+ /**
136
+ * The arguments to call the function with, as generated by the model in JSON
137
+ * format. Note that the model does not always generate valid JSON, and may
138
+ * hallucinate parameters not defined by your function schema. Validate the
139
+ * arguments in your code before calling your function.
140
+ */
141
+ arguments?: string;
142
+ /**
143
+ * The name of the function to call.
144
+ */
145
+ name?: string;
146
+ }
147
+ }
148
+ }
149
+ }
150
+ /**
151
+ * A chat completion message generated by the model.
152
+ */
153
+ export interface ChatCompletionMessage {
103
154
  /**
104
- * A chat completion delta generated by streamed model responses.
155
+ * The contents of the message.
105
156
  */
106
- delta: Choice.Delta;
157
+ content: string | null;
107
158
  /**
108
- * The reason the model stopped generating tokens. This will be `stop` if the model
109
- * hit a natural stop point or a provided stop sequence, `length` if the maximum
110
- * number of tokens specified in the request was reached, or `function_call` if the
111
- * model called a function.
159
+ * The role of the author of this message.
112
160
  */
113
- finish_reason: 'stop' | 'length' | 'function_call' | null;
161
+ role: ChatCompletionRole;
114
162
  /**
115
- * The index of the choice in the list of choices.
163
+ * The name and arguments of a function that should be called, as generated by the
164
+ * model.
116
165
  */
117
- index: number;
118
- }
119
- namespace Choice {
166
+ function_call?: ChatCompletionMessage.FunctionCall;
167
+ }
168
+ export declare namespace ChatCompletionMessage {
120
169
  /**
121
- * A chat completion delta generated by streamed model responses.
170
+ * The name and arguments of a function that should be called, as generated by the
171
+ * model.
122
172
  */
123
- interface Delta {
124
- /**
125
- * The contents of the chunk message.
126
- */
127
- content?: string | null;
128
- /**
129
- * The name and arguments of a function that should be called, as generated by the
130
- * model.
131
- */
132
- function_call?: Delta.FunctionCall;
133
- /**
134
- * The role of the author of this message.
135
- */
136
- role?: ChatCompletionRole;
137
- }
138
- namespace Delta {
139
- /**
140
- * The name and arguments of a function that should be called, as generated by the
141
- * model.
142
- */
143
- interface FunctionCall {
173
+ interface FunctionCall {
144
174
  /**
145
175
  * The arguments to call the function with, as generated by the model in JSON
146
176
  * format. Note that the model does not always generate valid JSON, and may
147
177
  * hallucinate parameters not defined by your function schema. Validate the
148
178
  * arguments in your code before calling your function.
149
179
  */
150
- arguments?: string;
180
+ arguments: string;
151
181
  /**
152
182
  * The name of the function to call.
153
183
  */
154
- name?: string;
155
- }
184
+ name: string;
156
185
  }
157
- }
158
- }
159
- /**
160
- * A chat completion message generated by the model.
161
- */
162
- export interface ChatCompletionMessage {
163
- /**
164
- * The contents of the message.
165
- */
166
- content: string | null;
167
- /**
168
- * The role of the author of this message.
169
- */
170
- role: ChatCompletionRole;
171
- /**
172
- * The name and arguments of a function that should be called, as generated by the
173
- * model.
174
- */
175
- function_call?: ChatCompletionMessage.FunctionCall;
176
186
  }
177
- export declare namespace ChatCompletionMessage {
178
- /**
179
- * The name and arguments of a function that should be called, as generated by the
180
- * model.
181
- */
182
- interface FunctionCall {
187
+ export interface ChatCompletionMessageParam {
183
188
  /**
184
- * The arguments to call the function with, as generated by the model in JSON
185
- * format. Note that the model does not always generate valid JSON, and may
186
- * hallucinate parameters not defined by your function schema. Validate the
187
- * arguments in your code before calling your function.
189
+ * The contents of the message. `content` is required for all messages, and may be
190
+ * null for assistant messages with function calls.
188
191
  */
189
- arguments: string;
192
+ content: string | null;
190
193
  /**
191
- * The name of the function to call.
194
+ * The role of the messages author. One of `system`, `user`, `assistant`, or
195
+ * `function`.
192
196
  */
193
- name: string;
194
- }
195
- }
196
- export interface ChatCompletionMessageParam {
197
- /**
198
- * The contents of the message. `content` is required for all messages, and may be
199
- * null for assistant messages with function calls.
200
- */
201
- content: string | null;
202
- /**
203
- * The role of the messages author. One of `system`, `user`, `assistant`, or
204
- * `function`.
205
- */
206
- role: 'system' | 'user' | 'assistant' | 'function';
207
- /**
208
- * The name and arguments of a function that should be called, as generated by the
209
- * model.
210
- */
211
- function_call?: ChatCompletionMessageParam.FunctionCall;
212
- /**
213
- * The name of the author of this message. `name` is required if role is
214
- * `function`, and it should be the name of the function whose response is in the
215
- * `content`. May contain a-z, A-Z, 0-9, and underscores, with a maximum length of
216
- * 64 characters.
217
- */
218
- name?: string;
219
- }
220
- export declare namespace ChatCompletionMessageParam {
221
- /**
222
- * The name and arguments of a function that should be called, as generated by the
223
- * model.
224
- */
225
- interface FunctionCall {
197
+ role: 'system' | 'user' | 'assistant' | 'function';
226
198
  /**
227
- * The arguments to call the function with, as generated by the model in JSON
228
- * format. Note that the model does not always generate valid JSON, and may
229
- * hallucinate parameters not defined by your function schema. Validate the
230
- * arguments in your code before calling your function.
199
+ * The name and arguments of a function that should be called, as generated by the
200
+ * model.
231
201
  */
232
- arguments: string;
202
+ function_call?: ChatCompletionMessageParam.FunctionCall;
233
203
  /**
234
- * The name of the function to call.
204
+ * The name of the author of this message. `name` is required if role is
205
+ * `function`, and it should be the name of the function whose response is in the
206
+ * `content`. May contain a-z, A-Z, 0-9, and underscores, with a maximum length of
207
+ * 64 characters.
235
208
  */
236
- name: string;
237
- }
209
+ name?: string;
210
+ }
211
+ export declare namespace ChatCompletionMessageParam {
212
+ /**
213
+ * The name and arguments of a function that should be called, as generated by the
214
+ * model.
215
+ */
216
+ interface FunctionCall {
217
+ /**
218
+ * The arguments to call the function with, as generated by the model in JSON
219
+ * format. Note that the model does not always generate valid JSON, and may
220
+ * hallucinate parameters not defined by your function schema. Validate the
221
+ * arguments in your code before calling your function.
222
+ */
223
+ arguments: string;
224
+ /**
225
+ * The name of the function to call.
226
+ */
227
+ name: string;
228
+ }
238
229
  }
239
230
  /**
240
231
  * The role of the author of this message.
@@ -244,201 +235,187 @@ export type ChatCompletionRole = 'system' | 'user' | 'assistant' | 'function';
244
235
  * @deprecated ChatCompletionMessageParam should be used instead
245
236
  */
246
237
  export type CreateChatCompletionRequestMessage = ChatCompletionMessageParam;
247
- export type ChatCompletionCreateParams =
248
- | ChatCompletionCreateParamsNonStreaming
249
- | ChatCompletionCreateParamsStreaming;
238
+ export type ChatCompletionCreateParams = ChatCompletionCreateParamsNonStreaming | ChatCompletionCreateParamsStreaming;
250
239
  export interface ChatCompletionCreateParamsBase {
251
- /**
252
- * A list of messages comprising the conversation so far.
253
- * [Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_format_inputs_to_ChatGPT_models.ipynb).
254
- */
255
- messages: Array<ChatCompletionMessageParam>;
256
- /**
257
- * ID of the model to use. See the
258
- * [model endpoint compatibility](https://platform.openai.com/docs/models/model-endpoint-compatibility)
259
- * table for details on which models work with the Chat API.
260
- */
261
- model:
262
- | (string & {})
263
- | 'gpt-4'
264
- | 'gpt-4-0314'
265
- | 'gpt-4-0613'
266
- | 'gpt-4-32k'
267
- | 'gpt-4-32k-0314'
268
- | 'gpt-4-32k-0613'
269
- | 'gpt-3.5-turbo'
270
- | 'gpt-3.5-turbo-16k'
271
- | 'gpt-3.5-turbo-0301'
272
- | 'gpt-3.5-turbo-0613'
273
- | 'gpt-3.5-turbo-16k-0613';
274
- /**
275
- * Number between -2.0 and 2.0. Positive values penalize new tokens based on their
276
- * existing frequency in the text so far, decreasing the model's likelihood to
277
- * repeat the same line verbatim.
278
- *
279
- * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/gpt/parameter-details)
280
- */
281
- frequency_penalty?: number | null;
282
- /**
283
- * Controls how the model responds to function calls. "none" means the model does
284
- * not call a function, and responds to the end-user. "auto" means the model can
285
- * pick between an end-user or calling a function. Specifying a particular function
286
- * via `{"name": "my_function"}` forces the model to call that function. "none" is
287
- * the default when no functions are present. "auto" is the default if functions
288
- * are present.
289
- */
290
- function_call?: 'none' | 'auto' | ChatCompletionCreateParams.FunctionCallOption;
291
- /**
292
- * A list of functions the model may generate JSON inputs for.
293
- */
294
- functions?: Array<ChatCompletionCreateParams.Function>;
295
- /**
296
- * Modify the likelihood of specified tokens appearing in the completion.
297
- *
298
- * Accepts a json object that maps tokens (specified by their token ID in the
299
- * tokenizer) to an associated bias value from -100 to 100. Mathematically, the
300
- * bias is added to the logits generated by the model prior to sampling. The exact
301
- * effect will vary per model, but values between -1 and 1 should decrease or
302
- * increase likelihood of selection; values like -100 or 100 should result in a ban
303
- * or exclusive selection of the relevant token.
304
- */
305
- logit_bias?: Record<string, number> | null;
306
- /**
307
- * The maximum number of [tokens](/tokenizer) to generate in the chat completion.
308
- *
309
- * The total length of input tokens and generated tokens is limited by the model's
310
- * context length.
311
- * [Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb)
312
- * for counting tokens.
313
- */
314
- max_tokens?: number;
315
- /**
316
- * How many chat completion choices to generate for each input message.
317
- */
318
- n?: number | null;
319
- /**
320
- * Number between -2.0 and 2.0. Positive values penalize new tokens based on
321
- * whether they appear in the text so far, increasing the model's likelihood to
322
- * talk about new topics.
323
- *
324
- * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/gpt/parameter-details)
325
- */
326
- presence_penalty?: number | null;
327
- /**
328
- * Up to 4 sequences where the API will stop generating further tokens.
329
- */
330
- stop?: string | null | Array<string>;
331
- /**
332
- * If set, partial message deltas will be sent, like in ChatGPT. Tokens will be
333
- * sent as data-only
334
- * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
335
- * as they become available, with the stream terminated by a `data: [DONE]`
336
- * message.
337
- * [Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_stream_completions.ipynb).
338
- */
339
- stream?: boolean | null;
340
- /**
341
- * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
342
- * make the output more random, while lower values like 0.2 will make it more
343
- * focused and deterministic.
344
- *
345
- * We generally recommend altering this or `top_p` but not both.
346
- */
347
- temperature?: number | null;
348
- /**
349
- * An alternative to sampling with temperature, called nucleus sampling, where the
350
- * model considers the results of the tokens with top_p probability mass. So 0.1
351
- * means only the tokens comprising the top 10% probability mass are considered.
352
- *
353
- * We generally recommend altering this or `temperature` but not both.
354
- */
355
- top_p?: number | null;
356
- /**
357
- * A unique identifier representing your end-user, which can help OpenAI to monitor
358
- * and detect abuse.
359
- * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).
360
- */
361
- user?: string;
362
- }
363
- export declare namespace ChatCompletionCreateParams {
364
- interface FunctionCallOption {
365
240
  /**
366
- * The name of the function to call.
241
+ * A list of messages comprising the conversation so far.
242
+ * [Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_format_inputs_to_ChatGPT_models.ipynb).
243
+ */
244
+ messages: Array<ChatCompletionMessageParam>;
245
+ /**
246
+ * ID of the model to use. See the
247
+ * [model endpoint compatibility](https://platform.openai.com/docs/models/model-endpoint-compatibility)
248
+ * table for details on which models work with the Chat API.
249
+ */
250
+ model: (string & {}) | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-16k-0613';
251
+ /**
252
+ * Number between -2.0 and 2.0. Positive values penalize new tokens based on their
253
+ * existing frequency in the text so far, decreasing the model's likelihood to
254
+ * repeat the same line verbatim.
255
+ *
256
+ * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/gpt/parameter-details)
257
+ */
258
+ frequency_penalty?: number | null;
259
+ /**
260
+ * Controls how the model responds to function calls. "none" means the model does
261
+ * not call a function, and responds to the end-user. "auto" means the model can
262
+ * pick between an end-user or calling a function. Specifying a particular function
263
+ * via `{"name": "my_function"}` forces the model to call that function. "none" is
264
+ * the default when no functions are present. "auto" is the default if functions
265
+ * are present.
266
+ */
267
+ function_call?: 'none' | 'auto' | ChatCompletionCreateParams.FunctionCallOption;
268
+ /**
269
+ * A list of functions the model may generate JSON inputs for.
270
+ */
271
+ functions?: Array<ChatCompletionCreateParams.Function>;
272
+ /**
273
+ * Modify the likelihood of specified tokens appearing in the completion.
274
+ *
275
+ * Accepts a json object that maps tokens (specified by their token ID in the
276
+ * tokenizer) to an associated bias value from -100 to 100. Mathematically, the
277
+ * bias is added to the logits generated by the model prior to sampling. The exact
278
+ * effect will vary per model, but values between -1 and 1 should decrease or
279
+ * increase likelihood of selection; values like -100 or 100 should result in a ban
280
+ * or exclusive selection of the relevant token.
281
+ */
282
+ logit_bias?: Record<string, number> | null;
283
+ /**
284
+ * The maximum number of [tokens](/tokenizer) to generate in the chat completion.
285
+ *
286
+ * The total length of input tokens and generated tokens is limited by the model's
287
+ * context length.
288
+ * [Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb)
289
+ * for counting tokens.
367
290
  */
368
- name: string;
369
- }
370
- interface Function {
291
+ max_tokens?: number;
371
292
  /**
372
- * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
373
- * underscores and dashes, with a maximum length of 64.
293
+ * How many chat completion choices to generate for each input message.
374
294
  */
375
- name: string;
295
+ n?: number | null;
376
296
  /**
377
- * The parameters the functions accepts, described as a JSON Schema object. See the
378
- * [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for
379
- * examples, and the
380
- * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
381
- * documentation about the format.
297
+ * Number between -2.0 and 2.0. Positive values penalize new tokens based on
298
+ * whether they appear in the text so far, increasing the model's likelihood to
299
+ * talk about new topics.
382
300
  *
383
- * To describe a function that accepts no parameters, provide the value
384
- * `{"type": "object", "properties": {}}`.
301
+ * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/gpt/parameter-details)
302
+ */
303
+ presence_penalty?: number | null;
304
+ /**
305
+ * Up to 4 sequences where the API will stop generating further tokens.
385
306
  */
386
- parameters: Record<string, unknown>;
307
+ stop?: string | null | Array<string>;
387
308
  /**
388
- * A description of what the function does, used by the model to choose when and
389
- * how to call the function.
309
+ * If set, partial message deltas will be sent, like in ChatGPT. Tokens will be
310
+ * sent as data-only
311
+ * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
312
+ * as they become available, with the stream terminated by a `data: [DONE]`
313
+ * message.
314
+ * [Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_stream_completions.ipynb).
390
315
  */
391
- description?: string;
392
- }
393
- type ChatCompletionCreateParamsNonStreaming = API.ChatCompletionCreateParamsNonStreaming;
394
- type ChatCompletionCreateParamsStreaming = API.ChatCompletionCreateParamsStreaming;
316
+ stream?: boolean | null;
317
+ /**
318
+ * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
319
+ * make the output more random, while lower values like 0.2 will make it more
320
+ * focused and deterministic.
321
+ *
322
+ * We generally recommend altering this or `top_p` but not both.
323
+ */
324
+ temperature?: number | null;
325
+ /**
326
+ * An alternative to sampling with temperature, called nucleus sampling, where the
327
+ * model considers the results of the tokens with top_p probability mass. So 0.1
328
+ * means only the tokens comprising the top 10% probability mass are considered.
329
+ *
330
+ * We generally recommend altering this or `temperature` but not both.
331
+ */
332
+ top_p?: number | null;
333
+ /**
334
+ * A unique identifier representing your end-user, which can help OpenAI to monitor
335
+ * and detect abuse.
336
+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).
337
+ */
338
+ user?: string;
339
+ }
340
+ export declare namespace ChatCompletionCreateParams {
341
+ interface FunctionCallOption {
342
+ /**
343
+ * The name of the function to call.
344
+ */
345
+ name: string;
346
+ }
347
+ interface Function {
348
+ /**
349
+ * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
350
+ * underscores and dashes, with a maximum length of 64.
351
+ */
352
+ name: string;
353
+ /**
354
+ * The parameters the functions accepts, described as a JSON Schema object. See the
355
+ * [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for
356
+ * examples, and the
357
+ * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
358
+ * documentation about the format.
359
+ *
360
+ * To describe a function that accepts no parameters, provide the value
361
+ * `{"type": "object", "properties": {}}`.
362
+ */
363
+ parameters: Record<string, unknown>;
364
+ /**
365
+ * A description of what the function does, used by the model to choose when and
366
+ * how to call the function.
367
+ */
368
+ description?: string;
369
+ }
370
+ type ChatCompletionCreateParamsNonStreaming = API.ChatCompletionCreateParamsNonStreaming;
371
+ type ChatCompletionCreateParamsStreaming = API.ChatCompletionCreateParamsStreaming;
395
372
  }
396
373
  /**
397
374
  * @deprecated Use ChatCompletionCreateParams instead
398
375
  */
399
376
  export type CompletionCreateParams = ChatCompletionCreateParams;
400
377
  export interface ChatCompletionCreateParamsNonStreaming extends ChatCompletionCreateParamsBase {
401
- /**
402
- * If set, partial message deltas will be sent, like in ChatGPT. Tokens will be
403
- * sent as data-only
404
- * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
405
- * as they become available, with the stream terminated by a `data: [DONE]`
406
- * message.
407
- * [Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_stream_completions.ipynb).
408
- */
409
- stream?: false | null;
378
+ /**
379
+ * If set, partial message deltas will be sent, like in ChatGPT. Tokens will be
380
+ * sent as data-only
381
+ * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
382
+ * as they become available, with the stream terminated by a `data: [DONE]`
383
+ * message.
384
+ * [Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_stream_completions.ipynb).
385
+ */
386
+ stream?: false | null;
410
387
  }
411
388
  /**
412
389
  * @deprecated Use ChatCompletionCreateParamsNonStreaming instead
413
390
  */
414
391
  export type CompletionCreateParamsNonStreaming = ChatCompletionCreateParamsNonStreaming;
415
392
  export interface ChatCompletionCreateParamsStreaming extends ChatCompletionCreateParamsBase {
416
- /**
417
- * If set, partial message deltas will be sent, like in ChatGPT. Tokens will be
418
- * sent as data-only
419
- * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
420
- * as they become available, with the stream terminated by a `data: [DONE]`
421
- * message.
422
- * [Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_stream_completions.ipynb).
423
- */
424
- stream: true;
393
+ /**
394
+ * If set, partial message deltas will be sent, like in ChatGPT. Tokens will be
395
+ * sent as data-only
396
+ * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
397
+ * as they become available, with the stream terminated by a `data: [DONE]`
398
+ * message.
399
+ * [Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_stream_completions.ipynb).
400
+ */
401
+ stream: true;
425
402
  }
426
403
  /**
427
404
  * @deprecated Use ChatCompletionCreateParamsStreaming instead
428
405
  */
429
406
  export type CompletionCreateParamsStreaming = ChatCompletionCreateParamsStreaming;
430
407
  export declare namespace Completions {
431
- export import ChatCompletion = API.ChatCompletion;
432
- export import ChatCompletionChunk = API.ChatCompletionChunk;
433
- export import ChatCompletionMessage = API.ChatCompletionMessage;
434
- export import ChatCompletionMessageParam = API.ChatCompletionMessageParam;
435
- export import ChatCompletionRole = API.ChatCompletionRole;
436
- export import CreateChatCompletionRequestMessage = API.CreateChatCompletionRequestMessage;
437
- export import ChatCompletionCreateParams = API.ChatCompletionCreateParams;
438
- export import CompletionCreateParams = API.CompletionCreateParams;
439
- export import ChatCompletionCreateParamsNonStreaming = API.ChatCompletionCreateParamsNonStreaming;
440
- export import CompletionCreateParamsNonStreaming = API.CompletionCreateParamsNonStreaming;
441
- export import ChatCompletionCreateParamsStreaming = API.ChatCompletionCreateParamsStreaming;
442
- export import CompletionCreateParamsStreaming = API.CompletionCreateParamsStreaming;
408
+ export import ChatCompletion = API.ChatCompletion;
409
+ export import ChatCompletionChunk = API.ChatCompletionChunk;
410
+ export import ChatCompletionMessage = API.ChatCompletionMessage;
411
+ export import ChatCompletionMessageParam = API.ChatCompletionMessageParam;
412
+ export import ChatCompletionRole = API.ChatCompletionRole;
413
+ export import CreateChatCompletionRequestMessage = API.CreateChatCompletionRequestMessage;
414
+ export import ChatCompletionCreateParams = API.ChatCompletionCreateParams;
415
+ export import CompletionCreateParams = API.CompletionCreateParams;
416
+ export import ChatCompletionCreateParamsNonStreaming = API.ChatCompletionCreateParamsNonStreaming;
417
+ export import CompletionCreateParamsNonStreaming = API.CompletionCreateParamsNonStreaming;
418
+ export import ChatCompletionCreateParamsStreaming = API.ChatCompletionCreateParamsStreaming;
419
+ export import CompletionCreateParamsStreaming = API.CompletionCreateParamsStreaming;
443
420
  }
444
- //# sourceMappingURL=completions.d.ts.map
421
+ //# sourceMappingURL=completions.d.ts.map