Skip to content

Commit 2d517ee

Browse files
ilayaperumalgmarkpollack
authored andcommitted
Refactor chat memory repository artifacts for clarity
- Rename the artifact ID of the chat memory repository artifacts: - `spring-ai-model-chat-memory-jdbc` -> `spring-ai-model-chat-memory-repository-jdbc` - `spring-ai-model-chat-memory-cassandra` -> `spring-ai-model-chat-memory-repository-cassandra` - `spring-ai-model-chat-memory-neo4j` -> `spring-ai-model-chat-memory-repository-neo4j` - Rename the package names to include "repository". Example: org.springframework.ai.chat.memory.repository.jdbc.JdbcChatMemoryRepository - This package renaming also requires to change the default schema location for the jdbc repository to include "repository" - Update the docs - Update the artifact IDs in the parent POM, BOM, autoconfiguration and starters - Update upgrade notes and docs to describe the changes Fix JdbcChatMemoryRepositoryPostgresqlIT - Make sure to set the dialect via datasource Signed-off-by: Ilayaperumal Gopinathan <[email protected]>
1 parent e10fbde commit 2d517ee

File tree

57 files changed

+119
-103
lines changed

Some content is hidden

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

57 files changed

+119
-103
lines changed

auto-configurations/models/chat/memory/repository/spring-ai-autoconfigure-model-chat-memory-repository-cassandra/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
<dependency>
2727
<groupId>org.springframework.ai</groupId>
28-
<artifactId>spring-ai-model-chat-memory-cassandra</artifactId>
28+
<artifactId>spring-ai-model-chat-memory-repository-cassandra</artifactId>
2929
<version>${project.parent.version}</version>
3030
</dependency>
3131

auto-configurations/models/chat/memory/repository/spring-ai-autoconfigure-model-chat-memory-repository-cassandra/src/main/java/org/springframework/ai/model/chat/memory/repository/cassandra/autoconfigure/CassandraChatMemoryRepositoryAutoConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
import com.datastax.oss.driver.api.core.CqlSession;
2020

21-
import org.springframework.ai.chat.memory.cassandra.CassandraChatMemoryRepositoryConfig;
22-
import org.springframework.ai.chat.memory.cassandra.CassandraChatMemoryRepository;
21+
import org.springframework.ai.chat.memory.repository.cassandra.CassandraChatMemoryRepositoryConfig;
22+
import org.springframework.ai.chat.memory.repository.cassandra.CassandraChatMemoryRepository;
2323
import org.springframework.ai.model.chat.memory.autoconfigure.ChatMemoryAutoConfiguration;
2424
import org.springframework.boot.autoconfigure.AutoConfiguration;
2525
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;

auto-configurations/models/chat/memory/repository/spring-ai-autoconfigure-model-chat-memory-repository-cassandra/src/main/java/org/springframework/ai/model/chat/memory/repository/cassandra/autoconfigure/CassandraChatMemoryRepositoryProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import org.slf4j.Logger;
2222
import org.slf4j.LoggerFactory;
2323

24-
import org.springframework.ai.chat.memory.cassandra.CassandraChatMemoryRepositoryConfig;
24+
import org.springframework.ai.chat.memory.repository.cassandra.CassandraChatMemoryRepositoryConfig;
2525
import org.springframework.boot.context.properties.ConfigurationProperties;
2626
import org.springframework.lang.Nullable;
2727

auto-configurations/models/chat/memory/repository/spring-ai-autoconfigure-model-chat-memory-repository-cassandra/src/test/java/org/springframework/ai/model/chat/memory/repository/cassandra/autoconfigure/CassandraChatMemoryRepositoryAutoConfigurationIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import org.testcontainers.junit.jupiter.Testcontainers;
2727
import org.testcontainers.utility.DockerImageName;
2828

29-
import org.springframework.ai.chat.memory.cassandra.CassandraChatMemoryRepository;
29+
import org.springframework.ai.chat.memory.repository.cassandra.CassandraChatMemoryRepository;
3030
import org.springframework.ai.chat.messages.AssistantMessage;
3131
import org.springframework.ai.chat.messages.MessageType;
3232
import org.springframework.ai.chat.messages.UserMessage;

