From aba8089e1d2ece4dd24030398245434a38b7ab70 Mon Sep 17 00:00:00 2001 From: Naman Jain Date: Tue, 26 Nov 2024 09:14:06 +0000 Subject: [PATCH] fix: cache and imports --- src/r2e/llms/__init__.py | 2 ++ src/r2e/llms/cache_object.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/r2e/llms/__init__.py b/src/r2e/llms/__init__.py index e69de29..8723b9c 100644 --- a/src/r2e/llms/__init__.py +++ b/src/r2e/llms/__init__.py @@ -0,0 +1,2 @@ +from r2e.llms.llm_args import LLMArgs +from r2e.llms.completions import LLMCompletions diff --git a/src/r2e/llms/cache_object.py b/src/r2e/llms/cache_object.py index 8afd6ce..d8be166 100644 --- a/src/r2e/llms/cache_object.py +++ b/src/r2e/llms/cache_object.py @@ -1,6 +1,6 @@ import os import json -from diskcache import Cache +from diskcache import Cache as DiskCache from r2e.paths import CACHE_PATH, CACHE_DIR @@ -8,7 +8,7 @@ class Cache: def __init__(self) -> None: os.makedirs(CACHE_DIR, exist_ok=True) - self.cache_dict = Cache(CACHE_PATH) + self.cache_dict = DiskCache(CACHE_DIR) @staticmethod def process_payload(payload):