-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Allow ChromaClient to be initialized outside Chroma Vector Store #211
Comments
I am currently doing it this way though I prefer using const client = new ChromaClient();
const chroma = new Chroma(
{
collectionName,
numDimensions,
},
embeddings,
client
);
await chroma.addDocuments(docs); |
@nfcampos Thank you! |
Closed
5 tasks
jacoblee93
added a commit
that referenced
this issue
Oct 9, 2024
* Adds web entrypoint * Update prebuilt to pass config * Add env tests * Add to CI * Fix * Update CI condition * Fix docs build * Adds tracing unit test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While trying out Chroma integration I stumbled upon the following error:
Error: Please install chromadb as a dependency with, e.g. `npm install -S chromadb`
Even though I had already installed
chromadb
.When I dug into the source, I was surprised to see that
ChromaClient
is being required and initialized directly here: https://github.com/hwchase17/langchainjs/blob/main/langchain/src/vectorstores/chroma.ts#L10-L15This doesn't work well with cli tools like tsx.
Any reason why this is the case? Why can't we just pass our own initialized
ChromaClient
tofromDocuments
? Also, this would cause an issue when ChromaDB has a differentbasePath
and is hosted on a remote machine as currently there is no way to configure parameters that are passed toChromaClient
.This is already being done with
PineconeStore
where we pass in theindex
initialized outside thePineconeStore
itself.Keeping the API consistent with
PineconeStore
, my suggestion would be to have this function signature forfromDocuments
(andfromTexts
too):And of course remove the need to initialize
ChromaClient
directly and let us pass the initialized client instead.The text was updated successfully, but these errors were encountered: