Skip to content

Commit f6d29e1

Browse files
committed
修复缓存处理的运行时错误
].func # ["func"] ^^^^ AttributeError: 'dict' object has no attribute 'func'
1 parent 443aab2 commit f6d29e1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lightrag/utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,7 @@ async def handle_cache(hashing_kv, args_hash, prompt, mode="default"):
479479
quantized = min_val = max_val = None
480480
if is_embedding_cache_enabled:
481481
# Use embedding cache
482-
embedding_model_func = hashing_kv.global_config[
483-
"embedding_func"
484-
].func # ["func"]
482+
embedding_model_func = hashing_kv.global_config["embedding_func"]["func"]
485483
llm_model_func = hashing_kv.global_config.get("llm_model_func")
486484

487485
current_embedding = await embedding_model_func([prompt])

0 commit comments

Comments
 (0)