mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-08-29 04:26:20 +00:00
fix: use 'is not None' for entity cache hit check to handle empty list results
Empty extraction results (valid cached values) were incorrectly treated as cache misses because truthiness check `if cached_result:` evaluates [] as False. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
467955e98b
commit
5319e504e0
@@ -897,7 +897,7 @@ def extract_entities_llm(
|
||||
"entity_types": kwargs.get("entity_types"),
|
||||
}
|
||||
cached_result = _result_cache.get("entities", text, **cache_params)
|
||||
if cached_result:
|
||||
if cached_result is not None:
|
||||
logger.debug(f"Cache hit for entity extraction ({len(cached_result)} entities)")
|
||||
return cached_result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user