Package com.embabel.agent.rag.support
Class SpringVectorStoreRagService
-
- All Implemented Interfaces:
-
com.embabel.agent.rag.RagService,com.embabel.agent.rag.WritableStore,com.embabel.common.core.types.Described,com.embabel.common.core.types.HasInfoString,com.embabel.common.core.types.Named,java.util.function.Consumer,org.springframework.ai.document.DocumentWriter
@ApiStatus.Experimental() public final class SpringVectorStoreRagService implements WritableStore, RagService
RagService wrapping a Spring AI VectorStore.
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringnameprivate final Stringdescription
-
Constructor Summary
Constructors Constructor Description SpringVectorStoreRagService(VectorStore vectorStore, String description)
-
Method Summary
Modifier and Type Method Description StringgetName()Name of the RAG service. StringgetDescription()RagResponsesearch(RagRequest ragRequest)Make a RAG request Unitaccept(List<Document> documents)List<String>writeContent(MaterializedDocument root)Write the given content root and its children to the underlying store. StringinfoString(Boolean verbose, Integer indent)-
-
Constructor Detail
-
SpringVectorStoreRagService
SpringVectorStoreRagService(VectorStore vectorStore, String description)
-
-
Method Detail
-
getName
String getName()
Name of the RAG service. Should be unique per application instance. User code may use this to select a RAG service.
-
getDescription
String getDescription()
-
search
RagResponse search(RagRequest ragRequest)
Make a RAG request
-
writeContent
List<String> writeContent(MaterializedDocument root)
Write the given content root and its children to the underlying store.
- Returns:
list of chunk ids
-
infoString
String infoString(Boolean verbose, Integer indent)
-
-
-
-