Skip to content

Commit

Permalink
simplify code and remove redundancy
Browse files Browse the repository at this point in the history
  • Loading branch information
rishsriv committed Dec 15, 2024
1 parent 5d98561 commit 60e00b0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions defog_utils/utils_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ def __post_init__(self):
if mname in self.model:
potential_model_names.append(mname)

if len(potential_model_names) == 1:
model_name = potential_model_names[0]
elif len(potential_model_names) > 1:
if len(potential_model_names) > 0:
# if there are multiple potential matches, then find the one with the longest prefix
model_name = max(potential_model_names, key=len)

Expand Down

0 comments on commit 60e00b0

Please sign in to comment.