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:
parent
1443af2e42
commit
7b5ba8e8f5
4 changed files with 19 additions and 39 deletions
|
|
@ -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",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue