SECUREXSECURITY ENGINEERINGNVR 文档

中文描述

通过 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

RolePurpose
chatInteractive chat/question answering.
descriptionsGenerate descriptions for tracked objects/events.
embeddingsVector 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: 256000

Language 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

ErrorTypical cause
401/403API key, authorization header, or reverse-proxy authentication.
404Wrong base_url or compatibility route.
500Upstream provider/model failure or unsupported input.
Generation never finishesModel download, unsupported vision path, timeout, or insufficient GPU/RAM.
Wrong languagePrompt, model capability, or requests reaching a different provider than expected.

Validation sequence

  1. Test a text request directly against the provider.
  2. Test a single-image vision request.
  3. Enable descriptions.
  4. 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

RolUso
chatChat y preguntas.
descriptionsDescripciones de objetos/eventos.
embeddingsVectores 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: 256000

Idioma

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

ErrorCausa habitual
401/403Clave o autenticación/proxy.
404base_url/ruta incorrecta.
500Fallo del proveedor/modelo.
No terminaDescarga, visión no soportada, timeout o recursos insuficientes.
Idioma incorrectoPrompt, modelo o provider equivocado.

Secuencia de prueba

  1. Pruebe texto directamente.
  2. Pruebe una imagen.
  3. Active descriptions.
  4. Después active resumen, chat y funciones semánticas.
输入关键词开始搜索