mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-13 14:50:00 +00:00
pass kwargs through to loading (#863)
This commit is contained in:
parent
8df6b68093
commit
483441d305
@ -440,7 +440,7 @@ def load_chain_from_config(config: dict, **kwargs: Any) -> Chain:
|
|||||||
def load_chain(path: Union[str, Path], **kwargs: Any) -> Chain:
|
def load_chain(path: Union[str, Path], **kwargs: Any) -> Chain:
|
||||||
"""Unified method for loading a chain from LangChainHub or local fs."""
|
"""Unified method for loading a chain from LangChainHub or local fs."""
|
||||||
if hub_result := try_load_from_hub(
|
if hub_result := try_load_from_hub(
|
||||||
path, _load_chain_from_file, "chains", {"json", "yaml"}
|
path, _load_chain_from_file, "chains", {"json", "yaml"}, **kwargs
|
||||||
):
|
):
|
||||||
return hub_result
|
return hub_result
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user