From b305879541d4ff17826b5896bbabf255c74b6fe4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 17 Apr 2025 06:40:04 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20=E8=87=AA=E5=8A=A8=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/do_tool/tool_can_use/get_knowledge.py | 2 +- src/do_tool/tool_use.py | 2 +- src/plugins/PFC/message_sender.py | 2 +- .../chat_module/reasoning_chat/reasoning_prompt_builder.py | 2 +- .../think_flow_chat/think_flow_prompt_builder.py | 6 +++--- src/plugins/person_info/person_info.py | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/do_tool/tool_can_use/get_knowledge.py b/src/do_tool/tool_can_use/get_knowledge.py index 31d3c2811..0ccac52c4 100644 --- a/src/do_tool/tool_can_use/get_knowledge.py +++ b/src/do_tool/tool_can_use/get_knowledge.py @@ -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]: """从数据库中获取相关信息 diff --git a/src/do_tool/tool_use.py b/src/do_tool/tool_use.py index d2c8df9c5..4cef79a37 100644 --- a/src/do_tool/tool_use.py +++ b/src/do_tool/tool_use.py @@ -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 ): """构建工具使用的提示词 diff --git a/src/plugins/PFC/message_sender.py b/src/plugins/PFC/message_sender.py index 3ff7cba01..5a5818ae7 100644 --- a/src/plugins/PFC/message_sender.py +++ b/src/plugins/PFC/message_sender.py @@ -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: diff --git a/src/plugins/chat_module/reasoning_chat/reasoning_prompt_builder.py b/src/plugins/chat_module/reasoning_chat/reasoning_prompt_builder.py index 1f6943ced..74ad2cdc2 100644 --- a/src/plugins/chat_module/reasoning_chat/reasoning_prompt_builder.py +++ b/src/plugins/chat_module/reasoning_chat/reasoning_prompt_builder.py @@ -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 [] diff --git a/src/plugins/chat_module/think_flow_chat/think_flow_prompt_builder.py b/src/plugins/chat_module/think_flow_chat/think_flow_prompt_builder.py index f63e98973..ecc20d271 100644 --- a/src/plugins/chat_module/think_flow_chat/think_flow_prompt_builder.py +++ b/src/plugins/chat_module/think_flow_chat/think_flow_prompt_builder.py @@ -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, diff --git a/src/plugins/person_info/person_info.py b/src/plugins/person_info/person_info.py index 892653fc2..28117d029 100644 --- a/src/plugins/person_info/person_info.py +++ b/src/plugins/person_info/person_info.py @@ -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]: """