[Feature] Add support for weaviate vector db (#782)

This commit is contained in:
Rupesh Bansal
2023-10-18 10:48:53 +05:30
committed by GitHub
parent e8a2846449
commit cdfd6519c8
9 changed files with 581 additions and 5 deletions

View File

@@ -359,7 +359,6 @@ class EmbedChain(JSONSerializable):
db_result = self.db.get(ids=ids, where=where) # optional filter
existing_ids = set(db_result["ids"])
if len(existing_ids):
data_dict = {id: (doc, meta) for id, doc, meta in zip(ids, documents, metadatas)}
data_dict = {id: value for id, value in data_dict.items() if id not in existing_ids}
@@ -436,7 +435,6 @@ class EmbedChain(JSONSerializable):
:rtype: List[str]
"""
query_config = config or self.llm.config
if where is not None:
where = where
elif query_config is not None and query_config.where is not None:
@@ -463,7 +461,6 @@ class EmbedChain(JSONSerializable):
where=where,
skip_embedding=(hasattr(config, "query_type") and config.query_type == "Images"),
)
return contents
def query(self, input_query: str, config: BaseLlmConfig = None, dry_run=False, where: Optional[Dict] = None) -> str: