Commit Graph

1932 Commits

Author SHA1 Message Date
Soby Chacko
9875aaf1ca Migrage reader/transformer/writer packages from core to commons
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-04-03 10:11:03 -04:00
Ilayaperumal Gopinathan
53af6fd5ac Restructure Spring AI model module
- Pull chat, image, moderation, tool, audio specific api code into spring-ai-model module
  - Move the corresponding tests

Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-04-03 10:11:03 -04:00
Mark Pollack
7f3852ee4d 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-03 10:11:03 -04:00
Alexandros Pappas
8f20aabfdc feat: Add equals, hashCode, deep copy, tests to OpenAiChatOptions
This commit enhances OpenAiChatOptions by:
- Updating copy() method, creating new instances of mutable collections (List, Set, Map, Metadata) to prevent shared state.
- Adding OpenAiChatOptionsTests to verify copy(), builders, setters, and default values.

Signed-off-by: Alexandros Pappas <apappascs@gmail.com>
2025-04-03 10:45:47 +01:00
Yanming Zhou
25c584a783 Fix typo in ETL pipeline document (#2626)
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-04-03 10:35:50 +01:00
Yanming Zhou
20c4954521 Fix typo in prompt system messages for the models' tests
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-04-03 07:50:57 +01:00
jonghoonpark
a50f80b7a6 update mcp-client-boot-starter-docs.adoc (#2624)
Signed-off-by: jonghoonpark <dev@jonghoonpark.com>
2025-04-03 07:37:39 +01:00
rmalara
2517ca8020 GH-2609: Fix the thread leak issue in VertexAiTextEmbeddingModel
Fixes: #2609

https://github.com/spring-projects/spring-ai/issues/2609

The PredictionServiceClient was not being closed. Connections are kept open preventing resources from being disposed properly.

Signed-off-by: rmalara <rmalara@interactions.com>
Signed-off-by: Rodrigo Malara <rodrigomalara@gmail.com>
2025-04-02 18:17:57 -04:00
vker
2294c5a807 Fix: Add missing placeholder for TABLE_NAME in MariaDB table existence check
Signed-off-by: vker <6492178@gmail.com>
2025-04-01 20:04:03 +01:00
CChuYong
c02430ea6b Add PgIdType based schema generation for PgVectorStore
Signed-off-by: CChuYong <yeongmin1061@gmail.com>
2025-04-01 19:27:33 +01:00
Xwh
49df62533d Update vectordbs doc,batching-strategy is remove (#2550)
Signed-off-by: Xwh <981800006@qq.com>
2025-04-01 11:11:45 +01:00
mawenhao
e888895a4e fix(openai): prevent incorrect ToolCall merging caused by empty id and name strings
Empty tool call id and name strings causing improper ToolCall merging during OpenAI stream
processing, resulting in incorrect function calling responses. This fix ensures both null
and empty strings are properly validated before merging operations.

Fixes GH-2417 (https://github.com/spring-projects/spring-ai/issues/2417)
Fixes GH-2423 (https://github.com/spring-projects/spring-ai/issues/2423)

Signed-off-by: Wenhao Ma <296232679@qq.com>
2025-04-01 11:01:38 +01:00
yoobin_mion
77e87ccb39 Fix: Duplicate example in Vector Databases documentation (#2562) (#2563)
Signed-off-by: yoobin_mion <113106136+yybmion@users.noreply.github.com>
2025-04-01 10:55:11 +01:00
yangtuooc
63891544c1 docs: fix BakLLaVA model name spelling in multimodality documentation (#2608)
Signed-off-by: Wenhao Ma <296232679@qq.com>
Co-authored-by: jonghoon park <dev@jonghoonpark.com>
2025-04-01 10:37:04 +01:00
gabriel duncan
64a4f79783 Add missing audio formats for OpenAIAudio API
- Add missing formats "wav" and "pcm" which OpenAI supports but SpringAI does not have serializers for

Signed-off-by: gabriel duncan <gabrielduncan@Mac.attlocal.net>
2025-04-01 10:27:26 +01:00
jonghoon park
4f4da3076a Make the embedding field name configurable for the ElasticSearchVectorStore
Signed-off-by: jonghoon park <dev@jonghoonpark.com>
2025-03-31 12:45:17 +01:00
Viacheslav Dobrynin
a75b27f99b fix: correction of a typo (Char -> Chat) (#2606)
Signed-off-by: Viacheslav Dobrynin <49430239+viacheslav-dobrynin@users.noreply.github.com>
2025-03-31 12:12:47 +01:00
JongIn Won
1795d85fb3 fix ChatModel docs (#2605)
Fixed deprecated getContent() to getText() in ChatModel documentation.

Signed-off-by: jongin <jonginwon1203@gmail.com>
2025-03-31 11:38:05 +01:00
jonghoonpark
457a106d77 change redis vector store property index to index name (#2517)
Signed-off-by: jonghoon park <dev@jonghoonpark.com>
2025-03-31 11:36:42 +01:00
JongIn Won
e57b41fdc4 fix Structured Output Converter docs (#2604)
Fixed deprecated getContent() to getText() in Structured Output Converter documentation.

Signed-off-by: jongin <jonginwon1203@gmail.com>
2025-03-31 10:07:57 +01:00
Thomas Vitale
83294023cd ToolContext is now excluded from JSON Schema Generation
When generating the JSON Schema for a tool input from a method, ToolContext is now excluded since it's not something we want the model to provide. The framework takes care of passing a value for it when actually executing the tool call.

Fixes gh-2366

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2025-03-27 20:31:42 +01:00
Ilayaperumal Gopinathan
3c17750a00 Documentation updates for image/audio docs
- Fix to include the correct top level property to enable/disable image/audio models

Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-03-27 12:08:29 +00:00
Wandile
510ae2291d Update mcp-client-boot-starter-docs.adoc (#2577)
wrong spelling check
serverConfiurationName -> serverConfigurationName

Signed-off-by: Wandile <64791173+wandile-gim@users.noreply.github.com>
2025-03-27 11:59:17 +00:00
Thomas Vitale
24fb447227 openai: Adopt new strategy for ObservationContext
Relates to gh-2518

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2025-03-27 11:53:28 +00:00
Thomas Vitale
3d1825dd05 ollama: Adopt new strategy for ObservationContext
Relates to gh-2518

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2025-03-27 11:29:14 +00:00
Thomas Vitale
20deb0e653 mistral: Adopt new strategy for ObservationContext
Relates to gh-2518

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2025-03-27 09:40:27 +00:00
Ilayaperumal Gopinathan
b0668700ec Code cleanup: Neo4j vector store
- Remove batch strategy usage as it is taken care by the vector store parent builder

Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-03-26 20:14:39 +00: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
c23647df79 Fix wrong annottion
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-03-26 21:02:51 +01:00
Christian Tzolov
89ff9ebf5e fix(mcp): Implement tool de-duplication by name in MCP server
Add de-duplication logic for tools in the MCP server configuration, ensuring that tools
with the same name are not registered multiple times. The implementation keeps the
first occurrence of each tool name and discards duplicates.

- Modified toSyncToolSpecifications and toAsyncToolSpecification methods to de-duplicate tools
- Updated tests to verify that duplicate tools are properly filtered out

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-03-26 20:14:44 +01: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
양예성
e8d4957d0e Fix :: Broken URL link to document
VectorStoreDocumentRetriever not linked so fix it

Signed-off-by: 양예성 <127856153+yeseong0412@users.noreply.github.com>
2025-03-26 08:53:43 +09:00
Ilayaperumal Gopinathan
cdacf4284a Remove unused imports in autoconfigurations
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-03-25 20:50:39 +00:00
Ilayaperumal Gopinathan
9eacd40aa9 Update/remove autoconfiguration enable/disable configurations
- Since the model autoconfiguration enable/disable flags are no longer used, remove them

   - Currently, the model autoconfigurations can be enabled/disabled via top level Spring AI properties such as spring.ai.model.chat/embedding/image/moderation=<model-provider-name>

   - Update documentation to add note section about this change

- Update note on the autoconfiguration section to point to the configuration changes

- Align the vertex ai text/multimodal keys in line with the other properties

Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-03-25 19:36:30 +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
Ilayaperumal Gopinathan
3ca8d703df Update chat client autoconfiguration into Chat model starters 2025-03-25 09:58:39 +00:00
Ilayaperumal Gopinathan
958dbd3089 Fix TransformersEmbeddingModelAutoConfigurationIT
- Update the right settings to enable the configuration properties
2025-03-25 06:46:31 +00:00
Mark Pollack
c11cc739b3 update reference docs for upgrade 2025-03-24 23:07:27 -04:00
Ilayaperumal Gopinathan
5461e8338e Fix Ollam test configuration
- Add missing jackson-module-kotlin for the kotlin tests
  - Fix Function calling options to use ToolCallingChatOptions

Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-03-24 15:34:23 -04:00
Soby Chacko
989971f641 Remove coherence vector store boot starter since it is missing the autoconfig (#2565)
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-03-24 15:34:23 -04:00
Soby Chacko
ddf7748786 Add missing vector store autoconfig coorindates to spring-ai-bom (#2564)
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-03-24 15:34:23 -04:00
Soby Chacko
3d494961c2 Migrate Couchbase vector store auto-configuration to dedicated module
- Update dependencies and module names in maven pom.xml files affecting couchbase vector store support
- Rename artifact from spring-ai-couchbase-store-spring-boot-starter to spring-ai-starter-vector-store-couchbase
- Update imports and related cleanup
- Update corresponding documentation references

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-03-24 15:34:23 -04:00
Mark Pollack
31c953903a Add update prompt 2025-03-24 15:34:23 -04:00
Ilayaperumal Gopinathan
46e4c77e41 Fix autoconfiguration dependencies
- Fix OpenAI autoconfiguration observation dependencies
 - Fix Huggingface autoconfiguration OpenAI test dependency

Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-03-24 15:34:23 -04:00
Ilayaperumal Gopinathan
2d778e8a0c Update vector store docs for Spring AI starters
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-03-24 15:34:23 -04:00
Ilayaperumal Gopinathan
ce00204914 Update docs references for the Spring AI model starters
- Update the documentation references to replace the artifact ID name change for the model starters

Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-03-24 15:34:23 -04:00
Ilayaperumal Gopinathan
83ff0133cd Update MCP starters
- Update starters for MCP and docs
2025-03-24 15:34:23 -04:00
Ilayaperumal Gopinathan
962f17915b Spring AI BOM updates
- Update the latest changes to autoconfigurations, starters for the Spring AI autoconfigurations and starters

Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-03-24 15:34:23 -04:00