From 8bb7f39641f7cd046d213fd9775ec31c900343de Mon Sep 17 00:00:00 2001 From: tt-P607 <68868379+tt-P607@users.noreply.github.com> Date: Mon, 1 Dec 2025 20:14:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(kokoro-flow):=20=E6=B7=BB=E5=8A=A0=20PyYAM?= =?UTF-8?q?L=20=E4=BE=9D=E8=B5=96=E5=B9=B6=E5=A2=9E=E5=BC=BA=20kfc=5Freply?= =?UTF-8?q?=20=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加 PyYAML 作为依赖,以支持未来在 Kokoro Flow Chatter 插件中基于 YAML 的配置和功能。 `kfc_reply` 动作的提示已更新,明确指示模型将其完整响应整合为单个动作调用,防止出现分散或多条回复。 --- pyproject.toml | 1 + requirements.txt | 1 + .../built_in/kokoro_flow_chatter/prompt_modules_unified.py | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0c0246a3f..6f8dc92a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,7 @@ dependencies = [ "pymongo>=4.13.2", "pymysql>=1.1.1", "pypinyin>=0.54.0", + "PyYAML>=6.0", "python-dateutil>=2.9.0.post0", "python-dotenv>=1.1.1", "python-igraph>=0.11.9", diff --git a/requirements.txt b/requirements.txt index d508e6435..59b07ffc1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -29,6 +29,7 @@ peewee pyarrow pydantic pypinyin +PyYAML python-dateutil python-dotenv python-igraph diff --git a/src/plugins/built_in/kokoro_flow_chatter/prompt_modules_unified.py b/src/plugins/built_in/kokoro_flow_chatter/prompt_modules_unified.py index 64f2b5377..290298d22 100644 --- a/src/plugins/built_in/kokoro_flow_chatter/prompt_modules_unified.py +++ b/src/plugins/built_in/kokoro_flow_chatter/prompt_modules_unified.py @@ -214,9 +214,9 @@ def build_actions_module(available_actions: Optional[dict[str, ActionInfo]] = No def _get_default_actions_block() -> str: """获取默认的内置动作描述块""" return """### `kfc_reply` - 发消息 -发送文字回复。 +发送文字回复。**注意:只能有一个 kfc_reply 动作,把你想说的话都写在一条消息里。** ```json -{"type": "kfc_reply", "content": "你要说的话"} +{"type": "kfc_reply", "content": "你要说的话,全部写在这里"} ``` ### `poke_user` - 戳一戳