mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-15 00:11:15 +03:00
add field messages for object and review genai
This commit is contained in:
parent
28d1c4f85a
commit
beeb7f1331
@ -1662,6 +1662,9 @@
|
|||||||
"detect": {
|
"detect": {
|
||||||
"fpsGreaterThanFive": "Setting the detect FPS higher than 5 is not recommended. Higher values may cause performance issues and will not provide any benefit."
|
"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": {
|
"faceRecognition": {
|
||||||
"globalDisabled": "The face recognition enrichment must be enabled for face recognition features to function on this camera.",
|
"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."
|
"personNotTracked": "Face recognition requires the 'person' object to be tracked. Enable 'person' in Objects for this camera."
|
||||||
|
|||||||
@ -11,6 +11,22 @@ const hideAttributeFilters = (config: FrigateConfig): string[] =>
|
|||||||
const objects: SectionConfigOverrides = {
|
const objects: SectionConfigOverrides = {
|
||||||
base: {
|
base: {
|
||||||
sectionDocs: "/configuration/object_filters",
|
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: {
|
fieldDocs: {
|
||||||
"filters.min_area": "/configuration/object_filters#object-area",
|
"filters.min_area": "/configuration/object_filters#object-area",
|
||||||
"filters.max_area": "/configuration/object_filters#object-area",
|
"filters.max_area": "/configuration/object_filters#object-area",
|
||||||
|
|||||||
@ -41,6 +41,20 @@ const review: SectionConfigOverrides = {
|
|||||||
return !Array.isArray(labels) || labels.length === 0;
|
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: {
|
fieldDocs: {
|
||||||
"alerts.labels": "/configuration/review/#alerts-and-detections",
|
"alerts.labels": "/configuration/review/#alerts-and-detections",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user