feat: add initial backend and frontend structure with models, DTOs, and WebSocket events
This commit is contained in:
29
apps/backend/prisma/models/vectorMemory.prisma
Normal file
29
apps/backend/prisma/models/vectorMemory.prisma
Normal file
@@ -0,0 +1,29 @@
|
||||
// Vector memory for embeddings (conversation and character knowledge)
|
||||
|
||||
enum MemoryType {
|
||||
conversation
|
||||
character
|
||||
}
|
||||
|
||||
model VectorMemory {
|
||||
id String @id @default(uuid())
|
||||
content String
|
||||
embedding Unsupported("vector")?
|
||||
memoryType MemoryType @default(conversation)
|
||||
metadata Json?
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
conversationId String?
|
||||
conversation Conversation? @relation(fields: [conversationId], references: [id], onDelete: Cascade)
|
||||
|
||||
characterId String?
|
||||
character Character? @relation(fields: [characterId], references: [id], onDelete: Cascade)
|
||||
|
||||
knowledgeId String?
|
||||
knowledge CharacterKnowledge? @relation(fields: [knowledgeId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([conversationId])
|
||||
@@index([characterId])
|
||||
@@index([knowledgeId])
|
||||
@@index([memoryType])
|
||||
}
|
||||
Reference in New Issue
Block a user