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:
@@ -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,
|
||||
)
|
||||
|
||||
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user