Explorar o código

Recreate VectorStoreFile after deletion

Shun Miyazawa hai 1 ano
pai
achega
e05d911cf0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      apps/app/src/features/openai/server/services/openai.ts

+ 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);
     }
   }