feat: 新增HFC处理器自定义项和思考间隔项
新增了 HFC不同处理器的开启关闭可选项 新增了思考间隔调整 移除无用工具
This commit is contained in:
@@ -25,6 +25,7 @@ from src.chat.focus_chat.info_processors.self_processor import SelfProcessor
|
||||
from src.chat.focus_chat.planners.planner import ActionPlanner
|
||||
from src.chat.focus_chat.planners.action_manager import ActionManager
|
||||
from src.chat.focus_chat.working_memory.working_memory import WorkingMemory
|
||||
from src.config.config import global_config
|
||||
|
||||
install(extra_lines=3)
|
||||
|
||||
@@ -257,6 +258,8 @@ 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:
|
||||
# 设置了关闭标志位后被取消是正常流程
|
||||
|
||||
@@ -86,7 +86,6 @@ class MaiStateManager:
|
||||
current_time = time.time()
|
||||
current_status = current_state_info.mai_status
|
||||
time_in_current_status = current_time - current_state_info.last_status_change_time
|
||||
_time_since_last_min_check = current_time - current_state_info.last_min_check_time
|
||||
next_state: Optional[MaiState] = None
|
||||
|
||||
def _resolve_offline(candidate_state: MaiState) -> MaiState:
|
||||
|
||||
@@ -38,10 +38,8 @@ class NormalChat:
|
||||
# Interest dict
|
||||
self.interest_dict = interest_dict or {}
|
||||
|
||||
# --- Initialize attributes (defaults) ---
|
||||
self.is_group_chat: bool = False
|
||||
self.chat_target_info: Optional[dict] = None
|
||||
# --- End Initialization ---
|
||||
|
||||
# Other sync initializations
|
||||
self.gpt = NormalChatGenerator()
|
||||
@@ -51,8 +49,7 @@ class NormalChat:
|
||||
self._chat_task: Optional[asyncio.Task] = None
|
||||
self._initialized = False # Track initialization status
|
||||
|
||||
# logger.info(f"[{self.stream_name}] NormalChat 实例 __init__ 完成 (同步部分)。")
|
||||
# Avoid logging here as stream_name might not be final
|
||||
|
||||
|
||||
async def initialize(self):
|
||||
"""异步初始化,获取聊天类型和目标信息。"""
|
||||
|
||||
Reference in New Issue
Block a user