Refactor vertex import in base.py

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-11-28 22:04:37 -03:00
commit 3cc1e4b8bc

View file

@ -5,7 +5,8 @@ from langflow.graph.edge.base import Edge
from langflow.graph.graph.constants import lazy_load_vertex_dict
from langflow.graph.graph.utils import process_flow
from langflow.graph.vertex.base import Vertex
from langflow.graph.vertex.types import FileToolVertex, LLMVertex, ToolkitVertex
from langflow.graph.vertex.types import (FileToolVertex, LLMVertex,
ToolkitVertex)
from langflow.interface.tools.constants import FILE_TOOLS
from langflow.utils import payload
from loguru import logger
@ -249,4 +250,3 @@ class Graph:
vertex_ids = [vertex.id for vertex in self.vertices]
edges_repr = "\n".join([f"{edge.source_id} --> {edge.target_id}" for edge in self.edges])
return f"Graph:\nNodes: {vertex_ids}\nConnections:\n{edges_repr}"
return f"Graph:\nNodes: {vertex_ids}\nConnections:\n{edges_repr}"