mirror of
https://github.com/run-llama/create-llama.git
synced 2026-07-16 11:04:26 -04:00
npm run generate fails with chromadb #73
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tanmaybhardwaj on GitHub (Oct 6, 2024).
Originally assigned to: @thucpn on GitHub.
Below are my .env settings
CHROMA_COLLECTION=chromadb-hr-docs
CHROMA_HOST=http://localhost:8000
CHROMA_PORT=8000
successfully installed chromadb on my local mac and able to run by using below command
chroma run --host localhost --port 8000 --path chromadb-docs
But on running the 'npm run generate' command I am getting below error
Using 'openai' model provider
Starting load for HR Manual.pdf file
Started parsing the file under job id 1f3497ad-93de-4389-954b-60efba609ff2
Start creating embeddings...
/Users/tanmaybhardwaj/vcpl-chatbot/vcpl-bot/node_modules/chromadb/dist/cjs/chromadb.cjs:2844
throw new Error(newCollection.error);
^
Error: TypeError: fetch failed
at ChromaClient.getOrCreateCollection (/Users/tanmaybhardwaj/vcpl-chatbot/vcpl-bot/node_modules/chromadb/dist/cjs/chromadb.cjs:2844:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ChromaVectorStore.getCollection (/Users/tanmaybhardwaj/vcpl-chatbot/vcpl-bot/node_modules/llamaindex/dist/cjs/vector-store/ChromaVectorStore.js:34:26)
at async ChromaVectorStore.add (/Users/tanmaybhardwaj/vcpl-chatbot/vcpl-bot/node_modules/llamaindex/dist/cjs/vector-store/ChromaVectorStore.js:55:28)
at async addNodesToVectorStores (/Users/tanmaybhardwaj/vcpl-chatbot/vcpl-bot/node_modules/llamaindex/dist/cjs/ingestion/IngestionPipeline.js:113:28)
at async VectorStoreIndex.insertNodes (/Users/tanmaybhardwaj/vcpl-chatbot/vcpl-bot/node_modules/llamaindex/dist/cjs/indices/vectorStore/index.js:574:9)
at async VectorStoreIndex.buildIndexFromNodes (/Users/tanmaybhardwaj/vcpl-chatbot/vcpl-bot/node_modules/llamaindex/dist/cjs/indices/vectorStore/index.js:488:9)
at async VectorStoreIndex.init (/Users/tanmaybhardwaj/vcpl-chatbot/vcpl-bot/node_modules/llamaindex/dist/cjs/indices/vectorStore/index.js:438:13)
at async VectorStoreIndex.fromDocuments (/Users/tanmaybhardwaj/vcpl-chatbot/vcpl-bot/node_modules/llamaindex/dist/cjs/indices/vectorStore/index.js:516:16)
at async loadAndIndex (/Users/tanmaybhardwaj/vcpl-chatbot/vcpl-bot/app/api/chat/engine/generate.ts:26:3)
at async (/Users/tanmaybhardwaj/vcpl-chatbot/vcpl-bot/app/api/chat/engine/generate.ts:35:3)
Node.js v20.17.0
@thucpn commented on GitHub (Oct 11, 2024):
Hi @tanmaybhardwaj, please change your settings in .env file to: