-
Notifications
You must be signed in to change notification settings - Fork 4
/
schema.prisma
87 lines (76 loc) · 2.92 KB
/
schema.prisma
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
generator client {
provider = "prisma-client-py"
recursive_type_depth = 5
output = "./database/prisma"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
enum CriteriaTypeEnum {
RANKING_CRITERIA
MULTI_SCORE
SCORE
MULTI_SELECT
}
model Ground_Truth_Model {
id String @id @default(uuid())
request_id String
obfuscated_model_id String
real_model_id String
rank_id Int
feedback_request Feedback_Request_Model @relation(fields: [feedback_request_id], references: [id])
feedback_request_id String
created_at DateTime @default(now())
updated_at DateTime @updatedAt
@@unique([request_id, obfuscated_model_id, rank_id])
}
model Feedback_Request_Model {
id String @id @unique @default(uuid())
request_id String
prompt String
completions Completion_Response_Model[]
task_type String
criteria_types Criteria_Type_Model[]
is_processed Boolean @default(false)
dojo_task_id String?
hotkey String
expire_at DateTime
created_at DateTime @default(now())
updated_at DateTime @updatedAt
ground_truths Ground_Truth_Model[]
parent_request Feedback_Request_Model? @relation("ParentChild", fields: [parent_id], references: [id])
parent_id String?
child_requests Feedback_Request_Model[] @relation("ParentChild")
@@unique([request_id, hotkey])
}
model Completion_Response_Model {
id String @id @default(uuid())
completion_id String
model String
completion Json
rank_id Int?
score Float?
created_at DateTime @default(now())
updated_at DateTime @updatedAt
feedback_request_relation Feedback_Request_Model @relation(fields: [feedback_request_id], references: [id])
feedback_request_id String
}
model Criteria_Type_Model {
id String @id @default(uuid())
type CriteriaTypeEnum
options Json
min Float?
max Float?
feedback_request_relation Feedback_Request_Model? @relation(fields: [feedback_request_id], references: [id])
feedback_request_id String?
created_at DateTime @default(now())
updated_at DateTime @updatedAt
}
model Score_Model {
id String @id @default(uuid())
// json array of scores
score Json
created_at DateTime @default(now())
updated_at DateTime @updatedAt
}