Revert "fix: Optimize Setting of Output Required Inputs" (#4404)

Revert "fix: Optimize Setting of Output Required Inputs (#4389)"

This reverts commit 7cc497aa52.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-11-05 12:55:48 -03:00 • committed by GitHub
commit 7b5ba8e8f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 19 additions and 39 deletions

View file

@ -1,4 +1,3 @@
from .agent import AgentComponent
from .crewai import CrewAIAgentComponent
from .csv import CSVAgentComponent
from .hierarchical_crew import HierarchicalCrewComponent
@ -27,5 +26,4 @@ __all__ = [
"VectorStoreAgentComponent",
"VectorStoreRouterAgentComponent",
"XMLAgentComponent",
"AgentComponent",
]

View file

@ -10,7 +10,6 @@ from langflow.field_typing import LanguageModel
from langflow.field_typing.range_spec import RangeSpec
from langflow.inputs import BoolInput, DictInput, DropdownInput, FloatInput, IntInput, SecretStrInput, StrInput
from langflow.inputs.inputs import HandleInput
from langflow.io import Output
class OpenAIModelComponent(LCModelComponent):
@ -82,10 +81,6 @@ class OpenAIModelComponent(LCModelComponent):
input_types=["OutputParser"],
),
]
outputs = [
Output(display_name="Text", name="text_output", method="text_response"),
Output(display_name="Language Model", name="model_output", method="build_model"),
]
def build_model(self) -> LanguageModel: # type: ignore[type-var]
# self.output_schema is a list of dictionaries

View file

@ -369,8 +369,6 @@ class Component(CustomComponent):
def _set_output_required_inputs(self) -> None:
for output in self.outputs:
if output.required_inputs:
continue
if not output.method:
continue
method = getattr(self, output.method, None)