feat: chat typing

This commit is contained in:
2026-04-10 21:33:52 +02:00
parent d5856557b4
commit e31cdf131f
6 changed files with 277 additions and 221 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ 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("/chat/completions", post(chat::chat_completions))
.route("/models/{model}/load", post(models::load_model))
.route("/models/{model}/unload", post(models::unload_model))
}
@@ -22,5 +22,5 @@ pub fn protected_router() -> Router<AppState> {
pub fn router() -> Router<AppState> {
Router::new()
// .merge(public_router())
.merge(protected_router()) //.layer(middleware::from_fn(auth_middleware)))
.merge(protected_router().layer(middleware::from_fn(auth_middleware)))
}