mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
chck for empty string
This commit is contained in:
+1
@@ -19,6 +19,7 @@ export class SimplePromptModerationRunner implements Moderation {
|
||||
if (this.model) {
|
||||
const denyArray = this.denyList.split('\n')
|
||||
for (const denyStr of denyArray) {
|
||||
if (!denyStr || denyStr === '') continue
|
||||
const res = await this.model.invoke(
|
||||
`Are these two sentences similar to each other? Only return Yes or No.\nFirst sentence: ${input}\nSecond sentence: ${denyStr}`
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user