hotfix Gemini finish twice. #4955 #4966

This commit is contained in:
lloydzhou 2024-07-10 18:59:44 +08:00
parent 844025ec14
commit 6885812d21
1 changed files with 4 additions and 2 deletions

View File

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