Doc-code consistency (per BEHAVIOR_SPEC.md ground truth):
- INTERNALS.md, dehydrator.py, README.md, config.example.yaml: drop the
outdated "API 不可用自动降级到本地关键词提取" claims; align with the
"RuntimeError on API outage, no silent fallback" design decision
- INTERNALS.md & BEHAVIOR_SPEC.md narrative: activation_count=1 → 0 (B-04)
- server.py header: 5 MCP tools → 6 (add dream)
OMBRE_PORT (T5/T6):
- Replace hardcoded 8000 in FastMCP / uvicorn / keepalive URL
with int(os.environ.get("OMBRE_PORT", "8000"))
OMBRE_HOOK_URL / OMBRE_HOOK_SKIP webhook (T7):
- Implement _fire_webhook() helper: fire-and-forget POST with 5s timeout,
failures logged at WARNING but never propagated
- Wired into breath / dream MCP tools and /breath-hook + /dream-hook routes
- Push payload: {event, timestamp, payload:{...}}; documented in ENV_VARS.md
Dashboard host-vault input (T12, per user request):
- New /api/host-vault GET/POST endpoints persist OMBRE_HOST_VAULT_DIR
to project-root .env (idempotent upsert, preserves other entries,
rejects quotes/newlines)
- Settings tab gains a "宿主机记忆桶目录 (Docker)" panel with
load/save buttons and a clear "需要 docker compose down/up 生效" notice
97 lines
4.3 KiB
YAML
97 lines
4.3 KiB
YAML
# ============================================================
|
||
# Ombre Brain Configuration / 配置文件
|
||
# Copy this file to config.yaml and modify as needed
|
||
# 复制此文件为 config.yaml 后按需修改
|
||
# ============================================================
|
||
|
||
# --- Transport / 传输方式 ---
|
||
# stdio: local use (Claude Desktop, direct pipe)
|
||
# streamable-http: remote use (HTTP, tunnel/CDN/proxy friendly)
|
||
# stdio: 本地使用(Claude Desktop,直接管道通信)
|
||
# streamable-http: 远程使用(标准 HTTP,对隧道/CDN/代理友好)
|
||
transport: "stdio"
|
||
|
||
# --- Log level / 日志级别 ---
|
||
log_level: "INFO"
|
||
|
||
# --- Bucket storage path / 记忆桶存储路径 ---
|
||
# Point this to your Obsidian vault subdirectory, or any local folder
|
||
# 指向你的 Obsidian 仓库子目录,或任意本地文件夹
|
||
# Leave as-is to use the built-in ./buckets/ directory
|
||
# 保持默认则使用内置的 ./buckets/ 目录
|
||
# buckets_dir: "/path/to/your/Obsidian Vault/Ombre Brain"
|
||
|
||
# --- Merge threshold / 桶合并阈值 ---
|
||
# When storing a new memory, if similarity with an existing bucket exceeds
|
||
# this value (0-100), merge instead of creating a new one
|
||
# 存新记忆时,如果与已有桶的相似度超过此值(0-100),则合并而非新建
|
||
merge_threshold: 75
|
||
|
||
# --- Dehydration API / 脱水压缩 API 配置 ---
|
||
# Uses a cheap LLM for intelligent compression. API is required; if the
|
||
# configured key/endpoint is unavailable, hold/grow will raise an explicit
|
||
# error instead of silently degrading (see BEHAVIOR_SPEC.md 三、降级行为表).
|
||
# 用廉价 LLM 做智能压缩。API 为必需;如 key/endpoint 不可用,
|
||
# hold/grow 会直接报错而非静默降级(详见 BEHAVIOR_SPEC.md 三、降级行为表)。
|
||
dehydration:
|
||
# Supports any OpenAI-compatible API: DeepSeek / Ollama / LM Studio / vLLM / Gemini etc.
|
||
# 支持所有 OpenAI 兼容 API:DeepSeek / Ollama / LM Studio / vLLM / Gemini 等
|
||
model: "deepseek-chat"
|
||
base_url: "https://api.deepseek.com/v1"
|
||
# Common base_url examples / 常见 base_url 示例:
|
||
# DeepSeek: https://api.deepseek.com/v1
|
||
# SiliconFlow: https://api.siliconflow.cn/v1
|
||
# Ollama: http://localhost:11434/v1
|
||
# LM Studio: http://localhost:1234/v1
|
||
# vLLM: http://localhost:8000/v1
|
||
# Gemini: https://generativelanguage.googleapis.com/v1beta/openai
|
||
# api_key: "" # ⚠️ Use env var OMBRE_API_KEY instead / 请使用环境变量 OMBRE_API_KEY
|
||
max_tokens: 1024
|
||
temperature: 0.1
|
||
|
||
# --- Decay parameters / 记忆衰减参数 ---
|
||
# Simulates Ebbinghaus forgetting curve, auto-archives inactive memories
|
||
# 模拟艾宾浩斯遗忘曲线,自动归档不活跃的记忆
|
||
decay:
|
||
lambda: 0.05 # Decay rate / 衰减速率(越大遗忘越快)
|
||
threshold: 0.3 # Archive threshold / 归档阈值
|
||
check_interval_hours: 24 # Check interval (hours) / 衰减检查间隔(小时)
|
||
emotion_weights:
|
||
base: 1.0 # Base weight / 基础权重
|
||
arousal_boost: 0.8 # Arousal boost coefficient / 唤醒度加成系数
|
||
|
||
# --- Embedding / 向量化配置 ---
|
||
# Uses embedding API for semantic similarity search
|
||
# 通过 embedding API 实现语义相似度搜索
|
||
# You can configure embedding independently from dehydration.
|
||
# If api_key is omitted, reuses the same API key (OMBRE_API_KEY) and base_url from dehydration config
|
||
# 你可以把 embedding 独立配置;若 api_key 留空,复用脱水配置的 API key 和 base_url
|
||
embedding:
|
||
enabled: true # Enable embedding / 启用向量化
|
||
model: "gemini-embedding-001" # Embedding model / 向量化模型
|
||
# base_url: "https://generativelanguage.googleapis.com/v1beta/openai"
|
||
# api_key: ""
|
||
|
||
# --- Scoring weights / 检索权重参数 ---
|
||
# total = topic(×4) + emotion(×2) + time(×1.5) + importance(×1)
|
||
scoring_weights:
|
||
topic_relevance: 4.0
|
||
emotion_resonance: 2.0
|
||
time_proximity: 1.5
|
||
importance: 1.0
|
||
|
||
# --- Fuzzy matching / 模糊匹配参数 ---
|
||
matching:
|
||
fuzzy_threshold: 50 # Minimum match score (0-100) / 最低匹配分数
|
||
max_results: 5 # Max results per search / 单次搜索最多返回条数
|
||
|
||
# --- Obsidian wikilinks / Obsidian 双链自动注入 ---
|
||
wikilink:
|
||
enabled: true
|
||
use_tags: false
|
||
use_domain: true
|
||
use_auto_keywords: true
|
||
auto_top_k: 4
|
||
min_keyword_len: 3
|
||
exclude_keywords: []
|