2026-07-25 15:07:19 +07:00
|
|
|
//! Chat UI — simple web interface for interacting with the LLM.
|
|
|
|
|
|
|
|
|
|
use axum::http::{header, HeaderValue, StatusCode};
|
|
|
|
|
use axum::response::{IntoResponse, Response};
|
|
|
|
|
|
|
|
|
|
const HTML: &str = include_str!("chat-ui/index.html");
|
|
|
|
|
|
|
|
|
|
/// GET / — serve the chat UI page.
|
|
|
|
|
pub async fn chat_ui() -> Response {
|
|
|
|
|
(
|
|
|
|
|
StatusCode::OK,
|
2026-08-03 08:58:13 +07:00
|
|
|
[(
|
|
|
|
|
header::CONTENT_TYPE,
|
|
|
|
|
HeaderValue::from_static("text/html; charset=utf-8"),
|
|
|
|
|
)],
|
2026-07-25 15:07:19 +07:00
|
|
|
HTML,
|
|
|
|
|
)
|
|
|
|
|
.into_response()
|
|
|
|
|
}
|