gpt4-pdf-chatbot-langchain
gpt4-pdf-chatbot-langchain copied to clipboard
fail to ingest error.
Had following the instruction. Created the pinecone index and named it, use 1536 dimensions, cosine. However, when I run command: nvm run ingest, it still occurs error as below: `[WARN] Importing from 'langchain/document_loaders' is deprecated. Import from eg. 'langchain/document_loaders/fs/text' or 'langchain/document_loaders/web/cheerio' instead. See https://js.langchain.com/docs/getting-started/install#updating-from-0052 for upgrade instructions. .... .... url: 'https://api.openai.com/v1/embeddings' }, code: 'ERR_NETWORK', request: Request { [Symbol(realm)]: { settingsObject: [Object] }, [Symbol(state)]: { method: 'POST', localURLsOnly: false, unsafeRequest: false, body: [Object], client: [Object], reservedClient: null, replacesClientId: '', window: 'client', keepalive: false, serviceWorkers: 'all', initiator: '', destination: '', priority: null, origin: 'client', policyContainer: 'client', referrer: 'client', referrerPolicy: '', mode: 'cors', useCORSPreflightFlag: false, credentials: 'same-origin', useCredentials: false, cache: 'default', redirect: 'follow', integrity: '', cryptoGraphicsNonceMetadata: '', parserMetadata: '', reloadNavigation: false, historyNavigation: false, userActivation: false, taintedOrigin: false, redirectCount: 0, responseTainting: 'basic', preventNoCacheCacheControlHeaderModification: false, done: false, timingAllowFailed: false, headersList: [HeadersList], urlList: [Array], url: [URL] }, [Symbol(signal)]: AbortSignal { aborted: false }, [Symbol(headers)]: HeadersList { cookies: null, [Symbol(headers map)]: [Map], [Symbol(headers map sorted)]: null } }, response: undefined, isAxiosError: true, toJSON: [Function: toJSON], attemptNumber: 7, retriesLeft: 0 } /Users/Jeff/ChatGPT/gpt4-pdf-chatbot-langchain/scripts/ingest-data.ts:44 throw new Error('Failed to ingest your data'); ^
Error: Failed to ingest your data
at run (/Users/Jeff/ChatGPT/gpt4-pdf-chatbot-langchain/scripts/ingest-data.ts:44:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at
I have tried to change node to 18.16.0 and the latest version, not work.
Are you using the latest version of this repo?
Are you using the latest version of this repo?
Yes, the latest yarn version.
Same error here
I got the same error too
Do you see something like "429 - Too Many Requests" in the stack trace? Might be https://github.com/mayooear/gpt4-pdf-chatbot-langchain/issues/42. Try setting up a payment method and creating a new api key.
Do you see something like "429 - Too Many Requests" in the stack trace? Might be #42. Try setting up a payment method and creating a new api key.
Have not tried trace that, however I'm a paying user of openai.
got the same error too
node -v 18.16, latest repo
@Huowuge, ENOTDIR error means that the filepath is looking for a directory, not a path to a file.
Shoutout to tuantranf for posting about this: https://github.com/mayooear/gpt4-pdf-chatbot-langchain/issues/162
I replaced my ingest-data.ts with his, updated the filepath to 'docs/' and load up some pdfs to ingest.
@Kevjinx, there is no @tuantranf comments in issue #162. Can you please describe in detail how where do you find his ingest-data.ts and how you updated the filepath?
P.S. I'm a noob in programming...
@Kevjinx, there is no @tuantranf comments in issue #162. Can you please describe in detail how where do you find his ingest-data.ts and how you updated the filepath?
P.S. I'm a noob in programming...
@Doggson23 , are you able to figure this out? I ran into the exact same issue. Please suggest.
I am having the same issue as well. I am not sure @Kevjinx is referring to the correct issue? @mayooear can you help please? I am uploading a single page pdf which I converted to text and back to pdf so it should be ok. I am running Node.js v20.0.0. I am also running ChatGPT v3.5 Turbo and I left it as such in makechain.ts.
I am having the same issue as well. I am not sure @Kevjinx is referring to the correct issue? @mayooear can you help please? I am uploading a single page pdf which I converted to text and back to pdf so it should be ok. I am running Node.js v20.0.0. I am also running ChatGPT v3.5 Turbo and I left it as such in makechain.ts.
Hi @LeroyZanzibar, try just giving the directory name without the pdf filename and it should work.
/* Name of directory to retrieve your files from */ const filePath = 'docs/';
let me know if it works.
Actually the solution that worked for me was creating a brand new OpenAI account with a different email and generating a new API key. Obviously, not ideal if the first account has access to the GPT4 API but I do not yet so it wasn't too inconvenient for me.
Not working for me, and have followed all of the suggestions here. Does this stack need to update to the latest api as stated in the warnings?
This is what worked for me.
https://github.com/mayooear/gpt4-pdf-chatbot-langchain/issues/318#issuecomment-1557525044
Hi, @Huowuge! 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.
Based on my understanding, you are experiencing an error while trying to ingest data into a Pinecone index. It seems that you have already tried changing the Node version, but the problem persists. Other users have also reported similar issues, and some have suggested possible solutions such as setting up a payment method and creating a new API key, or replacing the ingest-data.ts file and updating the filepath.
Before we proceed, we would like to confirm if this issue is still relevant to the latest version of the gpt4-pdf-chatbot-langchain repository. If it is, please let us know by commenting on this issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.
Thank you for your understanding, and we look forward to hearing from you soon.