diff --git a/README.md b/README.md index 80d65d8..6ae79c0 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ from pyllm import CodeLLM llm = CodeLLM() swap_numbers = llm.def_function( - "Swap two input numbers", unit_tests=[((1, 2), (2, 1))], use_cached=False + "Swap two input numbers", unit_tests=[((1, 2), (2, 1))] ) print(swap_numbers(20, 40)) # Output: (40, 20) diff --git a/pyllm/llm.py b/pyllm/llm.py index c008783..d5a7954 100644 --- a/pyllm/llm.py +++ b/pyllm/llm.py @@ -15,6 +15,9 @@ from pyllm.exceptions import TooManyRetries +os.makedirs(user_cache_dir("PyLLM"), exist_ok=True) + + class CacheHandler: CACHE_FILE = os.path.join(user_cache_dir("PyLLM"), "cached_functions.json")