Spaces:
Sleeping
Sleeping
Jonathan Bejarano
commited on
Commit
·
77e482a
1
Parent(s):
8d0993b
last local fix
Browse files
app.py
CHANGED
|
@@ -230,6 +230,7 @@ def clean_response(response):
|
|
| 230 |
response = re.sub(r'<\|channel\|>commentary to=assistant', '', response, flags=re.IGNORECASE)
|
| 231 |
response = re.sub(r'<\|constrain\|>json<\|message\|>', '', response, flags=re.IGNORECASE)
|
| 232 |
response = re.sub(r'<\|.*?\|>', '', response) # Remove any other <|...|> patterns
|
|
|
|
| 233 |
|
| 234 |
# Try to parse JSON response and extract the actual message
|
| 235 |
try:
|
|
|
|
| 230 |
response = re.sub(r'<\|channel\|>commentary to=assistant', '', response, flags=re.IGNORECASE)
|
| 231 |
response = re.sub(r'<\|constrain\|>json<\|message\|>', '', response, flags=re.IGNORECASE)
|
| 232 |
response = re.sub(r'<\|.*?\|>', '', response) # Remove any other <|...|> patterns
|
| 233 |
+
response = response.replace("\\n", "\n")
|
| 234 |
|
| 235 |
# Try to parse JSON response and extract the actual message
|
| 236 |
try:
|