🐛 fix: Prevent Empty File Uploads & Assistants Fixes (#2611)

* chore: update default models for openai/assistants

* fix: allows assistants models fetching

* change default models order, ensure assistant_id is defined if intended

* fix: prevent empty files from being uploaded
This commit is contained in:
Danny Avila 2024-05-03 12:49:26 -04:00 committed by GitHub
parent a0288f1c5c
commit c8baceac76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 24 additions and 7 deletions

View file

@ -514,6 +514,10 @@ function filterFile({ req, file, image }) {
throw new Error('No file_id provided');
}
if (file.size === 0) {
throw new Error('Empty file uploaded');
}
/* parse to validate api call, throws error on fail */
isUUID.parse(file_id);