diff --git a/js/package.json b/js/package.json index 565c83b71..12f97c49a 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "langsmith", - "version": "0.1.47", + "version": "0.1.48", "description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.", "packageManager": "yarn@1.22.19", "files": [ diff --git a/js/src/evaluation/_runner.ts b/js/src/evaluation/_runner.ts index bbdd0ead9..a73cc392d 100644 --- a/js/src/evaluation/_runner.ts +++ b/js/src/evaluation/_runner.ts @@ -673,11 +673,12 @@ export class _ExperimentManager { this.client._selectEvalResults(summaryEvalResult); aggregateFeedback.push(...flattenedResults); for (const result of flattenedResults) { - const { targetRunId, ...feedback } = result; + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { targetRunId, key, ...feedback } = result; const evaluatorInfo = feedback.evaluatorInfo; delete feedback.evaluatorInfo; - await this.client.createFeedback(null, "key", { + await this.client.createFeedback(null, key, { ...feedback, projectId: projectId, sourceInfo: evaluatorInfo, diff --git a/js/src/index.ts b/js/src/index.ts index 011bb450e..2c28b5915 100644 --- a/js/src/index.ts +++ b/js/src/index.ts @@ -12,4 +12,4 @@ export type { export { RunTree, type RunTreeConfig } from "./run_trees.js"; // Update using yarn bump-version -export const __version__ = "0.1.47"; +export const __version__ = "0.1.48"; diff --git a/js/src/tests/evaluate.int.test.ts b/js/src/tests/evaluate.int.test.ts index 98ab6c6c8..4d68b920c 100644 --- a/js/src/tests/evaluate.int.test.ts +++ b/js/src/tests/evaluate.int.test.ts @@ -266,7 +266,7 @@ test("evaluate can evaluate with summary evaluators", async () => { const runIds = runs.map(({ id }) => id).join(", "); const exampleIds = examples?.map(({ id }) => id).join(", "); return Promise.resolve({ - key: "key", + key: "MyCustomScore", score: 1, comment: `Runs: ${runIds} Examples: ${exampleIds}`, }); @@ -279,7 +279,7 @@ test("evaluate can evaluate with summary evaluators", async () => { }); expect(evalRes.summaryResults.results).toHaveLength(1); - expect(evalRes.summaryResults.results[0].key).toBe("key"); + expect(evalRes.summaryResults.results[0].key).toBe("MyCustomScore"); expect(evalRes.summaryResults.results[0].score).toBe(1); const allRuns = evalRes.results.map(({ run }) => run); const allExamples = evalRes.results.map(({ example }) => example);