LiranHuang/dsh-roleplay-engine ↗★ 1

@alyx/dsh-roleplay-engine

Native SillyTavern-compatible character context compiler and prompt inspector for DeepSeek Harness.

包名
@alyx/dsh-roleplay-engine
兼容性
待验证
版本
0.1.31
许可证
SEE LICENSE IN LICENSE
最近更新
2026年11月3日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:LiranHuang/dsh-roleplay-engine

快速配置

在 设置 → 角色扮演引擎 中添加绑定:

  1. 填写需要绑定的 Agent Preset ID;
  2. 选择 PNG 或 JSON 角色卡;
  3. 按需选择一个或多个 JSON 世界书;
  4. 选择作用范围:
    • 全局:该人格的所有会话生效;
    • 自定义:仅对勾选的活跃会话生效;
  5. 设置上下文预算、扫描深度、Temperature 和回复模式;
  6. 开启 启用注入,然后保存全部配置。

配置示例

- insert:
    - id: roleplay-engine
      name: '@alyx/dsh-roleplay-engine'
      config:
        bindings:
          - presetId: my-agent
            enabled: true
            characterPath: 'D:\Roleplay\characters\MyCharacter.png'
            worldbookPaths:
              - 'D:\Roleplay\worldbooks\MyWorld.json'
            scopeMode: global
            sessionIds: []
            contextBudget: 12288
            outputReserve: 2048
            scanDepth: 8
            temperature: 1
            maxOutputTokens: 0
            responseRichness: full-scene-dialogue

配置示例

- insert:
    - id: roleplay-engine
      name: '@alyx/dsh-roleplay-engine'
      config:
        bindings:
          - presetId: my-agent
            enabled: true
            characterPath: 'D:\Roleplay\characters\MyCharacter.png'
            worldbookPaths:
              - 'D:\Roleplay\worldbooks\MyWorld.json'
            scopeMode: global
            sessionIds: []
            contextBudget: 12288
            outputReserve: 2048
            scanDepth: 8
            temperature: 1
            maxOutputTokens: 0
            responseRichness: full-scene-dialogue

配置字段

字段类型默认值说明
presetIdstring—要绑定的 Agent Preset ID,必须唯一。
enabledbooleantrue是否为该绑定启用角色 Prompt 与请求参数覆盖。
characterPathstring—PNG 或 JSON 角色卡的绝对路径。
worldbookPathsstring[][]外部 JSON 世界书绝对路径列表。
scopeModeglobal | customglobal对该人格全部会话生效,或仅对指定会话生效。
sessionIdsstring[][]custom 模式下允许启用的活跃 Session ID。
contextBudgetnumber12288角色上下文编译可使用的总 Token 预算。
outputReservenumber2048为模型输出保留的 Token 数。
scanDepthnumber8用于触发世界书的最近历史消息数量。
temperaturenumber1覆盖绑定会话的模型 Temperature,范围 0–2。
maxOutputTokensnumber0最大输出 Token;0 表示保留模型或 Provider 默认值。
responseRichnessstringfull-scene-dialogue回复丰富度策略,见下表。

回复模式

值行为
full-scene-dialogue多个连续轮次,包含场景、动作、情绪变化和人物对白。
scene-dialogue只演出一个完整轮次,可包含多个自然段。
single-dialogue只输出一句不带引号的角色对白。