Files
ST-Bionic-Memory-Ecology/settings.html
2026-03-23 12:34:06 +08:00

355 lines
11 KiB
HTML

<div class="st-bme-settings">
<div class="inline-drawer">
<div class="inline-drawer-toggle inline-drawer-header">
<b>ST-BME 图谱记忆</b>
<div
class="inline-drawer-icon fa-solid fa-circle-chevron-down down"
></div>
</div>
<div class="inline-drawer-content">
<!-- 基础设置 -->
<div class="st-bme-section">
<div class="st-bme-row">
<label class="checkbox_label" for="st_bme_enabled">
<input type="checkbox" id="st_bme_enabled" />
<span>启用记忆图谱</span>
</label>
</div>
<div class="st-bme-row">
<label for="st_bme_extract_every">每 N 条回复提取</label>
<input
type="number"
id="st_bme_extract_every"
class="text_pole"
min="1"
max="10"
value="1"
/>
</div>
</div>
<hr class="st-bme-hr" />
<!-- 召回设置 -->
<div class="st-bme-section">
<h4 class="st-bme-section-title">召回设置</h4>
<div class="st-bme-row">
<label class="checkbox_label" for="st_bme_recall_enabled">
<input type="checkbox" id="st_bme_recall_enabled" />
<span>启用记忆召回注入</span>
</label>
</div>
<div class="st-bme-row">
<label class="checkbox_label" for="st_bme_recall_llm">
<input type="checkbox" id="st_bme_recall_llm" />
<span>启用 LLM 精确召回</span>
</label>
</div>
<div class="st-bme-row">
<label for="st_bme_inject_depth">注入深度</label>
<input
type="number"
id="st_bme_inject_depth"
class="text_pole"
min="0"
max="9999"
value="4"
/>
</div>
</div>
<hr class="st-bme-hr" />
<!-- 评分权重 -->
<div class="st-bme-section">
<h4 class="st-bme-section-title">混合评分权重</h4>
<div class="st-bme-row">
<label for="st_bme_graph_weight">图扩散权重</label>
<input
type="number"
id="st_bme_graph_weight"
class="text_pole"
min="0"
max="1"
step="0.1"
value="0.6"
/>
</div>
<div class="st-bme-row">
<label for="st_bme_vector_weight">向量权重</label>
<input
type="number"
id="st_bme_vector_weight"
class="text_pole"
min="0"
max="1"
step="0.1"
value="0.3"
/>
</div>
<div class="st-bme-row">
<label for="st_bme_importance_weight">重要性权重</label>
<input
type="number"
id="st_bme_importance_weight"
class="text_pole"
min="0"
max="1"
step="0.1"
value="0.1"
/>
</div>
</div>
<hr class="st-bme-hr" />
<!-- v2: 增强功能 -->
<div class="st-bme-section">
<h4 class="st-bme-section-title">
<i class="fa-solid fa-flask"></i> v2 增强功能
</h4>
<!-- P0 核心 -->
<div class="st-bme-subsection">
<span class="st-bme-badge st-bme-badge-p0">P0</span>
<div class="st-bme-row">
<label class="checkbox_label" for="st_bme_evolution">
<input type="checkbox" id="st_bme_evolution" />
<span>记忆进化 <small class="st-bme-hint">A-MEM</small></span>
</label>
</div>
<div class="st-bme-row st-bme-indent">
<label for="st_bme_evo_neighbors">近邻数量</label>
<input
type="number"
id="st_bme_evo_neighbors"
class="text_pole"
min="1"
max="10"
value="5"
/>
</div>
<div class="st-bme-row">
<label class="checkbox_label" for="st_bme_precise_conflict">
<input type="checkbox" id="st_bme_precise_conflict" />
<span>精确对照 <small class="st-bme-hint">Mem0</small></span>
</label>
</div>
<div class="st-bme-row st-bme-indent">
<label for="st_bme_conflict_threshold">对照阈值</label>
<input
type="number"
id="st_bme_conflict_threshold"
class="text_pole"
min="0.5"
max="0.99"
step="0.05"
value="0.85"
/>
</div>
<div class="st-bme-row">
<label class="checkbox_label" for="st_bme_synopsis">
<input type="checkbox" id="st_bme_synopsis" />
<span>全局概要 <small class="st-bme-hint">MemoRAG</small></span>
</label>
</div>
<div class="st-bme-row st-bme-indent">
<label for="st_bme_synopsis_every">每 N 次提取更新</label>
<input
type="number"
id="st_bme_synopsis_every"
class="text_pole"
min="1"
max="20"
value="5"
/>
</div>
</div>
<!-- P1 推荐 -->
<div class="st-bme-subsection">
<span class="st-bme-badge st-bme-badge-p1">P1</span>
<div class="st-bme-row">
<label class="checkbox_label" for="st_bme_visibility">
<input type="checkbox" id="st_bme_visibility" />
<span>认知边界 <small class="st-bme-hint">RoleRAG</small></span>
</label>
</div>
<div class="st-bme-row">
<label class="checkbox_label" for="st_bme_cross_recall">
<input type="checkbox" id="st_bme_cross_recall" />
<span>交叉检索 <small class="st-bme-hint">AriGraph</small></span>
</label>
</div>
</div>
<!-- P2 可选 -->
<div class="st-bme-subsection">
<span class="st-bme-badge st-bme-badge-p2">P2</span>
<div class="st-bme-row">
<label class="checkbox_label" for="st_bme_smart_trigger">
<input type="checkbox" id="st_bme_smart_trigger" />
<span>惊奇度分割 <small class="st-bme-hint">EM-LLM</small></span>
</label>
</div>
<div class="st-bme-row st-bme-indent">
<label for="st_bme_trigger_patterns">自定义触发模式</label>
<input
type="text"
id="st_bme_trigger_patterns"
class="text_pole"
placeholder="突然,真相,秘密,背叛 或 正则"
/>
</div>
<div class="st-bme-row">
<label class="checkbox_label" for="st_bme_sleep_cycle">
<input type="checkbox" id="st_bme_sleep_cycle" />
<span>主动遗忘 <small class="st-bme-hint">SleepGate</small></span>
</label>
</div>
<div class="st-bme-row st-bme-indent">
<label for="st_bme_forget_threshold">遗忘阈值</label>
<input
type="number"
id="st_bme_forget_threshold"
class="text_pole"
min="0.1"
max="1.0"
step="0.1"
value="0.5"
/>
</div>
<div class="st-bme-row">
<label class="checkbox_label" for="st_bme_prob_recall">
<input type="checkbox" id="st_bme_prob_recall" />
<span>概率触发回忆</span>
</label>
</div>
<div class="st-bme-row st-bme-indent">
<label for="st_bme_prob_chance">触发概率</label>
<input
type="number"
id="st_bme_prob_chance"
class="text_pole"
min="0.01"
max="0.5"
step="0.05"
value="0.15"
/>
</div>
<div class="st-bme-row">
<label class="checkbox_label" for="st_bme_reflection">
<input type="checkbox" id="st_bme_reflection" />
<span>反思条目 <small class="st-bme-hint">Reflexion</small></span>
</label>
</div>
<div class="st-bme-row st-bme-indent">
<label for="st_bme_reflect_every">每 N 次提取反思</label>
<input
type="number"
id="st_bme_reflect_every"
class="text_pole"
min="3"
max="30"
value="10"
/>
</div>
</div>
</div>
<hr class="st-bme-hr" />
<!-- Embedding API -->
<div class="st-bme-section">
<h4 class="st-bme-section-title">Embedding API</h4>
<div class="st-bme-row">
<label for="st_bme_embed_url">API 地址</label>
<input
type="text"
id="st_bme_embed_url"
class="text_pole"
placeholder="https://api.openai.com/v1"
/>
</div>
<div class="st-bme-row">
<label for="st_bme_embed_key">API Key</label>
<input
type="password"
id="st_bme_embed_key"
class="text_pole"
placeholder="sk-..."
/>
</div>
<div class="st-bme-row">
<label for="st_bme_embed_model">模型</label>
<input
type="text"
id="st_bme_embed_model"
class="text_pole"
placeholder="text-embedding-3-small"
/>
</div>
<div class="st-bme-row">
<button id="st_bme_btn_test_embed" class="menu_button">
<i class="fa-solid fa-plug"></i> 测试连接
</button>
</div>
</div>
<hr class="st-bme-hr" />
<!-- 操作 -->
<div class="st-bme-section">
<h4 class="st-bme-section-title">操作</h4>
<div class="st-bme-btn-group">
<button id="st_bme_btn_view_graph" class="menu_button">
<i class="fa-solid fa-diagram-project"></i> 查看图谱
</button>
<button id="st_bme_btn_view_injection" class="menu_button">
<i class="fa-solid fa-syringe"></i> 查看注入
</button>
</div>
<div class="st-bme-btn-group">
<button id="st_bme_btn_rebuild" class="menu_button">
<i class="fa-solid fa-rotate"></i> 重建图谱
</button>
<button id="st_bme_btn_compress" class="menu_button">
<i class="fa-solid fa-compress"></i> 手动压缩
</button>
</div>
<div class="st-bme-btn-group">
<button id="st_bme_btn_export" class="menu_button">
<i class="fa-solid fa-download"></i> 导出
</button>
<button id="st_bme_btn_import" class="menu_button">
<i class="fa-solid fa-upload"></i> 导入
</button>
</div>
</div>
</div>
</div>
</div>