Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

langchain/vectorstores/chroma #5

Open
dsws opened this issue Sep 22, 2023 · 1 comment
Open

langchain/vectorstores/chroma #5

dsws opened this issue Sep 22, 2023 · 1 comment

Comments

@dsws
Copy link

dsws commented Sep 22, 2023

I'm trying to use the langchain/vectorstores/chroma as a vector store in the POST handler app/api/chat/retrieval/route.ts

Keep getting this error

error ./node_modules/@visheratin/tokenizers-node/tokenizers_wasm.js:367:14 Module not found: Can't resolve 'fs' https://nextjs.org/docs/messages/module-not-found Import trace for requested module: ./node_modules/@visheratin/web-ai-node/node/tokenizer.js ./node_modules/@visheratin/web-ai-node/node/tokenizerLoader.js ./node_modules/@visheratin/web-ai-node/node/index.js ./node_modules/@visheratin/web-ai-node/index.js ./node_modules/chromadb/dist/module/embeddings/WebAIEmbeddingFunction.js ./node_modules/chromadb/dist/module/index.js ./node_modules/langchain/dist/vectorstores/chroma.cjs ./node_modules/langchain/vectorstores/chroma.cjs

I tried to load it like this but no luck... keeps throwing this error. Thoughts?

if(typeof window === "undefined") {
  const {Chroma} = require("langchain/vectorstores/chroma");
}
@jacoblee93
Copy link
Collaborator

Looks like Chroma isn't supported in Edge environments :(

Can you open an issue on them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants