Skip to content

Commit

Permalink
add missing await in AI.js (#4486)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaculum committed Sep 4, 2024
1 parent 7935822 commit cd76743
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/helper/AI.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit cd76743

Please sign in to comment.