fix(embedding_store): ensure is_healthy remains unchanged on cache hits

- Updated get_embeddings docstring to clarify cache hits must not alter is_healthy state
- Improved code comment for embedding dimension matching method
This commit is contained in:
jinli.yl 2026-08-20 19:47:51 +08:00
parent 7aa5e29127
commit 097f6c8270

View file

@ -69,7 +69,7 @@ class BaseEmbeddingStore(BaseComponent):
@abstractmethod
async def get_embeddings(self, input_text: list[str], **kwargs) -> list[np.ndarray | None]:
"""Get embeddings for texts."""
"""Get embeddings; cache hits must not change is_healthy."""
def _embedding_dim_matches(self, embedding: np.ndarray | None) -> bool:
"""Return whether an embedding matches the configured model dimension."""