aimo-cli 0.0.1

AiMo Network router node Rust implementation
1
2
3
4
5
6
7
8
9
10
11
12
use axum::Json;
use axum::http::StatusCode;
use serde_json::{Value, json};

/// Expose an openai-compatible API
///
/// POST /chat/completions
pub async fn completions(Json(payload): Json<Value>) -> Result<Json<Value>, (StatusCode, String)> {
    if let Some(Value::Bool(is_stream)) = payload.get("stream") {}

    Ok(Json(json!({})))
}