Przeglądaj źródła

Recreate VectorStoreFile after deletion

Shun Miyazawa 10 miesięcy temu
rodzic
commit
e05d911cf0

+ 1 - 1
apps/app/src/features/openai/server/services/openai.ts

@@ -623,8 +623,8 @@ class OpenaiService implements IOpenaiService {
       logger.debug('-----------------------------------------------------');
 
       // Do not create a new VectorStoreFile if page is changed to a permission that AiAssistant does not have access to
-      await this.createVectorStoreFile(vectorStoreRelation as VectorStoreDocument, pagesToVectorize);
       await this.deleteVectorStoreFile((vectorStoreRelation as VectorStoreDocument)._id, page._id);
+      await this.createVectorStoreFile(vectorStoreRelation as VectorStoreDocument, pagesToVectorize);
     }
   }