重构Kokoro Flow Chatter:移除已弃用的响应后处理器和会话管理器
- 删除了`response_post_processor.py`和`session_manager.py`,因为它们已不再需要。 - 更新了`__init__.py`文件,移除了对`ActionExecutor`的引用。 - 删除了`action_executor.py`,并将动作执行直接集成到`chatter.py`和`proactive_thinker.py`中。 - 在`KokoroFlowChatterV2`中重构了动作执行逻辑,以直接使用`ChatterActionManager`。 - 增强了主动思考逻辑,以简化操作执行,而无需依赖已移除的`ActionExecutor`。
This commit is contained in:
@@ -559,6 +559,7 @@ class BaseAction(ABC):
|
||||
action_require=getattr(cls, "action_require", []).copy(),
|
||||
associated_types=getattr(cls, "associated_types", []).copy(),
|
||||
chat_type_allow=getattr(cls, "chat_type_allow", ChatType.ALL),
|
||||
chatter_allow=getattr(cls, "chatter_allow", []).copy(),
|
||||
# 二步Action相关属性
|
||||
is_two_step_action=getattr(cls, "is_two_step_action", False),
|
||||
step_one_description=getattr(cls, "step_one_description", ""),
|
||||
|
||||
@@ -209,6 +209,7 @@ class ActionInfo(ComponentInfo):
|
||||
mode_enable: ChatMode = ChatMode.ALL
|
||||
parallel_action: bool = False
|
||||
chat_type_allow: ChatType = ChatType.ALL # 允许的聊天类型
|
||||
chatter_allow: list[str] = field(default_factory=list) # 允许的 Chatter 列表,空则允许所有
|
||||
# 二步Action相关属性
|
||||
is_two_step_action: bool = False # 是否为二步Action
|
||||
step_one_description: str = "" # 第一步的描述
|
||||
@@ -226,6 +227,8 @@ class ActionInfo(ComponentInfo):
|
||||
self.associated_types = []
|
||||
if self.sub_actions is None:
|
||||
self.sub_actions = []
|
||||
if self.chatter_allow is None:
|
||||
self.chatter_allow = []
|
||||
self.component_type = ComponentType.ACTION
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user