Replies: 1 comment
-
Hey there, @lalitx17! I'm here to assist you with any questions or issues you have. I can help you solve bugs, answer questions, and become a contributor while you're waiting for a human maintainer. Let me know how I can help! Yes, there is a way to get the list of collections in import { Chroma } from "@langchain/community/vectorstores/chroma";
import { HuggingFaceTransformersEmbeddings } from "@langchain/community/embeddings/hf_transformers";
const embeddings = new HuggingFaceTransformersEmbeddings({
modelName: "Xenova/all-MiniLM-L6-v2",
});
async function listCollections(chromaInstance: Chroma) {
if (!chromaInstance.index) {
throw new Error("ChromaClient is not initialized.");
}
return await chromaInstance.index.listCollections();
}
async function initChroma() {
const chromaInstance = await Chroma.fromExistingCollection(embeddings, { collectionName: "your_collection_name" });
const collections = await listCollections(chromaInstance);
console.log(collections);
}
initChroma(); This function checks if the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
I couldn't find a way to do it unless I use the chromadb package independently.
System Info
using langchainjs in next.js
linux fedora workstation 40
nodejs -v20.15.1
Beta Was this translation helpful? Give feedback.
All reactions