spring-ai
spring-ai copied to clipboard
Review VectorStore interface
Triggered by the PR https://github.com/spring-projects/spring-ai/pull/203 the VectorStore interface should be revisited to see how many VectorStore
implementations can take additional information to add
and/or delete
. This feels similar to the case of ChatClientOptions
currently being prototyped that allows for specific AI Model provider options to be passed down to the implementation while still allowing the use of the generic interface ChatClient
.
Removed VectorStoreRetriever
Will revisit a query only interface in the future. The AcmeIT tests need to be reviewed, they were probably used a spike vs. a real test in the early days of the project.
As the "portable options' for ChatClient are designed, a similar pattern can be used for vectorstore add options. As a rough example.
public void add(List<Document> documents, VectorAddOptions addOptions) {
public interface VectorAddOptions { }
public interface PineconeVectorAddOptions extends VectorAddOptions {
String namespace;
}