fix: complete B-03/B-08/B-09 and add OMBRE_*_MODEL env vars
- decay_engine: keep activation_count as float (B-03); refresh local meta after auto_resolve so resolved_factor applies in the same cycle (B-08) - server.hold(): user-supplied valence/arousal now takes priority over analyze() output (B-09) - utils.load_config: support OMBRE_DEHYDRATION_MODEL (with OMBRE_MODEL alias) and OMBRE_EMBEDDING_MODEL - ENV_VARS.md: document new model env vars - tests/conftest.py: align fixture with spec-correct weights (time_proximity=1.5, content_weight=1.0) and feel subdir layout
This commit is contained in:
10
utils.py
10
utils.py
@@ -98,6 +98,16 @@ def load_config(config_path: str = None) -> dict:
|
||||
if env_buckets_dir:
|
||||
config["buckets_dir"] = env_buckets_dir
|
||||
|
||||
# OMBRE_DEHYDRATION_MODEL (with OMBRE_MODEL alias) overrides dehydration.model
|
||||
env_dehy_model = os.environ.get("OMBRE_DEHYDRATION_MODEL", "") or os.environ.get("OMBRE_MODEL", "")
|
||||
if env_dehy_model:
|
||||
config.setdefault("dehydration", {})["model"] = env_dehy_model
|
||||
|
||||
# OMBRE_EMBEDDING_MODEL overrides embedding.model
|
||||
env_embed_model = os.environ.get("OMBRE_EMBEDDING_MODEL", "")
|
||||
if env_embed_model:
|
||||
config.setdefault("embedding", {})["model"] = env_embed_model
|
||||
|
||||
# --- Ensure bucket storage directories exist ---
|
||||
# --- 确保记忆桶存储目录存在 ---
|
||||
buckets_dir = config["buckets_dir"]
|
||||
|
||||
Reference in New Issue
Block a user