中文描述
通过 Prompt 与语言偏好让对象描述和核查总结稳定输出简体中文。
Prompt 建议
请根据画面内容生成准确、简洁的安防描述。
仅使用简体中文回答。
不要猜测无法从画面确认的身份、关系或事件。
建议
- 对象描述 Prompt 与 Review 总结分别配置。
- 模型若仍混入英文,可进一步要求输出语言和格式。
- 重要告警规则不要只依赖自然语言模型,保留区域 / 目标规则作为确定性备用。
Chinese Descriptions
Generative AI converts visual events into natural-language descriptions, Review summaries, or chat answers. Securex NVR can use OpenAI-compatible cloud gateways or local AI providers. Keep API keys in environment variables rather than public configuration or screenshots.
Providers and roles
| Role | Purpose |
|---|---|
| chat | Interactive chat/question answering. |
| descriptions | Generate descriptions for tracked objects/events. |
| embeddings | Vector embeddings for semantic features when supported by the selected provider/build. |
OpenAI-compatible example
genai:
agnes:
provider: openai
api_key: ${GENAI_API_KEY}
model: agnes-2.0-flash
base_url: https://example-ai-gateway/v1
roles:
- chat
- descriptions
provider_options:
context_size: 256000Language control
If a model defaults to English, state the desired language explicitly in the object/Review prompt. A preferred-language setting only affects features that honor it; it is not a replacement for prompt-level output constraints.
Local AI
Local providers improve privacy and offline capability, but the selected model must actually support vision and the endpoint must match the expected compatibility API. A text-only model cannot reliably describe event images.
Troubleshooting
| Error | Typical cause |
|---|---|
| 401/403 | API key, authorization header, or reverse-proxy authentication. |
| 404 | Wrong base_url or compatibility route. |
| 500 | Upstream provider/model failure or unsupported input. |
| Generation never finishes | Model download, unsupported vision path, timeout, or insufficient GPU/RAM. |
| Wrong language | Prompt, model capability, or requests reaching a different provider than expected. |
Validation sequence
- Test a text request directly against the provider.
- Test a single-image vision request.
- Enable descriptions.
- Add Review summaries, chat, and semantic features only after the base path is reliable.
Descripciones en chino
La IA generativa convierte eventos visuales en descripciones, resúmenes de Review o respuestas de chat. Securex NVR puede usar gateways compatibles con OpenAI o proveedores locales. Guarde las claves en variables de entorno.
Provider y roles
| Rol | Uso |
|---|---|
| chat | Chat y preguntas. |
| descriptions | Descripciones de objetos/eventos. |
| embeddings | Vectores para funciones semánticas cuando estén soportadas. |
Ejemplo compatible con OpenAI
genai:
agnes:
provider: openai
api_key: ${GENAI_API_KEY}
model: agnes-2.0-flash
base_url: https://example-ai-gateway/v1
roles:
- chat
- descriptions
provider_options:
context_size: 256000Idioma
Si el modelo responde en inglés, exija explícitamente el idioma en el prompt. preferred_language no sustituye las reglas del prompt.
IA local
Un provider local mejora privacidad, pero el modelo debe soportar visión y el endpoint debe ser compatible. Un modelo solo de texto no puede describir imágenes de eventos de forma fiable.
Diagnóstico
| Error | Causa habitual |
|---|---|
| 401/403 | Clave o autenticación/proxy. |
| 404 | base_url/ruta incorrecta. |
| 500 | Fallo del proveedor/modelo. |
| No termina | Descarga, visión no soportada, timeout o recursos insuficientes. |
| Idioma incorrecto | Prompt, modelo o provider equivocado. |
Secuencia de prueba
- Pruebe texto directamente.
- Pruebe una imagen.
- Active descriptions.
- Después active resumen, chat y funciones semánticas.
