Skip to content

Commit 5a1a5f4

Browse files
fix: model matching end of function
1 parent 451a76b commit 5a1a5f4

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

DocToolsLLM/utils/misc.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,11 @@ def wrapped_model_name_matcher(model: str) -> str:
242242
match = get_close_matches(modelname, candidates, n=1)
243243
if match:
244244
return match[0]
245-
246-
red(f"Matching name for model with heuristics: {model}->{best_match}")
247-
return best_match
245+
else:
246+
red(f"Couldn't match the modelname {model} to any known model. "
247+
"Continuing but this will probably crash DocToolsLLM further "
248+
"down the code.")
249+
return model
248250

249251
def model_name_matcher(model: str) -> str:
250252
"""find the best match for a modelname (wrapper that checks if the matched

0 commit comments

Comments
 (0)