Spaces:
Runtime error
Runtime error
File size: 3,391 Bytes
de38977 |
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 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
generator client {
provider = "prisma-client-js"
interface = "asyncio"
recursive_type_depth = 5
previewFeatures = ["postgresqlExtensions"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
// Prisma migrations run through the direct URL. Replace as needed.
directUrl = env("DATABASE_URL")
extensions = [pgcrypto]
}
model Element {
id String @id @default(dbgenerated("gen_random_uuid()"))
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
threadId String?
stepId String
metadata Json
mime String?
name String
objectKey String?
url String?
step Step @relation(fields: [stepId], references: [id], onDelete: Cascade)
thread Thread? @relation(fields: [threadId], references: [id], onDelete: Cascade)
chainlitKey String?
display String?
size String?
language String?
page Int?
props Json?
@@index([stepId])
@@index([threadId])
}
model User {
id String @id @default(dbgenerated("gen_random_uuid()"))
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
metadata Json
identifier String
threads Thread[]
@@unique([identifier])
@@index([identifier])
}
model Feedback {
id String @id @default(dbgenerated("gen_random_uuid()"))
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
stepId String?
Step Step? @relation(fields: [stepId], references: [id])
name String
value Float
comment String?
@@index(createdAt)
@@index(name)
@@index(stepId)
@@index(value)
@@index([name, value])
}
model Step {
id String @id @default(dbgenerated("gen_random_uuid()"))
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
parentId String?
threadId String?
input String?
metadata Json
name String?
output String?
type StepType
showInput String? @default("json")
isError Boolean? @default(false)
startTime DateTime
endTime DateTime
elements Element[]
parent Step? @relation("ParentChild", fields: [parentId], references: [id], onDelete: Cascade)
children Step[] @relation("ParentChild")
thread Thread? @relation(fields: [threadId], references: [id], onDelete: Cascade)
Feedback Feedback[]
@@index([createdAt])
@@index([endTime])
@@index([parentId])
@@index([startTime])
@@index([threadId])
@@index([type])
@@index([name])
@@index([threadId, startTime, endTime])
}
model Thread {
id String @id @default(dbgenerated("gen_random_uuid()"))
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
deletedAt DateTime?
name String?
metadata Json
tags String[] @default([])
elements Element[]
userId String?
User User? @relation(fields: [userId], references: [id])
steps Step[]
@@index([createdAt])
@@index([name])
}
enum StepType {
assistant_message
embedding
llm
retrieval
rerank
run
system_message
tool
undefined
user_message
} |