Skip to content

Commit cd76743

Browse files
authored
add missing await in AI.js (#4486)
1 parent 7935822 commit cd76743

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/helper/AI.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class AI extends Helper {
7474
for (const chunk of htmlChunks) {
7575
const messages = [
7676
{ role: gtpRole.user, content: prompt },
77-
{ role: gtpRole.user, content: `Within this HTML: ${minifyHtml(chunk)}` },
77+
{ role: gtpRole.user, content: `Within this HTML: ${await minifyHtml(chunk)}` },
7878
]
7979

8080
if (htmlChunks.length > 1)
@@ -110,7 +110,7 @@ class AI extends Helper {
110110

111111
const messages = [
112112
{ role: gtpRole.user, content: prompt },
113-
{ role: gtpRole.user, content: `Within this HTML: ${minifyHtml(html)}` },
113+
{ role: gtpRole.user, content: `Within this HTML: ${await minifyHtml(html)}` },
114114
]
115115

116116
const response = await this._processAIRequest(messages)

0 commit comments

Comments
 (0)