🔥 refactor(base.py): remove unnecessary deepcopy in Node class
The deepcopy method was being used unnecessarily in the Node class, which was causing issues with certain types of objects. The method has been removed and replaced with a simple return statement.
This commit is contained in:
parent
20cc70db36
commit
588f0da625
1 changed files with 1 additions and 13 deletions
|
|
@ -212,19 +212,7 @@ class Node:
|
|||
if not self._built or force:
|
||||
self._build()
|
||||
|
||||
#! Deepcopy is breaking for vectorstores
|
||||
if self.base_type in [
|
||||
"vectorstores",
|
||||
"VectorStoreRouterAgent",
|
||||
"VectorStoreAgent",
|
||||
"VectorStoreInfo",
|
||||
] or self.node_type in [
|
||||
"VectorStoreInfo",
|
||||
"VectorStoreRouterToolkit",
|
||||
"SQLDatabase",
|
||||
]:
|
||||
return self._built_object
|
||||
return deepcopy(self._built_object)
|
||||
return self._built_object
|
||||
|
||||
def add_edge(self, edge: "Edge") -> None:
|
||||
self.edges.append(edge)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue