👓 fix: Assistants Vision Prompt Error Handling (legacy) (#4529)

* fix: vision prompt error handling

* fix: Update model reference in chatV1 controller

* remove model reference
This commit is contained in:
Danny Avila 2024-10-23 15:21:22 -04:00 committed by GitHub
parent 4da35b9cf5
commit 655f63714b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 7 deletions

View file

@ -151,7 +151,7 @@ const processVisionRequest = async (client, currentAction) => {
/** @type {ChatCompletion | undefined} */
const completion = await client.visionPromise;
if (completion.usage) {
if (completion && completion.usage) {
recordUsage({
user: client.req.user.id,
model: client.req.body.model,