pass kwargs through to loading (#863)

This commit is contained in:
Harrison Chase 2023-02-02 22:07:26 -08:00 committed by GitHub
parent 8df6b68093
commit 483441d305
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: