-
-
Notifications
You must be signed in to change notification settings - Fork 17.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] "Error: End of data reached" returned when using Upset API to upsert documents #3041
Comments
question: have you tried other pdf, docx file? Im guessting the file is corrupted because you save the text file into another format. |
It's definitely not the pdf file - it's a regular PDF. Docs files saved from Word fails too. |
Any further thoughts on this bug, @HenryHengZJ ? It looks like it's impossible to upsert pdf and docx files at all via the API. To me, that's a critical bug to anyone who integrates their chatflows in solutions with a knowledgebase that can change over time. |
@HenryHengZJ yes it works, but if you ask then something about the document with prediction api, it says that no doc was loaded |
We've released 2 new APIs that should work fine: https://docs.flowiseai.com/using-flowise/api#document-upsert-refresh-api |
Describe the bug
I want to upsert different files (e.g. PDF) via the API. Some Document Loaders return an error when using them via the Upsert API. The "Text File" Document Loader works fine, but, for example, "Pdf File" and "Docx File" return the following error (content of the JSON object returned by the
requests.post(...)
call){'statusCode': 500, 'success': False, 'message': 'Error: vectorsService.upsertVector - Error: End of data reached (data length = 0, asked index = 4). Corrupted zip ?', 'stack': {}}
I can't override the settings in the Pdf File or Docx File Document Loaders node via the API.
To Reproduce
If the node is 'configured' in the chatflow via the UI (the text.pdf file is uploaded) the error does not occur - but then that file is upserted every time I call the API, no matter which file I send via the API. I can't override the settings in the Pdf File Document Loader node via the API.
Expected behavior
I expect the "Pdf File", "Docx File", etc. Document Loaders to work like the "Text File" Document Loader where the form_data object overrides the settings in my node.
Screenshots
The simple chatflow to reproduce it:
The test Python code:
Setup
The text was updated successfully, but these errors were encountered: