yangtb24 commited on
Commit
27ad875
·
verified ·
1 Parent(s): 95146e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -456,9 +456,9 @@ def handsome_chat_completions():
456
  ):
457
  delta = response_json["choices"][0].get("delta", {})
458
  new_content = ""
459
- if "reasoning_content" in delta:
460
  new_content += "> " + delta["reasoning_content"]
461
- if "content" in delta:
462
  new_content += delta["content"]
463
 
464
  if new_content:
 
456
  ):
457
  delta = response_json["choices"][0].get("delta", {})
458
  new_content = ""
459
+ if "reasoning_content" in delta and delta["reasoning_content"] is not None:
460
  new_content += "> " + delta["reasoning_content"]
461
+ if "content" in delta and delta["content"] is not None:
462
  new_content += delta["content"]
463
 
464
  if new_content: