Skip to content

Commit

Permalink
chore: move clear cache command inside wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
dakennguyen committed Jun 25, 2023
1 parent 05f15e3 commit 6247767
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion app/routes/health.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions app/services/guidance_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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~}}
Expand Down

0 comments on commit 6247767

Please sign in to comment.