Merge branch 'python_custom_node_component' of personal:logspace-ai/langflow into python_custom_node_component
This commit is contained in:
commit
6391cfd671
1 changed files with 8 additions and 4 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from langflow.interface.initialize import loading
|
||||
from langflow.interface.listing import ALL_TYPES_DICT
|
||||
from langflow.utils.constants import DIRECT_TYPES
|
||||
from langflow.utils.logger import logger
|
||||
from langflow.utils.util import sync_to_async
|
||||
|
||||
|
|
@ -110,11 +111,14 @@ class Vertex:
|
|||
file_path = value.get("file_path")
|
||||
|
||||
params[key] = file_path
|
||||
elif (
|
||||
value.get("type") in ["code", "str", "prompt"]
|
||||
and params.get(key) is None
|
||||
):
|
||||
elif value.get("type") in DIRECT_TYPES and params.get(key) is None:
|
||||
params[key] = value.get("value")
|
||||
|
||||
if not value.get("required") and params.get(key) is None:
|
||||
if value.get("default"):
|
||||
params[key] = value.get("default")
|
||||
else:
|
||||
params.pop(key, None)
|
||||
# Add _type to params
|
||||
self.params = params
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue