File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ def cli_launcher() -> None:
5959 sys .argv [1 ] = aft
6060
6161 # make it so that 'wdoc --task=query THING' becomes 'wdoc --task=query --path=THING'
62- if "--path" not in sysline :
62+ if "--path" not in sysline and "string" not in sysline : # if string is present that can be because of filetype=string, in which case path is not needed
6363 path = sys .argv [2 ]
6464 newarg = f"--path={ path } "
6565 sys .argv [2 ]= newarg
Original file line number Diff line number Diff line change @@ -390,7 +390,8 @@ def load_one_doc(
390390 split into documents, add some metadata then return.
391391 The loader is cached"""
392392 text_splitter = get_splitter (task , modelname = llm_name )
393- assert kwargs , "Received an empty dict of arguments to load. Maybe --path is empty?"
393+ if filetype != "string" : # only filetype that can take empty arguments
394+ assert kwargs , "Received an empty dict of arguments to load. Maybe --path is empty?"
394395
395396 expected_global_dir = loaders_temp_dir_file .read_text ().strip ()
396397 assert expected_global_dir , f"Empty loaders_temp_dir_file at { loaders_temp_dir_file } "
You can’t perform that action at this time.
0 commit comments