@fallom/trace 0.2.23 → 0.2.24
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-NNVWIZN5.mjs → chunk-3VWF2OJX.mjs} +13 -6
- package/dist/{core-3MHBKYBC.mjs → core-Q3IHBEHB.mjs} +1 -1
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +11 -4
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-2NGJF2JZ.mjs +0 -661
- package/dist/chunk-3HBKT4HK.mjs +0 -827
- package/dist/chunk-KFD5AQ7V.mjs +0 -308
- package/dist/core-46Z4Q54J.mjs +0 -21
- package/dist/core-4L56QWI7.mjs +0 -21
- package/dist/models-SEFDGZU2.mjs +0 -8
|
@@ -128,7 +128,9 @@ async function runGEval(options) {
|
|
|
128
128
|
systemMessage,
|
|
129
129
|
judgeModel,
|
|
130
130
|
openrouterKey,
|
|
131
|
-
fallomApiKey
|
|
131
|
+
fallomApiKey,
|
|
132
|
+
traceSessionId,
|
|
133
|
+
traceCustomerId
|
|
132
134
|
} = options;
|
|
133
135
|
const apiKey = openrouterKey || process.env.OPENROUTER_API_KEY;
|
|
134
136
|
if (!apiKey) {
|
|
@@ -185,7 +187,9 @@ async function runGEval(options) {
|
|
|
185
187
|
reasoning,
|
|
186
188
|
startTime,
|
|
187
189
|
endTime,
|
|
188
|
-
usage: data.usage
|
|
190
|
+
usage: data.usage,
|
|
191
|
+
sessionId: traceSessionId,
|
|
192
|
+
customerId: traceCustomerId
|
|
189
193
|
}).catch(() => {
|
|
190
194
|
});
|
|
191
195
|
}
|
|
@@ -205,12 +209,15 @@ async function sendGEvalTrace(options) {
|
|
|
205
209
|
reasoning,
|
|
206
210
|
startTime,
|
|
207
211
|
endTime,
|
|
208
|
-
usage
|
|
212
|
+
usage,
|
|
213
|
+
sessionId,
|
|
214
|
+
customerId
|
|
209
215
|
} = options;
|
|
210
216
|
const traceUrl = process.env.FALLOM_TRACES_URL || "https://traces.fallom.com";
|
|
211
217
|
const traceData = {
|
|
212
218
|
config_key: "eval-worker",
|
|
213
|
-
session_id: `geval-${Date.now()}`,
|
|
219
|
+
session_id: sessionId || `geval-${Date.now()}`,
|
|
220
|
+
customer_id: customerId,
|
|
214
221
|
trace_id: generateHexId(32),
|
|
215
222
|
span_id: generateHexId(16),
|
|
216
223
|
name: `geval.${metricName}`,
|
|
@@ -416,7 +423,7 @@ function datasetFromTraces(traces) {
|
|
|
416
423
|
return items;
|
|
417
424
|
}
|
|
418
425
|
async function datasetFromFallom(datasetKey, version, config) {
|
|
419
|
-
const { _apiKey: _apiKey2, _baseUrl: _baseUrl2, _initialized: _initialized2 } = await import("./core-
|
|
426
|
+
const { _apiKey: _apiKey2, _baseUrl: _baseUrl2, _initialized: _initialized2 } = await import("./core-Q3IHBEHB.mjs").then(
|
|
420
427
|
(m) => ({
|
|
421
428
|
_apiKey: config?._apiKey ?? m._apiKey,
|
|
422
429
|
_baseUrl: config?._baseUrl ?? m._baseUrl,
|
|
@@ -489,7 +496,7 @@ var EvaluationDataset = class {
|
|
|
489
496
|
* @returns Self for chaining
|
|
490
497
|
*/
|
|
491
498
|
async pull(alias, version) {
|
|
492
|
-
const { _apiKey: _apiKey2, _baseUrl: _baseUrl2, _initialized: _initialized2 } = await import("./core-
|
|
499
|
+
const { _apiKey: _apiKey2, _baseUrl: _baseUrl2, _initialized: _initialized2 } = await import("./core-Q3IHBEHB.mjs");
|
|
493
500
|
if (!_initialized2) {
|
|
494
501
|
throw new Error("Fallom evals not initialized. Call evals.init() first.");
|
|
495
502
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -590,6 +590,10 @@ interface RunGEvalOptions {
|
|
|
590
590
|
openrouterKey?: string;
|
|
591
591
|
/** Optional Fallom API key to enable tracing of the judge LLM call */
|
|
592
592
|
fallomApiKey?: string;
|
|
593
|
+
/** Optional session ID for tracing (e.g., eval run ID) */
|
|
594
|
+
traceSessionId?: string;
|
|
595
|
+
/** Optional customer ID for tracing (e.g., organization ID) */
|
|
596
|
+
traceCustomerId?: string;
|
|
593
597
|
}
|
|
594
598
|
/**
|
|
595
599
|
* Run G-Eval for a single metric using OpenRouter.
|
package/dist/index.d.ts
CHANGED
|
@@ -590,6 +590,10 @@ interface RunGEvalOptions {
|
|
|
590
590
|
openrouterKey?: string;
|
|
591
591
|
/** Optional Fallom API key to enable tracing of the judge LLM call */
|
|
592
592
|
fallomApiKey?: string;
|
|
593
|
+
/** Optional session ID for tracing (e.g., eval run ID) */
|
|
594
|
+
traceSessionId?: string;
|
|
595
|
+
/** Optional customer ID for tracing (e.g., organization ID) */
|
|
596
|
+
traceCustomerId?: string;
|
|
593
597
|
}
|
|
594
598
|
/**
|
|
595
599
|
* Run G-Eval for a single metric using OpenRouter.
|
package/dist/index.js
CHANGED
|
@@ -386,7 +386,9 @@ async function runGEval(options) {
|
|
|
386
386
|
systemMessage,
|
|
387
387
|
judgeModel,
|
|
388
388
|
openrouterKey,
|
|
389
|
-
fallomApiKey
|
|
389
|
+
fallomApiKey,
|
|
390
|
+
traceSessionId,
|
|
391
|
+
traceCustomerId
|
|
390
392
|
} = options;
|
|
391
393
|
const apiKey4 = openrouterKey || process.env.OPENROUTER_API_KEY;
|
|
392
394
|
if (!apiKey4) {
|
|
@@ -443,7 +445,9 @@ async function runGEval(options) {
|
|
|
443
445
|
reasoning,
|
|
444
446
|
startTime,
|
|
445
447
|
endTime,
|
|
446
|
-
usage: data.usage
|
|
448
|
+
usage: data.usage,
|
|
449
|
+
sessionId: traceSessionId,
|
|
450
|
+
customerId: traceCustomerId
|
|
447
451
|
}).catch(() => {
|
|
448
452
|
});
|
|
449
453
|
}
|
|
@@ -463,12 +467,15 @@ async function sendGEvalTrace(options) {
|
|
|
463
467
|
reasoning,
|
|
464
468
|
startTime,
|
|
465
469
|
endTime,
|
|
466
|
-
usage
|
|
470
|
+
usage,
|
|
471
|
+
sessionId,
|
|
472
|
+
customerId
|
|
467
473
|
} = options;
|
|
468
474
|
const traceUrl = process.env.FALLOM_TRACES_URL || "https://traces.fallom.com";
|
|
469
475
|
const traceData = {
|
|
470
476
|
config_key: "eval-worker",
|
|
471
|
-
session_id: `geval-${Date.now()}`,
|
|
477
|
+
session_id: sessionId || `geval-${Date.now()}`,
|
|
478
|
+
customer_id: customerId,
|
|
472
479
|
trace_id: generateHexId2(32),
|
|
473
480
|
span_id: generateHexId2(16),
|
|
474
481
|
name: `geval.${metricName}`,
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED