mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-17 03:03:19 +08:00
feat: add deep_dream_enabled config toggle
This commit is contained in:
@@ -419,6 +419,17 @@ class MemoryFlushManager:
|
||||
lookback_days: How many days of daily files to read (default 1 for scheduled, 3 for manual)
|
||||
force: Skip input-hash dedup check (used by manual /memory dream trigger)
|
||||
"""
|
||||
# Config guard for scheduled runs. Manual trigger (force=True) always
|
||||
# runs since it is an explicit user action.
|
||||
if not force:
|
||||
try:
|
||||
from config import conf
|
||||
if not conf().get("deep_dream_enabled", True):
|
||||
logger.info("[DeepDream] deep_dream_enabled=false, skipping")
|
||||
return False
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if not self.llm_model:
|
||||
logger.warning("[DeepDream] No LLM model available, skipping")
|
||||
return False
|
||||
|
||||
@@ -265,6 +265,8 @@ available_setting = {
|
||||
"self_evolution_enabled": False, # switch to enable/disable self-evolution
|
||||
"self_evolution_idle_minutes": 10, # idle time before a session is reviewed
|
||||
"self_evolution_min_turns": 6, # min user turns (or context pressure) to trigger
|
||||
# Deep Dream: nightly memory distillation into MEMORY.md + dream diary.
|
||||
"deep_dream_enabled": True, # scheduled deep dream switch; manual /memory dream is unaffected
|
||||
"skill": {}, # Per-skill runtime config; nested keys flatten to SKILL_<NAME>_<KEY> env vars at startup
|
||||
"mcp_servers": [], # MCP server list; each entry supports type "stdio" (local process) or "sse" (remote URL)
|
||||
}
|
||||
|
||||
@@ -79,6 +79,22 @@ Deep Dream は以下の整理ルールに従います:
|
||||
初回デプロイ後は `/memory dream 30` を一度実行して、すべての履歴日次記憶を MEMORY.md に蒸留することをお勧めします。
|
||||
</Tip>
|
||||
|
||||
## 設定スイッチ
|
||||
|
||||
`config.json` の `deep_dream_enabled` で毎晩の自動蒸留を制御します:
|
||||
|
||||
```json
|
||||
{
|
||||
"deep_dream_enabled": true
|
||||
}
|
||||
```
|
||||
|
||||
| 設定項目 | 説明 | デフォルト |
|
||||
| --- | --- | --- |
|
||||
| `deep_dream_enabled` | 毎日の定期蒸留の有効化 | `true` |
|
||||
|
||||
デフォルトで有効になっており、既存の動作と互換性があります。無効にすると毎晩の自動蒸留が実行されなくなります。MEMORY.md を手動管理したい場合や LLM 呼び出しを 1 回節約したい場合に適しています(日次記憶の要約には影響しません)。手動コマンド `/memory dream` もこのスイッチの影響を受けず、いつでもトリガー可能です。
|
||||
|
||||
## 安全メカニズム
|
||||
|
||||
| メカニズム | 説明 |
|
||||
|
||||
@@ -79,6 +79,22 @@ In addition to the automatic daily run, you can manually trigger distillation in
|
||||
After first deployment, it's recommended to run `/memory dream 30` once to distill all historical daily memories into MEMORY.md.
|
||||
</Tip>
|
||||
|
||||
## Config Toggle
|
||||
|
||||
Control the nightly automatic distillation via `deep_dream_enabled` in `config.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"deep_dream_enabled": true
|
||||
}
|
||||
```
|
||||
|
||||
| Key | Description | Default |
|
||||
| --- | --- | --- |
|
||||
| `deep_dream_enabled` | Enable the daily scheduled distillation | `true` |
|
||||
|
||||
Enabled by default to keep existing behavior. When disabled, the nightly distillation no longer runs — useful if you prefer to maintain MEMORY.md manually or want to save an LLM call (daily memory summarization is not affected). The manual `/memory dream` command is also unaffected and can still be triggered anytime.
|
||||
|
||||
## Safety Mechanisms
|
||||
|
||||
| Mechanism | Description |
|
||||
|
||||
@@ -83,6 +83,22 @@ Deep Dream 遵循以下整理规则:
|
||||
首次部署后可以手动执行一次 `/memory dream 30`,将历史天级记忆全量蒸馏到 MEMORY.md。
|
||||
</Tip>
|
||||
|
||||
## 配置开关
|
||||
|
||||
通过 `config.json` 中的 `deep_dream_enabled` 控制每晚的自动蒸馏:
|
||||
|
||||
```json
|
||||
{
|
||||
"deep_dream_enabled": true
|
||||
}
|
||||
```
|
||||
|
||||
| 配置项 | 说明 | 默认值 |
|
||||
| --- | --- | --- |
|
||||
| `deep_dream_enabled` | 是否启用每日定时蒸馏 | `true` |
|
||||
|
||||
默认开启,保持与现有行为一致。关闭后每晚不再自动执行蒸馏,适合希望手动维护 MEMORY.md 或减少一次 LLM 调用的场景(每日记忆总结不受影响)。手动命令 `/memory dream` 也不受此开关影响,仍可随时触发。
|
||||
|
||||
## 安全机制
|
||||
|
||||
| 机制 | 说明 |
|
||||
|
||||
Reference in New Issue
Block a user