WinstonDeng commited on
Commit
55e196d
·
verified ·
1 Parent(s): ecf5360

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -196,7 +196,9 @@ def render_assistant_message(thinking: str, answer: str, is_streaming: bool = Fa
196
  """渲染助手消息(左侧)"""
197
  thinking_html = ""
198
  if thinking:
199
- escaped_thinking = thinking.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
 
 
200
  scroll_script = """<script>
201
  (function() {
202
  var el = document.getElementById('thinking-stream');
 
196
  """渲染助手消息(左侧)"""
197
  thinking_html = ""
198
  if thinking:
199
+ # 去掉 <think> 标签
200
+ cleaned_thinking = thinking.replace("<think>", "").replace("</think>", "")
201
+ escaped_thinking = cleaned_thinking.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
202
  scroll_script = """<script>
203
  (function() {
204
  var el = document.getElementById('thinking-stream');