Skip to content

Commit 99f0fd1

Browse files
committed
Allow path expansion, bump version
1 parent e5417f6 commit 99f0fd1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

llms_wrapper/cost_logger.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ def __init__(self, db_path: str, **defaults):
7171
Raises:
7272
Exception: If database initialization fails
7373
"""
74+
db_path = os.path.expanduser(db_path)
75+
db_path = os.path.expandvars(db_path)
7476
self.db_path = Path(db_path)
7577

7678
if defaults.get("user") is None:
@@ -553,4 +555,4 @@ def get_output_tokens(self) -> int:
553555
print(f"Total cost: ${logger.get_cost():.4f}")
554556
print(f"Total input tokens: {logger.get_input_tokens()}")
555557
print(f"Total output tokens: {logger.get_output_tokens()}")
556-
print(f"Get all: {logger.get()}")
558+
print(f"Get all: {logger.get()}")

llms_wrapper/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import importlib.metadata
2-
__version__ = "0.8"
2+
__version__ = "0.9"
33

0 commit comments

Comments
 (0)