You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 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
Copy file name to clipboardExpand all lines: 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
If you'd rather create the `JdbcChatMemoryRepository` manually, you can do so by providing a `JdbcTemplate` instance and optionally a custom `JdbcChatMemoryRepositoryDialect`:
108
+
If you'd rather create the `JdbcChatMemoryRepository` manually, you can do so by providing a `JdbcTemplate` instance and a `JdbcChatMemoryRepositoryDialect`:
@@ -129,7 +129,7 @@ Spring AI supports multiple relational databases via a dialect abstraction. The
129
129
- SQL Server
130
130
- HSQLDB
131
131
132
-
The correct dialect is auto-detected from the JDBC URL. You can extend support for other databases by implementing the `JdbcChatMemoryRepositoryDialect` interface.
132
+
The correct dialect can be auto-detected from the JDBC URL when using `JdbcChatMemoryRepositoryDialect.from(DataSource)`. You can extend support for other databases by implementing the `JdbcChatMemoryRepositoryDialect` interface.
133
133
134
134
==== Configuration Properties
135
135
@@ -138,6 +138,7 @@ The correct dialect is auto-detected from the JDBC URL. You can extend support f
138
138
|Property | Description | Default Value
139
139
| `spring.ai.chat.memory.repository.jdbc.initialize-schema` | Controls when to initialize the schema. Values: `embedded` (default), `always`, `never`. | `embedded`
140
140
| `spring.ai.chat.memory.repository.jdbc.schema` | Location of the schema script to use for initialization. Supports `classpath:` URLs and platform placeholders. | `classpath:org/springframework/ai/chat/memory/repository/jdbc/schema-@@platform@@.sql`
141
+
| `spring.ai.chat.memory.repository.jdbc.platform` | Platform to use in initialization scripts if the @@platform@@ placeholder is used. | _auto-detected_
@@ -611,13 +611,12 @@ TIP: Be cautious about logging sensitive information in production environments.
611
611
612
612
== Chat Memory
613
613
614
-
The interface `ChatMemory` represents a storage for chat conversation history. It provides methods to add messages to a conversation, retrieve messages from a conversation, and clear the conversation history.
614
+
The interface `ChatMemory` represents a storage for chat conversation memory. It provides methods to add messages to a conversation, retrieve messages from a conversation, and clear the conversation history.
615
615
616
-
There is currently one implementation: `MessageWindowChatMemory`.
616
+
There is currently one built-in implementation: `MessageWindowChatMemory`.
617
617
618
618
`MessageWindowChatMemory` is a chat memory implementation that maintains a window of messages up to a specified maximum size (default: 20 messages). When the number of messages exceeds this limit, older messages are evicted, but system messages are preserved. If a new system message is added, all previous system messages are removed from memory. This ensures that the most recent context is always available for the conversation while keeping memory usage bounded.
619
619
620
+
The `MessageWindowChatMemory` is backed by the `ChatMemoryRepository` abstraction which provides storage implementations for the chat conversation memory. There are several implementations available, including the `InMemoryChatMemoryRepository`, `JdbcChatMemoryRepository`, `CassandraChatMemoryRepository` and `Neo4jChatMemoryRepository`.
620
621
621
-
The `MessageWindowChatMemory` is backed by the `ChatMemoryRepository` abstraction which provides storage implementations for the chat conversation history. There are several implementations available, including the `InMemoryChatMemoryRepository`, `JdbcChatMemoryRepository`, `CassandraChatMemoryRepository` and `Neo4jChatMemoryRepository`.
622
-
623
-
This implementation is the default for conversation history management in Spring AI. For more details and usage examples, see the xref:api/chat-memory.adoc[Chat Memory] section.
622
+
For more details and usage examples, see the xref:api/chat-memory.adoc[Chat Memory] documentation.
Copy file name to clipboardExpand all lines: spring-ai-docs/src/main/antora/modules/ROOT/pages/upgrade-notes.adoc
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ For details, refer to:
29
29
[[upgrading-to-1-0-0-RC1]]
30
30
== Upgrading to 1.0.0-RC1
31
31
32
-
=== Chat ClientAnd Advisors
32
+
=== Chat Client and Advisors
33
33
34
34
* When building a `Prompt` from the ChatClient input, the `SystemMessage` built from `systemText()` is now placed first in the message list. Before, it was put last, resulting in errors with several model providers.
35
35
* `MessageAggregator` has a new method to aggregate messages from `ChatClientRequest`. The previous method aggregating messages from the old `AdvisedRequest` has been removed, since it was already marked as deprecated in M8.
@@ -60,6 +60,7 @@ If you were providing custom templates for the following advisors, you'll need t
60
60
** a `long_term_memory` placeholder to receive the retrieved conversation memory.
61
61
62
62
=== Breaking Changes
63
+
63
64
The Watson AI model was removed as it was based on the older text generation that is considered outdated as there is a new chat generation model available.
64
65
Hopefully Watson will reappear in a future version of Spring AI
65
66
@@ -82,6 +83,7 @@ In 1.0.0-RC1, the chat memory modules, starters, and autoconfiguration classes f
82
83
83
84
- Java packages now use `.repository.` (e.g., `org.springframework.ai.chat.memory.repository.jdbc.JdbcChatMemoryRepository` and `org.springframework.ai.model.chat.memory.repository.jdbc.autoconfigure.JdbcChatMemoryRepositoryAutoConfiguration`).
84
85
- Main autoconfiguration classes are now named `JdbcChatMemoryRepositoryAutoConfiguration`, `CassandraChatMemoryRepositoryAutoConfiguration`, etc.
86
+
- Properties have also been renamed to reflect the new naming convention, from `spring.ai.chat.memory.<storage>...` to `spring.ai.chat.memory.repository.<storage>...`.
85
87
86
88
**Migration Required:**
87
89
- Update your Maven/Gradle dependencies to use the new artifact IDs.
0 commit comments