From 10ca1bc6b357bae8b2fd3d1dcd6c7452f291991d Mon Sep 17 00:00:00 2001 From: scrpr <46473171+scrpr@users.noreply.github.com> Date: Fri, 14 Jun 2024 21:47:54 +0800 Subject: [PATCH] fix: fix exception handling logic --- tokencost/constants.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tokencost/constants.py b/tokencost/constants.py index 7147570..1df6906 100644 --- a/tokencost/constants.py +++ b/tokencost/constants.py @@ -47,6 +47,7 @@ async def update_token_costs(): TOKEN_COSTS = await fetch_costs() except Exception as e: logging.error(f"Failed to update TOKEN_COSTS: {e}") + raise with open(os.path.join(os.path.dirname(__file__), "model_prices.json"), "r") as f: TOKEN_COSTS_STATIC = json.load(f)