|  | 
| 4 | 4 | [[upgrading-to-1-0-0-snapshot]] | 
| 5 | 5 | == Upgrading to 1.0.0-SNAPSHOT | 
| 6 | 6 | 
 | 
|  | 7 | +== Part 1 | 
| 7 | 8 | You can upgrade to 1.0.0-SNAPSHOT either by following the manual steps outlined below or by using an automated approach with the Claude Code CLI tool and a provided prompt.  | 
| 8 | 9 | 
 | 
| 9 | 10 | The automated approach can save time and reduce errors when upgrading multiple projects or complex codebases.  | 
| @@ -171,7 +172,138 @@ To use this automation: | 
| 171 | 172 | 
 | 
| 172 | 173 | This approach can save time and reduce the chance of errors when upgrading multiple projects or complex codebases. | 
| 173 | 174 | 
 | 
| 174 |  | -== Upgrading to 1.0.0.M7 | 
|  | 175 | +== Part 2 | 
|  | 176 | + | 
|  | 177 | +As of April 4, the main branch now has changes to module/artifact structure of the project. | 
|  | 178 | +Since the start of the Spring AI project, there has been one central artifact where the main interfaces are defined, the `spring-ai-core` module. | 
|  | 179 | +Over time, this has grown to contain multiple specialized domains and we wanted to separate these domain out into their own modules. | 
|  | 180 | +For example, to use the `ChatClient` functionality, there does not need to be any classes related to Vector Stores in your application. | 
|  | 181 | + | 
|  | 182 | +The `spring-ai-core` module had a clean Dependency Structure Matrix, so most of the work to break up this module was simply cut and pasting code. | 
|  | 183 | +However, there were a few cases where the package names of classes have been changed. | 
|  | 184 | + | 
|  | 185 | +=== Changes to package names | 
|  | 186 | + | 
|  | 187 | +Your IDE should assist with refactoring to the new package locations. | 
|  | 188 | + | 
|  | 189 | +`ContentFormatTransformer` and `KeywordMetadataEnricher` have moved from `org.springframework.ai.transformer` to `org.springframework.ai.chat.transformer`. | 
|  | 190 | + | 
|  | 191 | +`Content`, `MediaContent`, and `Media` have moved from `org.springframework.ai.model` to `org.springframework.ai.content`. | 
|  | 192 | + | 
|  | 193 | + | 
|  | 194 | + | 
|  | 195 | +=== New Modules Overview | 
|  | 196 | + | 
|  | 197 | +==== `spring-ai-commons` | 
|  | 198 | + | 
|  | 199 | +This is a base module with no dependencies on other Spring AI modules. | 
|  | 200 | +It defines core domain models (`Document`, `TextSplitter`, etc.), JSON utilities, resource handling, and structured logging. | 
|  | 201 | +Supports document processing, tokenization, embedding optimization, and observability via operation metadata and metrics. | 
|  | 202 | + | 
|  | 203 | +==== `spring-ai-model` | 
|  | 204 | + | 
|  | 205 | +Provides abstractions for AI capabilities via interfaces like `ChatModel`, `EmbeddingModel`, and `ImageModel`. | 
|  | 206 | +Includes message types, prompt templates, response structures, and a full function-calling framework (`ToolDefinition`, `ToolCallback`, annotations). | 
|  | 207 | +Supports observation, content filtering, and consistent builder/strategy patterns across AI providers. | 
|  | 208 | + | 
|  | 209 | +==== `spring-ai-vector-store` | 
|  | 210 | + | 
|  | 211 | +Defines a unified abstraction (`VectorStore`) for vector databases and similarity search. | 
|  | 212 | +Includes advanced filtering via SQL-like expressions, `SearchRequest`, and `Filter.Expression.` | 
|  | 213 | +Offers `SimpleVectorStore` (in-memory) and observability integration. | 
|  | 214 | +Emphasizes type safety, extensibility, and batching support for embeddings. | 
|  | 215 | + | 
|  | 216 | +==== `spring-ai-client-chat` | 
|  | 217 | + | 
|  | 218 | +This module provides high-level APIs for conversational AI via the `ChatClient` interface. | 
|  | 219 | +Includes conversation persistence (`ChatMemory`), response conversion (`OutputConverter`), and advisor-based interception. | 
|  | 220 | +Supports synchronous and streaming (Project Reactor) interactions with observability via Micrometer. | 
|  | 221 | + | 
|  | 222 | +This client layer abstracts away the complexities of different AI model implementations, providing application developers with a uniform way to incorporate conversational AI capabilities while handling common concerns like conversation state management, response transformation, and instrumentation in a consistent manner. | 
|  | 223 | + | 
|  | 224 | +==== `spring-ai-advisors-vector-store` | 
|  | 225 | + | 
|  | 226 | +Bridges chat with vector stores for RAG and persistent memory. | 
|  | 227 | + | 
|  | 228 | +`QuestionAnswerAdvisor`: injects context into prompts using similarity search. | 
|  | 229 | + | 
|  | 230 | +`VectorStoreChatMemoryAdvisor`: stores/retrieves conversation history in vector stores, with filtering and session continuity. | 
|  | 231 | + | 
|  | 232 | +This component is essential for implementing sophisticated conversational applications that require both context retrieval and memory persistence within the Spring AI ecosystem. | 
|  | 233 | + | 
|  | 234 | +==== `spring-ai-model-chat-memory-cassandra` | 
|  | 235 | + | 
|  | 236 | +This module adds Apache Cassandra persistence for `ChatMemory` (via `CassandraChatMemory`). | 
|  | 237 | +Extracted from the Cassandra vector store module to provide a standalone, production-ready solution. | 
|  | 238 | +Uses immutable config records and Cassandra's QueryBuilder for type-safe CQL. | 
|  | 239 | + | 
|  | 240 | +==== `spring-ai-model-chat-memory-neo4j` | 
|  | 241 | + | 
|  | 242 | +This module provides Neo4j graph database persistence for chat conversations. | 
|  | 243 | +This functionality was previously located in the Neo4j vector store implementation module, but has been extracted to create a dedicated chat memory solution. | 
|  | 244 | + | 
|  | 245 | +==== `spring-ai-rag` | 
|  | 246 | + | 
|  | 247 | +This module provides a comprehensive framework for implementing Retrieval Augmented Generation (RAG) | 
|  | 248 | +pipelines based on a modular architecture inspired by academic research. It offers a structured approach to the entire RAG workflow through well-defined interfaces for each stage of the process. | 
|  | 249 | + | 
|  | 250 | +The central `RetrievalAugmentationAdvisor` serves as the main entry point, orchestrating the entire RAG workflow. | 
|  | 251 | +The design follows functional programming principles with composable components, enabling customization of each pipeline stage while maintaining a consistent programming model aligned with Spring's conventions. | 
|  | 252 | + | 
|  | 253 | +=== Dependency Structure | 
|  | 254 | + | 
|  | 255 | +The dependency hierarchy can be summarized as: | 
|  | 256 | + | 
|  | 257 | +* `spring-ai-commons` (foundation) | 
|  | 258 | +* `spring-ai-model` (depends on commons) | 
|  | 259 | +* `spring-ai-vector-store` and `spring-ai-client-chat` (both depend on model) | 
|  | 260 | +* `spring-ai-advisors-vector-store` and `spring-ai-rag` (depend on both client-chat and vector-store) | 
|  | 261 | +* `spring-ai-model-chat-memory-*` modules (depend on client-chat) | 
|  | 262 | + | 
|  | 263 | +The details are: | 
|  | 264 | + | 
|  | 265 | +=== Module Dependencies | 
|  | 266 | + | 
|  | 267 | +[cols="1,3,3", options="header"] | 
|  | 268 | +|=== | 
|  | 269 | +| Module | 
|  | 270 | +| Depends On | 
|  | 271 | +| Description | 
|  | 272 | + | 
|  | 273 | +| `spring-ai-commons` | 
|  | 274 | +| _None_ | 
|  | 275 | +| Base module with no dependencies on other Spring AI modules. Used by many other modules. | 
|  | 276 | + | 
|  | 277 | +| `spring-ai-model` | 
|  | 278 | +| `spring-ai-commons` | 
|  | 279 | +| Provides core model interfaces and abstractions. | 
|  | 280 | + | 
|  | 281 | +| `spring-ai-vector-store` | 
|  | 282 | +| `spring-ai-model` → `spring-ai-commons` | 
|  | 283 | +| Provides vector database abstractions. | 
|  | 284 | + | 
|  | 285 | +| `spring-ai-client-chat` | 
|  | 286 | +| `spring-ai-model` → `spring-ai-commons` | 
|  | 287 | +| High-level client API for chat interactions. | 
|  | 288 | + | 
|  | 289 | +| `spring-ai-advisors-vector-store` | 
|  | 290 | +| `spring-ai-client-chat`, `spring-ai-vector-store` | 
|  | 291 | +| Bridges chat capabilities with vector stores. | 
|  | 292 | + | 
|  | 293 | +| `spring-ai-model-chat-memory-cassandra` | 
|  | 294 | +| `spring-ai-client-chat` | 
|  | 295 | +| Provides Cassandra implementation for chat memory. | 
|  | 296 | + | 
|  | 297 | +| `spring-ai-model-chat-memory-neo4j` | 
|  | 298 | +| `spring-ai-client-chat` | 
|  | 299 | +| Provides Neo4j implementation for chat memory. | 
|  | 300 | + | 
|  | 301 | +| `spring-ai-rag` | 
|  | 302 | +| `spring-ai-client-chat`, `spring-ai-vector-store` | 
|  | 303 | +| Provides RAG framework implementation. | 
|  | 304 | +|=== | 
|  | 305 | + | 
|  | 306 | +=== ToolContext changes | 
| 175 | 307 | 
 | 
| 176 | 308 | * The `ToolContext` class has now been marked as final and cannot be extended anymore. It was never supposed to be subclassed. You can add all the contextual data you need when instantiating a `ToolContext`, in the form of a `Map<String, Object>`. For more information, check the [documentation](https://docs.spring.io/spring-ai/reference/api/tools.html#_tool_context). | 
| 177 | 309 | 
 | 
|  | 
0 commit comments