mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
(test) unset model_group_alias_map after test
This commit is contained in:
parent
8920f12a8d
commit
a7584a2b75
2 changed files with 2 additions and 2 deletions
|
@ -944,7 +944,7 @@ async def chat_completion(request: Request, model: Optional[str] = None, user_ap
|
|||
response = await llm_router.acompletion(**data)
|
||||
elif llm_router is not None and data["model"] in llm_router.deployment_names: # model in router deployments, calling a specific deployment on the router
|
||||
response = await llm_router.acompletion(**data, specific_deployment = True)
|
||||
elif llm_router is not None and data["model"] in litellm.model_group_alias_map: # model set in model_group_alias_map
|
||||
elif llm_router is not None and litellm.model_group_alias_map is not None and data["model"] in litellm.model_group_alias_map: # model set in model_group_alias_map
|
||||
response = await llm_router.acompletion(**data)
|
||||
else: # router is not set
|
||||
response = await litellm.acompletion(**data)
|
||||
|
|
|
@ -322,7 +322,7 @@ def test_model_group_aliases():
|
|||
router = Router(
|
||||
model_list=model_list,
|
||||
)
|
||||
|
||||
litellm.model_group_alias_map = {}
|
||||
for _ in range(20):
|
||||
selected_model = router.get_available_deployment("gpt-4")
|
||||
print("\n selected model", selected_model)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue