From 7209e5797d558b307a3059ddcdd20decac6b5023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Sans=C3=B3n?= Date: Mon, 28 Oct 2024 15:57:03 +0100 Subject: [PATCH] Simpler evaluations - part 1.2 --- .../src/services/evaluations/create.test.ts | 18 +++++++++--------- .../core/src/services/evaluations/create.ts | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/core/src/services/evaluations/create.test.ts b/packages/core/src/services/evaluations/create.test.ts index 6a0227ffd..fd341d088 100644 --- a/packages/core/src/services/evaluations/create.test.ts +++ b/packages/core/src/services/evaluations/create.test.ts @@ -191,17 +191,17 @@ describe('createEvaluation', () => { ...evaluation, name, description, - configuration: { - type: EvaluationResultableType.Number, - detail: { - range: { - from: 0, - to: 100, - }, - }, - }, metadata: { ...evaluation.metadata, + configuration: { + type: EvaluationResultableType.Number, + detail: { + range: { + from: 0, + to: 100, + }, + }, + }, prompt: ` --- provider: ${provider!.name} diff --git a/packages/core/src/services/evaluations/create.ts b/packages/core/src/services/evaluations/create.ts index 66a8c67e3..0a4dff4f6 100644 --- a/packages/core/src/services/evaluations/create.ts +++ b/packages/core/src/services/evaluations/create.ts @@ -74,6 +74,7 @@ ${meta.prompt} metadataTable = await tx .insert(evaluationMetadataLlmAsJudgeLegacy) .values({ + configuration, prompt: promptWithProvider, templateId: meta.templateId, }) @@ -90,7 +91,6 @@ ${meta.prompt} .insert(evaluations) .values([ { - configuration, description, metadataId: metadataTable[0]!.id, metadataType: type,