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

error npm run ingest #267

Closed sibylare closed 1 year ago

sibylare commented 1 year ago

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

langchain pdf-test error TypeError: Cannot convert undefined or null to object at Function.keys () at new DirectoryLoader (file:///content/node_modules/langchain/dist/document_loaders/fs/directory.js:37:20) at run (file:///content/scripts/ingest-data.ts:16:26) at file:///content/scripts/ingest-data.ts:51:9 at file:///content/scripts/ingest-data.ts:53:1 at () at processTicksAndRejections (internal/process/task_queues.js:93:5) (node:58614) UnhandledPromiseRejectionWarning: Error: Failed to ingest your data at run (file:///content/scripts/ingest-data.ts:46:11) at file:///content/scripts/ingest-data.ts:51:9 at file:///content/scripts/ingest-data.ts:53:1 at () at processTicksAndRejections (internal/process/task_queues.js:93:5) (Use node --trace-warnings ... to show where the warning was created) (node:58614) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 27) (node:58614) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.