Add Rust Router Python Binding (#1891)

Signed-off-by: Austin Liu <austin362667@gmail.com>
Co-authored-by: ByronHsu <byronhsu1230@gmail.com>
This commit is contained in:
Austin Liu
2024-11-07 10:08:30 +08:00
committed by GitHub
parent a5e0defb5a
commit 4b1d7a2583
3 changed files with 61 additions and 29 deletions

View File

@@ -1,4 +1,4 @@
import router
import sglang_router as router
# Create a Router instance with:
# - host: the address to bind to (e.g., "127.0.0.1")
@@ -11,6 +11,7 @@ router = router.Router(
"http://localhost:30000",
"http://localhost:30002",
],
policy="random"
)
# Start the router - this will block and run the server