aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ChatBox/AnswerParser.ts
diff options
context:
space:
mode:
authorA.J. Shulman <Shulman.aj@gmail.com>2024-08-22 15:32:18 -0400
committerA.J. Shulman <Shulman.aj@gmail.com>2024-08-22 15:32:18 -0400
commit9be434cddc30baada63aff0c5dae6dbf606f2590 (patch)
tree1fa4cd147ddd152c0248c90cfebfbf57b49b29aa /src/client/views/nodes/ChatBox/AnswerParser.ts
parent3d290c126623404b56958d16becc244d04548658 (diff)
adding csv
Diffstat (limited to 'src/client/views/nodes/ChatBox/AnswerParser.ts')
-rw-r--r--src/client/views/nodes/ChatBox/AnswerParser.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/views/nodes/ChatBox/AnswerParser.ts b/src/client/views/nodes/ChatBox/AnswerParser.ts
index b18083a27..05d26b8de 100644
--- a/src/client/views/nodes/ChatBox/AnswerParser.ts
+++ b/src/client/views/nodes/ChatBox/AnswerParser.ts
@@ -9,6 +9,7 @@ export class AnswerParser {
const followUpQuestionsRegex = /<follow_up_questions>([\s\S]*?)<\/follow_up_questions>/;
const questionRegex = /<question>(.*?)<\/question>/g;
const groundedTextRegex = /<grounded_text citation_index="([^"]+)">([\s\S]*?)<\/grounded_text>/g;
+ const normalTextRegex = /<normal_text>([\s\S]*?)<\/normal_text>/g;
const answerMatch = answerRegex.exec(xml);
const citationsMatch = citationsRegex.exec(xml);
@@ -49,6 +50,8 @@ export class AnswerParser {
}
}
+ rawTextContent = rawTextContent.replace(normalTextRegex, '$1');
+
// Parse text content (normal and grounded)
let lastIndex = 0;
let match;