mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
router - add doc string
This commit is contained in:
parent
91d9d59717
commit
cdc1e952ac
3 changed files with 74 additions and 11 deletions
|
@ -69,7 +69,7 @@ from litellm.types.router import (
|
|||
AlertingConfig,
|
||||
AllowedFailsPolicy,
|
||||
AssistantsTypedDict,
|
||||
CustomRoutingStrategy,
|
||||
CustomRoutingStrategyBase,
|
||||
Deployment,
|
||||
DeploymentTypedDict,
|
||||
LiteLLM_Params,
|
||||
|
@ -4815,7 +4815,18 @@ class Router:
|
|||
except Exception as e:
|
||||
pass
|
||||
|
||||
def set_custom_routing_strategy(self, CustomRoutingStrategy: CustomRoutingStrategy):
|
||||
def set_custom_routing_strategy(
|
||||
self, CustomRoutingStrategy: CustomRoutingStrategyBase
|
||||
):
|
||||
"""
|
||||
Sets get_available_deployment and async_get_available_deployment on an instanced of litellm.Router
|
||||
|
||||
Use this to set your custom routing strategy
|
||||
|
||||
Args:
|
||||
CustomRoutingStrategy: litellm.router.CustomRoutingStrategyBase
|
||||
"""
|
||||
|
||||
setattr(
|
||||
self,
|
||||
"get_available_deployment",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue