@mozaik-ai/core 4.0.0-beta.11 → 4.0.0-beta.12
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.d.mts +29 -20
- package/dist/index.d.ts +29 -20
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -569,10 +569,9 @@ var AgentLoop = class _AgentLoop {
|
|
|
569
569
|
loopVisitor.visitInterceptionStarted(transition);
|
|
570
570
|
transition = await this.interceptionHandler.handle(transition);
|
|
571
571
|
loopVisitor.visitInterceptionFinished(transition);
|
|
572
|
-
} else {
|
|
573
|
-
const execution = await this.stateExecutor.execute(transition, loopVisitor);
|
|
574
|
-
transition = this.transitionResolver.resolve(execution);
|
|
575
572
|
}
|
|
573
|
+
const execution = await this.stateExecutor.execute(transition, loopVisitor);
|
|
574
|
+
transition = this.transitionResolver.resolve(execution);
|
|
576
575
|
}
|
|
577
576
|
}
|
|
578
577
|
getLoopId() {
|
|
@@ -1067,7 +1066,7 @@ var AnthropicMessagesMapper = class {
|
|
|
1067
1066
|
);
|
|
1068
1067
|
}
|
|
1069
1068
|
}
|
|
1070
|
-
return { items, rowResponse: response };
|
|
1069
|
+
return { items, tokenUsage: this.extractTokenUsage(response), rowResponse: response };
|
|
1071
1070
|
}
|
|
1072
1071
|
};
|
|
1073
1072
|
|
|
@@ -1255,6 +1254,7 @@ var OpenAIResponsesMapper = class {
|
|
|
1255
1254
|
}
|
|
1256
1255
|
return {
|
|
1257
1256
|
items,
|
|
1257
|
+
tokenUsage: this.extractTokenUsage(response),
|
|
1258
1258
|
rowResponse: response
|
|
1259
1259
|
};
|
|
1260
1260
|
}
|
|
@@ -1443,7 +1443,7 @@ var GeminiGenerateContentMapper = class {
|
|
|
1443
1443
|
);
|
|
1444
1444
|
}
|
|
1445
1445
|
}
|
|
1446
|
-
return { items, rowResponse: response };
|
|
1446
|
+
return { items, tokenUsage: this.extractTokenUsage(response), rowResponse: response };
|
|
1447
1447
|
}
|
|
1448
1448
|
};
|
|
1449
1449
|
|
|
@@ -1566,7 +1566,7 @@ var OpenAIChatCompletionsMapper = class {
|
|
|
1566
1566
|
const items = [];
|
|
1567
1567
|
const message = (_b = (_a = response.choices) == null ? void 0 : _a[0]) == null ? void 0 : _b.message;
|
|
1568
1568
|
if (!message) {
|
|
1569
|
-
return { items: [], rowResponse: response };
|
|
1569
|
+
return { items: [], tokenUsage: this.extractTokenUsage(response), rowResponse: response };
|
|
1570
1570
|
}
|
|
1571
1571
|
if (message.reasoning_content) {
|
|
1572
1572
|
items.push(
|
|
@@ -1589,7 +1589,7 @@ var OpenAIChatCompletionsMapper = class {
|
|
|
1589
1589
|
})
|
|
1590
1590
|
);
|
|
1591
1591
|
}
|
|
1592
|
-
return { items, rowResponse: response };
|
|
1592
|
+
return { items, tokenUsage: this.extractTokenUsage(response), rowResponse: response };
|
|
1593
1593
|
}
|
|
1594
1594
|
};
|
|
1595
1595
|
|