mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🧹fix: Handle Abort Message Edge Cases (#1462)
* chore: bump langchain to v0.0.213 from v0.0.186 * fix: handle abort edge cases: - abort message server-side if response experienced error mid-generation - attempt to recover message if aborting resulted in error - if abortKey is not provided, use conversationId if it exists - if headers were already sent, send an Event stream message - issue warning for possible Google censor/filter refactor(streamResponse): for `sendError`, allow passing overrides so that error can include partial generation, improve typing for `sendMessage` * chore(MessageContent): remove eslint warning for unused `i`, rephrase unfinished message text * fix(useSSE): avoid invoking cancelHandler if the abort response was 404 * chore(TMessage): remove unnecessary, unused legacy message property `submitting` * chore(TMessage): remove unnecessary legacy message property `cancelled` * chore(abortMiddleware): remove unused `errorText` property to avoid confusion
This commit is contained in:
parent
f19f5dca8e
commit
379e470e38
19 changed files with 529 additions and 207 deletions
|
|
@ -18,7 +18,6 @@ module.exports = {
|
|||
isCreatedByUser = false,
|
||||
error,
|
||||
unfinished,
|
||||
cancelled,
|
||||
files,
|
||||
isEdited = false,
|
||||
finish_reason = null,
|
||||
|
|
@ -45,7 +44,6 @@ module.exports = {
|
|||
finish_reason,
|
||||
error,
|
||||
unfinished,
|
||||
cancelled,
|
||||
tokenCount,
|
||||
plugin,
|
||||
plugins,
|
||||
|
|
|
|||
|
|
@ -68,10 +68,6 @@ const messageSchema = mongoose.Schema(
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
cancelled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
error: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue