From 5f237313b99b6badd4e916b143dd100c96c57e5d Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 12 Dec 2023 16:58:56 -0300 Subject: [PATCH] Remove "code" parameter from VectorStoreVertex and ChainVertex --- src/backend/langflow/graph/vertex/types.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/backend/langflow/graph/vertex/types.py b/src/backend/langflow/graph/vertex/types.py index 42a1ee316..868cc6c67 100644 --- a/src/backend/langflow/graph/vertex/types.py +++ b/src/backend/langflow/graph/vertex/types.py @@ -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