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.75k stars 8k forks source link

Error creating file #1472

Open deanlayer opened 8 months ago

deanlayer commented 8 months ago

Hi, I am experiencing an issue when trying to upload files. Regardless of the file size or length, from a two-word document to longer ones, it will not allow me to upload anything.

Error creating file. Error: JSON object requested, multiple (or no) rows returned.

spammenotinoz commented 8 months ago

If you are on Vercel, restart the front end. There is a file size limit and once hit doesn’t go away. Sorry on my mobile and can’t remember what that limit is, but it’s not that big.

deanlayer commented 8 months ago

Если вы используете Vercel, перезапустите интерфейс. Существует ограничение на размер файла, и после нажатия оно не исчезает. Извините, у меня мобильный телефон, и я не могу вспомнить, что это за лимит, но он не такой уж большой.

No, I deployed it on my local machine through Docker.

iddelacruz commented 8 months ago

Hi, I'm having the same problem in local env running the latest version

spammenotinoz commented 8 months ago

For a hosted instance, I was able to resolve the HTML upload issue by running the migration script again.

CREATE OR REPLACE FUNCTION delete_storage_object(bucket TEXT, object TEXT, OUT status INT, OUT content TEXT) RETURNS RECORD LANGUAGE 'plpgsql' SECURITY DEFINER AS $$ DECLARE project_url TEXT := '<take your project ID from API settings'; service_role_key TEXT := '<replace with your actual service role key'; url TEXT := project_url || '/storage/v1/object/' || bucket || '/' || object; BEGIN SELECT INTO status, content result.status::INT, result.content::TEXT FROM extensions.http(( 'DELETE', url, ARRAY[extensions.http_header('authorization','Bearer ' || service_role_key)], NULL, NULL)::extensions.http_request) AS result; END; $$;

Note: This is not the original issue reported, which I have replicated in a test environment after a backup and restore. (Error creating file. Error: JSON object requested, multiple (or no) rows returned.) deanlayer, did you do a migration\restore? I was able to replicate via a restore as the existing file tables referenced buckets that were not associated with this project

piulin commented 8 months ago

I'm experiencing the same issue in a local environment using the latest commit @spammenotinoz . Is it a problem with the DB?

0x2me commented 8 months ago

I have the same issue, fails on uploading .tsx files. working for other file

piulin commented 8 months ago

For me it does not work with any file independently of the extension.

spammenotinoz commented 8 months ago

I'm experiencing the same issue in a local environment using the latest commit @spammenotinoz . Is it a problem with the DB?

supabase_kong_chatbotui

Which issue, there were two discussed in this thread. My fix was for not being able to resolve "supabase_kong_chatbotui". If you followed the guide for a local install won't \ shouldn't be problem as "supabase_kong_chatbotui" resolves to a valid container. But if you host your own supabase database or use a hosted instance, then the name will be unknown.

chawaa commented 8 months ago

Has this issue been resolved? Any new developments?

Realvincentyuan commented 8 months ago

For me it does not work with any file independently of the extension.

same here, deployed locally, cannot upload any files of any types in the front end

iddelacruz commented 8 months ago

I can not upload any file pdf, txt, etc. This is an interesting tool for test your ideas but, I need to be able to upload files.

Calv92 commented 7 months ago

have seme problem no able to upload any kind fine regarding of size or type

aodrasa commented 7 months ago

yeah same problem here.

raphi777 commented 7 months ago

I was not able to upload any files in my ChatbotUI while hosting my models locally with Ollama. I found out that the variable embeddingsProvider in app/api/retrieval/process/route.ts initialized in line 28 was set to "openai" instead of "local". So for me the fix was to got to the Workspace settings in the UI, select Tab defaults -> advanced settings -> select Embeddings Provider "local" (at the very bottom).

jpzhangvincent commented 6 months ago

I was not able to upload any files in my ChatbotUI while hosting my models locally with Ollama. I found out that the variable embeddingsProvider in app/api/retrieval/process/route.ts initialized in line 28 was set to "openai" instead of "local". So for me the fix was to got to the Workspace settings in the UI, select Tab defaults -> advanced settings -> select Embeddings Provider "local" (at the very bottom).

Hmm I have changed to the local setting. But I still got the errors - "Error creating file. Error: JSON object requested, multiple (or no) rows returned." "Failed to process file. Reason:supabaseKey is required."

Any ideas?

NamGHOST commented 5 months ago

Is this fixed?

ingrivia commented 2 months ago

any update on this?