akiko19191 commited on
Commit
08570c4
·
verified ·
1 Parent(s): de74166

Update utils/llms.py

Browse files
Files changed (1) hide show
  1. utils/llms.py +1 -1
utils/llms.py CHANGED
@@ -162,7 +162,7 @@ def gpt4stream(messages,model,api_keys):
162
  cunk=""
163
  for part in response:
164
  cunk=cunk+(part.choices[0].delta.content or "")
165
- x=part.choices[0].delta.content
166
  x=x.replace('>','\n </think> \n ')
167
  if "```json" not in cunk:
168
  helper.q.put_nowait(x or "")
 
162
  cunk=""
163
  for part in response:
164
  cunk=cunk+(part.choices[0].delta.content or "")
165
+ x=str(part.choices[0].delta.content)
166
  x=x.replace('>','\n </think> \n ')
167
  if "```json" not in cunk:
168
  helper.q.put_nowait(x or "")