fix(embedding): add list type check for embeddings in cache loading

This commit is contained in:
jinli.yl 2026-02-24 20:50:11 +08:00
parent f970d5e778
commit b1160d3b8e

View file

@ -160,7 +160,7 @@ class BaseEmbeddingModel(ABC):
# Each line is {cache_key: embedding}
cache_key, embedding = next(iter(data.items()))
if cache_key and embedding:
if cache_key and embedding and isinstance(embedding, list):
# Skip if already loaded (keep the newest)
if cache_key in self._embedding_cache:
continue