feat: strong typing for complete endpoints

This commit is contained in:
2026-04-10 18:27:02 +02:00
parent 562d154480
commit d5856557b4
9 changed files with 609 additions and 158 deletions
+6 -5
View File
@@ -11,11 +11,12 @@ use axum::{Router, middleware, routing::get, routing::post};
// }
pub fn protected_router() -> Router<AppState> {
Router::new().route("/models", get(models::list_models))
// .route("/completions", post(chat::completions))
// .route("/chat/completions", post(chat::chat_completions))
.route("/models/{model}/load", post(models::load_model))
.route("/models/{model}/unload", post(models::unload_model))
Router::new()
.route("/models", get(models::list_models))
.route("/completions", post(chat::completions))
// .route("/chat/completions", post(chat::chat_completions))
.route("/models/{model}/load", post(models::load_model))
.route("/models/{model}/unload", post(models::unload_model))
}
pub fn router() -> Router<AppState> {