janhq / jan

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer. Multiple engine support (llama.cpp, TensorRT-LLM)
https://jan.ai/
GNU Affero General Public License v3.0
23.74k stars 1.38k forks source link

bug: Local models cannot recognize uploaded files #4057

Open imtuyethan opened 5 days ago

imtuyethan commented 5 days ago

Jan version

0.5.8-731

Describe the Bug

I tried the entire Llama family. These models seem like they're unable to detect or process uploaded PDF files, responding as if no file was provided despite the UI showing successful file uploads.

1 2 Screenshot 2024-11-20 at 7 29 07 PM

File Type: PDF File Size: 169.56KB

Steps to Reproduce

  1. Upload a PDF file
  2. Requests to "summarize this"
  3. Model responds that there is no text to summarize

Screenshots / Logs

OS: macOS (Darwin Kernel Version 23.2.0) Hardware: Apple M2 Jan Version: v0.5.8-731 Memory: 16GB Total Cortex Version: v1.0.3-rc5

What is your OS?

louis-jan commented 5 days ago

As I remember, we don't support to change model mid-thread for documents uploads. There would be an enhancement where we fix an embedding model to address this issue from cortex.cpp.

sebastian-lempert commented 4 days ago

Same for me:

Screenshots

Bildschirmfoto 2024-11-21 um 17 09 29 Bildschirmfoto 2024-11-21 um 17 10 43 Bildschirmfoto 2024-11-21 um 17 10 58

PDF file used

Downloaded from Wikipedia: https://en.wikipedia.org/w/index.php?title=Special:DownloadAsPdf&page=Bitcoin&action=show-download-screen

System

Steps to reproduce

  1. Start Jan
  2. Install model "Llama 3.1 8B Instruct Q4"
  3. Follow these steps in order to be able to chat with PDFs using RAG: https://jan.ai/docs/tools/retrieval
  4. Start a new Thread
  5. Select model "Llama 3.1 8B Instruct Q4"
  6. Upload PDF
  7. Ask "Please summarize the text in this file" --> this will take forever
  8. Ask "Please summarize the text in this file" again --> this will result in an answer like "You haven't provided a file for me to access or read from. If you'd like, you can copy and paste the contents of the file into this chat window, and I'll be happy to help summarize it for you!"