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
@@ -37,14 +37,6 @@ class LLMChain_Chains implements INode {
name: 'model',
type: 'BaseLanguageModel'
},
{
label: 'Input Moderation',
description: 'Detect text that could generate harmful output and prevent it from being sent to the language model',
name: 'inputModeration',
type: 'Moderation',
optional: true,
list: true
},
{
label: 'Prompt',
name: 'prompt',
@@ -56,6 +48,14 @@ class LLMChain_Chains implements INode {
type: 'BaseLLMOutputParser',
optional: true
},
{
label: 'Input Moderation',
description: 'Detect text that could generate harmful output and prevent it from being sent to the language model',
name: 'inputModeration',
type: 'Moderation',
optional: true,
list: true
},
{
label: 'Chain Name',
name: 'chainName',
@@ -166,6 +166,7 @@ const runPrediction = async (
// Use the output of the moderation chain as input for the LLM chain
input = await checkInputs(moderations, chain.llm, input)
} catch (e) {
await new Promise((resolve) => setTimeout(resolve, 500))
streamResponse(isStreaming, e.message, socketIO, socketIOClientId)
return formatResponse(e.message)
}