Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,12 +50,13 @@ def respond(
|
|
| 50 |
|
| 51 |
for event in completion:
|
| 52 |
if hasattr(event.choices[0].delta, 'reasoning_content'):
|
| 53 |
-
|
| 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 |
response += '> **η»ζζθ**\n\n'
|
| 60 |
is_reasoning_end = False
|
| 61 |
token = event.choices[0].delta.content# Wrap content in a span with a normal color
|
|
|
|
| 50 |
|
| 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
|