Ver Fonte

not optional

Shun Miyazawa há 1 ano atrás
pai
commit
0c7d9154d9
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      apps/app/src/server/service/openai/openai.ts

+ 1 - 1
apps/app/src/server/service/openai/openai.ts

@@ -63,7 +63,7 @@ class OpenaiService implements IOpenaiService {
     });
     });
 
 
     // create vector store file
     // create vector store file
-    if (page.grant === PageGrant.GRANT_PUBLIC && page.revision != null && isPopulated(page?.revision)) {
+    if (page.grant === PageGrant.GRANT_PUBLIC && page.revision != null && isPopulated(page.revision)) {
       const file = await toFile(Readable.from(page.revision.body), `${page._id}.md`);
       const file = await toFile(Readable.from(page.revision.body), `${page._id}.md`);
       const res = await this.client.uploadAndPoll([file]);
       const res = await this.client.uploadAndPoll([file]);
       logger.debug('create vector store: ', res);
       logger.debug('create vector store: ', res);