mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
👥 fix(assistants): Improve Error handling (#2012)
* feat: make assistants endpoint appendable since message state is not managed by LibreChat * fix(ask): search currentMessages for thread_id if it's not defined * refactor(abortMiddleware): remove use of `overrideProps` and spread unknown fields instead * chore: remove console.log in `abortConversation` * refactor(assistants): improve error handling/cancellation flow
This commit is contained in:
parent
d4fe8fc82d
commit
18edd2660b
7 changed files with 77 additions and 25 deletions
|
|
@ -110,7 +110,7 @@ const handleAbortError = async (res, req, error, data) => {
|
|||
}
|
||||
|
||||
const respondWithError = async (partialText) => {
|
||||
const options = {
|
||||
let options = {
|
||||
sender,
|
||||
messageId,
|
||||
conversationId,
|
||||
|
|
@ -121,7 +121,8 @@ const handleAbortError = async (res, req, error, data) => {
|
|||
};
|
||||
|
||||
if (partialText) {
|
||||
options.overrideProps = {
|
||||
options = {
|
||||
...options,
|
||||
error: false,
|
||||
unfinished: true,
|
||||
text: partialText,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue