style: auto-format with ruff [skip ci]
This commit is contained in:
parent
1249344156
commit
9844908b2c
@ -658,11 +658,11 @@ async def update_thread(
|
||||
)
|
||||
|
||||
|
||||
|
||||
# ================================
|
||||
# > === 附件管理分组 ===
|
||||
# ================================
|
||||
|
||||
|
||||
@chat.post("/thread/{thread_id}/attachments", response_model=AttachmentResponse)
|
||||
async def upload_thread_attachment(
|
||||
thread_id: str,
|
||||
|
||||
@ -13,10 +13,9 @@ from src.agents.common import BaseAgent, load_chat_model
|
||||
from src.agents.common.middlewares import RuntimeConfigMiddleware, SummaryOffloadMiddleware, save_attachments_to_fs
|
||||
from src.agents.common.tools import get_tavily_search
|
||||
from src.services.mcp_service import get_tools_from_all_servers
|
||||
from src.utils import logger
|
||||
|
||||
from .context import DeepContext
|
||||
from .prompts import DEEP_PROMPT
|
||||
from src.utils import logger
|
||||
|
||||
|
||||
def _create_fs_backend(rt):
|
||||
|
||||
@ -74,8 +74,8 @@ class BaseEmbeddingModel(ABC):
|
||||
task_id = hashstr(messages)
|
||||
self.embed_state[task_id] = {"status": "in-progress", "total": len(messages), "progress": 0}
|
||||
|
||||
#保留原有逻辑:
|
||||
#使用 asyncio.gather 并发执行所有 embedding 批次请求:
|
||||
# 保留原有逻辑:
|
||||
# 使用 asyncio.gather 并发执行所有 embedding 批次请求:
|
||||
# tasks = []
|
||||
# for i in range(0, len(messages), batch_size):
|
||||
# group_msg = messages[i : i + batch_size]
|
||||
@ -90,7 +90,7 @@ class BaseEmbeddingModel(ABC):
|
||||
# self.embed_state[task_id]["status"] = "completed"
|
||||
|
||||
# return data
|
||||
|
||||
|
||||
for i in range(0, len(messages), batch_size):
|
||||
group_msg = messages[i : i + batch_size]
|
||||
logger.info(f"Async encoding [{i}/{len(messages)}] messages (bsz={batch_size})")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user