llmist 5.0.0 → 5.1.0
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/{chunk-UBPZUVIN.js → chunk-F5QK5YVI.js} +2 -2
- package/dist/{chunk-3SZIQI45.js → chunk-YJKUWFIC.js} +13 -2
- package/dist/chunk-YJKUWFIC.js.map +1 -0
- package/dist/cli.cjs +241 -70
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +231 -71
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +12 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/testing/index.cjs +12 -1
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-3SZIQI45.js.map +0 -1
- /package/dist/{chunk-UBPZUVIN.js.map → chunk-F5QK5YVI.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -9545,13 +9545,24 @@ ${endPrefix}`
|
|
|
9545
9545
|
observers: {
|
|
9546
9546
|
...hooks?.observers,
|
|
9547
9547
|
onLLMCallStart: async (context) => {
|
|
9548
|
+
let inputTokens;
|
|
9549
|
+
try {
|
|
9550
|
+
if (this.client) {
|
|
9551
|
+
inputTokens = await this.client.countTokens(
|
|
9552
|
+
context.options.model,
|
|
9553
|
+
context.options.messages
|
|
9554
|
+
);
|
|
9555
|
+
}
|
|
9556
|
+
} catch {
|
|
9557
|
+
}
|
|
9548
9558
|
onSubagentEvent({
|
|
9549
9559
|
type: "llm_call_start",
|
|
9550
9560
|
gadgetInvocationId: invocationId,
|
|
9551
9561
|
depth,
|
|
9552
9562
|
event: {
|
|
9553
9563
|
iteration: context.iteration,
|
|
9554
|
-
model: context.options.model
|
|
9564
|
+
model: context.options.model,
|
|
9565
|
+
inputTokens
|
|
9555
9566
|
}
|
|
9556
9567
|
});
|
|
9557
9568
|
if (existingOnLLMCallStart) {
|