@zenning/openai 1.4.6 → 1.4.7
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/dist/index.js +54 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +54 -0
- package/dist/index.mjs.map +1 -1
- package/internal/dist/index.js +54 -0
- package/internal/dist/index.js.map +1 -1
- package/internal/dist/index.mjs +54 -0
- package/internal/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/internal/dist/index.js
CHANGED
|
@@ -3038,6 +3038,14 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
3038
3038
|
stack: error instanceof Error ? error.stack : void 0
|
|
3039
3039
|
});
|
|
3040
3040
|
}
|
|
3041
|
+
} else if (isResponseInProgressChunk(value)) {
|
|
3042
|
+
console.log("\u23F3 Response in progress (ignored):", value.type);
|
|
3043
|
+
} else if (isResponseContentPartAddedChunk(value)) {
|
|
3044
|
+
console.log("\u{1F4DD} Content part added (ignored):", value.type);
|
|
3045
|
+
} else if (isResponseOutputTextDoneChunk(value)) {
|
|
3046
|
+
console.log("\u2705 Output text done (ignored):", value.type);
|
|
3047
|
+
} else if (isResponseContentPartDoneChunk(value)) {
|
|
3048
|
+
console.log("\u2705 Content part done (ignored):", value.type);
|
|
3041
3049
|
} else {
|
|
3042
3050
|
console.log("\u2753 Unhandled chunk type:", value.type, JSON.stringify(value, null, 2));
|
|
3043
3051
|
}
|
|
@@ -3242,6 +3250,36 @@ var responseReasoningSummaryTextDeltaSchema = import_zod12.z.object({
|
|
|
3242
3250
|
summary_index: import_zod12.z.number(),
|
|
3243
3251
|
delta: import_zod12.z.string()
|
|
3244
3252
|
});
|
|
3253
|
+
var responseInProgressChunkSchema = import_zod12.z.object({
|
|
3254
|
+
type: import_zod12.z.literal("response.in_progress"),
|
|
3255
|
+
sequence_number: import_zod12.z.number(),
|
|
3256
|
+
response: import_zod12.z.any()
|
|
3257
|
+
});
|
|
3258
|
+
var responseContentPartAddedChunkSchema = import_zod12.z.object({
|
|
3259
|
+
type: import_zod12.z.literal("response.content_part.added"),
|
|
3260
|
+
sequence_number: import_zod12.z.number(),
|
|
3261
|
+
item_id: import_zod12.z.string(),
|
|
3262
|
+
output_index: import_zod12.z.number(),
|
|
3263
|
+
content_index: import_zod12.z.number(),
|
|
3264
|
+
part: import_zod12.z.any()
|
|
3265
|
+
});
|
|
3266
|
+
var responseOutputTextDoneChunkSchema = import_zod12.z.object({
|
|
3267
|
+
type: import_zod12.z.literal("response.output_text.done"),
|
|
3268
|
+
sequence_number: import_zod12.z.number(),
|
|
3269
|
+
item_id: import_zod12.z.string(),
|
|
3270
|
+
output_index: import_zod12.z.number(),
|
|
3271
|
+
content_index: import_zod12.z.number(),
|
|
3272
|
+
text: import_zod12.z.string(),
|
|
3273
|
+
logprobs: import_zod12.z.array(import_zod12.z.any()).optional()
|
|
3274
|
+
});
|
|
3275
|
+
var responseContentPartDoneChunkSchema = import_zod12.z.object({
|
|
3276
|
+
type: import_zod12.z.literal("response.content_part.done"),
|
|
3277
|
+
sequence_number: import_zod12.z.number(),
|
|
3278
|
+
item_id: import_zod12.z.string(),
|
|
3279
|
+
output_index: import_zod12.z.number(),
|
|
3280
|
+
content_index: import_zod12.z.number(),
|
|
3281
|
+
part: import_zod12.z.any()
|
|
3282
|
+
});
|
|
3245
3283
|
var openaiResponsesChunkSchema = import_zod12.z.union([
|
|
3246
3284
|
textDeltaChunkSchema,
|
|
3247
3285
|
responseFinishedChunkSchema,
|
|
@@ -3251,6 +3289,10 @@ var openaiResponsesChunkSchema = import_zod12.z.union([
|
|
|
3251
3289
|
responseOutputItemAddedSchema,
|
|
3252
3290
|
responseAnnotationAddedSchema,
|
|
3253
3291
|
responseReasoningSummaryTextDeltaSchema,
|
|
3292
|
+
responseInProgressChunkSchema,
|
|
3293
|
+
responseContentPartAddedChunkSchema,
|
|
3294
|
+
responseOutputTextDoneChunkSchema,
|
|
3295
|
+
responseContentPartDoneChunkSchema,
|
|
3254
3296
|
import_zod12.z.object({ type: import_zod12.z.string() }).passthrough()
|
|
3255
3297
|
// fallback for unknown chunks
|
|
3256
3298
|
]);
|
|
@@ -3278,6 +3320,18 @@ function isResponseAnnotationAddedChunk(chunk) {
|
|
|
3278
3320
|
function isResponseReasoningSummaryTextDeltaChunk(chunk) {
|
|
3279
3321
|
return chunk.type === "response.reasoning_summary_text.delta";
|
|
3280
3322
|
}
|
|
3323
|
+
function isResponseInProgressChunk(chunk) {
|
|
3324
|
+
return chunk.type === "response.in_progress";
|
|
3325
|
+
}
|
|
3326
|
+
function isResponseContentPartAddedChunk(chunk) {
|
|
3327
|
+
return chunk.type === "response.content_part.added";
|
|
3328
|
+
}
|
|
3329
|
+
function isResponseOutputTextDoneChunk(chunk) {
|
|
3330
|
+
return chunk.type === "response.output_text.done";
|
|
3331
|
+
}
|
|
3332
|
+
function isResponseContentPartDoneChunk(chunk) {
|
|
3333
|
+
return chunk.type === "response.content_part.done";
|
|
3334
|
+
}
|
|
3281
3335
|
function getResponsesModelConfig(modelId) {
|
|
3282
3336
|
if (modelId.startsWith("o")) {
|
|
3283
3337
|
if (modelId.startsWith("o1-mini") || modelId.startsWith("o1-preview")) {
|