Spaces:
Building
Building
Update utils/llms.py
Browse files- 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 "")
|