Skip to content

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

chore: no default score source in db (#1403)

Marc Klingen9b271f0b78a9
diff --git a/web/prisma/generated/types.ts b/web/prisma/generated/types.ts
index 05968626e8..d0758fc315 100644
--- a/web/prisma/generated/types.ts
+++ b/web/prisma/generated/types.ts
@@ -264,7 +264,7 @@ export type Score = {
timestamp: Generated<Timestamp>;
name: string;
value: number;
- source: Generated<ScoreSource>;
+ source: ScoreSource;
comment: string | null;
trace_id: string;
observation_id: string | null;
diff --git a/web/prisma/migrations/20240312195727_score_source_drop_default/migration.sql b/web/prisma/migrations/20240312195727_score_source_drop_default/migration.sql
new file mode 100644
index 0000000000..1e253f6cea
--- /dev/null
+++ b/web/prisma/migrations/20240312195727_score_source_drop_default/migration.sql
@@ -0,0 +1,2 @@
+-- AlterTable
+ALTER TABLE "scores" ALTER COLUMN "source" DROP DEFAULT;
diff --git a/web/prisma/schema.prisma b/web/prisma/schema.prisma
index 35ac0e57a9..9521ec40cb 100644
--- a/web/prisma/schema.prisma
+++ b/web/prisma/schema.prisma
@@ -296,7 +296,7 @@ model Score {
timestamp DateTime @default(now())
name String
value Float
- source ScoreSource @default(API)
+ source ScoreSource
comment String?
traceId String @map("trace_id")
trace Trace @relation(fields: [traceId], references: [id], onDelete: Cascade)
diff --git a/worker/generated/types.ts b/worker/generated/types.ts
index d05dcf086c..d0758fc315 100644
--- a/worker/generated/types.ts
+++ b/worker/generated/types.ts
@@ -264,7 +264,7 @@ export type Score = {
timestamp: Generated<Timestamp>;
name: string;
value: number;
- source: ScoreSource | null;
+ source: ScoreSource;
comment: string | null;
trace_id: string;
observation_id: string | null;