Update app.py
Browse files
app.py
CHANGED
@@ -46,8 +46,7 @@ def respond(
|
|
46 |
delta = message['choices'][0]['delta']
|
47 |
if 'content' in delta:
|
48 |
response += delta['content']
|
49 |
-
formatted_response = re.sub(r
|
50 |
-
print(f"*- {response}")
|
51 |
yield formatted_response
|
52 |
|
53 |
|
|
|
46 |
delta = message['choices'][0]['delta']
|
47 |
if 'content' in delta:
|
48 |
response += delta['content']
|
49 |
+
formatted_response = re.sub(r"<think>\s*(.*?)\s*</think>", r"*\1*", response, flags=re.DOTALL)
|
|
|
50 |
yield formatted_response
|
51 |
|
52 |
|