diff --git a/src/chat/focus_chat/heartFC_chat.py b/src/chat/focus_chat/heartFC_chat.py index dc2d81649..1fe7d49bf 100644 --- a/src/chat/focus_chat/heartFC_chat.py +++ b/src/chat/focus_chat/heartFC_chat.py @@ -258,7 +258,7 @@ class HeartFChatting: f"动作: {self._current_cycle.loop_plan_info['action_result']['action_type']}" + (f"\n详情: {'; '.join(timer_strings)}" if timer_strings else "") ) - + await asyncio.sleep(global_config.focus_chat.think_interval) except asyncio.CancelledError: diff --git a/src/chat/normal_chat/normal_chat.py b/src/chat/normal_chat/normal_chat.py index 860ecf730..3b636479e 100644 --- a/src/chat/normal_chat/normal_chat.py +++ b/src/chat/normal_chat/normal_chat.py @@ -49,8 +49,6 @@ class NormalChat: self._chat_task: Optional[asyncio.Task] = None self._initialized = False # Track initialization status - - async def initialize(self): """异步初始化,获取聊天类型和目标信息。""" if self._initialized: diff --git a/src/config/official_configs.py b/src/config/official_configs.py index 5d10e61ef..82abf3ce7 100644 --- a/src/config/official_configs.py +++ b/src/config/official_configs.py @@ -160,6 +160,7 @@ class FocusChatConfig(ConfigBase): working_memory_processor: bool = True """是否启用工作记忆处理器""" + @dataclass class ExpressionConfig(ConfigBase): """表达配置类""" diff --git a/src/tools/tool_use.py b/src/tools/tool_use.py index ea41a657d..9b62aa0e5 100644 --- a/src/tools/tool_use.py +++ b/src/tools/tool_use.py @@ -5,12 +5,14 @@ from src.common.logger_manager import get_logger from src.tools.tool_can_use import get_all_tool_definitions, get_tool_instance logger = get_logger("tool_use") + + class ToolUser: def __init__(self): self.llm_model_tool = LLMRequest( model=global_config.model.tool_use, temperature=0.2, max_tokens=1000, request_type="tool_use" ) - + @staticmethod def _define_tools(): """获取所有已注册工具的定义