matthoffner commited on
Commit
c269b6a
1 Parent(s): 4af5a43

Update utils/server/index.ts

Browse files
Files changed (1) hide show
  1. utils/server/index.ts +1 -1
utils/server/index.ts CHANGED
@@ -77,7 +77,7 @@ export const OpenAIStream = async (
77
  console.log(event);
78
  if (event.type === 'event') {
79
  const data = event.data;
80
- if (data === '<|end|>') {
81
  controller.close();
82
  return;
83
  }
 
77
  console.log(event);
78
  if (event.type === 'event') {
79
  const data = event.data;
80
+ if (data === '<|end|>' || data === '[DONE]') {
81
  controller.close();
82
  return;
83
  }