omnius 1.0.252 → 1.0.253
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 +8 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -579418,7 +579418,7 @@ ${description}`
|
|
|
579418
579418
|
};
|
|
579419
579419
|
const streamTimeoutMs = Number.isFinite(request.timeoutMs) && request.timeoutMs > 0 ? Math.max(request.timeoutMs, 1e4) : 3e5;
|
|
579420
579420
|
const streamAbort = new AbortController();
|
|
579421
|
-
|
|
579421
|
+
let streamTimeoutHandle = setTimeout(() => {
|
|
579422
579422
|
streamAbort.abort(new Error(`stream timeout: no response or chunk within ${(streamTimeoutMs / 1e3).toFixed(0)}s`));
|
|
579423
579423
|
}, streamTimeoutMs);
|
|
579424
579424
|
if (typeof streamTimeoutHandle.unref === "function") {
|
|
@@ -579462,6 +579462,13 @@ ${description}`
|
|
|
579462
579462
|
let accumulatedThinking = "";
|
|
579463
579463
|
let sawReasoningTokens = false;
|
|
579464
579464
|
for await (const rawChunk of resp.body) {
|
|
579465
|
+
clearTimeout(streamTimeoutHandle);
|
|
579466
|
+
streamTimeoutHandle = setTimeout(() => {
|
|
579467
|
+
streamAbort.abort(new Error(`stream timeout: no response or chunk within ${(streamTimeoutMs / 1e3).toFixed(0)}s`));
|
|
579468
|
+
}, streamTimeoutMs);
|
|
579469
|
+
if (typeof streamTimeoutHandle.unref === "function") {
|
|
579470
|
+
streamTimeoutHandle.unref();
|
|
579471
|
+
}
|
|
579465
579472
|
sseBuffer += decoder.decode(rawChunk, { stream: true });
|
|
579466
579473
|
const parts = sseBuffer.split("\n\n");
|
|
579467
579474
|
sseBuffer = parts.pop();
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.253",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.253",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED