formatting
This commit is contained in:
parent
3ed0c35bdb
commit
f3d50e9fea
3 changed files with 5 additions and 10 deletions
8
src/backend/langflow/cache/base.py
vendored
8
src/backend/langflow/cache/base.py
vendored
|
|
@ -8,12 +8,10 @@ import os
|
|||
import tempfile
|
||||
from collections import OrderedDict
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
from PIL import Image
|
||||
import dill
|
||||
import pandas as pd # type: ignore
|
||||
from typing import Any, Dict
|
||||
import dill # type: ignore
|
||||
|
||||
CACHE = {}
|
||||
CACHE: Dict[str, Any] = {}
|
||||
|
||||
|
||||
def create_cache_folder(func):
|
||||
|
|
|
|||
|
|
@ -162,7 +162,8 @@ class Node:
|
|||
# If the key is "func", then we need to use the run method
|
||||
if key == "func":
|
||||
if not isinstance(result, types.FunctionType):
|
||||
# func can be PythonFunction(code='\ndef upper_case(text: str) -> str:\n return text.upper()\n')
|
||||
# func can be
|
||||
# PythonFunction(code='\ndef upper_case(text: str) -> str:\n return text.upper()\n')
|
||||
# so we need to check if there is an attribute called run
|
||||
if hasattr(result, "run"):
|
||||
result = result.run # type: ignore
|
||||
|
|
|
|||
|
|
@ -229,10 +229,6 @@ class FrontendNode(BaseModel):
|
|||
field.required = False
|
||||
if field.value is None:
|
||||
field.value = ""
|
||||
# If the field.name contains api or api and key, then it might be an api key
|
||||
# other conditions are to make sure that it is not an input or output variable
|
||||
if "api" in key.lower() and "key" in key.lower():
|
||||
field.required = False
|
||||
|
||||
if "kwargs" in field.name.lower():
|
||||
field.advanced = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue