Bugfix/Escape JSON in Prompt Message (#3901)

add fix to only get variables when there is no colon
This commit is contained in:
Henry Heng
2025-01-20 19:18:28 +00:00
committed by GitHub
parent 4c9d46d7e5
commit 4aa97b0c9a
16 changed files with 148 additions and 46 deletions
@@ -29,7 +29,8 @@ import {
getVars,
handleEscapeCharacters,
prepareSandboxVars,
removeInvalidImageMarkdown
removeInvalidImageMarkdown,
transformBracesWithColon
} from '../../../src/utils'
import {
customGet,
@@ -456,7 +457,9 @@ class Agent_SeqAgents implements INode {
let tools = nodeData.inputs?.tools
tools = flatten(tools)
let agentSystemPrompt = nodeData.inputs?.systemMessagePrompt as string
agentSystemPrompt = transformBracesWithColon(agentSystemPrompt)
let agentHumanPrompt = nodeData.inputs?.humanMessagePrompt as string
agentHumanPrompt = transformBracesWithColon(agentHumanPrompt)
const agentLabel = nodeData.inputs?.agentName as string
const sequentialNodes = nodeData.inputs?.sequentialNode as ISeqAgentNode[]
const maxIterations = nodeData.inputs?.maxIterations as string