lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
40.97k stars 9.34k forks source link

[Bug] doc文件分块错误,文件内容包含文字图片等 #3570

Closed ZeroDeng01 closed 3 weeks ago

ZeroDeng01 commented 1 month ago

📦 部署环境

Vercel

📌 软件版本

1.12.9

💻 系统环境

Windows

🌐 浏览器

Chrome

🐛 问题描述

doc文件分块错误,其实pdf、ppt等都会错误

Unhandled Rejection: h [TRPCClientError]: Unexpected token '<', "<!doctype "... is not valid JSON
    at h.from (/var/task/.next/server/chunks/6476.js:35:134907)
    at /var/task/.next/server/chunks/6476.js:35:140673
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  meta: undefined,
  shape: undefined,
  data: undefined,
  [cause]: SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON
      at JSON.parse (<anonymous>)
      at parseJSONFromBytes (node:internal/deps/undici/undici:5472:19)
      at successSteps (node:internal/deps/undici/undici:5454:27)
      at fullyReadBody (node:internal/deps/undici/undici:4381:9)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async consumeBody (node:internal/deps/undici/undici:5463:7)
      at async I (/var/task/.next/server/chunks/6476.js:35:139418)
      at async Object.fetch (/var/task/.next/server/chunks/6476.js:35:139980)
}
Node.js process exited with exit status: 128. The logs above can help with debugging the issue.

image image

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

No response

lobehubbot commented 1 month ago

👀 @ZeroDeng01

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

arvinxx commented 1 month ago

doc/xls/ppt 开源版里不计划支持,太老了。你试试加个 APP_URL 环境变量呢 ?

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


doc/xls/ppt is not planned to be supported in the open source version, it is too old. Could you try adding an APP_URL environment variable?

ZeroDeng01 commented 4 weeks ago

image image APP_URL为部署的lobe的主地址https://xxx.xxxx.net. docx可以了,部分pptx和pdf依然存在问题报错如下: image image

lobehubbot commented 4 weeks ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


image image APP_URL is the main address of the deployed lobe https://xxx.xxxx.net. Docx is OK, but some pptx and pdf still have problems and the error is as follows: image image

arvinxx commented 4 weeks ago

报错的 PDF 和 PPTX 可以发出来看下

lobehubbot commented 4 weeks ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


You can send the PDF and PPTX of the error report for a look.

lobehubbot commented 3 weeks ago

✅ @ZeroDeng01

This issue is closed, If you have any questions, you can comment and reply.\ 此问题已经关闭。如果您有任何问题,可以留言并回复。

ZeroDeng01 commented 3 weeks ago

Thx!由于可复现问题的文件不适合分享所以没办法提供测试样本!

lobehubbot commented 3 weeks ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Thx! Since the files that can reproduce the problem are not suitable for sharing, there is no way to provide test samples!