Refactoring the structure a bit
This commit is contained in:
8
server/src/http/chat.rs
Normal file
8
server/src/http/chat.rs
Normal 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))
|
||||
}
|
||||
Reference in New Issue
Block a user