-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/additional frontend features #72
Changes from 21 commits
51eed1d
06cf626
e226775
c0419f4
b0ddd83
50430b9
56ace77
c7c5396
6b6453f
cbf2a23
3deb4ff
33ac6c1
3d5291a
f338928
118d934
7a43168
0774181
878fbf7
9b73eac
a0787d2
f8ff1c6
f0fe13e
094af8e
8470474
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,9 +19,16 @@ export async function parseStreamedMessages({ | |
let isFollowupQuestion = false; | ||
let stepIndex = 0; | ||
let textBlockIndex = 0; | ||
const thoughtProcess: string[] = []; | ||
|
||
for await (const chunk of chunks) { | ||
// eslint-disable-next-line no-prototype-builtins | ||
if (chunk.hasOwnProperty('data_points')) { | ||
thoughtProcess.push(chunk as string); | ||
continue; | ||
} | ||
let chunkValue = chunk.answer as string; | ||
|
||
if (chunkValue === '') { | ||
continue; | ||
} | ||
|
@@ -110,8 +117,7 @@ export async function parseStreamedMessages({ | |
|
||
visit(); | ||
} | ||
|
||
return streamedMessageRaw.join(''); | ||
return streamedMessageRaw.join(''), thoughtProcess; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not what's the intent here? I you want to return both it should be in an array There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, good catch. Initially I was going to wrap both in an object, but streamedMessageRaw is not used, so I was going to delete it all together. I left it for later to decide, and I simply forgot :) |
||
} | ||
|
||
// update the citations entry and wrap the citations in a sup tag | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably disable this rule, makes no sense to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.