This commit is contained in:
GH Action - Upstream Sync 2024-07-11 00:34:24 +00:00
commit 7887bb6e10

View File

@ -154,8 +154,10 @@ export class GeminiProApi implements LLMApi {
let finished = false;
const finish = () => {
finished = true;
options.onFinish(responseText + remainText);
if (!finished) {
finished = true;
options.onFinish(responseText + remainText);
}
};
// animate response to make it looks smooth