mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-16 15:35:31 +01:00
🔀 refactor: Endpoint Check for File Uploads in Images Route (#11352)
- Changed the endpoint check from `isAgentsEndpoint` to `isAssistantsEndpoint` to adjust the logic for processing file uploads. - Reordered the import statements for better organization.
This commit is contained in:
parent
39a227a59f
commit
b5e4c763af
1 changed files with 4 additions and 4 deletions
|
|
@ -2,11 +2,11 @@ const path = require('path');
|
|||
const fs = require('fs').promises;
|
||||
const express = require('express');
|
||||
const { logger } = require('@librechat/data-schemas');
|
||||
const { isAgentsEndpoint } = require('librechat-data-provider');
|
||||
const { isAssistantsEndpoint } = require('librechat-data-provider');
|
||||
const {
|
||||
filterFile,
|
||||
processImageFile,
|
||||
processAgentFileUpload,
|
||||
processImageFile,
|
||||
filterFile,
|
||||
} = require('~/server/services/Files/process');
|
||||
|
||||
const router = express.Router();
|
||||
|
|
@ -21,7 +21,7 @@ router.post('/', async (req, res) => {
|
|||
metadata.temp_file_id = metadata.file_id;
|
||||
metadata.file_id = req.file_id;
|
||||
|
||||
if (isAgentsEndpoint(metadata.endpoint) && metadata.tool_resource != null) {
|
||||
if (!isAssistantsEndpoint(metadata.endpoint) && metadata.tool_resource != null) {
|
||||
return await processAgentFileUpload({ req, res, metadata });
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue