Merge pull request #624 from FlowiseAI/bugfix/EscapeInTemplate

remove curly bracket in loaded document text
This commit is contained in:
Henry Heng
2023-07-27 11:36:58 +01:00
committed by GitHub
@@ -77,6 +77,9 @@ class ConversationChain_Chains implements INode {
finalText += finalDocs[i].pageContent
}
const replaceChar: string[] = ['{', '}']
for (const char of replaceChar) finalText = finalText.replaceAll(char, '')
if (finalText) systemMessage = `${systemMessage}\nThe AI has the following context:\n${finalText}`
const obj: any = {