Add StatefulVertex and StatelessVertex classes
This commit is contained in:
parent
2213aa2e57
commit
d3f728a436
2 changed files with 8 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ from fastapi import APIRouter, Depends, HTTPException, Query, WebSocket, WebSock
|
||||||
from fastapi.responses import StreamingResponse
|
from fastapi.responses import StreamingResponse
|
||||||
from langflow.api.utils import build_input_keys_response, format_elapsed_time
|
from langflow.api.utils import build_input_keys_response, format_elapsed_time
|
||||||
from langflow.api.v1.schemas import BuildStatus, BuiltResponse, InitResponse, ResultDict, StreamData, VerticesOrderResponse
|
from langflow.api.v1.schemas import BuildStatus, BuiltResponse, InitResponse, ResultDict, StreamData, VerticesOrderResponse
|
||||||
|
from langflow.graph.vertex.base import StatelessVertex
|
||||||
from langflow.processing.process import process_tweaks_on_graph
|
from langflow.processing.process import process_tweaks_on_graph
|
||||||
from langflow.services.database.models.flow.flow import Flow
|
from langflow.services.database.models.flow.flow import Flow
|
||||||
from langflow.graph.graph.base import Graph
|
from langflow.graph.graph.base import Graph
|
||||||
|
|
|
||||||
|
|
@ -376,3 +376,10 @@ class Vertex:
|
||||||
def _built_object_repr(self):
|
def _built_object_repr(self):
|
||||||
# Add a message with an emoji, stars for sucess,
|
# Add a message with an emoji, stars for sucess,
|
||||||
return "Built sucessfully ✨" if self._built_object is not None else "Failed to build 😵💫"
|
return "Built sucessfully ✨" if self._built_object is not None else "Failed to build 😵💫"
|
||||||
|
|
||||||
|
class StatefulVertex(Vertex):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class StatelessVertex(Vertex):
|
||||||
|
pass
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue