Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions src/backend/base/langflow/custom/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,9 @@ def get_module_name_from_display_name(display_name: str):


def build_custom_component_template_from_inputs(
custom_component: Component | CustomComponent, user_id: str | UUID | None = None, module_name: str | None = None
custom_component: Component | CustomComponent,
user_id: str | UUID | None = None,
module_name: str | None = None, # noqa :ARG001
):
# The List of Inputs fills the role of the build_config and the entrypoint_args
"""Builds a frontend node template from a custom component using its input-based configuration.
Expand Down Expand Up @@ -494,7 +496,6 @@ def build_custom_component_template_from_inputs(
# ! This should be removed when we have a better way to handle this
frontend_node.set_base_classes_from_outputs()
reorder_fields(frontend_node, cc_instance._get_field_order())
frontend_node = build_component_metadata(frontend_node, cc_instance, module_name, ctype_name)

return frontend_node.to_dict(keep_name=False), cc_instance

Expand Down Expand Up @@ -588,11 +589,6 @@ def build_custom_component_template(

reorder_fields(frontend_node, custom_instance._get_field_order())

if module_name:
frontend_node = build_component_metadata(
frontend_node, custom_component, module_name, custom_component.__class__.__name__
)

return frontend_node.to_dict(keep_name=False), custom_instance
except Exception as exc:
if isinstance(exc, HTTPException):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,19 +361,7 @@
"key": "ChatInput",
"legacy": false,
"lf_version": "1.5.0",
"metadata": {
"code_hash": "5f2d98ee19db",
"dependencies": {
"dependencies": [
{
"name": "langflow",
"version": null
}
],
"total_dependencies": 1
},
"module": "langflow.components.input_output.chat.ChatInput"
},
"metadata": {},
"output_types": [],
"outputs": [
{
Expand Down Expand Up @@ -608,27 +596,7 @@
"icon": "MessagesSquare",
"legacy": false,
"lf_version": "1.5.0",
"metadata": {
"code_hash": "765fdf2ed814",
"dependencies": {
"dependencies": [
{
"name": "orjson",
"version": "3.10.15"
},
{
"name": "fastapi",
"version": "0.116.1"
},
{
"name": "langflow",
"version": null
}
],
"total_dependencies": 3
},
"module": "langflow.components.input_output.chat_output.ChatOutput"
},
"metadata": {},
"output_types": [],
"outputs": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,7 @@
"icon": "MessagesSquare",
"legacy": false,
"lf_version": "1.4.2",
"metadata": {
"code_hash": "5f2d98ee19db",
"dependencies": {
"dependencies": [
{
"name": "langflow",
"version": null
}
],
"total_dependencies": 1
},
"module": "langflow.components.input_output.chat.ChatInput"
},
"metadata": {},
"output_types": [],
"outputs": [
{
Expand Down Expand Up @@ -560,27 +548,7 @@
"icon": "MessagesSquare",
"legacy": false,
"lf_version": "1.4.2",
"metadata": {
"code_hash": "765fdf2ed814",
"dependencies": {
"dependencies": [
{
"name": "orjson",
"version": "3.10.15"
},
{
"name": "fastapi",
"version": "0.116.1"
},
{
"name": "langflow",
"version": null
}
],
"total_dependencies": 3
},
"module": "langflow.components.input_output.chat_output.ChatOutput"
},
"metadata": {},
"output_types": [],
"outputs": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,19 +351,7 @@
"icon": "type",
"legacy": false,
"lf_version": "1.4.2",
"metadata": {
"code_hash": "efdcba3771af",
"dependencies": {
"dependencies": [
{
"name": "langflow",
"version": null
}
],
"total_dependencies": 1
},
"module": "langflow.components.input_output.text.TextInputComponent"
},
"metadata": {},
"output_types": [],
"outputs": [
{
Expand Down Expand Up @@ -476,27 +464,7 @@
"icon": "MessagesSquare",
"legacy": false,
"lf_version": "1.4.2",
"metadata": {
"code_hash": "765fdf2ed814",
"dependencies": {
"dependencies": [
{
"name": "orjson",
"version": "3.10.15"
},
{
"name": "fastapi",
"version": "0.116.1"
},
{
"name": "langflow",
"version": null
}
],
"total_dependencies": 3
},
"module": "langflow.components.input_output.chat_output.ChatOutput"
},
"metadata": {},
"output_types": [],
"outputs": [
{
Expand Down Expand Up @@ -735,19 +703,7 @@
"key": "ParserComponent",
"legacy": false,
"lf_version": "1.4.2",
"metadata": {
"code_hash": "556209520650",
"dependencies": {
"dependencies": [
{
"name": "langflow",
"version": null
}
],
"total_dependencies": 1
},
"module": "langflow.components.processing.parser.ParserComponent"
},
"metadata": {},
"minimized": false,
"output_types": [],
"outputs": [
Expand Down Expand Up @@ -931,31 +887,7 @@
"key": "URLComponent",
"legacy": false,
"lf_version": "1.4.2",
"metadata": {
"code_hash": "b5c50602651a",
"dependencies": {
"dependencies": [
{
"name": "requests",
"version": "2.32.5"
},
{
"name": "bs4",
"version": "4.12.3"
},
{
"name": "langchain_community",
"version": "0.3.21"
},
{
"name": "langflow",
"version": null
}
],
"total_dependencies": 4
},
"module": "langflow.components.data.url.URLComponent"
},
"metadata": {},
"minimized": false,
"output_types": [],
"outputs": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,19 +236,7 @@
"icon": "message-square-more",
"legacy": false,
"lf_version": "1.4.3",
"metadata": {
"code_hash": "7d2ecfa2054e",
"dependencies": {
"dependencies": [
{
"name": "langflow",
"version": null
}
],
"total_dependencies": 1
},
"module": "langflow.components.helpers.memory.MemoryComponent"
},
"metadata": {},
"output_types": [],
"outputs": [
{
Expand Down Expand Up @@ -1933,19 +1921,7 @@
"key": "ChatInput",
"legacy": false,
"lf_version": "1.4.3",
"metadata": {
"code_hash": "5f2d98ee19db",
"dependencies": {
"dependencies": [
{
"name": "langflow",
"version": null
}
],
"total_dependencies": 1
},
"module": "langflow.components.input_output.chat.ChatInput"
},
"metadata": {},
"minimized": true,
"output_types": [],
"outputs": [
Expand Down Expand Up @@ -2190,27 +2166,7 @@
"icon": "MessagesSquare",
"key": "ChatOutput",
"legacy": false,
"metadata": {
"code_hash": "765fdf2ed814",
"dependencies": {
"dependencies": [
{
"name": "orjson",
"version": "3.10.15"
},
{
"name": "fastapi",
"version": "0.116.1"
},
{
"name": "langflow",
"version": null
}
],
"total_dependencies": 3
},
"module": "langflow.components.input_output.chat_output.ChatOutput"
},
"metadata": {},
"minimized": true,
"output_types": [],
"outputs": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,7 @@
"icon": "MessagesSquare",
"legacy": false,
"lf_version": "1.4.3",
"metadata": {
"code_hash": "5f2d98ee19db",
"dependencies": {
"dependencies": [
{
"name": "langflow",
"version": null
}
],
"total_dependencies": 1
},
"module": "langflow.components.input_output.chat.ChatInput"
},
"metadata": {},
"output_types": [],
"outputs": [
{
Expand Down Expand Up @@ -387,27 +375,7 @@
"icon": "MessagesSquare",
"legacy": false,
"lf_version": "1.4.3",
"metadata": {
"code_hash": "765fdf2ed814",
"dependencies": {
"dependencies": [
{
"name": "orjson",
"version": "3.10.15"
},
{
"name": "fastapi",
"version": "0.116.1"
},
{
"name": "langflow",
"version": null
}
],
"total_dependencies": 3
},
"module": "langflow.components.input_output.chat_output.ChatOutput"
},
"metadata": {},
"output_types": [],
"outputs": [
{
Expand Down Expand Up @@ -1114,19 +1082,7 @@
"icon": "file-text",
"legacy": false,
"lf_version": "1.4.3",
"metadata": {
"code_hash": "0deb837dc28d",
"dependencies": {
"dependencies": [
{
"name": "langflow",
"version": null
}
],
"total_dependencies": 1
},
"module": "langflow.components.data.file.FileComponent"
},
"metadata": {},
"minimized": false,
"output_types": [],
"outputs": [
Expand Down
Loading
Loading