auto-configurations/models/chat/memory/repository/spring-ai-autoconfigure-model-chat-memory-repository-cassandra/src/test/java/org/springframework/ai/model/chat/memory/repository/cassandra/autoconfigure/CassandraChatMemoryRepositoryPropertiesTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
import org.junit.jupiter.api.Test;
2222

23-
import org.springframework.ai.chat.memory.cassandra.CassandraChatMemoryRepositoryConfig;
23+
import org.springframework.ai.chat.memory.repository.cassandra.CassandraChatMemoryRepositoryConfig;
2424

2525
import static org.assertj.core.api.Assertions.assertThat;
2626

auto-configurations/models/chat/memory/repository/spring-ai-autoconfigure-model-chat-memory-repository-jdbc/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
<dependency>
2727
<groupId>org.springframework.ai</groupId>
28-
<artifactId>spring-ai-model-chat-memory-jdbc</artifactId>
28+
<artifactId>spring-ai-model-chat-memory-repository-jdbc</artifactId>
2929
<version>${project.parent.version}</version>
3030
</dependency>
3131

auto-configurations/models/chat/memory/repository/spring-ai-autoconfigure-model-chat-memory-repository-jdbc/src/main/java/org/springframework/ai/model/chat/memory/repository/jdbc/autoconfigure/JdbcChatMemoryRepositoryAutoConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
import javax.sql.DataSource;
2020

