Spaces:
Running
Running
Download extensions/python/job_loop/_50_trim_cache.py from Leon4gr45/openoperator: direct link, hf CLI and curl.
- Browser
- Download file 274 Bytes
-
https://huggingface.co/spaces/Leon4gr45/openoperator/resolve/main/extensions/python/job_loop/_50_trim_cache.py
- Command line
-
hf download hf://spaces/Leon4gr45/openoperator/extensions/python/job_loop/_50_trim_cache.py
-
curl -L -o _50_trim_cache.py https://huggingface.co/spaces/Leon4gr45/openoperator/resolve/main/extensions/python/job_loop/_50_trim_cache.py
274 Bytes
| from typing import Any | |
| from helpers.extension import Extension | |
| from helpers import cache | |
| class SaveToolCallFile(Extension): | |
| def execute(self, data: dict[str, Any] | None = None, **kwargs): | |
| # trim unused cache entries | |
| cache.trim_cache("*", seconds=300) | |