[model-gateway] include smg version command in py binding (#14274)
This commit is contained in:
@@ -704,6 +704,18 @@ impl Router {
|
||||
}
|
||||
}
|
||||
|
||||
/// Get formatted version information string with full build details
|
||||
#[pyfunction]
|
||||
fn get_version_string() -> String {
|
||||
version::get_version_string()
|
||||
}
|
||||
|
||||
/// Get short version information string
|
||||
#[pyfunction]
|
||||
fn get_short_version_string() -> String {
|
||||
version::get_short_version_string()
|
||||
}
|
||||
|
||||
#[pymodule]
|
||||
fn sglang_router_rs(m: &Bound<'_, PyModule>) -> PyResult<()> {
|
||||
m.add_class::<PolicyType>()?;
|
||||
@@ -712,5 +724,7 @@ fn sglang_router_rs(m: &Bound<'_, PyModule>) -> PyResult<()> {
|
||||
m.add_class::<PyOracleConfig>()?;
|
||||
m.add_class::<PyPostgresConfig>()?;
|
||||
m.add_class::<Router>()?;
|
||||
m.add_function(wrap_pyfunction!(get_version_string, m)?)?;
|
||||
m.add_function(wrap_pyfunction!(get_short_version_string, m)?)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user