Allows the converters to be shared between the autoconfigure codebase and the vector-stores code.
Reenabled the vector-stores code and fixed the TestApplication (so that it uses the MimeTypeConverters).
Annotated tests to check for the OPEN_API_KEY
environment variable.
Updated to mongodb/atlas:v1.24.0
in vector-stores so inline with the autoconfigure
test codebase.
Related to #698 and the auto configure fix in a1afb0d
Comment From: markpollack
I had made a commit for https://github.com/spring-projects/spring-ai/issues/698 and I somehow missed this.
Aside from where the converters should live (in a separate class or not) the bigger issue I found was that
@AutoConfiguration(after = MongoDataAutoConfiguration.class)
@ConditionalOnClass({ MongoDBAtlasVectorStore.class, EmbeddingModel.class, MongoTemplate.class })
@EnableConfigurationProperties(MongoDBAtlasVectorStoreProperties.class)
public class MongoDBAtlasVectorStoreAutoConfiguration {
The use of after
in the autoconfiguration is what was leading to the converter not being replaced. Removing that fixed the overall issue and no need to use BeanPostProcessor
I am inquiring if that config should use before
. @rozza would you be able to verify that?
Comment From: rozza
The use of after in the autoconfiguration is what was leading to the converter not being replaced. Removing that fixed the overall issue and no need to use BeanPostProcessor I am inquiring if that config should use before. @rozza would you be able to verify that?
Hi @markpollack - verified using @AutoConfiguration(before = MongoDataAutoConfiguration.class)
works. I've updated the PR.
I'm not sure where the converters should live, I opted to move them into the org.springframework.ai.vectorstore.convert
namespace so that they could be reused by the TestApplication
which doesn't have dependency on rg.springframework.ai.autoconfigure.vectorstore.mongo
. Not sure what is the correct idiomatic path forward here.
Comment From: sobychacko
@rozza, I missed the existence of this PR while fixing the MongoDB vector store test failures. I think we can still take some ideas in this PR and refactor some code duplications. For now, I will close this PR, and we can consider opening a new one on top of the changes from https://github.com/spring-projects/spring-ai/pull/1255. Thanks!