veryfront 0.1.981 → 0.1.982

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/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.981",
3
+ "version": "0.1.982",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": {
@@ -1 +1 @@
1
- {"version":3,"file":"model-comparison.d.ts","sourceRoot":"","sources":["../../../src/src/eval/model-comparison.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,mBAAmB,EAEnB,0BAA0B,EAE1B,UAAU,EACX,MAAM,YAAY,CAAC;AAmkBpB,oFAAoF;AACpF,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,UAAU,EAAE,EACrB,OAAO,EAAE,0BAA0B,GAClC,mBAAmB,CAqBrB;AA0BD,gFAAgF;AAChF,wBAAgB,iCAAiC,CAAC,UAAU,EAAE,mBAAmB,GAAG,MAAM,CAmEzF"}
1
+ {"version":3,"file":"model-comparison.d.ts","sourceRoot":"","sources":["../../../src/src/eval/model-comparison.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,mBAAmB,EAEnB,0BAA0B,EAE1B,UAAU,EACX,MAAM,YAAY,CAAC;AAylBpB,oFAAoF;AACpF,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,UAAU,EAAE,EACrB,OAAO,EAAE,0BAA0B,GAClC,mBAAmB,CAqBrB;AA0BD,gFAAgF;AAChF,wBAAgB,iCAAiC,CAAC,UAAU,EAAE,mBAAmB,GAAG,MAAM,CAmEzF"}
@@ -411,14 +411,34 @@ function compareCandidate(candidate, baseline, options) {
411
411
  };
412
412
  }
413
413
  function pickRecommendation(candidates) {
414
- const promotable = candidates
415
- .filter((candidate) => candidate.decision === "promote-candidate")
416
- .sort((a, b) => (b.objectiveScore ?? 0) - (a.objectiveScore ?? 0))[0];
417
- if (promotable) {
414
+ const promotable = candidates.filter((candidate) => candidate.decision === "promote-candidate");
415
+ if (promotable.length === 1) {
416
+ const candidate = promotable[0];
417
+ if (candidate) {
418
+ return {
419
+ decision: "promote-candidate",
420
+ model: candidate.model,
421
+ reasons: candidate.reasons,
422
+ };
423
+ }
424
+ }
425
+ if (promotable.length > 1) {
426
+ const scoredPromotable = promotable
427
+ .filter((candidate) => candidate.objectiveScore !== undefined)
428
+ .sort((a, b) => (b.objectiveScore ?? 0) - (a.objectiveScore ?? 0))[0];
429
+ if (scoredPromotable) {
430
+ return {
431
+ decision: "promote-candidate",
432
+ model: scoredPromotable.model,
433
+ reasons: scoredPromotable.reasons,
434
+ };
435
+ }
418
436
  return {
419
437
  decision: "promote-candidate",
420
- model: promotable.model,
421
- reasons: promotable.reasons,
438
+ reasons: [
439
+ `multiple candidate models are promotable: ${promotable.map((candidate) => candidate.model).join(", ")}`,
440
+ "configure --comparison-policy objectives to rank candidates by your product requirements",
441
+ ],
422
442
  };
423
443
  }
424
444
  const needsReview = candidates.find((candidate) => candidate.decision === "needs-review");
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.981";
2
+ export declare const VERSION = "0.1.982";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.981";
4
+ export const VERSION = "0.1.982";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.981",
3
+ "version": "0.1.982",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",