PFC修复

pull/937/head
Bakadax 2025-05-14 16:54:42 +08:00
parent a4e71c071b
commit d54826f58c
3 changed files with 7 additions and 11 deletions

View File

@ -16,11 +16,7 @@ if TYPE_CHECKING:
logger = get_logger("pfc_loop")
# 时区配置
configured_tz = getattr(global_config, "TIME_ZONE", "Asia/Shanghai")
TIME_ZONE = tz.gettz(configured_tz)
if TIME_ZONE is None:
logger.error(f"配置的时区 '{configured_tz}' 无效,将使用默认时区 'Asia/Shanghai'")
TIME_ZONE = tz.gettz("Asia/Shanghai")
TIME_ZONE = tz.gettz("Asia/Shanghai")
MAX_CONSECUTIVE_LLM_ACTION_FAILURES = 3 # 可配置的最大LLM连续失败次数

View File

@ -13,7 +13,7 @@ from .chat_states import NotificationHandler, NotificationType, Notification
logger = get_logger("observation_info")
TIME_ZONE = tz.gettz(global_config.TIME_ZONE if global_config else "Asia/Shanghai") # 使用配置的时区,提供默认值
TIME_ZONE = tz.gettz("Asia/Shanghai") # 使用配置的时区,提供默认值
class ObservationInfoHandler(NotificationHandler):

View File

@ -3,12 +3,12 @@ import json
import re
from typing import Dict, Any, Optional, Tuple, List, Union
from src.common.logger_manager import get_logger # 确认 logger 的导入路径
from src.plugins.memory_system.Hippocampus import HippocampusManager
from src.plugins.heartFC_chat.heartflow_prompt_builder import prompt_builder # 确认 prompt_builder 的导入路径
from src.plugins.chat.chat_stream import ChatStream
from ..person_info.person_info import person_info_manager
from src.chat.memory_system.Hippocampus import HippocampusManager
from src.chat.focus_chat.heartflow_prompt_builder import prompt_builder
from src.chat.utils.chat_message_builder import build_readable_messages
from src.chat.message_receive.chat_stream import ChatStream
from src.chat.person_info.person_info import person_info_manager
import math
from src.plugins.utils.chat_message_builder import build_readable_messages
from .observation_info import ObservationInfo
from src.config.config import global_config