Commit Graph

1946 Commits

Author SHA1 Message Date
Ilayaperumal Gopinathan
156344dc23 Update Spring Boot to 3.4.4 2025-04-03 19:22:38 +01:00
Ilayaperumal Gopinathan
e458cf1956 Auto-configurations dependencies cleanup 2025-04-03 10:11:04 -04:00
Soby Chacko
638fb78418 Move AOT runtime hints package and classes from spring-ai-client-chat to spring-ai-model
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-04-03 10:11:03 -04:00
Ilayaperumal Gopinathan
8ca3d41e68 Refactoring cleanup
- Update Spring AI BOM with the newly added modules
 - Remove unnecessary dependencies from the modules' POM file
2025-04-03 10:11:03 -04:00
Soby Chacko
bd82e73193 Rename spring-ai parent from spring-ai to spring-ai-parent
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-04-03 10:11:03 -04:00
Soby Chacko
ee5f9f361c Moving LoggingMarkers and ResourceUtils from spring-ai-client-chat to spring-ai-commons
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-04-03 10:11:03 -04:00
Mark Pollack
676c139efb Update docs based on module refactorings 2025-04-03 10:11:03 -04:00
Mark Pollack
2467359ade Move chat based enrichers to a new package to avoid conflicts with other enrichers in different modules 2025-04-03 10:11:03 -04:00
Soby Chacko
21c2b4de81 Migrate Cassandra chat memory implementation to its own module
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-04-03 10:11:03 -04:00
Mark Pollack
278db764b3 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-03 10:11:03 -04:00
Mark Pollack
85555003ad rename spring-ai-core to spring-ai-client-chat 2025-04-03 10:11:03 -04:00
Mark Pollack
148534d511 remove duplicated deps in spring-ai-pgvector-store pom.xml 2025-04-03 10:11:03 -04:00
Mark Pollack
e75137cce1 Move rag classes out of spring-ai-core and into new module spring-ai-rag 2025-04-03 10:11:03 -04:00
Mark Pollack
9c0262e50e Move advisors that depend on vector store to spring-ai-advisors module 2025-04-03 10:11:03 -04:00
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