Update typing import in base.py
This commit is contained in:
parent
ff86d02a92
commit
77227b887b
1 changed files with 4 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
import ast
|
import ast
|
||||||
import inspect
|
import inspect
|
||||||
import types
|
import types
|
||||||
from typing import TYPE_CHECKING, Any, Dict, List, Optional
|
from typing import TYPE_CHECKING, Any, Coroutine, Dict, List, Optional
|
||||||
|
|
||||||
from langflow.graph.utils import UnbuiltObject
|
from langflow.graph.utils import UnbuiltObject
|
||||||
from langflow.interface.initialize import loading
|
from langflow.interface.initialize import loading
|
||||||
|
|
@ -245,7 +245,10 @@ class Vertex:
|
||||||
|
|
||||||
if self.is_task and self.task_id is not None:
|
if self.is_task and self.task_id is not None:
|
||||||
task = self.get_task()
|
task = self.get_task()
|
||||||
|
|
||||||
result = task.get(timeout=timeout)
|
result = task.get(timeout=timeout)
|
||||||
|
if isinstance(result, Coroutine):
|
||||||
|
result = await result
|
||||||
if result is not None: # If result is ready
|
if result is not None: # If result is ready
|
||||||
self._update_built_object_and_artifacts(result)
|
self._update_built_object_and_artifacts(result)
|
||||||
return self._built_object
|
return self._built_object
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue