billion-context 0.1.56-pr.264.124 → 0.1.56
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 +0 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -50628,20 +50628,6 @@ function shouldReserveOutputHeadroom(protocol) {
|
|
|
50628
50628
|
|
|
50629
50629
|
// src/loop/adapter-responses.ts
|
|
50630
50630
|
var RESPONSES_ITEM_ID_MAX = 64;
|
|
50631
|
-
function normalizeResponsesMessageItems(input) {
|
|
50632
|
-
if (!Array.isArray(input)) return 0;
|
|
50633
|
-
let typed = 0;
|
|
50634
|
-
for (const item of input) {
|
|
50635
|
-
if (typeof item !== "object" || item === null) continue;
|
|
50636
|
-
const rec = item;
|
|
50637
|
-
if (rec["type"] !== void 0) continue;
|
|
50638
|
-
if (rec["role"] !== "user" && rec["role"] !== "assistant") continue;
|
|
50639
|
-
if (rec["content"] === void 0) continue;
|
|
50640
|
-
rec["type"] = "message";
|
|
50641
|
-
typed++;
|
|
50642
|
-
}
|
|
50643
|
-
return typed;
|
|
50644
|
-
}
|
|
50645
50631
|
function sanitizeResponsesInputIds(input) {
|
|
50646
50632
|
if (!Array.isArray(input)) return;
|
|
50647
50633
|
for (const item of input) {
|
|
@@ -55035,10 +55021,6 @@ function prepareResponses(parsed, req, opts, core, config, prompts, log2, sessio
|
|
|
55035
55021
|
let responsesProjection;
|
|
55036
55022
|
let rebuiltInput = parsed.input;
|
|
55037
55023
|
let toolsOut = parsed.tools;
|
|
55038
|
-
const typedItems = normalizeResponsesMessageItems(parsed.input);
|
|
55039
|
-
if (typedItems > 0) {
|
|
55040
|
-
log2("info", `[${sessionId}] stamped type:"message" on ${typedItems} type-less input item(s) before projection (omp wire form)`);
|
|
55041
|
-
}
|
|
55042
55024
|
sanitizeResponsesInputIds(parsed.input);
|
|
55043
55025
|
const droppedEmpty = dropWhitespaceResponsesMessages(parsed.input);
|
|
55044
55026
|
if (droppedEmpty > 0) {
|