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)