Shun Miyazawa 1 год назад
Родитель
Сommit
9167954b6c
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      apps/app/src/features/openai/server/models/ai-assistant.ts

+ 6 - 0
apps/app/src/features/openai/server/models/ai-assistant.ts

@@ -39,6 +39,7 @@ interface AiAssistant {
   instruction?: string
   vectorStoreId: string // VectorStoreId of OpenAI Specify (https://platform.openai.com/docs/api-reference/vector-stores/object)
   types: AiAssistantType[]
+  creator: mongoose.Types.ObjectId
   grantedGroups: IGrantedGroup[];
   pages: mongoose.Types.ObjectId[]
   sharingScope: AiAssistantSharingScope
@@ -75,6 +76,11 @@ const schema = new Schema<AiAssistantDocument>(
       enum: Object.values(AiAssistantType),
       required: true,
     }],
+    creator: {
+      type: Schema.Types.ObjectId,
+      ref: 'User',
+      required: true,
+    },
     pages: [{
       type: Schema.Types.ObjectId,
       ref: 'Page',