New LLM Router strategy (#199)

This commit is contained in:
Kerem Yilmaz
2024-04-16 14:52:15 -07:00
committed by GitHub
parent eab98426f2
commit 02cf2a1e87
3 changed files with 6 additions and 5 deletions

6
poetry.lock generated
View File

@@ -2767,13 +2767,13 @@ files = [
[[package]] [[package]]
name = "litellm" name = "litellm"
version = "1.34.41" version = "1.35.8"
description = "Library to easily interface with LLM API providers" description = "Library to easily interface with LLM API providers"
optional = false optional = false
python-versions = "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8" python-versions = "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8"
files = [ files = [
{file = "litellm-1.34.41-py3-none-any.whl", hash = "sha256:ec6b1fb7f27178ad36f3be64e2f0fb73a637c0d7c128d5aa1d845414cc21be66"}, {file = "litellm-1.35.8-py3-none-any.whl", hash = "sha256:0b328b37b6c40e5ece82f701bcb92e4d1d76ffb070e03f6c3abfbc6030bf07b8"},
{file = "litellm-1.34.41.tar.gz", hash = "sha256:e8ad1a0b9cf4abea0471394db8c95f479e94e271bc1ce3d98204e1a6ed917e93"}, {file = "litellm-1.35.8.tar.gz", hash = "sha256:0a8c031a01c19f2cfd9d873ff89bebc120917ec88f5656c1464a64d38e7c782d"},
] ]
[package.dependencies] [package.dependencies]

View File

@@ -299,7 +299,7 @@ function CreateNewTaskForm({ initialValues }: Props) {
body: createTaskRequestObject(form.getValues()), body: createTaskRequestObject(form.getValues()),
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
"x-api-key": envCredential ?? "", "x-api-key": envCredential ?? "<your-api-key>",
}, },
}); });
await navigator.clipboard.writeText(curl); await navigator.clipboard.writeText(curl);

View File

@@ -43,8 +43,9 @@ class LLMRouterConfig(LLMConfig):
"simple-shuffle", "simple-shuffle",
"least-busy", "least-busy",
"usage-based-routing", "usage-based-routing",
"usage-based-routing-v2",
"latency-based-routing", "latency-based-routing",
] = "usage-based-routing" ] = "usage-based-routing-v2"
num_retries: int = 2 num_retries: int = 2
retry_delay_seconds: int = 15 retry_delay_seconds: int = 15
set_verbose: bool = False set_verbose: bool = False