From 2ba1799e464eb8bb7d565831cb28a4d3de67c7c1 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 2 Mar 2024 06:10:59 +0800 Subject: [PATCH] Fix the bug: the prompt.id in conversationKey are undefined Now it's like: --------conversationKey start--------- provider.id:undefined --------conversationKey end--------- In fact, it should be --------conversationKey start--------- provider.id:prompt.id --------conversationKey end--------- --- src/evaluator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evaluator.ts b/src/evaluator.ts index a432bce489..2c186fc75a 100644 --- a/src/evaluator.ts +++ b/src/evaluator.ts @@ -483,7 +483,7 @@ class Evaluator { for (let repeatIndex = 0; repeatIndex < numRepeat; repeatIndex++) { for (const vars of varCombinations) { let colIndex = 0; - for (const prompt of testSuite.prompts) { + for (const prompt of prompts) { for (const provider of testSuite.providers) { if (testSuite.providerPromptMap) { const allowedPrompts = testSuite.providerPromptMap[provider.id()];