Merge pull request from ConnectAI-E/hotfix/google

hotfix Gemini finish twice.  
This commit is contained in:
Lloyd Zhou 2024-07-10 20:19:29 +08:00 committed by GitHub
commit ba6039fc8b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions
app/client/platforms

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