mirror of
https://github.com/csunny/DB-GPT.git
synced 2026-07-16 17:15:22 +00:00
chore:fmt
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""QuestionManager — session-level pending question state with asyncio.Event blocking."""
|
||||
"""QuestionManager — pending question state with asyncio.Event."""
|
||||
|
||||
import asyncio
|
||||
import logging
|
||||
|
||||
@@ -127,7 +127,8 @@ def make_shell_interpreter(react_state: Dict[str, Any]):
|
||||
):
|
||||
ext = os.path.splitext(abs_path)[1].lower()
|
||||
if ext in IMAGE_EXTS:
|
||||
unique_name = f"{uuid.uuid4().hex[:8]}_{os.path.basename(abs_path)}"
|
||||
basename = os.path.basename(abs_path)
|
||||
unique_name = f"{uuid.uuid4().hex[:8]}_{basename}"
|
||||
dest = os.path.join(
|
||||
STATIC_MESSAGE_IMG_PATH, unique_name
|
||||
)
|
||||
|
||||
@@ -48,9 +48,8 @@ def make_sql_query(react_state: Dict[str, Any], database_connector: Optional[Any
|
||||
"chunks": [
|
||||
{
|
||||
"output_type": "text",
|
||||
"content": (
|
||||
f"安全限制: 不允许执行 {kw} 语句,仅支持 SELECT 查询。"
|
||||
),
|
||||
"content": f"安全限制: 不允许执行 {kw} 语句,"
|
||||
"仅支持 SELECT 查询。",
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user