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.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
resultWithImages,
|
|
12
12
|
resultWithMedia,
|
|
13
13
|
z
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-F5QK5YVI.js";
|
|
15
15
|
import {
|
|
16
16
|
AbortException,
|
|
17
17
|
AbstractGadget,
|
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
toBase64,
|
|
90
90
|
validateAndApplyDefaults,
|
|
91
91
|
validateGadgetParams
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-YJKUWFIC.js";
|
|
93
93
|
export {
|
|
94
94
|
AbortException,
|
|
95
95
|
AbstractGadget,
|
package/dist/testing/index.cjs
CHANGED
|
@@ -6194,13 +6194,24 @@ ${endPrefix}`
|
|
|
6194
6194
|
observers: {
|
|
6195
6195
|
...hooks?.observers,
|
|
6196
6196
|
onLLMCallStart: async (context) => {
|
|
6197
|
+
let inputTokens;
|
|
6198
|
+
try {
|
|
6199
|
+
if (this.client) {
|
|
6200
|
+
inputTokens = await this.client.countTokens(
|
|
6201
|
+
context.options.model,
|
|
6202
|
+
context.options.messages
|
|
6203
|
+
);
|
|
6204
|
+
}
|
|
6205
|
+
} catch {
|
|
6206
|
+
}
|
|
6197
6207
|
onSubagentEvent({
|
|
6198
6208
|
type: "llm_call_start",
|
|
6199
6209
|
gadgetInvocationId: invocationId,
|
|
6200
6210
|
depth,
|
|
6201
6211
|
event: {
|
|
6202
6212
|
iteration: context.iteration,
|
|
6203
|
-
model: context.options.model
|
|
6213
|
+
model: context.options.model,
|
|
6214
|
+
inputTokens
|
|
6204
6215
|
}
|
|
6205
6216
|
});
|
|
6206
6217
|
if (existingOnLLMCallStart) {
|