259 Commits

Author SHA1 Message Date
Ilayaperumal Gopinathan
fcd2803f36 Release version 1.0.0 2025-05-19 10:40:35 +01:00
Ilayaperumal Gopinathan
20ccd1f0ac Disable checkstlye check by default
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-05-16 14:10:59 +01:00
Soby Chacko
368be3a04f Fixing miscellaneous checkstyle errors
Enabling checkstyle by default in the project build

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-05-16 11:08:33 +01:00
Ilayaperumal Gopinathan
1a395e6847 Add Chat memory (in-memory chat memory repository) starter (#3185)
- Add Spring Boot starter for Chat memory with in-memory chat memory repository

Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-05-15 11:27:31 -04:00
Ilayaperumal Gopinathan
f2940cffce Next development version 2025-05-13 19:06:16 +01:00
Ilayaperumal Gopinathan
30a9638de8 Release version 1.0.0-RC1 2025-05-13 19:05:52 +01:00
Ilayaperumal Gopinathan
2d517eec5c 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 <ilayaperumal.gopinathan@broadcom.com>
2025-05-12 13:02:26 -04:00
Christian Tzolov
a6bb325b62 Update MCP to 0.10.0
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-05-12 15:54:51 +02:00
Ilayaperumal Gopinathan
f6dba1bf08 Refactor chat memory repository autoconfigurations and Spring Boot starters for clarity
- Rename chat memory repository autoconfiguration modules to include the "repository" suffix:
    - spring-ai-autoconfigure-model-chat-memory-cassandra -> spring-ai-autoconfigure-model-chat-memory-repository-cassandra
    - spring-ai-autoconfigure-model-chat-memory-jdbc -> spring-ai-autoconfigure-model-chat-memory-repository-jdbc
    - spring-ai-autoconfigure-model-chat-memory-neo4j -> spring-ai-autoconfigure-model-chat-memory-repository-neo4j
- Update Spring Boot starter modules to match the new naming convention.
- Rename packages to include `.repository.` for improved clarity and consistency.
- Rename configuration and related classes to use the `ChatMemoryRepository` suffix.
- Update Spring AI BOM and parent POM files to reference the new artifact names.
- Update all imports, references, and configuration to use the new package and class names.

BREAKING CHANGE:
These changes require users to update their dependencies, imports, and configuration to use the new artifact, package, and class names. See the upgrade notes for migration instructions.

Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-05-10 14:56:08 -04:00
ddobrin
72a2862bce Fixes #3083 Update Google dependencies and model versions
Signed-off-by: ddobrin <ddobrin@google.com>
2025-05-10 16:43:00 +01:00
Chengcheng Wu
2c9214b33e Update dependencies for milvus stores (#3009)
Milvus from 2.5.7 to 2.5.8

Signed-off-by: Chengcheng Wu <88792183+AntonyCheng@users.noreply.github.com>
2025-05-08 18:11:29 +01:00
Soby Chacko
f3b4624494 GH-3029: Remove HanaDB vector store autoconfiguration
Fixes: #3029

- Remove HanaDB vector store autoconfiguration
- Remove the corresponding starter
- Update docs
- Update maven configuration
- Remove autoconfiguration and starter entries from Spring AI BOM

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-05-08 16:55:48 +01:00
GR
c54dfd35d5 feat: add deepseek starter and docs - fix pom module ordering
- Add remaining deepseek modules
- Fix build order to put autoconfig modules after model modules to fix javadoc build

Signed-off-by: GR <gr@fastball.dev>
2025-05-07 23:38:07 -04:00
Mark Pollack
a5920a17fa Add core deepseek classes
Signed-off-by: Mark Pollack <mark.pollack@broadcom.com>
2025-05-07 21:27:39 -04:00
Mark Pollack
a2975a6cec Switch to mcp sdk 0.10.0-SNAPSHOT
Signed-off-by: Mark Pollack <mark.pollack@broadcom.com>
2025-05-06 06:54:59 +02:00
Mark Pollack
9e71b163e3 Remove Waston text generation model 2025-05-03 18:36:02 -04:00
Mark Pollack
846165d47f update to build against boot 3.4.5 2025-05-02 12:49:43 -04:00
Ilayaperumal Gopinathan
3acc206eb2 Next development version 2025-04-30 17:51:20 +01:00
Ilayaperumal Gopinathan
b657cf3bae Release version 1.0.0-M8 2025-04-30 17:51:07 +01:00
Christian Tzolov
e05552f6eb refactor(mcp): disable completion features and downgrade MCP SDK to 0.9.0
- Comment out AsyncCompletionSpecification and SyncCompletionSpecification imports
- Comment out completion parameters and processing in both sync and async server creation methods
- Downgrade MCP SDK version from 0.10.0-SNAPSHOT to 0.9.0

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-04-30 03:10:56 +03:00
Kushagra Thapar
6c85aeabba Updated azure service dependencies to the latest versions
Signed-off-by: Kushagra Thapar <kuthapar@microsoft.com>
2025-04-29 16:49:48 -04:00
Nicolas KRIER
388068d481 Maven build issues fixes
Signed-off-by: Nicolas KRIER <7557886+nicolaskrier@users.noreply.github.com>
2025-04-29 07:29:18 +01:00
Christian Tzolov
1457dc800d feat(mcp): add support for completion specifications in MCP server
Add support for completion specifications in both sync and async MCP servers by:

- Adding parameters for SyncCompletionSpecification and AsyncCompletionSpecification
- Implementing registration of completion specifications in server builders
- Updating capabilities builders to include completions
- Upgrading MCP SDK version to 0.10.0-SNAPSHOT

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-04-29 07:54:59 +03:00
Thomas Vitale
0024e4dd49 Chat Memory Enhancements
* ChatMemory will become a generic interface to implement different memory management strategies. It’s been moved from the “”spring-ai-client-chat” package to “spring-ai-model” package while retaining the same package, so it’s transparent to users.
* A MessageWindowChatMemory has been introduced to provide support for a chat memory that keeps at most N messages in the memory.
* A ChatMemoryRepository interface has been introduced to support different storage strategies for the chat memory. It’s meant to be used as part of a ChatMemory implementation. This is different than before, where the storage-specific implementation was directly tied to the ChatMemory. This design is familiar to Spring users since it’s used already in the ecosystem. The goal was to use a programming model similar to Spring Session and Spring Data.
* The JdbcChatMemory has been supersed by JdbcChatMemoryRepository.
* A ChatMemory bean is auto-configured for you whenever using one of the Spring AI Model starters. By default, it uses the MessageWindowChatMemory implementation and stores the conversation history in memory. If a different repository is already configured (e.g., Cassandra, JDBC, or Neo4j), Spring AI will use that instead.
* First-class documentation has been introduced to describe the ChatMemory API and related features.
* All the changes introduced in this PR are backward-compatible.

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2025-04-25 15:53:20 -04:00
Mark Pollack
98052624b1 Remove Qianfan and Moonshot model modules
Drop support for the Qianfan and Moonshot models by removing their modules from the build.

These integrations are now maintained in the community repositories:
https://github.com/spring-ai-community/qianfan
https://github.com/spring-ai-community/moonshot
2025-04-25 14:02:23 -04:00
Mark Pollack
ff52859b2d migrate remaining moonshot modules to community repo 2025-04-25 13:05:11 -04:00
Thomas Vitale
2bc29dab32 Introduce TemplateRenderer for prompt templating
- Introduce new TemplateRenderer API providing the logic for rendering an input template.
- Update the PromptTemplate API to accept a TemplateRenderer object at construction time.
- Move ST logic to StTemplateRenderer implementation, used by default in PromptTemplate. Additionally, make start and end delimiter character configurable.

Relates to gh-2655

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2025-04-24 17:17:40 -04:00
Soby Chacko
687dea52e0 Update Bedrock runtime from 2.29.29 to 2.31.26
- Update bedrockruntime.version to 2.31.26 in root pom.xml
- Standardize AWS SDK dependencies in bedrock-converse module to use
  bedrockruntime.version property instead of awssdk.version
- Affected dependencies: bedrockruntime, sts, netty-nio-client

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-04-23 12:36:28 -04:00
Soby Chacko
81b715b3d2 Update dependencies and cleanup misc version management
- Extract common dependency versions to properties in root pom
  - Added jsoup.version property
  - Added mockk-jvm.version property
  - Added neo4j-cypher-dsl-bom.version property
- Update dependency versions:
  - djl from 0.30.0 to 0.32.0
  - oci-sdk from 3.51.0 to 3.63.1
  - azure-identity from 1.14.0 to 1.15.4
- Remove hardcoded versions for consistency
- Minor polishing

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-04-22 19:10:36 -04:00
Soby Chacko
05529b6bf5 Update dependencies for vector stores
Update multiple dependency versions including:

- Milvus from 2.5.4 to 2.5.7
- Azure Search from 11.6.1 to 11.7.6
- Weaviate client from 5.0.1 to 5.2.0
- Typesense from 0.5.0 to 1.3.0 (with matching code update)
- OpenSearch client from 2.10.1 to 2.23.0
- MariaDB from 3.5.1 to 3.5.3
- Couchbase from 3.7.8 to 3.8.0
- Neo4j Cypher DSL from 2024.0.2 to 2024.5.1
- Jedis from 5.1.0 to 5.2.0

Updates TypesenseVectorStore to use IndexAction enum instead of string literal.

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-04-22 17:36:18 -04:00
Soby Chacko
3756e16526 Upgrade azure-open-ai-client to 1.0.0-beta.16
Adjust MergeUtils to accommodate API changes:
- Update ChatCompletions constructor parameter list to remove the usage argument
- Move usage assignment to post-construction via reflection

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-04-17 17:07:11 -04:00
ddobrin
53359fd9e6 Fixes #2185 - googleSearchRetrieval(true) causes INVALID_ARGUMENT error with Gemini 2.0 (use google_search instead) 2025-04-17 14:22:30 -04:00
Eddú Meléndez
318bdfc7c1 Add missing chat memory entries to BOM
Also, create new memory chat starters for cassandra and neo4j.

Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
2025-04-13 00:37:56 -05:00
Ilayaperumal Gopinathan
bda702e8e1 Next development version 2025-04-10 20:23:38 +01:00
Ilayaperumal Gopinathan
584138af28 Release version 1.0.0-M7 2025-04-10 20:23:07 +01:00
Christian Tzolov
3409c1fd87 feat(mcp): update WebFlux and WebMvc server transport providers with URL configuration
- Update MCP SDK version to 0.9.0
- Add baseUrl and sseEndpoint properties to McpServerProperties
- Update WebFlux and WebMvc server transport providers to use new URL configuration properties
- Remove deprecated backward compatibility code and related tests
- Remove deprecated methods from McpToolUtils
- Update MCP SDK version to 0.9.0-SNAPSHOT
- Add tool filtering capability to MCP Tool Callback Providers
  Introduces a BiPredicate-based filtering mechanism for both Sync and Async
  MCP Tool Callback Providers, allowing selective tool discovery based on
  custom criteria. This enables filtering tools by name, client, or
  any combination of properties.
  * Apply filter in getToolCallbacks() methods for both providers
  * Add  tests for various filtering scenarios
- Add utility method to retrieve MCP exchange from tool context
 * Add constant TOOL_CONTEXT_MCP_EXCHANGE_KEY to replace hardcoded exchange string
 * Implement getMcpExchange utility method to safely retrieve the MCP exchange object

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-04-10 19:30:49 +02:00
leijendary
4be10028b0 feat: JDBC implementation of ChatMemory
Signed-off-by: leijendary <jonathanleijendekker@gmail.com>

Remove references to spring-ai-core module in jdbc chat memory
2025-04-07 15:08:58 -04:00
Ilayaperumal Gopinathan
57f0b592e9 Update Spring Boot to 3.4.4 2025-04-04 12:43:23 -04:00
Soby Chacko
717e419515 Rename spring-ai parent from spring-ai to spring-ai-parent
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-04-04 12:43:22 -04:00
Soby Chacko
f7f00328a1 Migrate Cassandra chat memory implementation to its own module
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-04-04 11:44:38 -04:00
Mark Pollack
d45ff8e984 Refactorings
- Avoid overlapping package names
  Changed in spring-ai-commons package from org.sf.ai.model to org.sf.ai.content
  Refactor advisor module name to be spring-ai-advisors-vector-store
    Moved advisors into org.springframework.ai.chat.client.advisor.vectorstore

- Created top level memory directory
- Create new module spring-ai-model-chat-memory-neo4j and moved neo4j memory classes out of the vectorstore module
  Updated neo4j autoconfiguation
2025-04-04 11:44:38 -04:00
Mark Pollack
e3f9b7c16b rename spring-ai-core to spring-ai-client-chat 2025-04-04 11:44:38 -04:00
Mark Pollack
79671d47ec Move rag classes out of spring-ai-core and into new module spring-ai-rag 2025-04-04 11:44:38 -04:00
Mark Pollack
81fecefae8 Move advisors that depend on vector store to spring-ai-advisors module 2025-04-04 11:44:38 -04:00
Mark Pollack
69d5b5fcf0 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.
2025-04-04 11:44:38 -04:00
Ilayaperumal Gopinathan
00b0aab828 Refactor Cassandra ChatMemory Autoconfiguration
- Move Cassandra ChatMemory autoconfiguration into dedicated autoconfiguration

Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-03-26 20:04:08 +00:00
Enrico Rampazzo
1d4bde80e5 Neo4j chatmemory implementation
- Add chatmemory implementation for Neo4j
  - Add autoconfiguration for Neo4jChatMemory
  - Add tests

Signed-off-by: Enrico Rampazzo <enrico.rampazzo@live.com>
2025-03-26 20:04:08 +00:00
Christian Tzolov
3b543cfb68 Update MCP version to 0.8.1
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-03-26 13:08:20 +01:00
Christian Tzolov
cde7e6686a Swirtch MCP from 0.8.0 to 0.9.0-SN
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-03-26 12:40:18 +01:00
Christian Tzolov
fc955c74eb feat(mcp): Refactor MCP server API to use Specification pattern
- Rename Registration classes to Specification (SyncToolRegistration → SyncToolSpecification)
- Update transport classes to use Provider suffix (WebFluxSseServerTransport → WebFluxSseServerTransportProvider)
- Add exchange parameter to handler methods for better context passing
- Introduce McpBackwardCompatibility class to maintain backward compatibility
- Update MCP Server documentation to reflect new API patterns
- Add tests for backward compatibility
- Update mcp version to 0.8.0
- Add mcp 0.8.0 breaking change note-

The changes align with the MCP specification evolution while maintaining backward compatibility through deprecated APIs.

refactor: Extract MCP tool callback configuration into separate auto-configuration

Extracts the MCP tool callback functionality from McpClientAutoConfiguration into a
new dedicated McpToolCallbackAutoConfiguration that is disabled by default.

- Created new McpToolCallbackAutoConfiguration class that handles tool callback registration
- Made tool callbacks opt-in by requiring explicit configuration with spring.ai.mcp.client.toolcallback.enabled=true
- Removed deprecated tool callback methods from McpClientAutoConfiguration
- Updated ClientMcpTransport references to McpClientTransport to align with MCP library changes
- Added tests for the new auto-configuration and its conditions

refactor: standardize tool names to use underscores instead of hyphens

- Change separator in McpToolUtils.prefixedToolName from hyphen to underscore
- Add conversion of any remaining hyphens to underscores in formatted tool names
- Update affected tests to reflect the new naming convention
- Add comprehensive tests for McpToolUtils.prefixedToolName method
- Add integration test for payment transaction tools with Vertex AI Gemini

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-03-25 14:23:12 -04:00