Commit Graph

749 Commits

Author SHA1 Message Date
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
Theo van Kraay
e723371723 cosmos db entra id support and fixes
add doc changes

Signed-off-by: Theo van Kraay <theo.van@microsoft.com>
2025-04-21 14:20:34 -04:00
Ilayaperumal Gopinathan
c0bc6231a5 Remove FunctionCallback deprecations
- Remove the super type FunctionCallingOptions from ToolCallingChatOptions

        - Move toolContext builder methods into ToolCallingChatOptions

    - Remove Model chat options' function specific usages

        - Replace them with tooling:

              FunctionCallback -> ToolCallback
              functions -> toolNames
        - Remove proxyToolCalls use

        - Remove deprecated methods

     - Update ChatClient methods

        - Replace FunctionCallback -> ToolCallback

        - Remove deprecated methods

     - Update DefaultChatClient

        - functionNames -> toolNames
        - functionCallbacks -> toolCallbacks

     - Update AdviseRequest

        - functionNames -> toolNames
        - functionCallbacks -> toolCallbacks
        - Remove FunctionCallingOptions and replace it with ToolCallingOptions

      - Remove FunctionCallingHelper

      - Update DefaultToolCallingChatOptions, ToolCallbackResolvers, ToolCallbackProvider to use Tool calling types

     - Update documentation

     - Remove VertexAiGeminiChatModelFunctionCallingIT and adjust MistralAiApiToolFunctionCallIT

Resolves #2528
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-04-18 10:55:55 +02:00
可能
aaf1589669 Update tools.adoc , change colon to semicolon (#2741)
Signed-off-by: 可能 <contact@revengemission.com>
2025-04-15 10:28:13 +01:00
Tran Ngoc Nhan
257c91ccf2 Fix typo (#2719)
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-04-14 16:35:06 +01:00
Christian Tzolov
def15f9295 (docs) minor PE patterns copyedit changes
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-04-14 11:46:45 +02:00
Christian Tzolov
d32e773c50 (docs) Add Prompt Egineering Patterns section
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-04-14 10:42:44 +01:00
Christian Tzolov
2dad4822cf refactor(docs): improve Berock embedding and RAG documentation
- Replace model-specific enabled properties with unified spring.ai.model.embedding property
- Update documentation for Bedrock Cohere and Titan embedding models
- Add missing dependency information for RAG advisors in documentation

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-04-11 10:28:44 +02: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
Mark Pollack
d4a3f7a774 Update upgrade notes 2025-04-10 14:53:10 -04: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
Mark Pollack
0aea1866e4 Update support boot versions in getting started doc 2025-04-10 12:56:18 -04:00
Eddú Meléndez
eef5f74b4c Add support for Docker Model Runner
- Docker Desktop 4.40 has released a Docker Model Runner, which is OpenAI compatible.
- Add docs for Docker Model Runner

Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
2025-04-10 11:58:25 -04:00
gongzhongqiang
923e09a1b0 feat(ollama): Add min_p parameter for improved sampling control
- Add min_p option
- Add qwq model

Signed-off-by: gongzhongqiang <gongzhongqiang@apache.org>
2025-04-10 11:20:13 +01:00
jonghoon park
14e7033a8e refactor(openai): change voice parameter to string in OpenAI Audio Speech API (#2395)
This change modifies the voice parameter in OpenAI Audio Speech API from using the
Voice enum directly to using the string value of the enum. This provides more
flexibility for handling voice options, especially for custom voices or when voice
names come from configuration.

- Change voice parameter type from Voice enum to String
- Add overloaded methods to accept both enum and string values
- Update tests and documentation to reflect these changes

Signed-off-by: jonghoon park <dev@jonghoonpark.com>
2025-04-09 21:10:31 +02:00
Viacheslav Dobrynin
a43cdc8f79 fix: update MCP Java SDK docs link (#2660)
Signed-off-by: Viacheslav Dobrynin <49430239+viacheslav-dobrynin@users.noreply.github.com>
2025-04-08 15:38:44 +01:00
Emmanuel Ferdman
37dc443b84 Update OpenAiApiToolFunctionCallIT source (#2661)
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2025-04-08 15:37:01 +01:00
Christian Tzolov
0d748e2b87 feat(tool): Add ToolExecutionEligibilityChecker interface
Introduce a new ToolExecutionEligibilityChecker interface to provide a more flexible way to determine
when tool execution should be performed based on model responses. This abstraction replaces the
hardcoded logic previously scattered across the codebase.

- Adds a new ToolExecutionEligibilityChecker interface in spring-ai-core
- Integrates the checker into OpenAiChatModel with appropriate defaults
- Updates OpenAiChatAutoConfiguration to support the new interface
- Provides a default implementation that maintains backward compatibility

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>

refactor: Replace ToolExecutionEligibilityChecker with ToolExecutionEligibilityPredicate

- Replacing ToolExecutionEligibilityChecker with ToolExecutionEligibilityPredicate
- Changing from Function<ChatResponse, Boolean> to BiPredicate<ChatOptions, ChatResponse>
- Adding a DefaultToolExecutionEligibilityPredicate implementation
- Updating AnthropicChatModel and OpenAiChatModel to use the new predicate
- Updating auto-configurations to inject the new predicate
- Adding comprehensive tests for the new predicate implementation

The new approach provides a cleaner and more consistent way to determine when tool execution should be performed based on both prompt options and chat responses.

Add Bedrock Converse support

add mistral support

Add ollama and vertex gemini

add ToolExecutionEligibilityPredicate docs

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-04-08 15:22:53 +01: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
Timo Salm
ef0a2025f2 Fix documentation for removed 'spring.ai.vectorstore.redis.uri' property 2025-04-07 08:21:25 +01:00
Alexandros Pappas
59fbd9e3eb fix: remove default temperature on all QueryTransformer implementations
Signed-off-by: Alexandros Pappas <apappascs@gmail.com>

update documentation

Signed-off-by: Alexandros Pappas <apappascs@gmail.com>
2025-04-07 07:52:17 +01:00
Soby Chacko
edc35667c1 Minor polishing in upgrade-notes
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-04-04 13:27:17 -04:00
Mark Pollack
dde01a56ef Add diagram for new module structure 2025-04-04 13:03:55 -04:00
Mark Pollack
4f63fdc305 Add upgrade notes 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
Mark Pollack
76d6e7d6d0 Update docs based on module refactorings 2025-04-04 12:43:22 -04: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
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
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
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
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
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
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
양예성
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
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
Mark Pollack
c11cc739b3 update reference docs for upgrade 2025-03-24 23:07:27 -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
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
0453fc55d5 Modularise Spring AI Spring Boot autoconfigurations
- Split spring-ai-spring-boot-autoconfigure into modules

     - This PR addresses the restructuring of the following spring boot autoconfigurations:

       - spring-ai retry -> common
       - spring-ai chat client/model/memory -> chat
       - spring-ai chat/embedding/image observation -> observation
       - spring-ai chat/embedding models -> models

     - Update the Spring AI BOM and boot starters with the new autoconfigure modules

     - Rename the autoconfiguration and starters

        - The package name for the models in autoconfiguration classes will have `org.springframework.ai.model.<name>.autoconfigure`
        - Both the autoconfiguration and starters will have the prefix `spring-ai-autoconfigure-model` and `spring-ai-starter-model` respectively

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