Update utils.py (#10201)

This commit is contained in:
Nathan Brake 2025-04-22 16:54:46 -04:00 committed by GitHub
parent b2955a2bdd
commit 08e5bdf542
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -180,9 +180,9 @@ from litellm.types.utils import (
all_litellm_params, all_litellm_params,
) )
with resources.open_text( with resources.files("litellm.litellm_core_utils.tokenizers") \
"litellm.litellm_core_utils.tokenizers", "anthropic_tokenizer.json" .joinpath("anthropic_tokenizer.json") \
) as f: .open("r") as f:
json_data = json.load(f) json_data = json.load(f)
# Convert to str (if necessary) # Convert to str (if necessary)
claude_json_str = json.dumps(json_data) claude_json_str = json.dumps(json_data)