Spaces:
Build error
Build error
| pub mod executor; | |
| use axum::{extract::State, Json}; | |
| use serde_json::json; | |
| use std::sync::Arc; | |
| use crate::AppState; | |
| pub async fn chat_handler( | |
| State(state): State<Arc<AppState>>, | |
| Json(payload): Json<serde_json::Value> | |
| ) -> Json<serde_json::Value> { | |
| let _ = state.tx.send(json!({"type": "log", "data": "Agent is thinking..."}).to_string()); | |
| Json(json!({"status": "ok"})) | |
| } |