mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
fix(router.py): fix null model names error
https://github.com/BerriAI/litellm/issues/669#issuecomment-1775456245
This commit is contained in:
parent
bbaa62af13
commit
cfed9fff74
1 changed files with 1 additions and 1 deletions
|
@ -20,12 +20,12 @@ class Router:
|
|||
|
||||
router = Router(model_list=model_list)
|
||||
"""
|
||||
model_names = []
|
||||
def __init__(self,
|
||||
model_list: Optional[list]=None,
|
||||
redis_host: Optional[str] = None,
|
||||
redis_port: Optional[int] = None,
|
||||
redis_password: Optional[str] = None) -> None:
|
||||
self.model_names = []
|
||||
if model_list:
|
||||
self.model_list = model_list
|
||||
self.model_names = [m["model_name"] for m in model_list]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue