mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-21 17:56:13 +01:00
🔧 fix: Correct Properties Passed to getResponseSender, Catch OpenAI Errors (#1244)
* fix: attempt to catch more errors, especially when generation started * fix: pass the right properties to getResponseSender * chore: Update .eslintrc.js and fix sendEmail.js linting errors
This commit is contained in:
parent
ae03267d9b
commit
e13b146d6d
10 changed files with 22 additions and 15 deletions
|
|
@ -829,9 +829,12 @@ ${convo}
|
|||
return '';
|
||||
}
|
||||
if (
|
||||
err?.message?.includes('stream ended') ||
|
||||
err?.message?.includes('The server had an error processing your request') ||
|
||||
err?.message?.includes('missing finish_reason') ||
|
||||
(err instanceof OpenAI.OpenAIError && err?.message?.includes('missing finish_reason'))
|
||||
) {
|
||||
console.error(err);
|
||||
await abortController.abortCompletion();
|
||||
return intermediateReply;
|
||||
} else if (err instanceof OpenAI.APIError) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue