Skip to content

Commit 81984fd

Browse files
committed
resolved bugs in json loading
1 parent bd04693 commit 81984fd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

agentneo/tracing/llm_utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@
1313
with open("agentneo/configs/model_costs.json", "r") as file:
1414
config = json.load(file)
1515
except FileNotFoundError:
16-
with resources.open_text("agentneo", "configs/model_costs.json") as file:
16+
# with resources.open_text("agentneo", "configs/model_costs.json") as file:
17+
# config = json.load(file)
18+
from importlib.resources import files
19+
with (files("agentneo.configs") / "model_costs.json").open("r") as file:
1720
config = json.load(file)
1821

1922

23+
2024
def extract_llm_output(result):
2125

2226
# import pdb

0 commit comments

Comments
 (0)