21-
import org.springframework.ai.chat.memory.jdbc.JdbcChatMemoryDialect;
22-
import org.springframework.ai.chat.memory.jdbc.JdbcChatMemoryRepository;
21+
import org.springframework.ai.chat.memory.repository.jdbc.JdbcChatMemoryRepositoryDialect;
22+
import org.springframework.ai.chat.memory.repository.jdbc.JdbcChatMemoryRepository;
2323
import org.springframework.ai.model.chat.memory.autoconfigure.ChatMemoryAutoConfiguration;
2424
import org.springframework.boot.autoconfigure.AutoConfiguration;
2525
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
@@ -45,7 +45,7 @@ public class JdbcChatMemoryRepositoryAutoConfiguration {
4545
@Bean
4646
@ConditionalOnMissingBean
4747
JdbcChatMemoryRepository jdbcChatMemoryRepository(JdbcTemplate jdbcTemplate, DataSource dataSource) {
48-
JdbcChatMemoryDialect dialect = JdbcChatMemoryDialect.from(dataSource);
48+
JdbcChatMemoryRepositoryDialect dialect = JdbcChatMemoryRepositoryDialect.from(dataSource);
4949
return JdbcChatMemoryRepository.builder().jdbcTemplate(jdbcTemplate).dialect(dialect).build();
5050
}
5151

auto-configurations/models/chat/memory/repository/spring-ai-autoconfigure-model-chat-memory-repository-jdbc/src/main/java/org/springframework/ai/model/chat/memory/repository/jdbc/autoconfigure/JdbcChatMemoryRepositoryProperties.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class JdbcChatMemoryRepositoryProperties {
3030

3131
public static final String CONFIG_PREFIX = "spring.ai.chat.memory.repository.jdbc";
3232

33-
private static final String DEFAULT_SCHEMA_LOCATION = "classpath:org/springframework/ai/chat/memory/jdbc/schema-@@platform@@.sql";
33+
private static final String DEFAULT_SCHEMA_LOCATION = "classpath:org/springframework/ai/chat/memory/repository/jdbc/schema-@@platform@@.sql";
3434

3535
/**
3636
* Whether to initialize the schema on startup. Values: embedded, always, never.
@@ -40,7 +40,7 @@ public class JdbcChatMemoryRepositoryProperties {
4040

4141
/**
4242
* Locations of schema (DDL) scripts. Supports comma-separated list. Default is
43-
* classpath:org/springframework/ai/chat/memory/jdbc/schema-@@platform@@.sql
43+
* classpath:org/springframework/ai/chat/memory/repository/jdbc/schema-@@platform@@.sql
4444
*/
4545
private String schema = DEFAULT_SCHEMA_LOCATION;
4646

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.junit.Test;
2323
import org.junit.runner.RunWith;
2424

25+
import org.springframework.ai.chat.memory.repository.jdbc.JdbcChatMemoryRepository;
2526
import org.springframework.ai.chat.messages.AssistantMessage;
2627
import org.springframework.ai.chat.messages.Message;
2728
import org.springframework.ai.chat.messages.UserMessage;
@@ -39,7 +40,7 @@
3940
import static org.assertj.core.api.Assertions.fail;
4041

4142
@RunWith(SpringRunner.class)
42-
@SpringBootTest(classes = JdbcChatMemoryHsqldbAutoConfigurationIT.TestConfig.class,
43+
@SpringBootTest(classes = JdbcChatMemoryRepositoryHsqldbAutoConfigurationIT.TestConfig.class,
4344
properties = { "spring.datasource.url=jdbc:hsqldb:mem:chat_memory_auto_configuration_test;DB_CLOSE_DELAY=-1",
4445
"spring.datasource.username=sa", "spring.datasource.password=",
4546
"spring.datasource.driver-class-name=org.hsqldb.jdbcDriver",
@@ -54,7 +55,7 @@
5455
org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration.class,
5556
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration.class,
5657
SqlInitializationAutoConfiguration.class })
57-
public class JdbcChatMemoryHsqldbAutoConfigurationIT {
58+
public class JdbcChatMemoryRepositoryHsqldbAutoConfigurationIT {
5859

5960
@Autowired
6061
private ApplicationContext context;
@@ -130,7 +131,7 @@ public void useAutoConfiguredChatMemoryWithJdbc() {
130131
try {
131132
java.util.Enumeration<java.net.URL> resources = Thread.currentThread()
132133
.getContextClassLoader()
133-
.getResources("org/springframework/ai/chat/memory/jdbc/schema-hsqldb.sql");
134+
.getResources("org/springframework/ai/chat/memory/repository/jdbc/schema-hsqldb.sql");
134135
System.out.println("--- schema-hsqldb.sql resources found on classpath ---");
135136
while (resources.hasMoreElements()) {
136137
System.out.println(resources.nextElement());
@@ -157,7 +158,7 @@ public void useAutoConfiguredChatMemoryWithJdbc() {
157158

158159
// Now test the ChatMemory functionality
159160
assertThat(context.getBean(org.springframework.ai.chat.memory.ChatMemory.class)).isNotNull();
160-
assertThat(context.getBean(org.springframework.ai.chat.memory.jdbc.JdbcChatMemoryRepository.class)).isNotNull();
161+
assertThat(context.getBean(JdbcChatMemoryRepository.class)).isNotNull();
161162

162163
var chatMemory = context.getBean(org.springframework.ai.chat.memory.ChatMemory.class);
163164
var conversationId = java.util.UUID.randomUUID().toString();
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.junit.jupiter.api.Test;
2323

2424
import org.springframework.ai.chat.memory.ChatMemory;
25-
import org.springframework.ai.chat.memory.jdbc.JdbcChatMemoryRepository;
25+
import org.springframework.ai.chat.memory.repository.jdbc.JdbcChatMemoryRepository;
2626
import org.springframework.ai.chat.messages.AssistantMessage;
2727
import org.springframework.ai.chat.messages.Message;
2828
import org.springframework.ai.chat.messages.UserMessage;
@@ -40,7 +40,7 @@
4040
* @author Linar Abzaltdinov
4141
* @author Yanming Zhou
4242
*/
43-
class JdbcChatMemoryPostgresqlAutoConfigurationIT {
43+
class JdbcChatMemoryRepositoryPostgresqlAutoConfigurationIT {
4444

4545
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
4646
.withConfiguration(AutoConfigurations.of(JdbcChatMemoryRepositoryAutoConfiguration.class,

auto-configurations/models/chat/memory/repository/spring-ai-autoconfigure-model-chat-memory-repository-jdbc/src/test/java/org/springframework/ai/model/chat/memory/repository/jdbc/autoconfigure/JdbcChatMemoryRepositorySchemaInitializerPostgresqlTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void getSettings_shouldHaveSchemaLocations() {
6262
new JdbcChatMemoryRepositoryProperties());
6363

6464
assertThat(settings.getSchemaLocations())
65-
.containsOnly("classpath:org/springframework/ai/chat/memory/jdbc/schema-postgresql.sql");
65+
.containsOnly("classpath:org/springframework/ai/chat/memory/repository/jdbc/schema-postgresql.sql");
6666
});
6767
}
6868

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import org.junit.jupiter.api.Test;
1111

1212
import org.springframework.ai.chat.memory.ChatMemory;
13-
import org.springframework.ai.chat.memory.jdbc.JdbcChatMemoryRepository;
13+
import org.springframework.ai.chat.memory.repository.jdbc.JdbcChatMemoryRepository;
1414
import org.springframework.ai.chat.messages.AssistantMessage;
1515
import org.springframework.ai.chat.messages.Message;
1616
import org.springframework.ai.chat.messages.UserMessage;
@@ -27,7 +27,7 @@
2727
import static org.assertj.core.api.Assertions.assertThat;
2828

2929
@Testcontainers
30-
class JdbcChatMemorySqlServerAutoConfigurationIT {
30+
class JdbcChatMemoryRepositorySqlServerAutoConfigurationIT {
3131

3232
static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName
3333
.parse("mcr.microsoft.com/mssql/server:2022-latest");

auto-configurations/models/chat/memory/repository/spring-ai-autoconfigure-model-chat-memory-repository-neo4j/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
<dependency>
2727
<groupId>org.springframework.ai</groupId>
28-
<artifactId>spring-ai-model-chat-memory-neo4j</artifactId>
28+
<artifactId>spring-ai-model-chat-memory-repository-neo4j</artifactId>
2929
<version>${project.parent.version}</version>
3030
</dependency>
3131

auto-configurations/models/chat/memory/repository/spring-ai-autoconfigure-model-chat-memory-repository-neo4j/src/main/java/org/springframework/ai/model/chat/memory/repository/neo4j/autoconfigure/Neo4jChatMemoryRepositoryAutoConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
import org.neo4j.driver.Driver;
2020

21-
import org.springframework.ai.chat.memory.neo4j.Neo4jChatMemoryRepositoryConfig;
22-
import org.springframework.ai.chat.memory.neo4j.Neo4jChatMemoryRepository;
21+
import org.springframework.ai.chat.memory.repository.neo4j.Neo4jChatMemoryRepositoryConfig;
22+
import org.springframework.ai.chat.memory.repository.neo4j.Neo4jChatMemoryRepository;
2323
import org.springframework.ai.model.chat.memory.autoconfigure.ChatMemoryAutoConfiguration;
2424
import org.springframework.boot.autoconfigure.AutoConfiguration;
2525
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;

auto-configurations/models/chat/memory/repository/spring-ai-autoconfigure-model-chat-memory-repository-neo4j/src/main/java/org/springframework/ai/model/chat/memory/repository/neo4j/autoconfigure/Neo4jChatMemoryRepositoryProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.ai.model.chat.memory.repository.neo4j.autoconfigure;
1818

19-
import org.springframework.ai.chat.memory.neo4j.Neo4jChatMemoryRepositoryConfig;
19+
import org.springframework.ai.chat.memory.repository.neo4j.Neo4jChatMemoryRepositoryConfig;
2020
import org.springframework.boot.context.properties.ConfigurationProperties;
2121

2222
/**

auto-configurations/models/chat/memory/repository/spring-ai-autoconfigure-model-chat-memory-repository-neo4j/src/test/java/org/springframework/ai/model/chat/memory/repository/neo4j/autoconfigure/Neo4JChatMemoryRepositoryPropertiesTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import org.junit.jupiter.api.Test;
2020

21-
import org.springframework.ai.chat.memory.neo4j.Neo4jChatMemoryRepositoryConfig;
21+
import org.springframework.ai.chat.memory.repository.neo4j.Neo4jChatMemoryRepositoryConfig;
2222

2323
import static org.assertj.core.api.Assertions.assertThat;
2424

auto-configurations/models/chat/memory/repository/spring-ai-autoconfigure-model-chat-memory-repository-neo4j/src/test/java/org/springframework/ai/model/chat/memory/repository/neo4j/autoconfigure/Neo4jChatMemoryRepositoryAutoConfigurationIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
import org.junit.jupiter.api.Test;
2626

2727
import org.springframework.ai.chat.memory.ChatMemoryRepository;
28-
import org.springframework.ai.chat.memory.neo4j.Neo4jChatMemoryRepository;
28+
import org.springframework.ai.chat.memory.repository.neo4j.Neo4jChatMemoryRepository;
2929
import org.testcontainers.containers.Neo4jContainer;
3030
import org.testcontainers.junit.jupiter.Container;
3131
import org.testcontainers.junit.jupiter.Testcontainers;
3232
import org.testcontainers.utility.DockerImageName;
3333

34-
import org.springframework.ai.chat.memory.neo4j.Neo4jChatMemoryRepositoryConfig;
34+
import org.springframework.ai.chat.memory.repository.neo4j.Neo4jChatMemoryRepositoryConfig;
3535
import org.springframework.ai.chat.messages.AssistantMessage;
3636
import org.springframework.ai.chat.messages.Message;
3737
import org.springframework.ai.chat.messages.SystemMessage;

memory/spring-ai-model-chat-memory-cassandra/pom.xml renamed to memory/repository/spring-ai-model-chat-memory-repository-cassandra/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
<groupId>org.springframework.ai</groupId>
2424
<artifactId>spring-ai-parent</artifactId>
2525
<version>1.0.0-SNAPSHOT</version>
26-
<relativePath>../../pom.xml</relativePath>
26+
<relativePath>../../../pom.xml</relativePath>
2727
</parent>
2828

29-
<artifactId>spring-ai-model-chat-memory-cassandra</artifactId>
30-
<name>Spring AI Apache Cassandra Chat Memory</name>
31-
<description>Spring AI Apache Cassandra Chat Memory implementation</description>
29+
<artifactId>spring-ai-model-chat-memory-repository-cassandra</artifactId>
30+
<name>Spring AI Apache Cassandra Chat Memory Repository</name>
31+
<description>Spring AI Apache Cassandra Chat Memory Repository implementation</description>
3232

3333
<url>https://github.com/spring-projects/spring-ai</url>
3434

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.ai.chat.memory.cassandra;
17+
package org.springframework.ai.chat.memory.repository.cassandra;
1818

1919
import java.time.Instant;
2020
import java.util.ArrayList;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.ai.chat.memory.cassandra;
17+
package org.springframework.ai.chat.memory.repository.cassandra;
1818

1919
import java.net.InetSocketAddress;
2020
import java.time.Duration;

memory/spring-ai-model-chat-memory-cassandra/src/main/java/org/springframework/ai/chat/memory/cassandra/SchemaUtil.java renamed to memory/repository/spring-ai-model-chat-memory-repository-cassandra/src/main/java/org/springframework/ai/chat/memory/repository/cassandra/SchemaUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.ai.chat.memory.cassandra;
17+
package org.springframework.ai.chat.memory.repository.cassandra;
1818

1919
import java.time.Duration;
2020

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.ai.chat.memory.cassandra;
17+
package org.springframework.ai.chat.memory.repository.cassandra;
1818

1919
import java.time.Duration;
2020
import java.util.List;

memory/spring-ai-model-chat-memory-cassandra/src/test/java/org/springframework/ai/chat/memory/cassandra/CassandraImage.java renamed to memory/repository/spring-ai-model-chat-memory-repository-cassandra/src/test/java/org/springframework/ai/chat/memory/repository/cassandra/CassandraImage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.ai.chat.memory.cassandra;
17+
package org.springframework.ai.chat.memory.repository.cassandra;
1818

1919
import org.testcontainers.utility.DockerImageName;
2020

memory/spring-ai-model-chat-memory-jdbc/pom.xml renamed to memory/repository/spring-ai-model-chat-memory-repository-jdbc/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
<groupId>org.springframework.ai</groupId>
2424
<artifactId>spring-ai-parent</artifactId>
2525
<version>1.0.0-SNAPSHOT</version>
26-
<relativePath>../../pom.xml</relativePath>
26+
<relativePath>../../../pom.xml</relativePath>
2727
</parent>
2828

29-
<artifactId>spring-ai-model-chat-memory-jdbc</artifactId>
29+
<artifactId>spring-ai-model-chat-memory-repository-jdbc</artifactId>
3030
<name>Spring AI JDBC Chat Memory</name>
3131
<description>Spring AI JDBC Chat Memory implementation</description>
3232

memory/spring-ai-model-chat-memory-jdbc/src/main/java/org/springframework/ai/chat/memory/jdbc/HsqldbChatMemoryDialect.java renamed to memory/repository/spring-ai-model-chat-memory-repository-jdbc/src/main/java/org/springframework/ai/chat/memory/repository/jdbc/HsqldbChatMemoryRepositoryDialect.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.ai.chat.memory.jdbc;
17+
package org.springframework.ai.chat.memory.repository.jdbc;
1818

1919
/**
2020
* HSQLDB-specific SQL dialect for chat memory repository.
2121
*/
22-
public class HsqldbChatMemoryDialect implements JdbcChatMemoryDialect {
22+
public class HsqldbChatMemoryRepositoryDialect implements JdbcChatMemoryRepositoryDialect {
2323

2424
@Override
2525
public String getSelectMessagesSql() {

memory/spring-ai-model-chat-memory-jdbc/src/main/java/org/springframework/ai/chat/memory/jdbc/JdbcChatMemoryRepository.java renamed to memory/repository/spring-ai-model-chat-memory-repository-jdbc/src/main/java/org/springframework/ai/chat/memory/repository/jdbc/JdbcChatMemoryRepository.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.ai.chat.memory.jdbc;
17+
package org.springframework.ai.chat.memory.repository.jdbc;
1818

1919
import java.sql.PreparedStatement;
2020
import java.sql.ResultSet;
@@ -51,9 +51,9 @@ public class JdbcChatMemoryRepository implements ChatMemoryRepository {
5151

5252
private final JdbcTemplate jdbcTemplate;
5353

54-
private final JdbcChatMemoryDialect dialect;
54+
private final JdbcChatMemoryRepositoryDialect dialect;
5555

56-
private JdbcChatMemoryRepository(JdbcTemplate jdbcTemplate, JdbcChatMemoryDialect dialect) {
56+
private JdbcChatMemoryRepository(JdbcTemplate jdbcTemplate, JdbcChatMemoryRepositoryDialect dialect) {
5757
Assert.notNull(jdbcTemplate, "jdbcTemplate cannot be null");
5858
Assert.notNull(dialect, "dialect cannot be null");
5959
this.jdbcTemplate = jdbcTemplate;
@@ -146,7 +146,7 @@ public static class Builder {
146146

147147
private JdbcTemplate jdbcTemplate;
148148

149-
private JdbcChatMemoryDialect dialect;
149+
private JdbcChatMemoryRepositoryDialect dialect;
150150

151151
private Builder() {
152152
}
@@ -156,7 +156,7 @@ public Builder jdbcTemplate(JdbcTemplate jdbcTemplate) {
156156
return this;
157157
}
158158

159-
public Builder dialect(JdbcChatMemoryDialect dialect) {
159+
public Builder dialect(JdbcChatMemoryRepositoryDialect dialect) {
160160
this.dialect = dialect;
161161
return this;
162162
}

0 commit comments

Comments
 (0)