chore: add abstract decorator and output log when query embedding fails (#9264)

This commit is contained in:
zhuhao 2024-10-12 23:58:41 +08:00 committed by GitHub
commit d97d3ff5fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 2 deletions

View file

@ -77,7 +77,7 @@ class ElasticSearchVector(BaseVector):
raise ValueError("Elasticsearch vector database version must be greater than 8.0.0")
def get_type(self) -> str:
return "elasticsearch"
return VectorType.ELASTICSEARCH
def add_texts(self, documents: list[Document], embeddings: list[list[float]], **kwargs):
uuids = self._get_uuids(documents)