mayooear / gpt4-pdf-chatbot-langchain

GPT4 & LangChain Chatbot for large PDF docs
https://www.youtube.com/watch?v=ih9PBGVVOO4
14.95k stars 3.02k forks source link

npm run ingest error #325

Closed MrFadiAi closed 1 year ago

MrFadiAi commented 1 year ago

Hello, there i was wonderding why do i get this error ? i did everyhing right and set up new index on pincone. Can you help please?

btw: i have pdf file inside docs file

PS D:\Chatbot AI\gpt4-pdf-chatbot-langchain> npm run ingest

gpt4-langchain-pdf-chatbot@0.1.0 ingest tsx -r dotenv/config scripts/ingest-data.ts

error [Error: ENOTDIR: not a directory, scandir 'D:\Chatbot AI\gpt4-pdf-chatbot-langchain\docs\tesla.pdf'] { errno: -4052, code: 'ENOTDIR', syscall: 'scandir', path: 'D:\Chatbot AI\gpt4-pdf-chatbot-langchain\docs\tesla.pdf' } d:\Chatbot AI\gpt4-pdf-chatbot-langchain\scripts\ingest-data.ts:46 throw new Error('Failed to ingest your data'); ^

Error: Failed to ingest your data at run (d:\Chatbot AI\gpt4-pdf-chatbot-langchain\scripts\ingest-data.ts:46:11) at (d:\Chatbot AI\gpt4-pdf-chatbot-langchain\scripts\ingest-data.ts:51:3)

Node.js v18.16.0

boyuan99 commented 1 year ago

I think it may be that your file path is wrong. The file path should be the folder where the pdf file is stored instead of the file itself. Hope this helps

dosubot[bot] commented 1 year ago

Hi, @fadi9696! I'm Dosu, and I'm helping the gpt4-pdf-chatbot-langchain team manage their backlog. I wanted to let you know that we are marking this issue as stale.

From what I understand, you encountered an error while running the command "npm run ingest" for a PDF file. The error message suggests that the path provided is not a directory, causing the ingestion process to fail. Boyuan99 suggested that the file path should be the folder where the PDF file is stored instead of the file itself.

Before we close this issue, we wanted to check if it is still relevant to the latest version of the gpt4-pdf-chatbot-langchain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.

Thank you for your understanding and contribution to the project!