Skip to content

Commit 69d5b5f

Browse files
committed
Extract core modules for improved architecture
Extract functionality from spring-ai-core into dedicated modules: - spring-ai-commons: Common utilities and document handling - spring-ai-model: Core model interfaces and implementations - spring-ai-vector-store: Vector store abstraction and implementation This modularization creates clearer responsibility boundaries and allows consumers to include only what they need. The restructuring will make the codebase easier to maintain and extend as the project grows.
1 parent 8f20aab commit 69d5b5f

File tree

158 files changed

+4567
-71
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+4567
-71
lines changed

pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@
3232
<modules>
3333
<module>spring-ai-docs</module>
3434
<module>spring-ai-bom</module>
35+
<module>spring-ai-commons</module>
3536
<module>spring-ai-core</module>
37+
<module>spring-ai-model</module>
3638
<module>spring-ai-test</module>
39+
<module>spring-ai-vector-store</module>
3740

3841
<module>auto-configurations/common/spring-ai-autoconfigure-retry</module>
3942

spring-ai-commons/pom.xml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright 2023-2024 the original author or authors.
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ https://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
18+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19+
xmlns="http://maven.apache.org/POM/4.0.0"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
21+
<modelVersion>4.0.0</modelVersion>
22+
<parent>
23+
<groupId>org.springframework.ai</groupId>
24+
<artifactId>spring-ai</artifactId>
25+
<version>1.0.0-SNAPSHOT</version>
26+
</parent>
27+
<artifactId>spring-ai-commons</artifactId>
28+
<packaging>jar</packaging>
29+
<name>Spring AI Commons</name>
30+
<description>Common classes used across Spring AI</description>
31+
<url>https://github.com/spring-projects/spring-ai</url>
32+
33+
<scm>
34+
<url>https://github.com/spring-projects/spring-ai</url>
35+
<connection>git://github.com/spring-projects/spring-ai.git</connection>
36+
<developerConnection>git@github.com:spring-projects/spring-ai.git</developerConnection>
37+
</scm>
38+
39+
<dependencies>
40+
<!-- Spring Framework -->
41+
<dependency>
42+
<groupId>org.springframework</groupId>
43+
<artifactId>spring-context</artifactId>
44+
</dependency>
45+
46+
<dependency>
47+
<groupId>io.micrometer</groupId>
48+
<artifactId>micrometer-core</artifactId>
49+
</dependency>
50+
51+
<dependency>
52+
<groupId>io.micrometer</groupId>
53+
<artifactId>context-propagation</artifactId>
54+
</dependency>
55+
56+
<dependency>
57+
<groupId>io.micrometer</groupId>
58+
<artifactId>micrometer-tracing-bridge-otel</artifactId>
59+
<optional>true</optional>
60+
</dependency>
61+
62+
63+
<dependency>
64+
<groupId>com.fasterxml.jackson.module</groupId>
65+
<artifactId>jackson-module-jsonSchema</artifactId>
66+
</dependency>
67+
68+
<dependency>
69+
<groupId>com.fasterxml.jackson.core</groupId>
70+
<artifactId>jackson-databind</artifactId>
71+
</dependency>
72+
73+
<dependency>
74+
<groupId>org.jetbrains.kotlin</groupId>
75+
<artifactId>kotlin-stdlib</artifactId>
76+
<optional>true</optional>
77+
</dependency>
78+
79+
<dependency>
80+
<groupId>org.jetbrains.kotlin</groupId>
81+
<artifactId>kotlin-reflect</artifactId>
82+
<optional>true</optional>
83+
</dependency>
84+
85+
<!-- JTokkit for tokenization -->
86+
<dependency>
87+
<groupId>com.knuddels</groupId>
88+
<artifactId>jtokkit</artifactId>
89+
<version>${jtokkit.version}</version>
90+
</dependency>
91+
92+
<!-- test dependencies -->
93+
<dependency>
94+
<groupId>org.springframework.boot</groupId>
95+
<artifactId>spring-boot-starter-test</artifactId>
96+
<scope>test</scope>
97+
</dependency>
98+
99+
<dependency>
100+
<groupId>com.fasterxml.jackson.module</groupId>
101+
<artifactId>jackson-module-kotlin</artifactId>
102+
<scope>test</scope>
103+
</dependency>
104+
105+
</dependencies>
106+
107+
108+
</project>

spring-ai-core/src/main/java/org/springframework/ai/document/DocumentMetadata.java renamed to spring-ai-commons/src/main/java/org/springframework/ai/document/DocumentMetadata.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@
1616

1717
package org.springframework.ai.document;
1818

19-
import org.springframework.ai.vectorstore.VectorStore;
20-
2119
/**
2220
* Common set of metadata keys used in {@link Document}s by {@link DocumentReader}s and
23-
* {@link VectorStore}s.
21+
* VectorStores.
2422
*
2523
* @author Thomas Vitale
2624
* @since 1.0.0

0 commit comments

Comments
 (0)