fix: initialize global memory from Settings.DATA_DIR
This commit is contained in:
1 parent
cc385be9cf
commit
de95f36df6
1 file changed
+13
-2
@@ -3,7 +3,12 @@
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from homeagent.memory.global_memory import GlobalMemory, MemoryItem, get_global_memory
|
from homeagent.memory.global_memory import (
|
||||||
|
GlobalMemory,
|
||||||
|
MemoryItem,
|
||||||
|
configure_global_memory_path,
|
||||||
|
get_global_memory,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_configured_global_memory(data_dir: Optional[Path] = None) -> GlobalMemory:
|
def get_configured_global_memory(data_dir: Optional[Path] = None) -> GlobalMemory:
|
||||||
@@ -13,4 +18,10 @@ def get_configured_global_memory(data_dir: Optional[Path] = None) -> GlobalMemor
|
|||||||
return get_global_memory(Path(data_dir) / "global_memory.json")
|
return get_global_memory(Path(data_dir) / "global_memory.json")
|
||||||
|
|
||||||
|
|
||||||
__all__ = ["GlobalMemory", "MemoryItem", "get_global_memory", "get_configured_global_memory"]
|
__all__ = [
|
||||||
|
"GlobalMemory",
|
||||||
|
"MemoryItem",
|
||||||
|
"configure_global_memory_path",
|
||||||
|
"get_global_memory",
|
||||||
|
"get_configured_global_memory",
|
||||||
|
]
|
||||||
Reference in new issue
Block a user