diff --git a/src/backend/langflow/graph/vertex/types.py b/src/backend/langflow/graph/vertex/types.py index 7609982a5..fdbabe510 100644 --- a/src/backend/langflow/graph/vertex/types.py +++ b/src/backend/langflow/graph/vertex/types.py @@ -205,6 +205,8 @@ class ChainVertex(Vertex): **kwargs, ) -> Any: if not self._built or force: + # Temporarily remove the code from the params + self.params.pop("code", None) # Check if the chain requires a PromptVertex for key, value in self.params.items(): if isinstance(value, PromptVertex):