@arizeai/phoenix-evals 0.6.2 → 0.6.5

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.
@@ -2,7 +2,7 @@ import { EvaluatorBase } from "../core/EvaluatorBase";
2
2
  import { EvaluationKind, OptimizationDirection, TelemetryConfig } from "../types";
3
3
  type AnyFn = (...args: any[]) => any;
4
4
  /**
5
- * Options for creating a custom evaluator using {@link CreateEvaluator}.
5
+ * Options for creating a custom evaluator using {@link createEvaluator}.
6
6
  *
7
7
  * @public
8
8
  */
@@ -15,7 +15,7 @@ export type CreateEvaluatorOptions = {
15
15
  *
16
16
  * @example
17
17
  * ```typescript
18
- * const evaluator = CreateEvaluator(myFunction, { name: "custom-metric" });
18
+ * const evaluator = createEvaluator(myFunction, { name: "custom-metric" });
19
19
  * ```
20
20
  */
21
21
  name?: string;
@@ -29,7 +29,7 @@ export type CreateEvaluatorOptions = {
29
29
  *
30
30
  * @example
31
31
  * ```typescript
32
- * const evaluator = CreateEvaluator(myFunction, { kind: "CODE" });
32
+ * const evaluator = createEvaluator(myFunction, { kind: "CODE" });
33
33
  * ```
34
34
  */
35
35
  kind?: EvaluationKind;
@@ -43,7 +43,7 @@ export type CreateEvaluatorOptions = {
43
43
  *
44
44
  * @example
45
45
  * ```typescript
46
- * const evaluator = CreateEvaluator(myFunction, {
46
+ * const evaluator = createEvaluator(myFunction, {
47
47
  * optimizationDirection: "MAXIMIZE"
48
48
  * });
49
49
  * ```
@@ -60,7 +60,7 @@ export type CreateEvaluatorOptions = {
60
60
  *
61
61
  * @example
62
62
  * ```typescript
63
- * const evaluator = CreateEvaluator(myFunction, {
63
+ * const evaluator = createEvaluator(myFunction, {
64
64
  * telemetry: { isEnabled: true, tracer: myTracer }
65
65
  * });
66
66
  * ```
@@ -101,7 +101,7 @@ export type CreateEvaluatorOptions = {
101
101
  * @example
102
102
  * Basic usage with a simple scoring function:
103
103
  * ```typescript
104
- * const accuracyEvaluator = CreateEvaluator(
104
+ * const accuracyEvaluator = createEvaluator(
105
105
  * ({ output, expected }) => {
106
106
  * return output === expected ? 1 : 0;
107
107
  * },
@@ -123,7 +123,7 @@ export type CreateEvaluatorOptions = {
123
123
  * @example
124
124
  * Returning a full EvaluationResult:
125
125
  * ```typescript
126
- * const qualityEvaluator = CreateEvaluator(
126
+ * const qualityEvaluator = createEvaluator(
127
127
  * ({ output }) => {
128
128
  * const score = calculateQuality(output);
129
129
  * return {
@@ -41,7 +41,7 @@ function generateUniqueName() {
41
41
  * @example
42
42
  * Basic usage with a simple scoring function:
43
43
  * ```typescript
44
- * const accuracyEvaluator = CreateEvaluator(
44
+ * const accuracyEvaluator = createEvaluator(
45
45
  * ({ output, expected }) => {
46
46
  * return output === expected ? 1 : 0;
47
47
  * },
@@ -63,7 +63,7 @@ function generateUniqueName() {
63
63
  * @example
64
64
  * Returning a full EvaluationResult:
65
65
  * ```typescript
66
- * const qualityEvaluator = CreateEvaluator(
66
+ * const qualityEvaluator = createEvaluator(
67
67
  * ({ output }) => {
68
68
  * const score = calculateQuality(output);
69
69
  * return {
@@ -1,2 +1,4 @@
1
+ export * from "./asEvaluatorFn";
1
2
  export * from "./createEvaluator";
3
+ export * from "./toEvaluationResult";
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
@@ -14,5 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./asEvaluatorFn"), exports);
17
18
  __exportStar(require("./createEvaluator"), exports);
19
+ __exportStar(require("./toEvaluationResult"), exports);
18
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,oDAAkC;AAClC,uDAAqC"}