add config option to set nsfwProtection sensitivity

This commit is contained in:
H. Shay 2024-09-10 16:46:17 -07:00
parent 147f595ec1
commit 0ee021b8eb
2 changed files with 7 additions and 1 deletions

View File

@ -258,3 +258,8 @@ pollReports: false
# Whether or not new reports, received either by webapi or polling, # Whether or not new reports, received either by webapi or polling,
# should be printed to our managementRoom. # should be printed to our managementRoom.
displayReports: true displayReports: true
# How sensitive the NsfwProtection should be, which determines if an image should be redacted. A number between 0 - .99,
# with a lower number indicating greater sensitivity, possibly resulting in images being more aggressively flagged
# and redacted as NSFW
nsfwSensitivity: .6

View File

@ -174,6 +174,7 @@ export interface IConfig {
enabled: boolean; enabled: boolean;
} }
} }
nsfwSensitivity: number
/** /**
* Config options only set at runtime. Try to avoid using the objects * Config options only set at runtime. Try to avoid using the objects
@ -248,7 +249,7 @@ const defaultConfig: IConfig = {
enabled: false, enabled: false,
}, },
}, },
nsfwSensitivity: .6,
// Needed to make the interface happy. // Needed to make the interface happy.
RUNTIME: { RUNTIME: {
}, },