Fix bugs and make improvements (#1794)
* add ? to prevent bug when template has no value * Refactor determine_component_name function in utils.py to use file name * Bump version to 0.6.18 in pyproject.toml --------- Co-authored-by: anovazzi1 <otavio2204@gmail.com>
This commit is contained in:
parent
676021d2d3
commit
83dfa4d160
4 changed files with 500 additions and 510 deletions
995
poetry.lock
generated
995
poetry.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "langflow"
|
name = "langflow"
|
||||||
version = "0.6.17"
|
version = "0.6.18"
|
||||||
description = "A Python package with a built-in web application"
|
description = "A Python package with a built-in web application"
|
||||||
authors = ["Logspace <contact@logspace.ai>"]
|
authors = ["Logspace <contact@logspace.ai>"]
|
||||||
maintainers = [
|
maintainers = [
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
from loguru import logger
|
||||||
|
|
||||||
from langflow.interface.custom.directory_reader import DirectoryReader
|
from langflow.interface.custom.directory_reader import DirectoryReader
|
||||||
from langflow.template.frontend_node.custom_components import CustomComponentFrontendNode
|
from langflow.template.frontend_node.custom_components import CustomComponentFrontendNode
|
||||||
from loguru import logger
|
|
||||||
|
|
||||||
|
|
||||||
def merge_nested_dicts_with_renaming(dict1, dict2):
|
def merge_nested_dicts_with_renaming(dict1, dict2):
|
||||||
|
|
@ -124,10 +125,6 @@ def get_new_key(dictionary, original_key):
|
||||||
|
|
||||||
def determine_component_name(component):
|
def determine_component_name(component):
|
||||||
"""Determine the name of the component."""
|
"""Determine the name of the component."""
|
||||||
component_output_types = component["output_types"]
|
|
||||||
if len(component_output_types) == 1:
|
|
||||||
return component_output_types[0]
|
|
||||||
else:
|
|
||||||
file_name = component.get("file").split(".")[0]
|
file_name = component.get("file").split(".")[0]
|
||||||
return "".join(word.capitalize() for word in file_name.split("_")) if "_" in file_name else file_name
|
return "".join(word.capitalize() for word in file_name.split("_")) if "_" in file_name else file_name
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -733,7 +733,7 @@ export default function CodeTabsComponent({
|
||||||
value={
|
value={
|
||||||
node.data.node!.template[
|
node.data.node!.template[
|
||||||
templateField
|
templateField
|
||||||
].value.toString() === "{}"
|
].value?.toString() === "{}"
|
||||||
? {
|
? {
|
||||||
yourkey: "value",
|
yourkey: "value",
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue