crabmate 0.4.0

Rust AI agent: OpenAI-compatible chat/completions, function calling, HTTP serve, ops CLI
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! `GET /health`、`GET /status`(JSON 形状在各自 handler 模块内定义);`GET /web-ui` 在 **`cm_web_host`**。

use std::sync::Arc;

use axum::{Router, routing::get};

use crate::AppState;
use crate::web::chat_handlers::{health_handler, status_handler};

pub(crate) fn router() -> Router<Arc<AppState>> {
    Router::new()
        .route("/health", get(health_handler))
        .route("/status", get(status_handler))
        .merge(crate::cm_web_host::routes::web_ui::router())
}