Refactoring the structure a bit

This commit is contained in:
Dave
2026-02-16 16:24:21 +00:00
parent a2188e2c7f
commit 5923165fcf
21 changed files with 522 additions and 372 deletions

8
server/src/http/chat.rs Normal file
View File

@@ -0,0 +1,8 @@
use crate::http::context::{AppContext, OpenApiResult, bad_request};
use crate::llm::chat;
use poem_openapi::payload::Json;
pub async fn cancel_chat(ctx: &AppContext) -> OpenApiResult<Json<bool>> {
chat::cancel_chat(&ctx.state).map_err(bad_request)?;
Ok(Json(true))
}