hunyuan-t commited on
Commit
0cb2b69
·
verified ·
1 Parent(s): feec3e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -51,13 +51,13 @@ def respond(
51
  for event in completion:
52
  if hasattr(event.choices[0].delta, 'reasoning_content'):
53
  if is_reasoning_start:
54
- response += '> **开始思考**\n\n'
55
  is_reasoning_start = False
56
  token = event.choices[0].delta.reasoning_content# Wrap reasoning_content in a span with a lighter color
57
  response += f'<span style="color: #999999;">{token}</span>'
58
  else:
59
  if is_reasoning_end:
60
- response += '> **结束思考**\n\n'
61
  is_reasoning_end = False
62
  token = event.choices[0].delta.content# Wrap content in a span with a normal color
63
  response += f'<span style="color: #000000;">{token}</span>'
 
51
  for event in completion:
52
  if hasattr(event.choices[0].delta, 'reasoning_content'):
53
  if is_reasoning_start:
54
+ response += '> **Start thinking**\n\n'
55
  is_reasoning_start = False
56
  token = event.choices[0].delta.reasoning_content# Wrap reasoning_content in a span with a lighter color
57
  response += f'<span style="color: #999999;">{token}</span>'
58
  else:
59
  if is_reasoning_end:
60
+ response += '> **End thinking**\n\n'
61
  is_reasoning_end = False
62
  token = event.choices[0].delta.content# Wrap content in a span with a normal color
63
  response += f'<span style="color: #000000;">{token}</span>'