diff --git a/app/routes/health.py b/app/routes/health.py index e7eb9dea..187984cd 100644 --- a/app/routes/health.py +++ b/app/routes/health.py @@ -14,7 +14,6 @@ def checkhealth(): result = [] for model in LLMModel: - guidance.llms.OpenAI.cache.clear() circuit_status = CircuitBreaker.get_status( func=GuidanceWrapper(model=model).is_up, cache_key=model, diff --git a/app/services/guidance_wrapper.py b/app/services/guidance_wrapper.py index 0a47ac6d..0858f111 100644 --- a/app/services/guidance_wrapper.py +++ b/app/services/guidance_wrapper.py @@ -48,6 +48,7 @@ def is_up(self) -> bool: True if the model is up, False otherwise. """ + guidance.llms.OpenAI.cache.clear() handlebars = """ {{#user~}}Say 1{{~/user}} {{#assistant~}}