From 6f7efd01f21d4077ac5b2538445fefe13ef18727 Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Fri, 14 Jun 2024 15:05:19 -0300 Subject: [PATCH] refactor: Improve handling of repr_value in CustomComponent --- src/backend/base/langflow/interface/initialize/loading.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/base/langflow/interface/initialize/loading.py b/src/backend/base/langflow/interface/initialize/loading.py index 05329fcc1..e0ecd5797 100644 --- a/src/backend/base/langflow/interface/initialize/loading.py +++ b/src/backend/base/langflow/interface/initialize/loading.py @@ -160,7 +160,7 @@ async def build_custom_component(params: dict, custom_component: "CustomComponen if raw is None and isinstance(build_result, (dict, Data, str)): raw = build_result.data if isinstance(build_result, Data) else build_result - artifact_type = get_artifact_type(custom_component or raw, build_result) + artifact_type = get_artifact_type(custom_component.repr_value or raw, build_result) raw = post_process_raw(raw, artifact_type) artifact = {"repr": custom_repr, "raw": raw, "type": artifact_type} return custom_component, build_result, artifact