Skip to content

Commit

Permalink
fix: ChatGPT never stop
Browse files Browse the repository at this point in the history
close #542
  • Loading branch information
sunner committed Sep 13, 2023
1 parent 30ab813 commit 91b1a36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bots/openai/ChatGPTBot.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export default class ChatGPTBot extends Bot {
let preInfo = [];
source.addEventListener("message", (event) => {
const regex = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{6}$/;
if (event.data === "[DONE]") {
if (event.data.trim() === "[DONE]") {
onUpdateResponse(callbackParam, { done: true });
source.close();
resolve();
Expand Down

1 comment on commit 91b1a36

@vercel
Copy link

@vercel vercel bot commented on 91b1a36 Sep 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

chatall – ./

chatall-git-main-sunner.vercel.app
chatall-llm.vercel.app
chatall-sunner.vercel.app

Please sign in to comment.