mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
refactor(router.py): renaming variable
This commit is contained in:
parent
03303033e5
commit
563a3d3016
2 changed files with 3 additions and 3 deletions
|
@ -34,7 +34,7 @@ class Router:
|
||||||
cache_responses: bool = False,
|
cache_responses: bool = False,
|
||||||
num_retries: Optional[int] = None,
|
num_retries: Optional[int] = None,
|
||||||
timeout: float = 600,
|
timeout: float = 600,
|
||||||
chat_completion_params = {}, # default params for Router.chat.completion.create
|
default_litellm_params = {}, # default params for Router.chat.completion.create
|
||||||
routing_strategy: Literal["simple-shuffle", "least-busy"] = "simple-shuffle") -> None:
|
routing_strategy: Literal["simple-shuffle", "least-busy"] = "simple-shuffle") -> None:
|
||||||
|
|
||||||
if model_list:
|
if model_list:
|
||||||
|
@ -44,7 +44,7 @@ class Router:
|
||||||
if num_retries:
|
if num_retries:
|
||||||
self.num_retries = num_retries
|
self.num_retries = num_retries
|
||||||
|
|
||||||
self.chat = litellm.Chat(params=chat_completion_params)
|
self.chat = litellm.Chat(params=default_litellm_params)
|
||||||
|
|
||||||
litellm.request_timeout = timeout
|
litellm.request_timeout = timeout
|
||||||
self.routing_strategy = routing_strategy
|
self.routing_strategy = routing_strategy
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
# "api_version": os.getenv("AZURE_API_VERSION"),
|
# "api_version": os.getenv("AZURE_API_VERSION"),
|
||||||
# "api_base": os.getenv("AZURE_API_BASE")
|
# "api_base": os.getenv("AZURE_API_BASE")
|
||||||
# }
|
# }
|
||||||
# }], chat_completion_params={"acompletion": True}))
|
# }], default_litellm_params={"acompletion": True}))
|
||||||
|
|
||||||
# class UserExtract(BaseModel):
|
# class UserExtract(BaseModel):
|
||||||
# name: str
|
# name: str
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue