👥 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:
Danny Avila 2024-03-07 10:50:01 -05:00 committed by GitHub
parent d4fe8fc82d
commit 18edd2660b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 77 additions and 25 deletions

View file

@ -37,7 +37,7 @@ async function abortRun(req, res) {
try {
await cache.set(cacheKey, 'cancelled');
const cancelledRun = await openai.beta.threads.runs.cancel(thread_id, run_id);
logger.debug('Cancelled run:', cancelledRun);
logger.debug('[abortRun] Cancelled run:', cancelledRun);
} catch (error) {
logger.error('[abortRun] Error cancelling run', error);
if (