mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-26 01:01:40 +00:00
fix: use 'is not None and != ""' instead of truthiness for mem0.json merge
The original filter (if v) silently drops False and 0, so 'rerank: false' in mem0.json would be ignored. Use explicit None/empty-string check to preserve intentional falsy values.
This commit is contained in:
parent
5e3303b3d8
commit
585a3b40ad
1 changed files with 2 additions and 1 deletions
|
|
@ -58,7 +58,8 @@ def _load_config() -> dict:
|
|||
if config_path.exists():
|
||||
try:
|
||||
file_cfg = json.loads(config_path.read_text(encoding="utf-8"))
|
||||
config.update({k: v for k, v in file_cfg.items() if v})
|
||||
config.update({k: v for k, v in file_cfg.items()
|
||||
if v is not None and v != ""})
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue