Split monolithic 1012-line main.rs into layered hexagonal architecture: - Domain: entity types and LlmError enum - Application: prompt building, sampler construction, tool call parsing - Infrastructure: LlamaEngine wrapping llama-cpp-2 with isolated unsafe transmute - Presentation: Axum handlers, middleware (auth), error chain, router - Config: type-safe AppConfig with LazyLock - Bootstrap: Application struct with build() + run() Resolves build_sampler/build_sampler_params duplication. Adds simple web chat UI at GET /. Co-Authored-By: Claude Code <noreply@anthropic.com>
14 lines
281 B
Rust
14 lines
281 B
Rust
//! Health check endpoint.
|
|
|
|
use axum::Json;
|
|
|
|
use crate::config::MODEL_ID;
|
|
use crate::domain::entity::HealthResponse;
|
|
|
|
pub async fn health_check() -> Json<HealthResponse> {
|
|
Json(HealthResponse {
|
|
status: "ok".into(),
|
|
model: format!("{MODEL_ID}-q4_k_m"),
|
|
})
|
|
}
|