langchain-chat-with-documents: Error while uploading files "Failed to index document"

I have all the packages up to date, review my Weaviate, cloudflare and OpenAI API. Everything seems to be correct.

I see in cloudflare that the files are correctly uploaded.

This is the error in console when uploading a .txt simple file: `- ready started server on 0.0.0.0:3000, url: http://localhost:3000

  • info Loaded env from C:\Users\r.ramos\Documents\GitHub\langchain-chat-with-documents.env “pnpm” no se reconoce como un comando interno o externo, Error: ‘Error in addDocuments’ TypeError [ERR_INVALID_URL]: Invalid URL at WeaviateStore.addVectors (file:///C:/Users/r.ramos/Documents/GitHub/langchain-chat-with-documents/node_modules/langchain/dist/vectorstores/weaviate.js:103:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async WeaviateStore.fromDocuments (file:///C:/Users/r.ramos/Documents/GitHub/langchain-chat-with-documents/node_modules/langchain/dist/vectorstores/weaviate.js:155:9) at async eval (webpack-internal:///(api)/./src/server/api/routers/weaviate.ts:81:13) at async resolveMiddleware (file:///C:/Users/r.ramos/Documents/GitHub/langchain-chat-with-documents/node_modules/@trpc/server/dist/index.mjs:416:30) at async callRecursive (file:///C:/Users/r.ramos/Documents/GitHub/langchain-chat-with-documents/node_modules/@trpc/server/dist/index.mjs:452:32) at async callRecursive (file:///C:/Users/r.ramos/Documents/GitHub/langchain-chat-with-documents/node_modules/@trpc/server/dist/index.mjs:452:32) at async resolve (file:///C:/Users/r.ramos/Documents/GitHub/langchain-chat-with-documents/node_modules/@trpc/server/dist/index.mjs:482:24) at async file:///C:/Users/r.ramos/Documents/GitHub/langchain-chat-with-documents/node_modules/@trpc/server/dist/resolveHTTPResponse-e1286cb3.mjs:87:32 at async Promise.all (index 0) at async resolveHTTPResponse (file:///C:/Users/r.ramos/Documents/GitHub/langchain-chat-with-documents/node_modules/@trpc/server/dist/resolveHTTPResponse-e1286cb3.mjs:84:28) at async file:///C:/Users/r.ramos/Documents/GitHub/langchain-chat-with-documents/node_modules/@trpc/server/dist/nodeHTTPRequestHandler-f0efcff4.mjs:32:24 at async file:///C:/Users/r.ramos/Documents/GitHub/langchain-chat-with-documents/node_modules/@trpc/server/dist/adapters/next.mjs:42:9 ❌ tRPC failed on weaviate.index: Failed to index document`

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17 (3 by maintainers)

Most upvoted comments

I Found the solution, remove the commented line after the WEAVITE_HOST property in .ENV file

WEAVIATE_HOST= xxxxx.weaviate.network THIS ----> [# do not use https:// just the domain like bellingcat-xxx.weaviate.network} <— THIS