diff options
author | A.J. Shulman <Shulman.aj@gmail.com> | 2024-07-17 12:06:40 -0400 |
---|---|---|
committer | A.J. Shulman <Shulman.aj@gmail.com> | 2024-07-17 12:06:40 -0400 |
commit | 0340c24eccce3d90c03934dec14d574128fb32ef (patch) | |
tree | da796e844fd84b5885d161f47f551b1e4145dbce /src/client/views/nodes/ChatBox/AnswerParser.ts | |
parent | 6e0dd5cf8b36e66edbced83cf5e6d4e2e272be3f (diff) |
added image citation highlights
Diffstat (limited to 'src/client/views/nodes/ChatBox/AnswerParser.ts')
-rw-r--r-- | src/client/views/nodes/ChatBox/AnswerParser.ts | 4 |
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; |