akiko19191 commited on
Commit
14cd71f
·
verified ·
1 Parent(s): 7394b15

Update utils/llms.py

Browse files
Files changed (1) hide show
  1. utils/llms.py +1 -0
utils/llms.py CHANGED
@@ -161,6 +161,7 @@ def gpt4stream(messages,model,api_keys):
161
  cunk=cunk+(part.choices[0].delta.content or "")
162
  if helper.stopped:
163
  helper.stopped=False
 
164
  break
165
  if "```json" not in cunk or "```" not in cunk:
166
  helper.q.put_nowait(part.choices[0].delta.content or "")
 
161
  cunk=cunk+(part.choices[0].delta.content or "")
162
  if helper.stopped:
163
  helper.stopped=False
164
+ helper.q.put_nowait("END")
165
  break
166
  if "```json" not in cunk or "```" not in cunk:
167
  helper.q.put_nowait(part.choices[0].delta.content or "")