🔧 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:
Danny Avila 2023-11-29 13:40:16 -05:00 committed by GitHub
parent ae03267d9b
commit e13b146d6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 22 additions and 15 deletions

View file

@ -33,7 +33,7 @@ router.post('/', validateEndpoint, buildEndpointOption, setHeaders, async (req,
let promptTokens;
let lastSavedTimestamp = 0;
let saveDelay = 100;
const sender = getResponseSender(endpointOption);
const sender = getResponseSender({ ...endpointOption, model: endpointOption.modelOptions.model });
const userMessageId = parentMessageId;
const user = req.user.id;