Update lightrag.py

This commit is contained in:
zrguo
2024-12-26 22:14:04 +08:00
committed by GitHub
parent a1493f56d6
commit 457e683acd

View File

@@ -198,15 +198,12 @@ class LightRAG:
logger.info(f"Creating working directory {self.working_dir}") logger.info(f"Creating working directory {self.working_dir}")
os.makedirs(self.working_dir) os.makedirs(self.working_dir)
self.llm_response_cache = ( self.llm_response_cache = self.key_string_value_json_storage_cls(
self.key_string_value_json_storage_cls( namespace="llm_response_cache",
namespace="llm_response_cache", global_config=asdict(self),
global_config=asdict(self), embedding_func=None,
embedding_func=None,
)
if self.enable_llm_cache
else None
) )
self.embedding_func = limit_async_func_call(self.embedding_func_max_async)( self.embedding_func = limit_async_func_call(self.embedding_func_max_async)(
self.embedding_func self.embedding_func
) )