Repository navigation
Custom Code API file persistence issues #16667
What happened?Hi, I am running LibreChat with a custom written Code API in python. The API itself is working fine and I can flawlessly generate files and transfer them to LibreChat. However, i recognized that there are issues related to the file size which I can somehow reproduce. Whenever I ask the chatbot to generate a binary fiel of size X it works roughly until 50-100kb. Bigger files do work well from Code API perspective, but the file doesn't get populated back into LibreChat. I can see the icon of the file, but the download doesn't work as the file transport got corrupted mit transfer. what's really suspicious is the fact of the fiel size. it works for smaller ones, I could imagine that some wrapper outside (e.g. agent loop?) kills the request Version Informationlibrechat v0.8.8 Steps to Reproduce
What browsers are you seeing the problem on?Firefox Relevant log outputthere are no signs in the log, but the browser request to api/files/code/download/... returns 200 with just parts of the file (e.g. 600kb instead of 5mb)
A download is not triggered in the browserScreenshotsNo response Code of Conduct
|
Replies: 3 comments 1 reply
why not use https://github.com/LibreChat-AI/code-interpreter/ ? |
|
I'd first separate "file generation" from "LibreChat proxying". The fact that /api/files/code/download/... returns 200 with a truncated body is actually useful. The request is reaching the download route and the response has already started. |
|
After all - it turns out to be an issue with the microsoft container apps where the stream suddenly drops when Connection: close header is part of the request: microsoft/azure-container-apps#734 |
After all - it turns out to be an issue with the microsoft container apps where the stream suddenly drops when Connection: close header is part of the request: microsoft/azure-container-apps#734
Due to keepAlive: false in the codeServerHttpAgent, this is the standard behavior of node...