openai 4.79.2 → 4.79.4
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.
- package/CHANGELOG.md +26 -0
- package/internal/decoders/line.d.ts +1 -2
- package/internal/decoders/line.d.ts.map +1 -1
- package/internal/stream-utils.d.ts +8 -0
- package/internal/stream-utils.d.ts.map +1 -0
- package/internal/stream-utils.js +39 -0
- package/internal/stream-utils.js.map +1 -0
- package/internal/stream-utils.mjs +35 -0
- package/internal/stream-utils.mjs.map +1 -0
- package/package.json +1 -1
- package/resources/chat/completions.d.ts +12 -12
- package/resources/files.d.ts +2 -2
- package/resources/fine-tuning/jobs/jobs.d.ts +1 -1
- package/src/internal/decoders/line.ts +1 -1
- package/src/internal/stream-utils.ts +32 -0
- package/src/resources/chat/completions.ts +12 -12
- package/src/resources/files.ts +2 -2
- package/src/resources/fine-tuning/jobs/jobs.ts +1 -1
- package/src/streaming.ts +3 -35
- package/src/version.ts +1 -1
- package/streaming.d.ts +0 -7
- package/streaming.d.ts.map +1 -1
- package/streaming.js +4 -38
- package/streaming.js.map +1 -1
- package/streaming.mjs +3 -36
- package/streaming.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.79.4 (2025-01-21)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v4.79.3...v4.79.4](https://github.com/openai/openai-node/compare/v4.79.3...v4.79.4)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* **jsr:** correct zod config ([e45fa5f](https://github.com/openai/openai-node/commit/e45fa5f535ca74789636001e60e33edcad4db83c))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* **internal:** minor restructuring ([#1278](https://github.com/openai/openai-node/issues/1278)) ([58ea92a](https://github.com/openai/openai-node/commit/58ea92a7464a04223f24ba31dbc0f7d0cf99cc19))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Documentation
|
|
18
|
+
|
|
19
|
+
* update deprecation messages ([#1275](https://github.com/openai/openai-node/issues/1275)) ([1c6599e](https://github.com/openai/openai-node/commit/1c6599e47ef75a71cb309a1e14d97bc97bd036d0))
|
|
20
|
+
|
|
21
|
+
## 4.79.3 (2025-01-21)
|
|
22
|
+
|
|
23
|
+
Full Changelog: [v4.79.2...v4.79.3](https://github.com/openai/openai-node/compare/v4.79.2...v4.79.3)
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **jsr:** export zod helpers ([9dc55b6](https://github.com/openai/openai-node/commit/9dc55b62b564ad5ad1d4a60fe520b68235d05296))
|
|
28
|
+
|
|
3
29
|
## 4.79.2 (2025-01-21)
|
|
4
30
|
|
|
5
31
|
Full Changelog: [v4.79.1...v4.79.2](https://github.com/openai/openai-node/compare/v4.79.1...v4.79.2)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
type Bytes = string | ArrayBuffer | Uint8Array | Buffer | null | undefined;
|
|
2
|
+
export type Bytes = string | ArrayBuffer | Uint8Array | Buffer | null | undefined;
|
|
3
3
|
/**
|
|
4
4
|
* A re-implementation of httpx's `LineDecoder` in Python that handles incrementally
|
|
5
5
|
* reading lines from text.
|
|
@@ -17,5 +17,4 @@ export declare class LineDecoder {
|
|
|
17
17
|
decodeText(bytes: Bytes): string;
|
|
18
18
|
flush(): string[];
|
|
19
19
|
}
|
|
20
|
-
export {};
|
|
21
20
|
//# sourceMappingURL=line.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../src/internal/decoders/line.ts"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../src/internal/decoders/line.ts"],"names":[],"mappings":";AAEA,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAElF;;;;;GAKG;AACH,qBAAa,WAAW;IAEtB,MAAM,CAAC,aAAa,cAAyB;IAC7C,MAAM,CAAC,cAAc,SAAkB;IAEvC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,GAAG,CAAC;;IAOjB,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE;IA0C9B,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM;IAqChC,KAAK,IAAI,MAAM,EAAE;CAUlB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Most browsers don't yet have async iterable support for ReadableStream,
|
|
3
|
+
* and Node has a very different way of reading bytes from its "ReadableStream".
|
|
4
|
+
*
|
|
5
|
+
* This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
|
|
6
|
+
*/
|
|
7
|
+
export declare function ReadableStreamToAsyncIterable<T>(stream: any): AsyncIterableIterator<T>;
|
|
8
|
+
//# sourceMappingURL=stream-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-utils.d.ts","sourceRoot":"","sources":["../src/internal/stream-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAyBtF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReadableStreamToAsyncIterable = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Most browsers don't yet have async iterable support for ReadableStream,
|
|
6
|
+
* and Node has a very different way of reading bytes from its "ReadableStream".
|
|
7
|
+
*
|
|
8
|
+
* This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
|
|
9
|
+
*/
|
|
10
|
+
function ReadableStreamToAsyncIterable(stream) {
|
|
11
|
+
if (stream[Symbol.asyncIterator])
|
|
12
|
+
return stream;
|
|
13
|
+
const reader = stream.getReader();
|
|
14
|
+
return {
|
|
15
|
+
async next() {
|
|
16
|
+
try {
|
|
17
|
+
const result = await reader.read();
|
|
18
|
+
if (result?.done)
|
|
19
|
+
reader.releaseLock(); // release lock when stream becomes closed
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
catch (e) {
|
|
23
|
+
reader.releaseLock(); // release lock when stream becomes errored
|
|
24
|
+
throw e;
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
async return() {
|
|
28
|
+
const cancelPromise = reader.cancel();
|
|
29
|
+
reader.releaseLock();
|
|
30
|
+
await cancelPromise;
|
|
31
|
+
return { done: true, value: undefined };
|
|
32
|
+
},
|
|
33
|
+
[Symbol.asyncIterator]() {
|
|
34
|
+
return this;
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
exports.ReadableStreamToAsyncIterable = ReadableStreamToAsyncIterable;
|
|
39
|
+
//# sourceMappingURL=stream-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-utils.js","sourceRoot":"","sources":["../src/internal/stream-utils.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,SAAgB,6BAA6B,CAAI,MAAW;IAC1D,IAAI,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC;QAAE,OAAO,MAAM,CAAC;IAEhD,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;IAClC,OAAO;QACL,KAAK,CAAC,IAAI;YACR,IAAI;gBACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;gBACnC,IAAI,MAAM,EAAE,IAAI;oBAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,0CAA0C;gBAClF,OAAO,MAAM,CAAC;aACf;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,2CAA2C;gBACjE,MAAM,CAAC,CAAC;aACT;QACH,CAAC;QACD,KAAK,CAAC,MAAM;YACV,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;YACtC,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,MAAM,aAAa,CAAC;YACpB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAC1C,CAAC;QACD,CAAC,MAAM,CAAC,aAAa,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC;AAzBD,sEAyBC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Most browsers don't yet have async iterable support for ReadableStream,
|
|
3
|
+
* and Node has a very different way of reading bytes from its "ReadableStream".
|
|
4
|
+
*
|
|
5
|
+
* This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
|
|
6
|
+
*/
|
|
7
|
+
export function ReadableStreamToAsyncIterable(stream) {
|
|
8
|
+
if (stream[Symbol.asyncIterator])
|
|
9
|
+
return stream;
|
|
10
|
+
const reader = stream.getReader();
|
|
11
|
+
return {
|
|
12
|
+
async next() {
|
|
13
|
+
try {
|
|
14
|
+
const result = await reader.read();
|
|
15
|
+
if (result?.done)
|
|
16
|
+
reader.releaseLock(); // release lock when stream becomes closed
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
catch (e) {
|
|
20
|
+
reader.releaseLock(); // release lock when stream becomes errored
|
|
21
|
+
throw e;
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
async return() {
|
|
25
|
+
const cancelPromise = reader.cancel();
|
|
26
|
+
reader.releaseLock();
|
|
27
|
+
await cancelPromise;
|
|
28
|
+
return { done: true, value: undefined };
|
|
29
|
+
},
|
|
30
|
+
[Symbol.asyncIterator]() {
|
|
31
|
+
return this;
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=stream-utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-utils.mjs","sourceRoot":"","sources":["../src/internal/stream-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAAI,MAAW;IAC1D,IAAI,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC;QAAE,OAAO,MAAM,CAAC;IAEhD,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;IAClC,OAAO;QACL,KAAK,CAAC,IAAI;YACR,IAAI;gBACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;gBACnC,IAAI,MAAM,EAAE,IAAI;oBAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,0CAA0C;gBAClF,OAAO,MAAM,CAAC;aACf;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,2CAA2C;gBACjE,MAAM,CAAC,CAAC;aACT;QACH,CAAC;QACD,KAAK,CAAC,MAAM;YACV,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;YACtC,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,MAAM,aAAa,CAAC;YACpB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAC1C,CAAC;QACD,CAAC,MAAM,CAAC,aAAa,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -125,8 +125,8 @@ export interface ChatCompletionAssistantMessageParam {
|
|
|
125
125
|
*/
|
|
126
126
|
content?: string | Array<ChatCompletionContentPartText | ChatCompletionContentPartRefusal> | null;
|
|
127
127
|
/**
|
|
128
|
-
* @deprecated
|
|
129
|
-
*
|
|
128
|
+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
|
|
129
|
+
* function that should be called, as generated by the model.
|
|
130
130
|
*/
|
|
131
131
|
function_call?: ChatCompletionAssistantMessageParam.FunctionCall | null;
|
|
132
132
|
/**
|
|
@@ -155,8 +155,8 @@ export declare namespace ChatCompletionAssistantMessageParam {
|
|
|
155
155
|
id: string;
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
158
|
-
* @deprecated
|
|
159
|
-
*
|
|
158
|
+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
|
|
159
|
+
* function that should be called, as generated by the model.
|
|
160
160
|
*/
|
|
161
161
|
interface FunctionCall {
|
|
162
162
|
/**
|
|
@@ -296,8 +296,8 @@ export declare namespace ChatCompletionChunk {
|
|
|
296
296
|
*/
|
|
297
297
|
content?: string | null;
|
|
298
298
|
/**
|
|
299
|
-
* @deprecated
|
|
300
|
-
*
|
|
299
|
+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
|
|
300
|
+
* function that should be called, as generated by the model.
|
|
301
301
|
*/
|
|
302
302
|
function_call?: Delta.FunctionCall;
|
|
303
303
|
/**
|
|
@@ -312,8 +312,8 @@ export declare namespace ChatCompletionChunk {
|
|
|
312
312
|
}
|
|
313
313
|
namespace Delta {
|
|
314
314
|
/**
|
|
315
|
-
* @deprecated
|
|
316
|
-
*
|
|
315
|
+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
|
|
316
|
+
* function that should be called, as generated by the model.
|
|
317
317
|
*/
|
|
318
318
|
interface FunctionCall {
|
|
319
319
|
/**
|
|
@@ -515,8 +515,8 @@ export interface ChatCompletionMessage {
|
|
|
515
515
|
*/
|
|
516
516
|
audio?: ChatCompletionAudio | null;
|
|
517
517
|
/**
|
|
518
|
-
* @deprecated
|
|
519
|
-
*
|
|
518
|
+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
|
|
519
|
+
* function that should be called, as generated by the model.
|
|
520
520
|
*/
|
|
521
521
|
function_call?: ChatCompletionMessage.FunctionCall | null;
|
|
522
522
|
/**
|
|
@@ -526,8 +526,8 @@ export interface ChatCompletionMessage {
|
|
|
526
526
|
}
|
|
527
527
|
export declare namespace ChatCompletionMessage {
|
|
528
528
|
/**
|
|
529
|
-
* @deprecated
|
|
530
|
-
*
|
|
529
|
+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
|
|
530
|
+
* function that should be called, as generated by the model.
|
|
531
531
|
*/
|
|
532
532
|
interface FunctionCall {
|
|
533
533
|
/**
|
package/resources/files.d.ts
CHANGED
|
@@ -97,12 +97,12 @@ export interface FileObject {
|
|
|
97
97
|
*/
|
|
98
98
|
purpose: 'assistants' | 'assistants_output' | 'batch' | 'batch_output' | 'fine-tune' | 'fine-tune-results' | 'vision';
|
|
99
99
|
/**
|
|
100
|
-
* @deprecated
|
|
100
|
+
* @deprecated Deprecated. The current status of the file, which can be either
|
|
101
101
|
* `uploaded`, `processed`, or `error`.
|
|
102
102
|
*/
|
|
103
103
|
status: 'uploaded' | 'processed' | 'error';
|
|
104
104
|
/**
|
|
105
|
-
* @deprecated
|
|
105
|
+
* @deprecated Deprecated. For details on why a fine-tuning training file failed
|
|
106
106
|
* validation, see the `error` field on `fine_tuning.job`.
|
|
107
107
|
*/
|
|
108
108
|
status_details?: string;
|
|
@@ -405,7 +405,7 @@ export interface JobCreateParams {
|
|
|
405
405
|
}
|
|
406
406
|
export declare namespace JobCreateParams {
|
|
407
407
|
/**
|
|
408
|
-
* @deprecated
|
|
408
|
+
* @deprecated The hyperparameters used for the fine-tuning job. This value is now
|
|
409
409
|
* deprecated in favor of `method`, and should be passed in under the `method`
|
|
410
410
|
* parameter.
|
|
411
411
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OpenAIError } from '../../error';
|
|
2
2
|
|
|
3
|
-
type Bytes = string | ArrayBuffer | Uint8Array | Buffer | null | undefined;
|
|
3
|
+
export type Bytes = string | ArrayBuffer | Uint8Array | Buffer | null | undefined;
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* A re-implementation of httpx's `LineDecoder` in Python that handles incrementally
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Most browsers don't yet have async iterable support for ReadableStream,
|
|
3
|
+
* and Node has a very different way of reading bytes from its "ReadableStream".
|
|
4
|
+
*
|
|
5
|
+
* This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
|
|
6
|
+
*/
|
|
7
|
+
export function ReadableStreamToAsyncIterable<T>(stream: any): AsyncIterableIterator<T> {
|
|
8
|
+
if (stream[Symbol.asyncIterator]) return stream;
|
|
9
|
+
|
|
10
|
+
const reader = stream.getReader();
|
|
11
|
+
return {
|
|
12
|
+
async next() {
|
|
13
|
+
try {
|
|
14
|
+
const result = await reader.read();
|
|
15
|
+
if (result?.done) reader.releaseLock(); // release lock when stream becomes closed
|
|
16
|
+
return result;
|
|
17
|
+
} catch (e) {
|
|
18
|
+
reader.releaseLock(); // release lock when stream becomes errored
|
|
19
|
+
throw e;
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
async return() {
|
|
23
|
+
const cancelPromise = reader.cancel();
|
|
24
|
+
reader.releaseLock();
|
|
25
|
+
await cancelPromise;
|
|
26
|
+
return { done: true, value: undefined };
|
|
27
|
+
},
|
|
28
|
+
[Symbol.asyncIterator]() {
|
|
29
|
+
return this;
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -163,8 +163,8 @@ export interface ChatCompletionAssistantMessageParam {
|
|
|
163
163
|
content?: string | Array<ChatCompletionContentPartText | ChatCompletionContentPartRefusal> | null;
|
|
164
164
|
|
|
165
165
|
/**
|
|
166
|
-
* @deprecated
|
|
167
|
-
*
|
|
166
|
+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
|
|
167
|
+
* function that should be called, as generated by the model.
|
|
168
168
|
*/
|
|
169
169
|
function_call?: ChatCompletionAssistantMessageParam.FunctionCall | null;
|
|
170
170
|
|
|
@@ -198,8 +198,8 @@ export namespace ChatCompletionAssistantMessageParam {
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
/**
|
|
201
|
-
* @deprecated
|
|
202
|
-
*
|
|
201
|
+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
|
|
202
|
+
* function that should be called, as generated by the model.
|
|
203
203
|
*/
|
|
204
204
|
export interface FunctionCall {
|
|
205
205
|
/**
|
|
@@ -360,8 +360,8 @@ export namespace ChatCompletionChunk {
|
|
|
360
360
|
content?: string | null;
|
|
361
361
|
|
|
362
362
|
/**
|
|
363
|
-
* @deprecated
|
|
364
|
-
*
|
|
363
|
+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
|
|
364
|
+
* function that should be called, as generated by the model.
|
|
365
365
|
*/
|
|
366
366
|
function_call?: Delta.FunctionCall;
|
|
367
367
|
|
|
@@ -380,8 +380,8 @@ export namespace ChatCompletionChunk {
|
|
|
380
380
|
|
|
381
381
|
export namespace Delta {
|
|
382
382
|
/**
|
|
383
|
-
* @deprecated
|
|
384
|
-
*
|
|
383
|
+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
|
|
384
|
+
* function that should be called, as generated by the model.
|
|
385
385
|
*/
|
|
386
386
|
export interface FunctionCall {
|
|
387
387
|
/**
|
|
@@ -620,8 +620,8 @@ export interface ChatCompletionMessage {
|
|
|
620
620
|
audio?: ChatCompletionAudio | null;
|
|
621
621
|
|
|
622
622
|
/**
|
|
623
|
-
* @deprecated
|
|
624
|
-
*
|
|
623
|
+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
|
|
624
|
+
* function that should be called, as generated by the model.
|
|
625
625
|
*/
|
|
626
626
|
function_call?: ChatCompletionMessage.FunctionCall | null;
|
|
627
627
|
|
|
@@ -633,8 +633,8 @@ export interface ChatCompletionMessage {
|
|
|
633
633
|
|
|
634
634
|
export namespace ChatCompletionMessage {
|
|
635
635
|
/**
|
|
636
|
-
* @deprecated
|
|
637
|
-
*
|
|
636
|
+
* @deprecated Deprecated and replaced by `tool_calls`. The name and arguments of a
|
|
637
|
+
* function that should be called, as generated by the model.
|
|
638
638
|
*/
|
|
639
639
|
export interface FunctionCall {
|
|
640
640
|
/**
|
package/src/resources/files.ts
CHANGED
|
@@ -168,13 +168,13 @@ export interface FileObject {
|
|
|
168
168
|
| 'vision';
|
|
169
169
|
|
|
170
170
|
/**
|
|
171
|
-
* @deprecated
|
|
171
|
+
* @deprecated Deprecated. The current status of the file, which can be either
|
|
172
172
|
* `uploaded`, `processed`, or `error`.
|
|
173
173
|
*/
|
|
174
174
|
status: 'uploaded' | 'processed' | 'error';
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
|
-
* @deprecated
|
|
177
|
+
* @deprecated Deprecated. For details on why a fine-tuning training file failed
|
|
178
178
|
* validation, see the `error` field on `fine_tuning.job`.
|
|
179
179
|
*/
|
|
180
180
|
status_details?: string;
|
|
@@ -516,7 +516,7 @@ export interface JobCreateParams {
|
|
|
516
516
|
|
|
517
517
|
export namespace JobCreateParams {
|
|
518
518
|
/**
|
|
519
|
-
* @deprecated
|
|
519
|
+
* @deprecated The hyperparameters used for the fine-tuning job. This value is now
|
|
520
520
|
* deprecated in favor of `method`, and should be passed in under the `method`
|
|
521
521
|
* parameter.
|
|
522
522
|
*/
|
package/src/streaming.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReadableStream, type Response } from './_shims/index';
|
|
2
2
|
import { OpenAIError } from './error';
|
|
3
3
|
import { LineDecoder } from './internal/decoders/line';
|
|
4
|
+
import { ReadableStreamToAsyncIterable } from './internal/stream-utils';
|
|
4
5
|
|
|
5
6
|
import { APIError } from './error';
|
|
6
7
|
|
|
@@ -96,7 +97,7 @@ export class Stream<Item> implements AsyncIterable<Item> {
|
|
|
96
97
|
async function* iterLines(): AsyncGenerator<string, void, unknown> {
|
|
97
98
|
const lineDecoder = new LineDecoder();
|
|
98
99
|
|
|
99
|
-
const iter =
|
|
100
|
+
const iter = ReadableStreamToAsyncIterable<Bytes>(readableStream);
|
|
100
101
|
for await (const chunk of iter) {
|
|
101
102
|
for (const line of lineDecoder.decode(chunk)) {
|
|
102
103
|
yield line;
|
|
@@ -210,7 +211,7 @@ export async function* _iterSSEMessages(
|
|
|
210
211
|
const sseDecoder = new SSEDecoder();
|
|
211
212
|
const lineDecoder = new LineDecoder();
|
|
212
213
|
|
|
213
|
-
const iter =
|
|
214
|
+
const iter = ReadableStreamToAsyncIterable<Bytes>(response.body);
|
|
214
215
|
for await (const sseChunk of iterSSEChunks(iter)) {
|
|
215
216
|
for (const line of lineDecoder.decode(sseChunk)) {
|
|
216
217
|
const sse = sseDecoder.decode(line);
|
|
@@ -363,36 +364,3 @@ function partition(str: string, delimiter: string): [string, string, string] {
|
|
|
363
364
|
|
|
364
365
|
return [str, '', ''];
|
|
365
366
|
}
|
|
366
|
-
|
|
367
|
-
/**
|
|
368
|
-
* Most browsers don't yet have async iterable support for ReadableStream,
|
|
369
|
-
* and Node has a very different way of reading bytes from its "ReadableStream".
|
|
370
|
-
*
|
|
371
|
-
* This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
|
|
372
|
-
*/
|
|
373
|
-
export function readableStreamAsyncIterable<T>(stream: any): AsyncIterableIterator<T> {
|
|
374
|
-
if (stream[Symbol.asyncIterator]) return stream;
|
|
375
|
-
|
|
376
|
-
const reader = stream.getReader();
|
|
377
|
-
return {
|
|
378
|
-
async next() {
|
|
379
|
-
try {
|
|
380
|
-
const result = await reader.read();
|
|
381
|
-
if (result?.done) reader.releaseLock(); // release lock when stream becomes closed
|
|
382
|
-
return result;
|
|
383
|
-
} catch (e) {
|
|
384
|
-
reader.releaseLock(); // release lock when stream becomes errored
|
|
385
|
-
throw e;
|
|
386
|
-
}
|
|
387
|
-
},
|
|
388
|
-
async return() {
|
|
389
|
-
const cancelPromise = reader.cancel();
|
|
390
|
-
reader.releaseLock();
|
|
391
|
-
await cancelPromise;
|
|
392
|
-
return { done: true, value: undefined };
|
|
393
|
-
},
|
|
394
|
-
[Symbol.asyncIterator]() {
|
|
395
|
-
return this;
|
|
396
|
-
},
|
|
397
|
-
};
|
|
398
|
-
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '4.79.
|
|
1
|
+
export const VERSION = '4.79.4'; // x-release-please-version
|
package/streaming.d.ts
CHANGED
|
@@ -31,11 +31,4 @@ export declare class Stream<Item> implements AsyncIterable<Item> {
|
|
|
31
31
|
export declare function _iterSSEMessages(response: Response, controller: AbortController): AsyncGenerator<ServerSentEvent, void, unknown>;
|
|
32
32
|
/** This is an internal helper function that's just used for testing */
|
|
33
33
|
export declare function _decodeChunks(chunks: string[]): string[];
|
|
34
|
-
/**
|
|
35
|
-
* Most browsers don't yet have async iterable support for ReadableStream,
|
|
36
|
-
* and Node has a very different way of reading bytes from its "ReadableStream".
|
|
37
|
-
*
|
|
38
|
-
* This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
|
|
39
|
-
*/
|
|
40
|
-
export declare function readableStreamAsyncIterable<T>(stream: any): AsyncIterableIterator<T>;
|
|
41
34
|
//# sourceMappingURL=streaming.d.ts.map
|
package/streaming.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":";AAAA,OAAO,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|
3
|
+
exports._decodeChunks = exports._iterSSEMessages = exports.Stream = void 0;
|
|
4
4
|
const index_1 = require("./_shims/index.js");
|
|
5
5
|
const error_1 = require("./error.js");
|
|
6
6
|
const line_1 = require("./internal/decoders/line.js");
|
|
7
|
+
const stream_utils_1 = require("./internal/stream-utils.js");
|
|
7
8
|
const error_2 = require("./error.js");
|
|
8
9
|
class Stream {
|
|
9
10
|
constructor(iterator, controller) {
|
|
@@ -82,7 +83,7 @@ class Stream {
|
|
|
82
83
|
let consumed = false;
|
|
83
84
|
async function* iterLines() {
|
|
84
85
|
const lineDecoder = new line_1.LineDecoder();
|
|
85
|
-
const iter =
|
|
86
|
+
const iter = (0, stream_utils_1.ReadableStreamToAsyncIterable)(readableStream);
|
|
86
87
|
for await (const chunk of iter) {
|
|
87
88
|
for (const line of lineDecoder.decode(chunk)) {
|
|
88
89
|
yield line;
|
|
@@ -188,7 +189,7 @@ async function* _iterSSEMessages(response, controller) {
|
|
|
188
189
|
}
|
|
189
190
|
const sseDecoder = new SSEDecoder();
|
|
190
191
|
const lineDecoder = new line_1.LineDecoder();
|
|
191
|
-
const iter =
|
|
192
|
+
const iter = (0, stream_utils_1.ReadableStreamToAsyncIterable)(response.body);
|
|
192
193
|
for await (const sseChunk of iterSSEChunks(iter)) {
|
|
193
194
|
for (const line of lineDecoder.decode(sseChunk)) {
|
|
194
195
|
const sse = sseDecoder.decode(line);
|
|
@@ -314,39 +315,4 @@ function partition(str, delimiter) {
|
|
|
314
315
|
}
|
|
315
316
|
return [str, '', ''];
|
|
316
317
|
}
|
|
317
|
-
/**
|
|
318
|
-
* Most browsers don't yet have async iterable support for ReadableStream,
|
|
319
|
-
* and Node has a very different way of reading bytes from its "ReadableStream".
|
|
320
|
-
*
|
|
321
|
-
* This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
|
|
322
|
-
*/
|
|
323
|
-
function readableStreamAsyncIterable(stream) {
|
|
324
|
-
if (stream[Symbol.asyncIterator])
|
|
325
|
-
return stream;
|
|
326
|
-
const reader = stream.getReader();
|
|
327
|
-
return {
|
|
328
|
-
async next() {
|
|
329
|
-
try {
|
|
330
|
-
const result = await reader.read();
|
|
331
|
-
if (result?.done)
|
|
332
|
-
reader.releaseLock(); // release lock when stream becomes closed
|
|
333
|
-
return result;
|
|
334
|
-
}
|
|
335
|
-
catch (e) {
|
|
336
|
-
reader.releaseLock(); // release lock when stream becomes errored
|
|
337
|
-
throw e;
|
|
338
|
-
}
|
|
339
|
-
},
|
|
340
|
-
async return() {
|
|
341
|
-
const cancelPromise = reader.cancel();
|
|
342
|
-
reader.releaseLock();
|
|
343
|
-
await cancelPromise;
|
|
344
|
-
return { done: true, value: undefined };
|
|
345
|
-
},
|
|
346
|
-
[Symbol.asyncIterator]() {
|
|
347
|
-
return this;
|
|
348
|
-
},
|
|
349
|
-
};
|
|
350
|
-
}
|
|
351
|
-
exports.readableStreamAsyncIterable = readableStreamAsyncIterable;
|
|
352
318
|
//# sourceMappingURL=streaming.js.map
|
package/streaming.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streaming.js","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":";;;AAAA,6CAA+D;AAC/D,sCAAsC;AACtC,sDAAuD;
|
|
1
|
+
{"version":3,"file":"streaming.js","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":";;;AAAA,6CAA+D;AAC/D,sCAAsC;AACtC,sDAAuD;AACvD,6DAAwE;AAExE,sCAAmC;AAUnC,MAAa,MAAM;IAGjB,YACU,QAAmC,EAC3C,UAA2B;QADnB,aAAQ,GAAR,QAAQ,CAA2B;QAG3C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED,MAAM,CAAC,eAAe,CAAO,QAAkB,EAAE,UAA2B;QAC1E,IAAI,QAAQ,GAAG,KAAK,CAAC;QAErB,KAAK,SAAS,CAAC,CAAC,QAAQ;YACtB,IAAI,QAA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AC"}
|
package/streaming.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReadableStream } from "./_shims/index.mjs";
|
|
2
2
|
import { OpenAIError } from "./error.mjs";
|
|
3
3
|
import { LineDecoder } from "./internal/decoders/line.mjs";
|
|
4
|
+
import { ReadableStreamToAsyncIterable } from "./internal/stream-utils.mjs";
|
|
4
5
|
import { APIError } from "./error.mjs";
|
|
5
6
|
export class Stream {
|
|
6
7
|
constructor(iterator, controller) {
|
|
@@ -79,7 +80,7 @@ export class Stream {
|
|
|
79
80
|
let consumed = false;
|
|
80
81
|
async function* iterLines() {
|
|
81
82
|
const lineDecoder = new LineDecoder();
|
|
82
|
-
const iter =
|
|
83
|
+
const iter = ReadableStreamToAsyncIterable(readableStream);
|
|
83
84
|
for await (const chunk of iter) {
|
|
84
85
|
for (const line of lineDecoder.decode(chunk)) {
|
|
85
86
|
yield line;
|
|
@@ -184,7 +185,7 @@ export async function* _iterSSEMessages(response, controller) {
|
|
|
184
185
|
}
|
|
185
186
|
const sseDecoder = new SSEDecoder();
|
|
186
187
|
const lineDecoder = new LineDecoder();
|
|
187
|
-
const iter =
|
|
188
|
+
const iter = ReadableStreamToAsyncIterable(response.body);
|
|
188
189
|
for await (const sseChunk of iterSSEChunks(iter)) {
|
|
189
190
|
for (const line of lineDecoder.decode(sseChunk)) {
|
|
190
191
|
const sse = sseDecoder.decode(line);
|
|
@@ -308,38 +309,4 @@ function partition(str, delimiter) {
|
|
|
308
309
|
}
|
|
309
310
|
return [str, '', ''];
|
|
310
311
|
}
|
|
311
|
-
/**
|
|
312
|
-
* Most browsers don't yet have async iterable support for ReadableStream,
|
|
313
|
-
* and Node has a very different way of reading bytes from its "ReadableStream".
|
|
314
|
-
*
|
|
315
|
-
* This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
|
|
316
|
-
*/
|
|
317
|
-
export function readableStreamAsyncIterable(stream) {
|
|
318
|
-
if (stream[Symbol.asyncIterator])
|
|
319
|
-
return stream;
|
|
320
|
-
const reader = stream.getReader();
|
|
321
|
-
return {
|
|
322
|
-
async next() {
|
|
323
|
-
try {
|
|
324
|
-
const result = await reader.read();
|
|
325
|
-
if (result?.done)
|
|
326
|
-
reader.releaseLock(); // release lock when stream becomes closed
|
|
327
|
-
return result;
|
|
328
|
-
}
|
|
329
|
-
catch (e) {
|
|
330
|
-
reader.releaseLock(); // release lock when stream becomes errored
|
|
331
|
-
throw e;
|
|
332
|
-
}
|
|
333
|
-
},
|
|
334
|
-
async return() {
|
|
335
|
-
const cancelPromise = reader.cancel();
|
|
336
|
-
reader.releaseLock();
|
|
337
|
-
await cancelPromise;
|
|
338
|
-
return { done: true, value: undefined };
|
|
339
|
-
},
|
|
340
|
-
[Symbol.asyncIterator]() {
|
|
341
|
-
return this;
|
|
342
|
-
},
|
|
343
|
-
};
|
|
344
|
-
}
|
|
345
312
|
//# sourceMappingURL=streaming.mjs.map
|
package/streaming.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streaming.mjs","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,EAAiB;OACjC,EAAE,WAAW,EAAE;OACf,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"streaming.mjs","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,EAAiB;OACjC,EAAE,WAAW,EAAE;OACf,EAAE,WAAW,EAAE;OACf,EAAE,6BAA6B,EAAE;OAEjC,EAAE,QAAQ,EAAE;AAUnB,MAAM,OAAO,MAAM;IAGjB,YACU,QAAmC,EAC3C,UAA2B;QADnB,aAAQ,GAAR,QAAQ,CAA2B;QAG3C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED,MAAM,CAAC,eAAe,CAAO,QAAkB,EAAE,UAA2B;QAC1E,IAAI,QAAQ,GAAG,KAAK,CAAC;QAErB,KAAK,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
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.79.
|
|
1
|
+
export declare const VERSION = "4.79.4";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '4.79.
|
|
1
|
+
export const VERSION = '4.79.4'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|