mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-11 16:53:45 +00:00
🔧 fix: legacy file upload UX checks in processFileURL and processAgentFileUpload
This commit is contained in:
parent
debb6e80e8
commit
7384947017
1 changed files with 2 additions and 3 deletions
|
|
@ -319,8 +319,7 @@ const processFileURL = async ({
|
||||||
};
|
};
|
||||||
|
|
||||||
const resolveDefaultUploadLLMDeliveryPath = ({ file, endpointConfig, fileConfig }) => {
|
const resolveDefaultUploadLLMDeliveryPath = ({ file, endpointConfig, fileConfig }) => {
|
||||||
const isLegacyFileUploadUX =
|
const isLegacyFileUploadUX = endpointConfig?.legacyFileUploadUX === true;
|
||||||
endpointConfig?.legacyFileUploadUX === true || fileConfig?.legacyFileUploadUX === true;
|
|
||||||
if (isLegacyFileUploadUX) {
|
if (isLegacyFileUploadUX) {
|
||||||
return 'provider';
|
return 'provider';
|
||||||
}
|
}
|
||||||
|
|
@ -589,7 +588,7 @@ const processAgentFileUpload = async ({ req, res, metadata }) => {
|
||||||
const endpointConfig = getEndpointFileConfig({ fileConfig, endpoint });
|
const endpointConfig = getEndpointFileConfig({ fileConfig, endpoint });
|
||||||
|
|
||||||
if (agent_id && !tool_resource && !messageAttachment) {
|
if (agent_id && !tool_resource && !messageAttachment) {
|
||||||
if (endpointConfig?.legacyFileUploadUX === true || fileConfig?.legacyFileUploadUX === true) {
|
if (endpointConfig?.legacyFileUploadUX === true) {
|
||||||
throw new Error('No tool resource provided for agent file upload');
|
throw new Error('No tool resource provided for agent file upload');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue