Chroma Cloud Splade sparse embedding function
npm install @chroma-core/chroma-cloud-spladeThis package provides a sparse embedding function for the Splade model family hosted on Chroma's cloud embedding service. Splade (Sparse Lexical and Expansion) embeddings are particularly effective for information retrieval tasks, combining the benefits of sparse representations with learned relevance.
``bash`
npm install @chroma-core/chroma-cloud-splade
`typescript
import { ChromaClient } from "chromadb";
import {
ChromaCloudSpladeEmbeddingFunction,
ChromaCloudSpladeEmbeddingModel,
} from "@chroma-core/chroma-cloud-splade";
// Initialize the embedder
const embedder = new ChromaCloudSpladeEmbeddingFunction({
model: ChromaCloudSpladeEmbeddingModel.SPLADE_PP_EN_V1,
apiKeyEnvVar: "CHROMA_API_KEY",
});
Set your Chroma API key as an environment variable:
`bash`
export CHROMA_API_KEY=your-api-key
Get your API key from Chroma's dashboard.
- model: Model to use for sparse embeddings (default: SPLADE_PP_EN_V1)CHROMA_API_KEY
- apiKeyEnvVar: Environment variable name for API key (default: )
- prithivida/Splade_PP_en_v1` - Splade++ English v1 model optimized for information retrieval