From f6d29e17930a425f32ac32b179962ab46189f94a Mon Sep 17 00:00:00 2001 From: Magic_yuan <317617749@qq.com> Date: Fri, 24 Jan 2025 11:01:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=93=E5=AD=98=E5=A4=84?= =?UTF-8?q?=E7=90=86=E7=9A=84=E8=BF=90=E8=A1=8C=E6=97=B6=E9=94=99=E8=AF=AF?= =?UTF-8?q?=20].func=20=20#=20["func"]=20=20^^^^=20AttributeError:=20'dict?= =?UTF-8?q?'=20object=20has=20no=20attribute=20'func'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lightrag/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lightrag/utils.py b/lightrag/utils.py index ce556ab2..f36e03e2 100644 --- a/lightrag/utils.py +++ b/lightrag/utils.py @@ -479,9 +479,7 @@ async def handle_cache(hashing_kv, args_hash, prompt, mode="default"): quantized = min_val = max_val = None if is_embedding_cache_enabled: # Use embedding cache - embedding_model_func = hashing_kv.global_config[ - "embedding_func" - ].func # ["func"] + embedding_model_func = hashing_kv.global_config["embedding_func"]["func"] llm_model_func = hashing_kv.global_config.get("llm_model_func") current_embedding = await embedding_model_func([prompt])