Skip to content
Snippets Groups Projects
Unverified Commit 29ef306a authored by Dilbarjot Randhawa's avatar Dilbarjot Randhawa Committed by GitHub
Browse files

fix error that occurs when defining custom_path in download_loader. (#8865)

parent 975a76fa
No related branches found
No related tags found
No related merge requests found
...@@ -35,11 +35,17 @@ def download_loader( ...@@ -35,11 +35,17 @@ def download_loader(
Returns: Returns:
A Loader. A Loader.
""" """
# Only one of the `custom_dir` or `custom_path` is supported.
if custom_path is not None:
custom_dir = None
else:
custom_dir = "llamahub_modules"
reader_cls = download_llama_module( reader_cls = download_llama_module(
loader_class, loader_class,
llama_hub_url=loader_hub_url, llama_hub_url=loader_hub_url,
refresh_cache=refresh_cache, refresh_cache=refresh_cache,
custom_dir="llamahub_modules", custom_dir=custom_dir,
custom_path=custom_path, custom_path=custom_path,
use_gpt_index_import=use_gpt_index_import, use_gpt_index_import=use_gpt_index_import,
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment