guangzhengli / ChatFiles

Document Chatbot — multiple files. Powered by GPT / Embedding.
MIT License
3.27k stars 488 forks source link

Vercel Deployment : File type application/zip is not supported #92

Closed goldenquant closed 1 year ago

goldenquant commented 1 year ago

using latest version git sorurce,Vercel Deployment,error log:

beginning embedding handler
(node:8) ExperimentalWarning: buffer.File is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Error: Failed to partition file /tmp/acb46278-ffe3-4118-83b0-27ff6ea7aba9.zip with error 400 and message {"detail":"Unable to process acb46278-ffe3-4118-83b0-27ff6ea7aba9.zip: File type application/zip is not supported."}
    at UnstructuredLoader._partition (file:///var/task/node_modules/langchain/dist/document_loaders/fs/unstructured.js:86:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async UnstructuredLoader.load (file:///var/task/node_modules/langchain/dist/document_loaders/fs/unstructured.js:95:26)
    at async handler (/var/task/.next/server/pages/api/embedding.js:104:22)
    at async Object.apiResolver (/var/task/node_modules/next/dist/server/api-utils/node.js:372:9)
    at async NextNodeServer.runApi (/var/task/node_modules/next/dist/server/next-server.js:514:9)
    at async Object.fn (/var/task/node_modules/next/dist/server/next-server.js:828:35)
    at async Router.execute (/var/task/node_modules/next/dist/server/router.js:243:32)
    at async NextNodeServer.runImpl (/var/task/node_modules/next/dist/server/base-server.js:432:29)
    at async NextNodeServer.handleRequestImpl (/var/task/node_modules/next/dist/server/base-server.js:375:20)
Error: Failed to partition file /tmp/acb46278-ffe3-4118-83b0-27ff6ea7aba9.zip with error 400 and message {"detail":"Unable to process acb46278-ffe3-4118-83b0-27ff6ea7aba9.zip: File type application/zip is not supported."}
    at UnstructuredLoader._partition (file:///var/task/node_modules/langchain/dist/document_loaders/fs/unstructured.js:86:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async UnstructuredLoader.load (file:///var/task/node_modules/langchain/dist/document_loaders/fs/unstructured.js:95:26)
    at async handler (/var/task/.next/server/pages/api/embedding.js:104:22)
    at async Object.apiResolver (/var/task/node_modules/next/dist/server/api-utils/node.js:372:9)
    at async NextNodeServer.runApi (/var/task/node_modules/next/dist/server/next-server.js:514:9)
    at async Object.fn (/var/task/node_modules/next/dist/server/next-server.js:828:35)
    at async Router.execute (/var/task/node_modules/next/dist/server/router.js:243:32)
    at async NextNodeServer.runImpl (/var/task/node_modules/next/dist/server/base-server.js:432:29)
    at async NextNodeServer.handleRequestImpl (/var/task/node_modules/next/dist/server/base-server.js:375:20)
RequestId: 63bc08e0-ee7e-432c-8327-f863b0e20062 Error: Runtime exited with error: exit status 1
Runtime.ExitError
guangzhengli commented 1 year ago

Sorry, after refactoring the embedding API into Langchain, the use of zip format files is temporarily not supported. It will be supported in the future.

guangzhengli commented 1 year ago

It supports zip file now!

guangzhengli commented 1 year ago

95