From cd76743f856bf8d7008a6612e255e6f2b9a16b34 Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 4 Sep 2024 15:54:55 +0200 Subject: [PATCH] add missing await in AI.js (#4486) --- lib/helper/AI.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/helper/AI.js b/lib/helper/AI.js index d59b15531..4b2d75978 100644 --- a/lib/helper/AI.js +++ b/lib/helper/AI.js @@ -74,7 +74,7 @@ class AI extends Helper { for (const chunk of htmlChunks) { const messages = [ { role: gtpRole.user, content: prompt }, - { role: gtpRole.user, content: `Within this HTML: ${minifyHtml(chunk)}` }, + { role: gtpRole.user, content: `Within this HTML: ${await minifyHtml(chunk)}` }, ] if (htmlChunks.length > 1) @@ -110,7 +110,7 @@ class AI extends Helper { const messages = [ { role: gtpRole.user, content: prompt }, - { role: gtpRole.user, content: `Within this HTML: ${minifyHtml(html)}` }, + { role: gtpRole.user, content: `Within this HTML: ${await minifyHtml(html)}` }, ] const response = await this._processAIRequest(messages)