Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix: fix score source public api filter (#4520)

Max Deichmann7aff8e0c26f4
diff --git a/web/src/pages/api/public/scores/index.ts b/web/src/pages/api/public/scores/index.ts
index d29a36e713..82af43d567 100644
--- a/web/src/pages/api/public/scores/index.ts
+++ b/web/src/pages/api/public/scores/index.ts
@@ -111,7 +111,7 @@ export default withMiddlewares({
? Prisma.sql`AND s."timestamp" < ${toTimestamp}::timestamp with time zone at time zone 'UTC'`
: Prisma.empty;
const sourceCondition = source
- ? Prisma.sql`AND s."source" = ${source}`
+ ? Prisma.sql`AND s."source" = ${source}::"ScoreSource"`
: Prisma.empty;
const valueCondition =
operator && value !== null && value !== undefined