Class ChromaVectorStore
java.lang.Object
org.springframework.ai.vectorstore.observation.AbstractObservationVectorStore
org.springframework.ai.chroma.vectorstore.ChromaVectorStore
- All Implemented Interfaces:
Consumer<List<org.springframework.ai.document.Document>>,org.springframework.ai.document.DocumentWriter,org.springframework.ai.vectorstore.VectorStore,org.springframework.ai.vectorstore.VectorStoreRetriever,org.springframework.beans.factory.InitializingBean
public class ChromaVectorStore
extends org.springframework.ai.vectorstore.observation.AbstractObservationVectorStore
implements org.springframework.beans.factory.InitializingBean
ChromaVectorStore is a concrete implementation of the VectorStore
interface. It is responsible for adding, deleting, and searching documents based on
their similarity to a query, using the ChromaApi and EmbeddingModel for
embedding calculations. For more information about how it does this, see the official
Chroma website.- Author:
- Christian Tzolov, Fu Cheng, Sebastien Deleuze, Soby Chacko, Thomas Vitale, Jonghoon Park
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.springframework.ai.vectorstore.observation.AbstractObservationVectorStore
batchingStrategy, embeddingModel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic ChromaVectorStore.Builderorg.springframework.ai.vectorstore.observation.VectorStoreObservationContext.BuildercreateObservationContextBuilder(String operationName) voidvoidprotected voiddoDelete(org.springframework.ai.vectorstore.filter.Filter.Expression expression) List<org.springframework.ai.document.Document>doSimilaritySearch(org.springframework.ai.vectorstore.SearchRequest request) Methods inherited from class org.springframework.ai.vectorstore.observation.AbstractObservationVectorStore
add, delete, delete, similaritySearchMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.ai.document.DocumentWriter
writeMethods inherited from interface org.springframework.ai.vectorstore.VectorStore
accept, delete, getName, getNativeClientMethods inherited from interface org.springframework.ai.vectorstore.VectorStoreRetriever
similaritySearch
-
Constructor Details
-
ChromaVectorStore
- Parameters:
builder-VectorStore.Builderfor chroma vector store
-
-
Method Details
-
builder
public static ChromaVectorStore.Builder builder(ChromaApi chromaApi, org.springframework.ai.embedding.EmbeddingModel embeddingModel) -
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
doAdd
- Specified by:
doAddin classorg.springframework.ai.vectorstore.observation.AbstractObservationVectorStore
-
doDelete
- Specified by:
doDeletein classorg.springframework.ai.vectorstore.observation.AbstractObservationVectorStore
-
doDelete
protected void doDelete(org.springframework.ai.vectorstore.filter.Filter.Expression expression) - Overrides:
doDeletein classorg.springframework.ai.vectorstore.observation.AbstractObservationVectorStore
-
doSimilaritySearch
public List<org.springframework.ai.document.Document> doSimilaritySearch(org.springframework.ai.vectorstore.SearchRequest request) - Specified by:
doSimilaritySearchin classorg.springframework.ai.vectorstore.observation.AbstractObservationVectorStore
-
createObservationContextBuilder
public org.springframework.ai.vectorstore.observation.VectorStoreObservationContext.Builder createObservationContextBuilder(String operationName) - Specified by:
createObservationContextBuilderin classorg.springframework.ai.vectorstore.observation.AbstractObservationVectorStore
-