remove curly bracket in loaded document text

This commit is contained in:
chungyau97
2023-07-27 14:08:33 +08:00
parent b7ddfdfdb0
commit 0a49234a16
@@ -77,6 +77,9 @@ class ConversationChain_Chains implements INode {
finalText += finalDocs[i].pageContent 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}` if (finalText) systemMessage = `${systemMessage}\nThe AI has the following context:\n${finalText}`
const obj: any = { const obj: any = {