mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-27 15:00:36 +03:00
Merge pull request #1300 from vinodkiran/BUGFIX/caseinsensitive-simple-moderation
Bugfix: Simple Moderation, making the checks case-insensitive
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ export class SimplePromptModerationRunner implements Moderation {
|
||||
|
||||
async checkForViolations(input: string): Promise<string> {
|
||||
this.denyList.split('\n').forEach((denyListItem) => {
|
||||
if (denyListItem && denyListItem !== '' && input.includes(denyListItem)) {
|
||||
if (denyListItem && denyListItem !== '' && input.toLowerCase().includes(denyListItem.toLowerCase())) {
|
||||
throw Error(this.moderationErrorMessage)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user