Upgrade notes for vector store delete API breaking change

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
This commit is contained in:
Soby Chacko
2025-02-06 20:25:38 -05:00
parent a36a987167
commit 348f3df729

View File

@@ -64,6 +64,27 @@ Spring AI updates to use Spring Boot 3.4.2 for the dependency management. You ca
* If you are upgrading to Spring Boot 3.4.2, please make sure to refer to https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.4-Release-Notes#upgrading-from-spring-boot-33[this] documentation for the changes required to configure the REST Client. Notably, if you dont have an HTTP client library on the classpath, this will likely result in the use of `JdkClientHttpRequestFactory` where `SimpleClientHttpRequestFactory` would have been used previously. To switch to use `SimpleClientHttpRequestFactory`, you need to set `spring.http.client.factory=simple`.
* If you are using a different version of Spring Boot (say Spring Boot 3.3.x) and need a specific version of a dependency, you can override it in your build configuration.
=== Vector Store API changes
In version 1.0.0-M6, the `delete` method in the `VectorStore` interface has been modified to be a void operation instead of returning an `Optional<Boolean>`.
If your code previously checked the return value of the delete operation, you'll need to remove this check.
The operation now throws an exception if the deletion fails, providing more direct error handling.
==== Before 1.0.0-M6:
[source,java]
----
Optional<Boolean> result = vectorStore.delete(ids);
if (result.isPresent() && result.get()) {
// handle successful deletion
}
----
==== In 1.0.0-M6 and later:
[source,java]
----
vectorStore.delete(ids);
// deletion successful if no exception is thrown
----
== Upgrading to 1.0.0.M5