Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#4968 from ConnectAI-E/hotfix/google
Browse files Browse the repository at this point in the history
hotfix Gemini finish twice. ChatGPTNextWeb#4955 ChatGPTNextWeb#4966
  • Loading branch information
lloydzhou authored Jul 10, 2024
2 parents 844025e + 6885812 commit ba6039f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/client/platforms/google.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ba6039f

Please sign in to comment.