Remove unused method _validate_vertices() in Graph class
This commit is contained in:
parent
4b5c6436e2
commit
daccda76fa
1 changed files with 1 additions and 10 deletions
|
|
@ -603,8 +603,7 @@ class Graph:
|
|||
# This is a hack to make sure that the LLM vertex is sent to
|
||||
# the toolkit vertex
|
||||
self._build_vertex_params()
|
||||
# remove invalid vertices
|
||||
self._validate_vertices()
|
||||
|
||||
# Now that we have the vertices and edges
|
||||
# We need to map the vertices that are connected to
|
||||
# to ChatVertex instances
|
||||
|
|
@ -631,14 +630,6 @@ class Graph:
|
|||
if isinstance(vertex, ToolkitVertex):
|
||||
vertex.params["llm"] = llm_vertex
|
||||
|
||||
def _validate_vertices(self) -> None:
|
||||
"""Check that all vertices have edges"""
|
||||
if len(self.vertices) == 1:
|
||||
return
|
||||
for vertex in self.vertices:
|
||||
if not self._validate_vertex(vertex):
|
||||
raise ValueError(f"{vertex.display_name} is not connected to any other components")
|
||||
|
||||
def _validate_vertex(self, vertex: Vertex) -> bool:
|
||||
"""Validates a vertex."""
|
||||
# All vertices that do not have edges are invalid
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue