File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
src/app/api/assistant-modes Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -78,9 +78,20 @@ model AssistantMode {
78
78
createdAt DateTime @default (now () )
79
79
updatedAt DateTime @updatedAt
80
80
81
+ contexts AssistantModeContext []
81
82
chatRoom ChatRoom []
82
- llmProvider LLMProvider ? @relation (fields : [llmProviderId ] , references : [id ] )
83
- author User ? @relation (fields : [authorId ] , references : [id ] )
83
+ llmProvider LLMProvider ? @relation (fields : [llmProviderId ] , references : [id ] )
84
+ author User ? @relation (fields : [authorId ] , references : [id ] )
85
+ }
86
+
87
+ model AssistantModeContext {
88
+ id String @id @default (cuid () )
89
+ assistantModeId String
90
+ data String
91
+ createdAt DateTime @default (now () )
92
+ updatedAt DateTime @updatedAt
93
+
94
+ assistantMode AssistantMode @relation (fields : [assistantModeId ] , references : [id ] )
84
95
}
85
96
86
97
model LLMProvider {
Original file line number Diff line number Diff line change @@ -58,7 +58,12 @@ export async function POST(req: NextRequest) {
58
58
description : data . description ,
59
59
systemPrompt : data . systemPrompt ,
60
60
authorId : session . user . id ,
61
- visibility : 'PRIVATE'
61
+ visibility : 'PRIVATE' ,
62
+ contexts : {
63
+ create : {
64
+ data : data . context ,
65
+ }
66
+ }
62
67
}
63
68
} )
64
69
You can’t perform that action at this time.
0 commit comments