mckaywrigley / chatbot-ui

Come join the best place on the internet to learn AI skills. Use code "chatbotui" for an extra 20% off.
https://JoinTakeoff.com
MIT License
28.56k stars 7.95k forks source link

does not process the file #1555

Open legaltextai opened 7 months ago

legaltextai commented 7 months ago

shows error when i try to upload the file. i am on a paid version Error creating file. Error: JSON object requested, multiple (or no) rows returned. NRS_ CHAPTER 128 - TERMINATION OF PARENTAL RIGHTS.pdf

fkesheh commented 7 months ago

This should be fixed by PR #1557. Currently the files are limited to 5 Mb, if you try to upload a bigger one it errors out and you have to refresh

spammenotinoz commented 7 months ago

This should be fixed by PR #1557. Currently the files are limited to 5 Mb, if you try to upload a bigger one it errors out and you have to refresh

Hi @fkesheh, unfortunately @legaltextai sample is less than half a megabyte. Interestingly If I drag the file via Explorer it works. However if I upload via the "+ New File" > "Create File", I also get the error "Error creating file. Error: JSON object requested, multiple (or no) rows returned.". Vercel returns the below error "[POST] /api/retrieval/process status=400 BAD Request"

@legaltextai please try the above workaround via Explorer, see if that helps.

spammenotinoz commented 6 months ago

Hi @fkesheh sorry to tag you, but thought you may know, which is the code that processes files via the "create file"? Using unmodified codebase, I can drag the file via explorer and upload that way, but not via the "create file". Tried to take a look, but couldn't find it. Via "Create File" also ignores limits set via https://github.com/mckaywrigley/chatbot-ui/pull/1557/files

Uploads work from Mobile Uploads work from Explorer (drag drop) Uploads via the + within Chat work However uploads via "new file\ create file" are returning the Error creating file. Error: JSON object requested, multiple (or no) rows returned. This is for files of any size.

fkesheh commented 6 months ago

Mine custom version works fine in both ways and also with this file. The same implementation also works in https://chat.hackerai.co/ for both drag and drop and through the button

image

spammenotinoz commented 6 months ago

Hi @fkesheh thank-you for taking the time to respond. OP was referring to upload file the left side bar menu. That also broke for myself after 1557. But is working again after reverting 1557. I might hide the actual upload feature from side-bar, as it's not required when you have the attachments icon and drag\drop functionality.

I checked out https://chat.hackerai.co, and upload works via the left sidebar menu, but suspect you have likely overhauled the interface somewhat. Amazing work you have done there!!

I did find a bug on https://chat.hackerai.co, it doesn't let you delete files. No error, the interface just doesn't respond.

fkesheh commented 6 months ago

On HackerGPT the user is not allowed to set the name of the file, so the extension is preserved. In chatbot-ui the user is allowed to name the file and the extension is removed. Since we are not pushing the file to vercel anymore, it doesn't know the file extension and this causes a failure in the process.

Here is the fixed version: https://github.com/mckaywrigley/chatbot-ui/pull/1613

spammenotinoz commented 6 months ago

Thankyo, confirming this fixes the issue for me.