Skip to content

Commit

Permalink
fix: google stream stop
Browse files Browse the repository at this point in the history
  • Loading branch information
李兴广 committed Dec 29, 2023
1 parent e1fa797 commit 30b3baf
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/providers/google/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ export const parseStream = (rawResponse: Response) => {
const text = json.candidates[0].content.parts[0].text || ''
const queue = encoder.encode(text)
controller.enqueue(queue)
if (json.candidates[0].finishReason === 'STOP')
setTimeout(() => controller.close(), 300)
} catch (e) {
controller.error(e)
}
Expand Down

0 comments on commit 30b3baf

Please sign in to comment.