spring-projects / spring-projects/spring-ai
Add an opportunity to choose a model in vector store
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
Expected Behavior
void add(List<Document> documents, String model);
@Nullable
List<Document> similaritySearch(SearchRequest request, String model);
or
void add(List<Document> documents, EmbeddingOptions options);
@Nullable
List<Document> similaritySearch(SearchRequest request, EmbeddingOptions options);
Current Behavior
Currently there is no opportunity to send requests providing different models. But in chatClient it is possible.
Context
Currently I use a weird decorator in order to support different models for different clients, which includes a lot of boilerplate code to make it compatible with my specific vector store. I've seen some issues about redesigning of the vector store to separate logic of calling embedding model and saving documents. Are there some plans to do it this way? Would be lovely.. Thanks in advance
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the vector-store add and similaritySearch entry points described in the issue, then compare how ChatClient accepts model or embedding options. Clarify the supported API and verify that callers can select different models for document ingestion and similarity search without the current decorator.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- databases, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100