mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-26 09:01:17 +03:00
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