Refactor Vertex class in base.py
This commit is contained in:
parent
131cebcea6
commit
9f2d67f3bc
1 changed files with 8 additions and 17 deletions
|
|
@ -2,26 +2,13 @@ import ast
|
|||
import inspect
|
||||
import types
|
||||
from enum import Enum
|
||||
from typing import (
|
||||
TYPE_CHECKING,
|
||||
Any,
|
||||
AsyncIterator,
|
||||
Callable,
|
||||
Coroutine,
|
||||
Dict,
|
||||
Iterator,
|
||||
List,
|
||||
Optional,
|
||||
)
|
||||
from typing import (TYPE_CHECKING, Any, AsyncIterator, Callable, Coroutine,
|
||||
Dict, Iterator, List, Optional)
|
||||
|
||||
from loguru import logger
|
||||
|
||||
from langflow.graph.schema import (
|
||||
INPUT_COMPONENTS,
|
||||
OUTPUT_COMPONENTS,
|
||||
InterfaceComponentTypes,
|
||||
ResultData,
|
||||
)
|
||||
from langflow.graph.schema import (INPUT_COMPONENTS, OUTPUT_COMPONENTS,
|
||||
InterfaceComponentTypes, ResultData)
|
||||
from langflow.graph.utils import UnbuiltObject, UnbuiltResult
|
||||
from langflow.graph.vertex.utils import generate_result
|
||||
from langflow.interface.initialize import loading
|
||||
|
|
@ -639,6 +626,10 @@ class Vertex:
|
|||
|
||||
if self.pinned and self._built:
|
||||
return self.get_requester_result(requester)
|
||||
elif self._built and requester is not None:
|
||||
# This means that the vertex has already been built
|
||||
# and we are just getting the result for the requester
|
||||
return await self.get_requester_result(requester)
|
||||
self._reset()
|
||||
|
||||
if self.is_input and inputs is not None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue