@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/dist/index.mjs
CHANGED
|
@@ -2976,6 +2976,14 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
2976
2976
|
stack: error instanceof Error ? error.stack : void 0
|
|
2977
2977
|
});
|
|
2978
2978
|
}
|
|
2979
|
+
} else if (isResponseInProgressChunk(value)) {
|
|
2980
|
+
console.log("\u23F3 Response in progress (ignored):", value.type);
|
|
2981
|
+
} else if (isResponseContentPartAddedChunk(value)) {
|
|
2982
|
+
console.log("\u{1F4DD} Content part added (ignored):", value.type);
|
|
2983
|
+
} else if (isResponseOutputTextDoneChunk(value)) {
|
|
2984
|
+
console.log("\u2705 Output text done (ignored):", value.type);
|
|
2985
|
+
} else if (isResponseContentPartDoneChunk(value)) {
|
|
2986
|
+
console.log("\u2705 Content part done (ignored):", value.type);
|
|
2979
2987
|
} else {
|
|
2980
2988
|
console.log("\u2753 Unhandled chunk type:", value.type, JSON.stringify(value, null, 2));
|
|
2981
2989
|
}
|
|
@@ -3180,6 +3188,36 @@ var responseReasoningSummaryTextDeltaSchema = z11.object({
|
|
|
3180
3188
|
summary_index: z11.number(),
|
|
3181
3189
|
delta: z11.string()
|
|
3182
3190
|
});
|
|
3191
|
+
var responseInProgressChunkSchema = z11.object({
|
|
3192
|
+
type: z11.literal("response.in_progress"),
|
|
3193
|
+
sequence_number: z11.number(),
|
|
3194
|
+
response: z11.any()
|
|
3195
|
+
});
|
|
3196
|
+
var responseContentPartAddedChunkSchema = z11.object({
|
|
3197
|
+
type: z11.literal("response.content_part.added"),
|
|
3198
|
+
sequence_number: z11.number(),
|
|
3199
|
+
item_id: z11.string(),
|
|
3200
|
+
output_index: z11.number(),
|
|
3201
|
+
content_index: z11.number(),
|
|
3202
|
+
part: z11.any()
|
|
3203
|
+
});
|
|
3204
|
+
var responseOutputTextDoneChunkSchema = z11.object({
|
|
3205
|
+
type: z11.literal("response.output_text.done"),
|
|
3206
|
+
sequence_number: z11.number(),
|
|
3207
|
+
item_id: z11.string(),
|
|
3208
|
+
output_index: z11.number(),
|
|
3209
|
+
content_index: z11.number(),
|
|
3210
|
+
text: z11.string(),
|
|
3211
|
+
logprobs: z11.array(z11.any()).optional()
|
|
3212
|
+
});
|
|
3213
|
+
var responseContentPartDoneChunkSchema = z11.object({
|
|
3214
|
+
type: z11.literal("response.content_part.done"),
|
|
3215
|
+
sequence_number: z11.number(),
|
|
3216
|
+
item_id: z11.string(),
|
|
3217
|
+
output_index: z11.number(),
|
|
3218
|
+
content_index: z11.number(),
|
|
3219
|
+
part: z11.any()
|
|
3220
|
+
});
|
|
3183
3221
|
var openaiResponsesChunkSchema = z11.union([
|
|
3184
3222
|
textDeltaChunkSchema,
|
|
3185
3223
|
responseFinishedChunkSchema,
|
|
@@ -3189,6 +3227,10 @@ var openaiResponsesChunkSchema = z11.union([
|
|
|
3189
3227
|
responseOutputItemAddedSchema,
|
|
3190
3228
|
responseAnnotationAddedSchema,
|
|
3191
3229
|
responseReasoningSummaryTextDeltaSchema,
|
|
3230
|
+
responseInProgressChunkSchema,
|
|
3231
|
+
responseContentPartAddedChunkSchema,
|
|
3232
|
+
responseOutputTextDoneChunkSchema,
|
|
3233
|
+
responseContentPartDoneChunkSchema,
|
|
3192
3234
|
z11.object({ type: z11.string() }).passthrough()
|
|
3193
3235
|
// fallback for unknown chunks
|
|
3194
3236
|
]);
|
|
@@ -3216,6 +3258,18 @@ function isResponseAnnotationAddedChunk(chunk) {
|
|
|
3216
3258
|
function isResponseReasoningSummaryTextDeltaChunk(chunk) {
|
|
3217
3259
|
return chunk.type === "response.reasoning_summary_text.delta";
|
|
3218
3260
|
}
|
|
3261
|
+
function isResponseInProgressChunk(chunk) {
|
|
3262
|
+
return chunk.type === "response.in_progress";
|
|
3263
|
+
}
|
|
3264
|
+
function isResponseContentPartAddedChunk(chunk) {
|
|
3265
|
+
return chunk.type === "response.content_part.added";
|
|
3266
|
+
}
|
|
3267
|
+
function isResponseOutputTextDoneChunk(chunk) {
|
|
3268
|
+
return chunk.type === "response.output_text.done";
|
|
3269
|
+
}
|
|
3270
|
+
function isResponseContentPartDoneChunk(chunk) {
|
|
3271
|
+
return chunk.type === "response.content_part.done";
|
|
3272
|
+
}
|
|
3219
3273
|
function getResponsesModelConfig(modelId) {
|
|
3220
3274
|
if (modelId.startsWith("o")) {
|
|
3221
3275
|
if (modelId.startsWith("o1-mini") || modelId.startsWith("o1-preview")) {
|