feat : server response cache

This commit is contained in:
martin legrand
2025-04-05 16:36:58 +02:00
parent 688e94d97c
commit 97708c7947
7 changed files with 50 additions and 28 deletions
+2
View File
@@ -2,6 +2,7 @@
import threading
import logging
from abc import abstractmethod
from .cache import Cache
class GenerationState:
def __init__(self):
@@ -29,6 +30,7 @@ class GeneratorLLM():
handler.setFormatter(formatter)
self.logger.addHandler(handler)
self.logger.setLevel(logging.INFO)
cache = Cache()
def set_model(self, model: str) -> None:
self.logger.info(f"Model set to {model}")