aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ChatBox/AnswerParser.ts
diff options
context:
space:
mode:
authorA.J. Shulman <Shulman.aj@gmail.com>2024-07-17 12:06:40 -0400
committerA.J. Shulman <Shulman.aj@gmail.com>2024-07-17 12:06:40 -0400
commit0340c24eccce3d90c03934dec14d574128fb32ef (patch)
treeda796e844fd84b5885d161f47f551b1e4145dbce /src/client/views/nodes/ChatBox/AnswerParser.ts
parent6e0dd5cf8b36e66edbced83cf5e6d4e2e272be3f (diff)
added image citation highlights
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;