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
@@ -1,3 +1,4 @@
import { transformBracesWithColon } from '../../../src'
import { INode, INodeData, INodeParams, PromptRetriever, PromptRetrieverInput } from '../../../src/Interface'
class PromptRetriever_Retrievers implements INode {
@@ -48,7 +49,8 @@ class PromptRetriever_Retrievers implements INode {
async init(nodeData: INodeData): Promise<any> {
const name = nodeData.inputs?.name as string
const description = nodeData.inputs?.description as string
const systemMessage = nodeData.inputs?.systemMessage as string
let systemMessage = nodeData.inputs?.systemMessage as string
systemMessage = transformBracesWithColon(systemMessage)
const obj = {
name,