🤖 自动格式化代码 [skip ci]

This commit is contained in:
github-actions[bot]
2025-04-17 06:40:04 +00:00
parent dc96e26ca5
commit b305879541
6 changed files with 8 additions and 8 deletions

View File

@@ -51,7 +51,7 @@ class SearchKnowledgeTool(BaseTool):
@staticmethod
def get_info_from_db(
query_embedding: list, limit: int = 1, threshold: float = 0.5, return_raw: bool = False
query_embedding: list, limit: int = 1, threshold: float = 0.5, return_raw: bool = False
) -> Union[str, list]:
"""从数据库中获取相关信息

View File

@@ -26,7 +26,7 @@ class ToolUser:
@staticmethod
async def _build_tool_prompt(
message_txt: str, sender_name: str, chat_stream: ChatStream, subheartflow: SubHeartflow = None
message_txt: str, sender_name: str, chat_stream: ChatStream, subheartflow: SubHeartflow = None
):
"""构建工具使用的提示词

View File

@@ -17,7 +17,7 @@ class DirectMessageSender:
@staticmethod
async def send_message(
chat_stream: ChatStream,
chat_stream: ChatStream,
content: str,
reply_to_message: Optional[Message] = None,
) -> None:

View File

@@ -375,7 +375,7 @@ class PromptBuilder:
@staticmethod
def get_info_from_db(
query_embedding: list, limit: int = 1, threshold: float = 0.5, return_raw: bool = False
query_embedding: list, limit: int = 1, threshold: float = 0.5, return_raw: bool = False
) -> Union[str, list]:
if not query_embedding:
return "" if not return_raw else []

View File

@@ -66,7 +66,7 @@ class PromptBuilder:
@staticmethod
async def _build_prompt(
chat_stream, message_txt: str, sender_name: str = "某人", stream_id: Optional[int] = None
chat_stream, message_txt: str, sender_name: str = "某人", stream_id: Optional[int] = None
) -> tuple[str, str]:
current_mind_info = heartflow.get_subheartflow(stream_id).current_mind
@@ -171,7 +171,7 @@ class PromptBuilder:
@staticmethod
async def _build_prompt_simple(
chat_stream, message_txt: str, sender_name: str = "某人", stream_id: Optional[int] = None
chat_stream, message_txt: str, sender_name: str = "某人", stream_id: Optional[int] = None
) -> tuple[str, str]:
current_mind_info = heartflow.get_subheartflow(stream_id).current_mind
@@ -241,7 +241,7 @@ class PromptBuilder:
@staticmethod
async def _build_prompt_check_response(
chat_stream,
chat_stream,
message_txt: str,
sender_name: str = "某人",
stream_id: Optional[int] = None,

View File

@@ -316,7 +316,7 @@ class PersonInfoManager:
@staticmethod
async def get_specific_value_list(
field_name: str,
field_name: str,
way: Callable[[Any], bool], # 接受任意类型值
) -> Dict[str, Any]:
"""