From 875098b9dea86d4b45ce21ab595b10d079e55a2e Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 4 Sep 2024 14:32:15 +0200 Subject: [PATCH] add missing await in AI.js --- 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)