Spaces:
Running
Running
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
| 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("&", "&").replace("<", "<").replace(">", ">")
|
| 202 |
scroll_script = """<script>
|
| 203 |
(function() {
|
| 204 |
var el = document.getElementById('thinking-stream');
|