Files
sentinel-home-ai/fam-edge/config/config.yaml
ericwyuan d2fd01f134 perf(config): Gemini 视觉单帧 timeout 15→30s
实测 gemini-flash-latest 视觉推理免费层排队需 15~30s,15s 频繁超时触发熔断;
调到 30s 后单测通过(返回有效描述)。NVIDIA NIM 仍 20s 稳定可用
2026-08-20 09:14:53 +08:00

78 lines
2.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# FAM-Edge 配置文件 (Oracle 端) - 多模型池配置
# Tailscale: Oracle=100.74.137.126, NAS=100.70.234.39
# NAS 端回调地址
nas:
webhook_url: "http://100.70.234.39:8000/api/core/callback/event"
media_base_url: "http://100.70.234.39:8000/media"
media_token: "sentinel-media-2026"
# Oracle 端服务
server:
host: "0.0.0.0"
port: 5000
max_concurrent_tasks: 1
# 编排调度模式: fallback(顺序降级, 默认) | ensemble(并行交叉验证)
orchestrator:
mode: "fallback"
overall_timeout: 600
# 关键帧筛选参数(自适应:帧数随视频时长动态计算)
video:
candidate_per_minute: 2 # 每分钟粗抽候选帧数
candidate_min: 30 # 候选帧下限(短视频保底)
candidate_max: 120 # 候选帧上限(超长视频截断)
key_frame_interval_sec: 150 # 关键帧间隔每2.5分钟1张
min_key_frames: 5 # 关键帧下限(帧差不足时补足到此数)
max_key_frames_floor: 8 # 关键帧上限的下限(短视频保底)
max_key_frames_cap: 30 # 关键帧上限(超长视频截断)
mse_threshold: 500
jpeg_quality: 80
max_long_edge: 1024
# 超时(秒)
timeout:
download: 60
vlm_visual: 600
vlm_fusion: 300
callback: 30
overall: 1800
# 多模型池配置
# 视觉分析: Gemini(主) -> NVIDIA NIM(备) 顺序降级; 全失败 -> 任务 FAILED 走重试
# 文本融合/对话: 本地 Ollama qwen2.5:7b 专职 (不参与视觉)
models:
- provider: "gemini"
role: "vision"
enabled: true
model_name: "gemini-flash-latest" # v1beta 下 gemini-1.5-flash 会 404
api_key: "${GEMINI_API_KEY}"
timeout: 30
circuit_breaker:
enabled: true
threshold: 3
cooldown: 600
- provider: "nvidia"
role: "vision"
enabled: true
model_name: "meta/llama-3.2-11b-vision-instruct"
base_url: "https://integrate.api.nvidia.com/v1"
api_key: "${NVIDIA_API_KEY}"
timeout: 20
circuit_breaker:
enabled: true
threshold: 3
cooldown: 600
- provider: "ollama"
role: "text"
enabled: true
model_name: "qwen2.5:7b"
base_url: "http://localhost:11434"
timeout: 300
num_predict: 1024
circuit_breaker:
enabled: false