Shun Miyazawa 1 год назад
Родитель
Сommit
67c8fe77a5
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      apps/app/src/features/openai/server/services/openai.ts

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

@@ -157,7 +157,7 @@ class OpenaiService implements IOpenaiService {
   // }
 
   private async uploadFile(pageId: Types.ObjectId, body: string): Promise<OpenAI.Files.FileObject> {
-    const sanitizedMarkdown = sanitizeMarkdown(body);
+    const sanitizedMarkdown = await sanitizeMarkdown(body);
     const file = await toFile(Readable.from(sanitizedMarkdown), `${pageId}.md`);
     const uploadedFile = await this.client.uploadFile(file);
     return uploadedFile;