mirror of
https://github.com/tcsenpai/agenticSeek.git
synced 2025-06-05 02:25:27 +00:00
Update sources/memory.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
de2650c007
commit
dd033d4084
@ -118,13 +118,13 @@ class Memory():
|
|||||||
json_memory = json.load(f)
|
json_memory = json.load(f)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
self.logger.warning(f"File not found: {path}")
|
self.logger.warning(f"File not found: {path}")
|
||||||
return None
|
return {}
|
||||||
except json.JSONDecodeError:
|
except json.JSONDecodeError:
|
||||||
self.logger.warning(f"Error decoding JSON from file: {path}")
|
self.logger.warning(f"Error decoding JSON from file: {path}")
|
||||||
return None
|
return {}
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.logger.warning(f"Error loading file {path}: {e}")
|
self.logger.warning(f"Error loading file {path}: {e}")
|
||||||
return None
|
return {}
|
||||||
return json_memory
|
return json_memory
|
||||||
|
|
||||||
def load_memory(self, agent_type: str = "casual_agent") -> None:
|
def load_memory(self, agent_type: str = "casual_agent") -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user