spring-ai icon indicating copy to clipboard operation
spring-ai copied to clipboard

Add an opportunity to choose a model in vector store

Open niallrox opened this issue 9 months ago • 0 comments
trafficstars

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

niallrox avatar Jan 22 '25 19:01 niallrox