slight naming changes

This commit is contained in:
Henry
2023-11-22 17:10:18 +00:00
parent 619fb4f5c1
commit c274085d42
5 changed files with 454 additions and 13 deletions
@@ -15,13 +15,13 @@ class SimplePromptModeration implements INode {
inputs: INodeParams[]
constructor() {
this.label = 'Moderation - Simple Prompt'
this.label = 'Simple Prompt Moderation'
this.name = 'inputModerationSimple'
this.version = 1.0
this.type = 'Moderation'
this.icon = 'simple_moderation.png'
this.category = 'Responsible AI'
this.description = 'Detecting and mitigating prompt attacks'
this.description = 'Check whether input consists of any text from Deny list, and prevent being sent to LLM'
this.baseClasses = [this.type, ...getBaseClasses(Moderation)]
this.inputs = [
{
@@ -44,7 +44,6 @@ class SimplePromptModeration implements INode {
]
}
// eslint-disable-next-line unused-imports/no-unused-vars
async init(nodeData: INodeData): Promise<any> {
const denyList = nodeData.inputs?.denyList as string
const moderationErrorMessage = nodeData.inputs?.moderationErrorMessage as string