diff --git a/src/backend/base/langflow/custom/custom_component/component.py b/src/backend/base/langflow/custom/custom_component/component.py index 3f38ff45ec7..5c3c4b0302c 100644 --- a/src/backend/base/langflow/custom/custom_component/component.py +++ b/src/backend/base/langflow/custom/custom_component/component.py @@ -211,6 +211,13 @@ def get_output(self, name: str) -> Any: return self._outputs[name] raise ValueError(f"Output {name} not found in {self.__class__.__name__}") + def set_on_output(self, name: str, **kwargs): + output = self.get_output(name) + for key, value in kwargs.items(): + if not hasattr(output, key): + raise ValueError(f"Output {name} does not have a method {key}") + setattr(output, key, value) + def set_output_value(self, name: str, value: Any): if name in self._outputs: self._outputs[name].value = value