mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-09-10 19:57:07 +00:00
Corrige a iteração sobre o modelo na função getAIResponse para aguardar a resolução da promessa antes de processar os chunks de resposta.
This commit is contained in:
parent
17f8a58267
commit
414f84599e
1 changed files with 1 additions and 1 deletions
|
@ -135,7 +135,7 @@ async function getAIResponse(prompt: string): Promise<Array<{
|
||||||
});
|
});
|
||||||
|
|
||||||
let fullResponse = '';
|
let fullResponse = '';
|
||||||
for await (const chunk of model) {
|
for await (const chunk of await model) {
|
||||||
fullResponse += chunk.text || '';
|
fullResponse += chunk.text || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue