Remove "code" parameter from VectorStoreVertex and ChainVertex

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-12-12 16:58:56 -03:00
commit 5f237313b9

View file

@ -131,6 +131,7 @@ class VectorStoreVertex(Vertex):
super().__init__(data, graph=graph, base_type="vectorstores")
self.params = params or {}
self.params.pop("code", None)
# VectorStores may contain databse connections
# so we need to define the __reduce__ method and the __setstate__ method
@ -200,9 +201,6 @@ class ChainVertex(Vertex):
self.params.pop("code", None)
# Check if the chain requires a PromptVertex
# Temporarily remove the code from the params
self.params.pop("code", None)
for key, value in self.params.items():
if isinstance(value, PromptVertex):
# Build the PromptVertex, passing the tools if available