refactor: update dependencies to use spring-ai-model and spring-ai-commons

Replace spring-ai-client-chat dependency with spring-ai-model in model implementations
and memory repositories, and with spring-ai-commons in document readers. This change
improves the dependency structure by having components depend on the appropriate
abstraction level.

Additional changes:
- Add slf4j-api dependency to pdf-reader and spring-ai-retry
- Move spring-ai-client-chat to test scope in spring-ai-ollama
- Fix XML formatting in some pom.xml files

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
Christian Tzolov
2025-05-16 19:40:48 +02:00
parent 8a5f68d655
commit 5d6bbd9368
25 changed files with 65 additions and 49 deletions

View File

@@ -39,9 +39,10 @@
</scm>
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-commons</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -40,7 +40,7 @@
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-commons</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -16,7 +16,8 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.ai</groupId>
@@ -42,7 +43,7 @@
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-commons</artifactId>
<version>${project.parent.version}</version>
</dependency>
@@ -58,6 +59,12 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<optional>true</optional>
</dependency>
<!-- TESTING -->
<dependency>
<groupId>org.springframework.boot</groupId>
@@ -79,4 +86,4 @@
</dependencies>
</project>
</project>

View File

@@ -43,7 +43,7 @@
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-commons</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -66,7 +66,7 @@
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -41,7 +41,7 @@
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-model</artifactId>
<version>${project.version}</version>
</dependency>

View File

@@ -41,10 +41,10 @@
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-model</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>

View File

@@ -45,7 +45,7 @@
<!-- production dependencies -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -43,7 +43,7 @@
<!-- production dependencies -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -42,7 +42,7 @@
<!-- production dependencies -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -44,7 +44,7 @@
<!-- production dependencies -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -24,7 +24,7 @@
<!-- production dependencies -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -43,7 +43,7 @@
<!-- production dependencies -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -42,11 +42,11 @@
<dependencies>
<!-- production dependencies -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.ai</groupId>

View File

@@ -45,7 +45,7 @@
<!-- production dependencies -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -42,11 +42,11 @@
<dependencies>
<!-- production dependencies -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>

View File

@@ -44,12 +44,12 @@
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.ai</groupId>
@@ -73,6 +73,13 @@
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<version>${project.parent.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>

View File

@@ -45,7 +45,7 @@
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -42,7 +42,7 @@
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -44,7 +44,7 @@
<!-- production dependencies -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -54,7 +54,7 @@
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -67,7 +67,7 @@
<!-- production dependencies -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -79,7 +79,7 @@
<!-- production dependencies -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -42,7 +42,7 @@
<!-- production dependencies -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<artifactId>spring-ai-model</artifactId>
<version>${project.parent.version}</version>
</dependency>

View File

@@ -16,7 +16,8 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.ai</groupId>
@@ -41,22 +42,22 @@
<dependencies>
<!-- production dependencies -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-client-chat</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<optional>true</optional>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
@@ -65,4 +66,4 @@
</dependency>
</dependencies>
</project>
</project>