🐛 fix(loading.py): fix issue with search_kwargs assignment in instantiate_vectorstore function
🔧 chore(loading.py): refactor instantiate_vectorstore function to clean up docs or texts to have only documents
This commit is contained in:
parent
4a399906ca
commit
c49d0c7faf
1 changed files with 2 additions and 0 deletions
|
|
@ -300,6 +300,8 @@ def instantiate_embedding(node_type, class_object, params: Dict):
|
||||||
|
|
||||||
def instantiate_vectorstore(class_object: Type[VectorStore], params: Dict):
|
def instantiate_vectorstore(class_object: Type[VectorStore], params: Dict):
|
||||||
search_kwargs = params.pop("search_kwargs", {})
|
search_kwargs = params.pop("search_kwargs", {})
|
||||||
|
if search_kwargs == {"yourkey": "value"}:
|
||||||
|
search_kwargs = {}
|
||||||
# clean up docs or texts to have only documents
|
# clean up docs or texts to have only documents
|
||||||
if "texts" in params:
|
if "texts" in params:
|
||||||
params["documents"] = params.pop("texts")
|
params["documents"] = params.pop("texts")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue