Преглед изворни кода

Associate Vector store with thread document

Shun Miyazawa пре 1 година
родитељ
комит
5b9f8c61b9
1 измењених фајлова са 6 додато и 0 уклоњено
  1. 6 0
      apps/app/src/features/openai/server/models/thread-relation.ts

+ 6 - 0
apps/app/src/features/openai/server/models/thread-relation.ts

@@ -12,6 +12,7 @@ const generateExpirationDate = (): Date => {
 
 
 interface ThreadRelation {
 interface ThreadRelation {
   userId: mongoose.Types.ObjectId;
   userId: mongoose.Types.ObjectId;
+  vectorStore: mongoose.Types.ObjectId;
   threadId: string;
   threadId: string;
   expiredAt: Date;
   expiredAt: Date;
 }
 }
@@ -30,6 +31,11 @@ const schema = new Schema<ThreadRelationDocument, ThreadRelationModel>({
     ref: 'User',
     ref: 'User',
     required: true,
     required: true,
   },
   },
+  vectorStore: {
+    type: Schema.Types.ObjectId,
+    ref: 'VectorStore',
+    required: true,
+  },
   threadId: {
   threadId: {
     type: String,
     type: String,
     required: true,
     required: true,