feat: update thinking format
Browse files
app.py
CHANGED
@@ -69,9 +69,9 @@ def respond(
|
|
69 |
|
70 |
if len(current_response) > 16:
|
71 |
if '<think>' in current_response:
|
72 |
-
current_response = current_response.replace('<think>', '```')
|
73 |
if '</think>' in current_response:
|
74 |
-
current_response = current_response.replace('</think>', '
|
75 |
if '**Final Answer**' in current_response:
|
76 |
current_response = current_response.replace('**Final Answer**', '')
|
77 |
|
@@ -84,9 +84,9 @@ def respond(
|
|
84 |
continue
|
85 |
if current_response:
|
86 |
if '<think>' in current_response:
|
87 |
-
current_response = current_response.replace('<think>', '```')
|
88 |
if '</think>' in current_response:
|
89 |
-
current_response = current_response.replace('</think>', '
|
90 |
if '**Final Answer**' in current_response:
|
91 |
current_response = current_response.replace('**Final Answer**', '')
|
92 |
|
|
|
69 |
|
70 |
if len(current_response) > 16:
|
71 |
if '<think>' in current_response:
|
72 |
+
current_response = current_response.replace('<think>', '<details><summary>Thinking</summary>\n\n```')
|
73 |
if '</think>' in current_response:
|
74 |
+
current_response = current_response.replace('</think>', '```\n\n</details>')
|
75 |
if '**Final Answer**' in current_response:
|
76 |
current_response = current_response.replace('**Final Answer**', '')
|
77 |
|
|
|
84 |
continue
|
85 |
if current_response:
|
86 |
if '<think>' in current_response:
|
87 |
+
current_response = current_response.replace('<think>', '<details><summary>思考过程</summary>\n\n```')
|
88 |
if '</think>' in current_response:
|
89 |
+
current_response = current_response.replace('</think>', '```\n\n</details>')
|
90 |
if '**Final Answer**' in current_response:
|
91 |
current_response = current_response.replace('**Final Answer**', '')
|
92 |
|