diff --git a/src/basic/keywords/hear_talk.rs b/src/basic/keywords/hear_talk.rs index 4b0f4e072..ac86faf20 100644 --- a/src/basic/keywords/hear_talk.rs +++ b/src/basic/keywords/hear_talk.rs @@ -1279,7 +1279,7 @@ async fn process_qrcode( .map_err(|e| format!("Failed to fetch image: {e}"))?; let response = client - .post(format!("{botmodels_url}/api/v1/vision/qrcode")) + .post(format!("{botmodels_url}/api/vision/qrcode")) .header("Content-Type", "application/octet-stream") .body(image_data.to_vec()) .send() @@ -1327,7 +1327,7 @@ async fn process_audio_to_text( .map_err(|e| format!("Failed to read audio: {e}"))?; let response = client - .post(format!("{botmodels_url}/api/v1/speech/to-text")) + .post(format!("{botmodels_url}/api/speech/to-text")) .header("Content-Type", "application/octet-stream") .body(audio_data.to_vec()) .send() @@ -1376,7 +1376,7 @@ async fn process_video_description( .map_err(|e| format!("Failed to fetch video: {e}"))?; let response = client - .post(format!("{botmodels_url}/api/v1/vision/describe-video")) + .post(format!("{botmodels_url}/api/vision/describe-video")) .header("Content-Type", "application/octet-stream") .body(video_data.to_vec()) .send() diff --git a/src/core/directory/api.rs b/src/core/directory/api.rs index 2952b5d3a..03a8bef5f 100644 --- a/src/core/directory/api.rs +++ b/src/core/directory/api.rs @@ -266,7 +266,7 @@ pub async fn check_services_status(State(state): State>) -> impl I } if let Ok(response) = client - .get("https://localhost:3000/api/v1/version") + .get("https://localhost:3000/api/version") .send() .await { diff --git a/src/core/urls.rs b/src/core/urls.rs index 9d0698eeb..9ebcda19f 100644 --- a/src/core/urls.rs +++ b/src/core/urls.rs @@ -474,9 +474,9 @@ impl InternalUrls { pub const QDRANT: &'static str = "http://localhost:6334"; pub const FORGEJO: &'static str = "http://localhost:3000"; pub const LIVEKIT: &'static str = "http://localhost:7880"; - pub const BOTMODELS_VISION_QRCODE: &'static str = "/api/v1/vision/qrcode"; - pub const BOTMODELS_SPEECH_TO_TEXT: &'static str = "/api/v1/speech/to-text"; - pub const BOTMODELS_VISION_DESCRIBE_VIDEO: &'static str = "/api/v1/vision/describe-video"; + pub const BOTMODELS_VISION_QRCODE: &'static str = "/api/vision/qrcode"; + pub const BOTMODELS_SPEECH_TO_TEXT: &'static str = "/api/speech/to-text"; + pub const BOTMODELS_VISION_DESCRIBE_VIDEO: &'static str = "/api/vision/describe-video"; } impl ApiUrls { diff --git a/src/security/auth.rs b/src/security/auth.rs index 90ff4441c..68c18ef98 100644 --- a/src/security/auth.rs +++ b/src/security/auth.rs @@ -527,7 +527,6 @@ impl Default for AuthConfig { "/health".to_string(), "/healthz".to_string(), "/api/health".to_string(), - "/api/v1/health".to_string(), "/.well-known".to_string(), "/metrics".to_string(), "/api/auth/login".to_string(), diff --git a/src/security/protection/api.rs b/src/security/protection/api.rs index de10150b0..41a8d2c0b 100644 --- a/src/security/protection/api.rs +++ b/src/security/protection/api.rs @@ -66,42 +66,42 @@ struct ActionResponse { pub fn configure_protection_routes() -> Router { Router::new() - .route("/api/v1/security/protection/status", get(get_all_status)) + .route("/api/security/protection/status", get(get_all_status)) .route( - "/api/v1/security/protection/:tool/status", + "/api/security/protection/:tool/status", get(get_tool_status), ) .route( - "/api/v1/security/protection/:tool/install", + "/api/security/protection/:tool/install", post(install_tool), ) .route( - "/api/v1/security/protection/:tool/uninstall", + "/api/security/protection/:tool/uninstall", post(uninstall_tool), ) - .route("/api/v1/security/protection/:tool/start", post(start_service)) - .route("/api/v1/security/protection/:tool/stop", post(stop_service)) + .route("/api/security/protection/:tool/start", post(start_service)) + .route("/api/security/protection/:tool/stop", post(stop_service)) .route( - "/api/v1/security/protection/:tool/enable", + "/api/security/protection/:tool/enable", post(enable_service), ) .route( - "/api/v1/security/protection/:tool/disable", + "/api/security/protection/:tool/disable", post(disable_service), ) - .route("/api/v1/security/protection/:tool/run", post(run_scan)) - .route("/api/v1/security/protection/:tool/report", get(get_report)) + .route("/api/security/protection/:tool/run", post(run_scan)) + .route("/api/security/protection/:tool/report", get(get_report)) .route( - "/api/v1/security/protection/:tool/update", + "/api/security/protection/:tool/update", post(update_definitions), ) - .route("/api/v1/security/protection/:tool/auto", post(toggle_auto)) + .route("/api/security/protection/:tool/auto", post(toggle_auto)) .route( - "/api/v1/security/protection/clamav/quarantine", + "/api/security/protection/clamav/quarantine", get(get_quarantine), ) .route( - "/api/v1/security/protection/clamav/quarantine/:id", + "/api/security/protection/clamav/quarantine/:id", post(remove_from_quarantine), ) } diff --git a/src/video/engine.rs b/src/video/engine.rs index d799cdb29..3348c94c1 100644 --- a/src/video/engine.rs +++ b/src/video/engine.rs @@ -590,7 +590,7 @@ impl VideoEngine { let client = reqwest::Client::new(); let response = client - .post(format!("{}/api/v1/audio/transcribe", botmodels_url)) + .post(format!("{}/api/audio/transcribe", botmodels_url)) .json(&serde_json::json!({ "audio_url": &clip.source_url, "language": language.unwrap_or_else(|| "auto".to_string()), @@ -695,7 +695,7 @@ impl VideoEngine { let client = reqwest::Client::new(); let response = client - .post(format!("{}/api/v1/audio/tts", botmodels_url)) + .post(format!("{}/api/audio/tts", botmodels_url)) .json(&serde_json::json!({ "text": text, "voice": voice, @@ -1026,7 +1026,7 @@ impl VideoEngine { let client = reqwest::Client::new(); let response = client - .post(format!("{}/api/v1/video/remove-background", botmodels_url)) + .post(format!("{}/api/video/remove-background", botmodels_url)) .json(&serde_json::json!({ "video_url": &clip.source_url, "replacement": replacement, @@ -1060,7 +1060,7 @@ impl VideoEngine { let client = reqwest::Client::new(); let response = client - .post(format!("{}/api/v1/video/enhance", botmodels_url)) + .post(format!("{}/api/video/enhance", botmodels_url)) .json(&serde_json::json!({ "video_url": &clip.source_url, "upscale_factor": req.upscale_factor, @@ -1101,7 +1101,7 @@ impl VideoEngine { let client = reqwest::Client::new(); let response = client - .post(format!("{}/api/v1/audio/detect-beats", botmodels_url)) + .post(format!("{}/api/audio/detect-beats", botmodels_url)) .json(&serde_json::json!({ "audio_url": &track.source_url, "sensitivity": sensitivity.unwrap_or(0.5), @@ -1147,7 +1147,7 @@ impl VideoEngine { let client = reqwest::Client::new(); let response = client - .post(format!("{}/api/v1/audio/waveform", botmodels_url)) + .post(format!("{}/api/audio/waveform", botmodels_url)) .json(&serde_json::json!({ "audio_url": &track.source_url, "samples_per_second": samples_per_second.unwrap_or(10),