LiranHuang/dsh-roleplay-engine ↗★ 1
@alyx/dsh-roleplay-engine
Native SillyTavern-compatible character context compiler and prompt inspector for DeepSeek Harness.
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:LiranHuang/dsh-roleplay-engineREADME
Read the full README ↗快速配置
在 设置 → 角色扮演引擎 中添加绑定:
- 填写需要绑定的 Agent Preset ID;
- 选择 PNG 或 JSON 角色卡;
- 按需选择一个或多个 JSON 世界书;
- 选择作用范围:
- 全局:该人格的所有会话生效;
- 自定义:仅对勾选的活跃会话生效;
- 设置上下文预算、扫描深度、Temperature 和回复模式;
- 开启 启用注入,然后保存全部配置。
配置示例
- 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
配置字段
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
presetId | string | — | 要绑定的 Agent Preset ID,必须唯一。 |
enabled | boolean | true | 是否为该绑定启用角色 Prompt 与请求参数覆盖。 |
characterPath | string | — | PNG 或 JSON 角色卡的绝对路径。 |
worldbookPaths | string[] | [] | 外部 JSON 世界书绝对路径列表。 |
scopeMode | global | custom | global | 对该人格全部会话生效,或仅对指定会话生效。 |
sessionIds | string[] | [] | custom 模式下允许启用的活跃 Session ID。 |
contextBudget | number | 12288 | 角色上下文编译可使用的总 Token 预算。 |
outputReserve | number | 2048 | 为模型输出保留的 Token 数。 |
scanDepth | number | 8 | 用于触发世界书的最近历史消息数量。 |
temperature | number | 1 | 覆盖绑定会话的模型 Temperature,范围 0–2。 |
maxOutputTokens | number | 0 | 最大输出 Token;0 表示保留模型或 Provider 默认值。 |
responseRichness | string | full-scene-dialogue | 回复丰富度策略,见下表。 |
回复模式
| 值 | 行为 |
|---|---|
full-scene-dialogue | 多个连续轮次,包含场景、动作、情绪变化和人物对白。 |
scene-dialogue | 只演出一个完整轮次,可包含多个自然段。 |
single-dialogue | 只输出一句不带引号的角色对白。 |