Spaces:
Paused
Paused
Update app/core/response_handlers.py
Browse files
app/core/response_handlers.py
CHANGED
|
@@ -4,7 +4,6 @@ Response handlers for streaming and non-streaming responses
|
|
| 4 |
|
| 5 |
import json
|
| 6 |
import time
|
| 7 |
-
import re
|
| 8 |
from typing import Generator, Optional
|
| 9 |
import requests
|
| 10 |
from fastapi import HTTPException
|
|
@@ -460,8 +459,8 @@ class NonStreamResponseHandler(ResponseHandler):
|
|
| 460 |
|
| 461 |
if upstream_data.data.phase == "thinking":
|
| 462 |
content = transform_thinking_content(content)
|
| 463 |
-
# 移除
|
| 464 |
-
content =
|
| 465 |
|
| 466 |
# 处理思考内容的分块格式
|
| 467 |
if not self.in_thinking_phase:
|
|
|
|
| 4 |
|
| 5 |
import json
|
| 6 |
import time
|
|
|
|
| 7 |
from typing import Generator, Optional
|
| 8 |
import requests
|
| 9 |
from fastapi import HTTPException
|
|
|
|
| 459 |
|
| 460 |
if upstream_data.data.phase == "thinking":
|
| 461 |
content = transform_thinking_content(content)
|
| 462 |
+
# 移除引用
|
| 463 |
+
content = content.lstrip('> ')
|
| 464 |
|
| 465 |
# 处理思考内容的分块格式
|
| 466 |
if not self.in_thinking_phase:
|