Shun Miyazawa 1 год назад
Родитель
Сommit
70f07d0f59

+ 2 - 0
apps/app/src/features/openai/interfaces/thread-relation.ts

@@ -1,10 +1,12 @@
 import type { IUser, Ref, HasObjectId } from '@growi/core';
 import type { IUser, Ref, HasObjectId } from '@growi/core';
 
 
+import type { AiAssistant } from './ai-assistant';
 import type { IVectorStore } from './vector-store';
 import type { IVectorStore } from './vector-store';
 
 
 export interface IThreadRelation {
 export interface IThreadRelation {
   userId: Ref<IUser>
   userId: Ref<IUser>
   vectorStore: Ref<IVectorStore>
   vectorStore: Ref<IVectorStore>
+  aiAssistant: Ref<AiAssistant>
   threadId: string;
   threadId: string;
   title?: string;
   title?: string;
   expiredAt: Date;
   expiredAt: Date;

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

@@ -25,6 +25,11 @@ const schema = new Schema<ThreadRelationDocument, ThreadRelationModel>({
     ref: 'User',
     ref: 'User',
     required: true,
     required: true,
   },
   },
+  aiAssistant: {
+    type: Schema.Types.ObjectId,
+    ref: 'AiAssistant',
+    required: true,
+  },
   vectorStore: {
   vectorStore: {
     type: Schema.Types.ObjectId,
     type: Schema.Types.ObjectId,
     ref: 'VectorStore',
     ref: 'VectorStore',