🔀 refactor(base.py): add from_method_nodes dictionary to RetrieverCreator class
The `from_method_nodes` dictionary is added to the `RetrieverCreator` class in order to map the "MultiQueryRetriever" node to the "from_llm" method. This refactor improves the readability and maintainability of the code by explicitly defining the mapping between nodes and methods.
This commit is contained in:
parent
72b6681f5a
commit
8cc0497120
1 changed files with 2 additions and 0 deletions
|
|
@ -13,6 +13,8 @@ from langflow.utils.util import build_template_from_method
|
|||
class RetrieverCreator(LangChainTypeCreator):
|
||||
type_name: str = "retrievers"
|
||||
|
||||
from_method_nodes = {"MultiQueryRetriever": "from_llm"}
|
||||
|
||||
@property
|
||||
def frontend_node_class(self) -> Type[RetrieverFrontendNode]:
|
||||
return RetrieverFrontendNode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue