add field messages for object and review genai

This commit is contained in:
Josh Hawkins 2026-05-07 09:39:49 -05:00
parent 28d1c4f85a
commit beeb7f1331
3 changed files with 33 additions and 0 deletions

View File

@ -1662,6 +1662,9 @@
"detect": {
"fpsGreaterThanFive": "Setting the detect FPS higher than 5 is not recommended. Higher values may cause performance issues and will not provide any benefit."
},
"objects": {
"genaiNoDescriptionsProvider": "You must configure a GenAI provider with the 'descriptions' role for descriptions to be generated."
},
"faceRecognition": {
"globalDisabled": "The face recognition enrichment must be enabled for face recognition features to function on this camera.",
"personNotTracked": "Face recognition requires the 'person' object to be tracked. Enable 'person' in Objects for this camera."

View File

@ -11,6 +11,22 @@ const hideAttributeFilters = (config: FrigateConfig): string[] =>
const objects: SectionConfigOverrides = {
base: {
sectionDocs: "/configuration/object_filters",
fieldMessages: [
{
key: "genai-no-descriptions-provider",
field: "genai.enabled",
messageKey: "configMessages.objects.genaiNoDescriptionsProvider",
severity: "warning",
position: "before",
condition: (ctx) => {
const providers = ctx.fullConfig.genai;
if (!providers || Object.keys(providers).length === 0) return true;
return !Object.values(providers).some((agent) =>
agent.roles?.includes("descriptions"),
);
},
},
],
fieldDocs: {
"filters.min_area": "/configuration/object_filters#object-area",
"filters.max_area": "/configuration/object_filters#object-area",

View File

@ -41,6 +41,20 @@ const review: SectionConfigOverrides = {
return !Array.isArray(labels) || labels.length === 0;
},
},
{
key: "genai-no-descriptions-provider",
field: "genai.enabled",
messageKey: "configMessages.objects.genaiNoDescriptionsProvider",
severity: "warning",
position: "before",
condition: (ctx) => {
const providers = ctx.fullConfig.genai;
if (!providers || Object.keys(providers).length === 0) return true;
return !Object.values(providers).some((agent) =>
agent.roles?.includes("descriptions"),
);
},
},
],
fieldDocs: {
"alerts.labels": "/configuration/review/#alerts-and-detections",