🤖 自动格式化代码 [skip ci]
This commit is contained in:
@@ -12,14 +12,13 @@ from src.chat.focus_chat.planners.action_manager import ActionManager
|
||||
logger = get_logger("action_manager")
|
||||
|
||||
|
||||
class ActionModifier():
|
||||
class ActionModifier:
|
||||
"""动作处理器
|
||||
|
||||
用于处理Observation对象,将其转换为ObsInfo对象。
|
||||
"""
|
||||
|
||||
log_prefix = "动作处理"
|
||||
|
||||
|
||||
def __init__(self, action_manager: ActionManager):
|
||||
"""初始化观察处理器"""
|
||||
@@ -70,7 +69,7 @@ class ActionModifier():
|
||||
# reasons.append(f"移除动作{action_changes['remove']}因为检测到连续回复")
|
||||
|
||||
# 处理ChattingObservation
|
||||
if chat_obs :
|
||||
if chat_obs:
|
||||
obs = chat_obs
|
||||
# 检查动作的关联类型
|
||||
chat_context = chat_manager.get_stream(obs.chat_id).context
|
||||
|
||||
@@ -120,8 +120,6 @@ class ActionPlanner:
|
||||
# self.action_manager.remove_action_from_using(action_name)
|
||||
# logger.debug(f"{self.log_prefix}移除动作: {action_name}, 原因: {reason}")
|
||||
|
||||
|
||||
|
||||
# 继续处理其他信息
|
||||
self_info = ""
|
||||
current_mind = ""
|
||||
@@ -144,7 +142,7 @@ class ActionPlanner:
|
||||
structured_info = info.get_processed_info()
|
||||
# print(f"structured_info: {structured_info}")
|
||||
# elif not isinstance(info, ActionInfo): # 跳过已处理的ActionInfo
|
||||
# extra_info.append(info.get_processed_info())
|
||||
# extra_info.append(info.get_processed_info())
|
||||
|
||||
# 获取当前可用的动作
|
||||
current_available_actions = self.action_manager.get_using_actions()
|
||||
|
||||
Reference in New Issue
Block a user