aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ChatBox/AnswerParser.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/ChatBox/AnswerParser.ts')
-rw-r--r--src/client/views/nodes/ChatBox/AnswerParser.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/ChatBox/AnswerParser.ts b/src/client/views/nodes/ChatBox/AnswerParser.ts
index f77d2261d..1162d46b0 100644
--- a/src/client/views/nodes/ChatBox/AnswerParser.ts
+++ b/src/client/views/nodes/ChatBox/AnswerParser.ts
@@ -1,4 +1,5 @@
import { ASSISTANT_ROLE, AssistantMessage, Citation, getChunkType } from './types';
+import { v4 as uuid } from 'uuid';
export class AnswerParser {
static parse(xml: string): AssistantMessage {
@@ -33,7 +34,8 @@ export class AnswerParser {
direct_text: direct_text.trim(),
type: getChunkType(type),
chunk_id: chunk_id,
- location: citationPlainStart,
+ text_location: citationPlainStart,
+ citation_id: uuid(),
});
citationOffset += fullMatch.length;