Skip to content

Commit 32e036d

Browse files
fix: ddg test
Signed-off-by: thiswillbeyourgithub <[email protected]>
1 parent 4d47631 commit 32e036d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tests/test_wdoc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ def test_query_duckduckgo_search():
498498
path="How is nvidia doing this month",
499499
query="How is nvidia doing this month",
500500
filetype="ddg",
501-
ddg_max_result=3,
501+
ddg_max_results=3,
502502
ddg_region="us - US",
503503
model=f"openai/{WDOC_TEST_OPENAI_MODEL}",
504504
query_eval_model=f"openai/{WDOC_TEST_OPENAI_EVAL_MODEL}",

wdoc/wdoc.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,11 @@ def print_exception(exc_type, exc_value, exc_traceback):
194194
# make sure the extra args are valid
195195
for k in cli_kwargs:
196196
if k not in self.allowed_extra_args:
197+
logger.exception(
198+
f"Found unexpected keyword argument: '{k}'\nThe allowed arguments are {','.join(self.allowed_extra_args)}"
199+
)
197200
raise Exception(
198-
logger.warning(
199-
f"Found unexpected keyword argument: '{k}'\nThe allowed arguments are {','.join(self.allowed_extra_args)}"
200-
)
201+
f"Found unexpected keyword argument: '{k}'\nThe allowed arguments are {','.join(self.allowed_extra_args)}"
201202
)
202203

203204
# type checking of extra args

0 commit comments

Comments
 (0)