Add additional verbose logs for cache

This commit is contained in:
Andrei Betlen 2023-06-14 21:46:48 -04:00
parent 4cefb70cd0
commit f27393ab7e

View file

@ -119,8 +119,12 @@ def create_app(settings: Optional[Settings] = None):
)
if settings.cache:
if settings.cache_type == "disk":
if settings.verbose:
print(f"Using disk cache with size {settings.cache_size}")
cache = llama_cpp.LlamaDiskCache(capacity_bytes=settings.cache_size)
else:
if settings.verbose:
print(f"Using ram cache with size {settings.cache_size}")
cache = llama_cpp.LlamaRAMCache(capacity_bytes=settings.cache_size)
cache = llama_cpp.LlamaCache(capacity_bytes=settings.cache_size)