bluewinliang commited on
Commit
88d5f7c
·
verified ·
1 Parent(s): 7488864

Update app/core/response_handlers.py

Browse files
Files changed (1) hide show
  1. app/core/response_handlers.py +2 -3
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 = re.sub(r'^\s*>\s*(?!>)', '', content, flags=re.MULTILINE)
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: