mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-21 10:50:14 +01:00
refactor: Integrate streamId handling for improved resumable functionality for attachments
- Added streamId parameter to various functions to support resumable mode in tool loading and memory processing. - Updated related methods to ensure proper handling of attachments and responses based on the presence of streamId, enhancing the overall streaming experience. - Improved logging and attachment management to accommodate both standard and resumable modes.
This commit is contained in:
parent
98f2025f6f
commit
9fc225a347
6 changed files with 55 additions and 19 deletions
|
|
@ -189,12 +189,8 @@ export default function useResumableSSE(
|
|||
}
|
||||
|
||||
if (data.sync != null) {
|
||||
const textPart = data.resumeState?.aggregatedContent?.find(
|
||||
(p: { type: string }) => p.type === 'text',
|
||||
);
|
||||
console.log('[ResumableSSE] SYNC received', {
|
||||
runSteps: data.resumeState?.runSteps?.length ?? 0,
|
||||
contentLength: textPart?.text?.length ?? 0,
|
||||
});
|
||||
|
||||
const runId = v4();
|
||||
|
|
@ -231,9 +227,6 @@ export default function useResumableSSE(
|
|||
);
|
||||
}
|
||||
|
||||
const textPart = data.resumeState.aggregatedContent?.find(
|
||||
(p: { type: string }) => p.type === 'text',
|
||||
);
|
||||
console.log('[ResumableSSE] SYNC update', {
|
||||
userMsgId,
|
||||
serverResponseId,
|
||||
|
|
@ -241,7 +234,6 @@ export default function useResumableSSE(
|
|||
foundMessageId: responseIdx >= 0 ? messages[responseIdx]?.messageId : null,
|
||||
messagesCount: messages.length,
|
||||
aggregatedContentLength: data.resumeState.aggregatedContent?.length,
|
||||
textContentLength: textPart?.text?.length ?? 0,
|
||||
});
|
||||
|
||||
if (responseIdx >= 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue