@voltagent/core 1.2.11 → 1.2.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.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12039,6 +12039,16 @@ function createScorerSpanAttributes(host, descriptor, config, storagePayload, me
|
|
|
12039
12039
|
if (storagePayload.conversationId) {
|
|
12040
12040
|
attributes["conversation.id"] = storagePayload.conversationId;
|
|
12041
12041
|
}
|
|
12042
|
+
if (storagePayload.input) {
|
|
12043
|
+
attributes["eval.input"] = storagePayload.input;
|
|
12044
|
+
}
|
|
12045
|
+
if (storagePayload.output) {
|
|
12046
|
+
attributes["eval.output"] = storagePayload.output;
|
|
12047
|
+
}
|
|
12048
|
+
const expected = metrics.combinedMetadata?.expected;
|
|
12049
|
+
if (expected) {
|
|
12050
|
+
attributes["eval.expected"] = typeof expected === "string" ? expected : JSON.stringify(expected);
|
|
12051
|
+
}
|
|
12042
12052
|
return attributes;
|
|
12043
12053
|
}
|
|
12044
12054
|
__name(createScorerSpanAttributes, "createScorerSpanAttributes");
|
|
@@ -12637,6 +12647,12 @@ function hasDatasetShape(source) {
|
|
|
12637
12647
|
__name(hasDatasetShape, "hasDatasetShape");
|
|
12638
12648
|
function resolveThresholdFromMetadata(metadata) {
|
|
12639
12649
|
const record = isPlainRecord(metadata) ? metadata : void 0;
|
|
12650
|
+
if (record?.scorer && isPlainRecord(record.scorer)) {
|
|
12651
|
+
const scorerMetadata = record.scorer;
|
|
12652
|
+
if (typeof scorerMetadata.threshold === "number") {
|
|
12653
|
+
return scorerMetadata.threshold;
|
|
12654
|
+
}
|
|
12655
|
+
}
|
|
12640
12656
|
const voltAgent = collectVoltAgentMetadataFromSources(record);
|
|
12641
12657
|
if (!voltAgent) {
|
|
12642
12658
|
return void 0;
|
|
@@ -12647,6 +12663,12 @@ function resolveThresholdFromMetadata(metadata) {
|
|
|
12647
12663
|
__name(resolveThresholdFromMetadata, "resolveThresholdFromMetadata");
|
|
12648
12664
|
function resolveThresholdPassedFromMetadata(metadata) {
|
|
12649
12665
|
const record = isPlainRecord(metadata) ? metadata : void 0;
|
|
12666
|
+
if (record?.scorer && isPlainRecord(record.scorer)) {
|
|
12667
|
+
const scorerMetadata = record.scorer;
|
|
12668
|
+
if (typeof scorerMetadata.thresholdPassed === "boolean") {
|
|
12669
|
+
return scorerMetadata.thresholdPassed;
|
|
12670
|
+
}
|
|
12671
|
+
}
|
|
12650
12672
|
const voltAgent = collectVoltAgentMetadataFromSources(record);
|
|
12651
12673
|
if (!voltAgent) {
|
|
12652
12674
|
return null;
|