将模块导入放到顶上

pull/914/head
Bakadax 2025-05-02 22:36:27 +08:00
parent cf999792be
commit 76a37452a0
1 changed files with 1 additions and 2 deletions

View File

@ -1,3 +1,4 @@
import re
import json
from typing import Dict, Any, Optional
from src.common.logger_manager import get_logger
@ -103,8 +104,6 @@ async def analyze_chat_for_nicknames(
# 清理可能的 Markdown 代码块标记
response_content = response_content.strip()
# 使用正则表达式处理各种 Markdown 代码块情况
import re
markdown_code_regex = re.compile(r"^```(?:\w+)?\s*\n(.*?)\n\s*```$", re.DOTALL)
match = markdown_code_regex.match(response_content)
if match: