feat: add Vision LLM integration (CLIP + Qwen3-VL cascade)
- Add Qwen3-VL dynamic management (start/stop/status CLI) - Add CLIP + Qwen3-VL cascade detection strategy - Add Vision CLI commands (vision start/stop/status, detect) - Add cascade_vision processor module - Add clip processor module - Add qwen_vl_manager module Changes: - scripts/start_qwen3vl.sh, stop_qwen3vl.sh: Qwen3-VL management scripts - src/core/vision/: Qwen3-VL manager module - src/core/processor/cascade_vision.rs: CLIP + Qwen3-VL cascade logic - src/core/processor/clip.rs: CLIP classification and detection - src/api/clip_api.rs: CLIP API endpoints - src/cli/vision.rs: Vision CLI implementation - src/cli/args.rs: Add Vision and Detect commands - src/main.rs: Integrate Vision CLI - src/core/mod.rs: Add vision module - src/core/processor/mod.rs: Add cascade_vision module
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use axum::{extract::State, http::StatusCode, response::Json, routing::post, Router};
|
||||
use reqwest::Client;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::api::types::AppState;
|
||||
use crate::core::llm::function_calling::LLM_CLIENT;
|
||||
|
||||
pub fn agent_routes() -> Router<AppState> {
|
||||
Router::new().route("/api/v1/agents/translate", post(translate_text))
|
||||
@@ -42,7 +42,6 @@ async fn translate_text(
|
||||
);
|
||||
|
||||
// Call LLM via configurable endpoint
|
||||
let client = Client::new();
|
||||
let llm_url = crate::core::config::llm::CHAT_URL.as_str();
|
||||
let model = crate::core::config::llm::CHAT_MODEL.as_str();
|
||||
|
||||
@@ -57,7 +56,7 @@ async fn translate_text(
|
||||
"temperature": 0.1
|
||||
});
|
||||
|
||||
let response = client.post(llm_url).json(&body).send().await.map_err(|e| {
|
||||
let response = LLM_CLIENT.post(llm_url).json(&body).send().await.map_err(|e| {
|
||||
(
|
||||
StatusCode::INTERNAL_SERVER_ERROR,
|
||||
format!("Failed to call LLM: {}", e),
|
||||
|
||||
Reference in New Issue
Block a user