File Search file upload problem with CosmosDB #8596
Replies: 2 comments
-
It's very unusual these methods would cause it, as they don't add significant data to either the agent document or files collection. Error logs with stack traces would be helpful here: Log locations:
There are two types of logs that can help diagnose the issue:
Error logs contain exact stack traces and are especially helpful, but both can provide valuable information. Please only include the relevant portions of logs that correspond to when you reproduced the error. Also if you can share the files used, really any files that help reproduce the error, would be helpful. |
Beta Was this translation helpful? Give feedback.
-
Thank you for a quick reply. I had the same thought. There is nothing unusual about these methods. However, I debugged the flow using the debugger with breakpoints placed in these methods, and it really seems like these are causing the problem. I think the problem might be caused by the fact that I am uploading multiple files in parallel, meaning FE will trigger multiple Here are the log files but there is no additional information that would help me to pinpoint the problem. debug logs:
error logs:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
Prerequisites:
Connect Librechat to Azure CosmosDB Mongo-compatible engine.
Problem:
When you create a brand new agent with file search capability, and when you upload multiple files, let's say 4 upload batches, each containing 10 files, you will run into the error similar to this one:
[/files] Error processing file: Size 32523176 is larger than MaxDocumentSize 16777216
The error indicates that the document size of the MongoDB document exceeds 16 MB.
After some investigation, I assume this problem is caused by concurrent calls to the upload endpoint, which in the background, updates the agent document. The problem seems to be caused by the method
addAgentResourceFile
in fileAgent.js
, specifically byaddToSet
update.Version Information
aec1777
Steps to Reproduce
What browsers are you seeing the problem on?
No response
Relevant log output
Screenshots
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions