autoevals
Advanced tools
Comparing version 0.0.39 to 0.0.40
@@ -73,3 +73,7 @@ "use strict"; | ||
const currentSpan = globalThis.__inherited_braintrust_state.currentSpan.getStore(); | ||
return currentSpan.traced(name, (span) => callback(span.log), args); | ||
return currentSpan.traced( | ||
name, | ||
(span) => callback(span.log.bind(span)), | ||
args | ||
); | ||
} else { | ||
@@ -478,5 +482,13 @@ return callback(() => { | ||
}; | ||
Object.defineProperty(Levenshtein, "name", { | ||
value: "Levenshtein", | ||
configurable: true | ||
}); | ||
var LevenshteinScorer = (args) => { | ||
return Levenshtein(args); | ||
}; | ||
Object.defineProperty(LevenshteinScorer, "name", { | ||
value: "LevenshteinScorer", | ||
configurable: true | ||
}); | ||
var EmbeddingSimilarity = async (args) => { | ||
@@ -510,7 +522,11 @@ var _a, _b; | ||
return { | ||
name: "EmbeddingDistance", | ||
name: "EmbeddingSimilarity", | ||
score: scaleScore(score != null ? score : 0, expectedMin), | ||
error: score === null ? "EmbeddingDistance failed" : void 0 | ||
error: score === null ? "EmbeddingSimilarity failed" : void 0 | ||
}; | ||
}; | ||
Object.defineProperty(EmbeddingSimilarity, "name", { | ||
value: "EmbeddingSimilarity", | ||
configurable: true | ||
}); | ||
function scaleScore(score, expectedMin) { | ||
@@ -555,2 +571,6 @@ return Math.max((score - expectedMin) / (1 - expectedMin), 0); | ||
}; | ||
Object.defineProperty(NumericDiff, "name", { | ||
value: "NumericDiff", | ||
configurable: true | ||
}); | ||
@@ -569,2 +589,6 @@ // js/json.ts | ||
}; | ||
Object.defineProperty(JSONDiff, "name", { | ||
value: "JSONDiff", | ||
configurable: true | ||
}); | ||
async function jsonDiff(o1, o2, stringScorer, numberScorer) { | ||
@@ -571,0 +595,0 @@ if (isObject(o1) && isObject(o2)) { |
{ | ||
"name": "autoevals", | ||
"version": "0.0.39", | ||
"version": "0.0.40", | ||
"description": "Universal library for evaluating AI models", | ||
@@ -31,17 +31,17 @@ "main": "./jsdist/index.js", | ||
"devDependencies": { | ||
"@types/jest": "^29.5.3", | ||
"@types/js-levenshtein": "^1.1.1", | ||
"@types/js-yaml": "^4.0.5", | ||
"@types/mustache": "^4.2.2", | ||
"jest": "^29.6.1", | ||
"@types/jest": "^29.5.11", | ||
"@types/js-levenshtein": "^1.1.3", | ||
"@types/js-yaml": "^4.0.9", | ||
"@types/mustache": "^4.2.5", | ||
"jest": "^29.7.0", | ||
"jest-text-transformer": "^1.0.4", | ||
"ts-jest": "^29.1.1", | ||
"tsup": "^8.0.1", | ||
"typedoc": "^0.24.8", | ||
"typedoc-plugin-markdown": "^3.15.3", | ||
"typescript": "^5.1.6" | ||
"typedoc": "^0.25.4", | ||
"typedoc-plugin-markdown": "^3.17.1", | ||
"typescript": "^5.3.3" | ||
}, | ||
"dependencies": { | ||
"@braintrust/core": "^0.0.6", | ||
"@types/node": "^20.4.4", | ||
"@types/node": "^20.10.5", | ||
"compute-cosine-similarity": "^1.1.0", | ||
@@ -51,5 +51,5 @@ "js-levenshtein": "^1.1.6", | ||
"mustache": "^4.2.0", | ||
"openai": "^4.23.0", | ||
"tsx": "^3.12.7" | ||
"openai": "4.23.0", | ||
"tsx": "^3.14.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62521
1465
+ Addedbase-64@0.1.0(transitive)
+ Addedcharenc@0.0.2(transitive)
+ Addedcrypt@0.0.2(transitive)
+ Addeddigest-fetch@1.3.0(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedmd5@2.3.0(transitive)
+ Addedopenai@4.23.0(transitive)
+ Addedweb-streams-polyfill@3.3.3(transitive)
- Removedopenai@4.76.3(transitive)
Updated@types/node@^20.10.5
Updatedopenai@4.23.0
Updatedtsx@^3.14.0