fix: Fix leaky opens (#2924)

This commit is contained in:
Matthew Zhou
2025-09-15 16:25:01 -07:00
committed by GitHub
parent 962f87a98f
commit 5511a08017
12 changed files with 55 additions and 38 deletions

View File

@@ -36,7 +36,8 @@ from letta.schemas.llm_config import LLMConfig
def get_llm_config(filename: str, llm_config_dir: str = "tests/configs/llm_model_configs") -> LLMConfig:
filename = os.path.join(llm_config_dir, filename)
config_data = json.load(open(filename, "r"))
with open(filename, "r") as f:
config_data = json.load(f)
llm_config = LLMConfig(**config_data)
return llm_config