Spaces:
Runtime error
Runtime error
Download src/memory.py from CliDyn/pangaeagpt: direct link, hf CLI and curl.
- Browser
- Download file 285 Bytes
-
https://huggingface.co/spaces/CliDyn/pangaeagpt/resolve/main/src/memory.py
- Command line
-
hf download hf://spaces/CliDyn/pangaeagpt/src/memory.py
-
curl -L -o memory.py https://huggingface.co/spaces/CliDyn/pangaeagpt/resolve/main/src/memory.py
285 Bytes
| #scr/memory.py | |
| from langgraph.checkpoint.memory import MemorySaver | |
| class CustomMemorySaver(MemorySaver): | |
| def should_save(self, state: dict, key: str) -> bool: | |
| # Exclude 'messages' from being saved | |
| if key == 'messages': | |
| return False | |
| return True |