Reevaluate all prompt stats when scenario is hidden (#32)
* Reevaluate when scenario is hidden * Add newline
This commit is contained in:
@@ -89,3 +89,11 @@ export const reevaluateEvaluation = async (evaluation: Evaluation) => {
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
export const reevaluateAll = async (experimentId: string) => {
|
||||
const evaluations = await prisma.evaluation.findMany({
|
||||
where: { experimentId },
|
||||
});
|
||||
|
||||
await Promise.all(evaluations.map(reevaluateEvaluation));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user