feat: implement service management API for VLM control

- Add /api/v1/mbe/health endpoint for status checks
- Add /api/v2/service/start to start llama-server
- Add /api/v2/service/stop to stop llama-server
- Use TCP connection test for port detection (more reliable than lsof)
- Add ps aux fallback for PID detection
- Implement structured bilingual VLM tags
- Add VLM integration documentation for Studio team

Endpoints tested and working with Momentry Studio AdminView UI.
This commit is contained in:
Accusys
2026-10-24 02:37:53 +08:00
parent d14cd9f3de
commit c151b49334
33 changed files with 3175 additions and 229 deletions
+1
View File
@@ -182,6 +182,7 @@ async fn main() -> Result<()> {
scene.timestamp_sec,
scene.frame_number,
desc,
scene.vlm_description_localized.as_deref(),
&scene.vlm_objects,
&scene.vlm_tags,
)
+7 -3
View File
@@ -40,8 +40,9 @@ async fn main() -> Result<()> {
println!("找到 {} 筆結果:", results.len());
for (i, r) in results.iter().enumerate() {
let text_preview: String = r.text.chars().take(60).collect();
let text_preview = if r.text.chars().count() > 60 {
let text: String = r.text.clone().unwrap_or_default();
let text_preview: String = text.chars().take(60).collect();
let text_preview = if text.chars().count() > 60 {
format!("{}...", text_preview)
} else {
text_preview
@@ -55,7 +56,10 @@ async fn main() -> Result<()> {
);
println!(
" 分數: {:.4}, 時間: {:.1}-{:.1}s, 類型: {}",
r.bm25_score, r.start_time, r.end_time, r.chunk_type
r.bm25_score,
r.start_time.unwrap_or(0.0),
r.end_time.unwrap_or(0.0),
r.chunk_type
);
}