Commit Graph

863 Commits

Author SHA1 Message Date
chainHo
a3d0898ee5 fix:Typo cloud bindings (#3436)
* fix:Typo cloud bindings doc

Signed-off-by: chainHo <chainhou@gmail.com>
(cherry picked from commit 694bb50be5)
2025-06-06 10:34:16 +00:00
jonghoonpark
0c43e24b66 docs: update huggingface doc (#3445)
Signed-off-by: jonghoonpark <dev@jonghoonpark.com>
(cherry picked from commit 925def2725)
2025-06-05 13:02:35 +00:00
SexyProgrammer
de3edbd867 fix: correct ToolDefinition.builder() usage in docs (#3431)
Signed-off-by: SexyProgrammer <49146257+SexyProgrammer@users.noreply.github.com>
(cherry picked from commit 8af1d3958f)
2025-06-04 09:00:04 +00:00
jonghoonpark
35e8ee9b06 Changes related to the response format have been added to the document. (#3434)
Fixes: #3354

Signed-off-by: jonghoonpark <dev@jonghoonpark.com>
(cherry picked from commit b070c67336)
2025-06-04 01:50:42 +00:00
YunKui Lu
9aa0c9a9c5 docs:Revise the documents of deepseek and minimax-chat (#3408)
Fixes: #3408

Signed-off-by: YunKui Lu <luyunkui95@gmail.com>
(cherry picked from commit ea995dfa51)
2025-06-02 23:37:27 +00:00
pavan kumar punna
8fe3cad5ee docs(bedrock-converse): fix MIME types and standardize formatting in video modalities docs (#3413)
Fixes: 3413

Signed-off-by: punnapavankumar9 <punnapavankumar9@gmail.com>
(cherry picked from commit 8e5a1d37d8)
2025-06-02 22:35:45 +00:00
YunKui Lu
8cd64bc1f4 docs: Remove duplicate NoOpTemplateRenderer mention in chatclient.adoc (#3414)
Fixes: #3414

Signed-off-by: YunKui Lu <luyunkui95@gmail.com>
(cherry picked from commit 12bd905413)
2025-06-02 22:30:49 +00:00
jonghoonpark
f4f2cfd399 add description of embedding-field-name property (#3399)
Fixes: #3399

Signed-off-by: jonghoonpark <dev@jonghoonpark.com>
(cherry picked from commit 9beee1d0f0)
2025-05-30 21:53:30 +00:00
Alexandros Pappas
b34dcbf0c7 feat(anthropic): add support for claude-opus-4 and claude-sonnet-4 (#3351)
* feat(anthropic): add support for claude-opus-4-0 and claude-sonnet-4-0 models

- Introduce `CLAUDE_OPUS_4` and `CLAUDE_SONNET_4` to `ChatModel` enum
- Update documentation to include new model options

Signed-off-by: Alexandros Pappas <apappascs@gmail.com>

* add model aliases url to anthropic documentation

Signed-off-by: Alexandros Pappas <apappascs@gmail.com>

---------

Signed-off-by: Alexandros Pappas <apappascs@gmail.com>
2025-05-30 11:33:00 +01:00
Filip Hrisafov
cd364e39dd Fix CustomerTools example to use existing methods (#3390)
Signed-off-by: Filip Hrisafov <filip.hrisafov@gmail.com>
2025-05-30 09:24:19 +01:00
Sun Yuhan
a0c76a0273 doc: Fix advisor doc for using the right dependencies
-  The documentation content regarding RAG has been updated. If you need to use the RetrievalAugmentationAdvisor, you should depend on spring-ai-rag.

Signed-off-by: Sun Yuhan <1085481446@qq.com>
2025-05-29 13:37:52 +01:00
Andrea Vacondio
0d91526f4c Update mistralai-embeddings.adoc (#3362)
Default value for the spring.ai.model.embedding should be "mistral" and not "true"

Signed-off-by: Andrea Vacondio <andrea.vacondio@gmail.com>
2025-05-28 19:27:22 +01:00
Henning Pöttker
f6d73a910e Fix links in documentation to Media.java (#3322)
Signed-off-by: Henning Pöttker <25299532+hpoettker@users.noreply.github.com>
2025-05-27 10:39:41 +01:00
Jemin Huh
544a448982 Fix awesome-spring-ai link to official repository (#3328)
Signed-off-by: Jemin Huh <hjm1980@gmail.com>
2025-05-27 07:47:27 +01:00
Cho-Hyun-Seung
03a2cb76ed docs: update custom API key example using OpenAiChatModel.builder() (#3335)
Signed-off-by: Cho-Hyun-Seung <toki0327@naver.com>
2025-05-27 07:43:46 +01:00
Eddú Meléndez Gonzales
cc5379344f Fix tools docs (#3292)
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
2025-05-22 16:37:19 +01:00
Yang Buyi
ea38612fe0 Update mcp-server-boot-starter-docs.adoc (#3279)
Older STDIO transports can't be pulled, this should be a milestone version and should use `spring-ai-starter-mcp-server`.

Signed-off-by: Yang Buyi <52228969+yangbuyiya@users.noreply.github.com>
2025-05-22 11:08:32 +01:00
Jemin Huh
e41f2b5bd2 Fix incorrect external link formatting in effective-agents.adoc (#3275)
Signed-off-by: Jemin Huh <hjm1980@gmail.com>
2025-05-22 08:02:03 +01:00
Hyunsik Aeom
4d716d5cd6 fix: Add document's title
https://docs.spring.io/spring-ai/reference/api/effective-agents.html
2025-05-22 07:49:41 +01:00
Tran Ngoc Nhan
62e7547c90 Fix typos (#3263)
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-05-22 07:42:44 +01:00
Christian Tzolov
3068c04dca feat(tools): Add configurable exception handling for tool execution
Adds a new configuration property `spring.ai.tools.throw-exception-on-error` that controls how tool execution errors are handled:
- When false (default): errors are converted to messages and sent back to the AI model
- When true: errors are thrown as exceptions for the caller to handle

The implementation:
- Adds the property to ToolCallingProperties
- Updates ToolCallingAutoConfiguration to use the property
- Improves error handling in MCP tool callbacks to use ToolExecutionException
- Adds tests to verify both behaviors
- Updates documentation with the new property

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-05-22 06:55:50 +01:00
Ilayaperumal Gopinathan
98a8dd4d46 Next development version for 1.0.x
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-05-19 13:44:20 +01:00
Ilayaperumal Gopinathan
fcd2803f36 Release version 1.0.0 2025-05-19 10:40:35 +01:00
Mark Pollack
a5fdfdbfe9 add effective agents section (#3247) 2025-05-19 10:24:49 +01:00
shusheng007
f5243b8fe2 Update openai-embeddings.adoc
change incorrect configuration: `spring.ai.openai.chat.embeddings-path` to the correct: `spring.ai.openai.embedding.embeddings-path`

Signed-off-by: shusheng007 <wangben850113@163.com>
2025-05-19 05:20:12 -04:00
Thomas Vitale
144ae1ec92 Support custom template in RelevancyEvaluator
The RelevancyEvaluator is key for validating RAG flows. This pull request improves it by making the PromptTemplate configurable, improving the format of the default one, introducing a Builder, and extending the documentation with more details on how to use it.

I added some unit tests. The RelevancyEvaluator is used in lots of integration tests in the project to test the QuestionAnswerAdvisor and RetrievalAugmentationAdvisor, that also help assessing the evaluator itself.

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2025-05-18 18:20:24 -04:00
Mark Pollack
d436ee85c4 docs: Improve ChatClient implementation notes
* Add context about reactive/imperative applications
* Fix typos and improve formatting
* Highlight Spring Boot 3.4 bug as IMPORTANT note
* Clarify tool calling impact on Micrometer observations
2025-05-18 18:16:26 -04:00
Christian Tzolov
14972f981f docs: minor adivsor docs update
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-05-18 19:10:32 +02:00
Christian Tzolov
36c597798d docs: reorganize tool calling documentation and add observability details
- Update Observability section with details about tool calling observability support
- Move "Migrating to ToolCallback API" guide from Tool Calling section to Upgrade Notes
- Update Observability section with details about tool calling observability support

Related to #3230

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-05-18 08:37:57 -04:00
Soby Chacko
b2d5ff0693 GH-3187: Replace Spring environment variables with custom alternatives
Fixes: #3187

This commit addresses the issue with Spring environment variables that directly
mirror Spring AI application properties, which can confuse users into thinking
they should always set environment variables that match Spring property names.

Instead, we've replaced all instances of SPRING_* prefixed environment variables
in the documentation with custom-named alternatives that are referenced using
Spring Expression Language (SpEL) or retrieved programmatically.

Each documentation section now shows multiple configuration approaches:

- Direct property setting in application.properties/yml
- Using custom environment variables with SpEL
- Accessing environment variables programmatically

This gives users more flexibility while making it clear that using SPRING_*
prefixed environment variables is not required or recommended.

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-05-17 12:56:02 +01:00
Christian Tzolov
c2a694900c docs: Document the MCP ToolContext support
Resolves #3209

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-05-17 13:53:24 +02:00
Christian Tzolov
9ed7535ba0 feat(mcp): Add request timeout configuration for MCP server
Add support for configuring request timeout in MCP server with a default of 20 seconds.
This timeout applies to all requests made through the client, including tool calls,
resource access, and prompt operations.

- Add requestTimeout property to McpServerProperties with default of 20s
- Configure server builder with the timeout value
- Add tests for default and custom timeout configurations
- Update documentation with the new property

Resolves #3205

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-05-17 12:41:48 +02:00
Soby Chacko
8b8fb4f02d GH-886: feat(opensearch): Add path prefix configuration support
Fixes: #886

Add ability to configure path prefix for OpenSearch API endpoints via properties.
This allows connecting to OpenSearch instances running behind a reverse proxy
with a non-root path, similar to Spring Elasticsearch's path-prefix property.

- Add pathPrefix property to OpenSearchVectorStoreProperties
- Apply pathPrefix to OpenSearchClient when configured
- Add documentation and unit tests

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-05-17 09:59:49 +01:00
Christian Tzolov
327cf40e97 feat(mcp): Add granular control over MCP server capabilities
- Add capability configuration to enable/disable tools, resources, prompts, and completions individually
- Refactor server configuration to conditionally register capabilities based on configuration
- Add support for server instructions configuration
- Update documentation with new capability options and completion management
- Add tests for new capabilities and configurations

Resolves #3207

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-05-16 10:08:23 -04:00
Christian Tzolov
b219c21723 docs: reorganize documentation structure
- Restructure navigation with clearer hierarchy using "Reference" and "Guides" sections
- Remove deprecated model-specific function calling documentation
- Update all model references to point to centralized Tool Calling documentation
- Rename "Docker Compose" to "Development-time Services" for clarity
- Move "Testing" under Reference section
- Add link to "Awesome Spring AI" community resources

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-05-15 18:06:37 -04:00
Jast
add7ca8489 fix doc (#3171)
Signed-off-by: Jast <745925668@qq.com>
2025-05-15 13:37:10 +01:00
Ricken BAZOLO
1beff75453 add mistral ai moderation doc (#3161) 2025-05-14 16:50:34 +01:00
Ricken BAZOLO
4d79ff5c56 openai-moderation.doc fix typo (#3162)
Signed-off-by: Ricken Bazolo <ricken.bazolo@gmail.com>
2025-05-14 14:17:05 +01:00
Mark Pollack
1ede66492f update upgrade-notes (#3142) 2025-05-13 19:32:50 +01: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
Linar Abzaltdinov
77be609c4a updated docs for new OpenSearch vector-store properties (#3140)
Signed-off-by: Linar Abzaltdinov <abzaltdinov@gmail.com>
2025-05-13 17:37:53 +01:00
Mark Pollack
cfeba7cf5d update upgrade-notes.adoc 2025-05-13 12:13:21 -04:00
Thomas Vitale
9ff6d3b364 Update memory docs and ensure consistent naming
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2025-05-13 11:33:44 -04:00
Claudio Silva Junior
348adee17f added custom path in doc (#3123)
* added custom path in doc

Signed-off-by: “claudio-code” <suporte2424@outlook.com>

* added custom path in doc

Signed-off-by: “claudio-code” <suporte2424@outlook.com>

---------

Signed-off-by: “claudio-code” <suporte2424@outlook.com>
2025-05-13 14:56:54 +01:00
Thomas Vitale
8939148fbc Fixes for memory advisors after recent refactoring
* The defaultConversationId was configurable, but not used. It’s now being used correctly when a custom defaultConversationId is defined.
* The memory advisors were missing the required configuration of a Schedule due to a default value missing. Now as default Scheduler is used, automatically protecting from blocking. It can be customised via “scheduler()”, replacing the old “protectFromBlocking()” method.
* The new defaultTopK options in VectorStoreChatMemoryAdvisor were documented, but not implemented. That is fixed now.
* The memory advisors were not null-safe. Now they are.
* Improved tests to check the null-safe behaviour.
* Updated the documentation accordingly.

Fixes gh-3133

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2025-05-13 09:53:24 -04:00
Mark Pollack
a03e7cba2f This commit enhances the documentation for working with multiple chat models in Spring AI by:
- Add introduction explaining common scenarios where multiple chat models are useful.
- Restructuring the content into clear subsections:
   - Multiple ChatClients with a Single Model Type
   - ChatClients for Different Model Types
   - Multiple OpenAI-Compatible API Endpoints

Signed-off-by: Mark Pollack <mark.pollack@broadcom.com>
2025-05-13 12:31:03 +02:00
mck
87b680af7c Optimise CassandraChatMemoryRepository for MessageWindowChatMemory usage pattern
Time-series each chat window in Cassandra, keeping past (and deleted) windows still in the db.
Add ability to store different MessageTypes.

Signed-off-by: mck <mck@apache.org>
2025-05-13 10:13:44 +01:00
Soby Chacko
868e288e01 GH-1949: Align CassandraVectorStore API naming with other vector stores
Fixes: #1949

- Rename 'disallowSchemaChanges(boolean)' to 'initializeSchema(boolean)' for consistency
  with other vector store implementations
- Maintain semantic meaning by inverting the default value (from disallowSchemaChanges=false
  to initializeSchema=true) in the CassandraVectorStore implementation
- Keep default behavior in auto-configuration consistent with other vector stores
- Remove unused 'returnEmbeddings' functionality and related code
- Update test cases to use the new initialization parameter
- Ref docs and javadocs updates

This change improves API consistency across Spring AI vector stores while
preserving the same behavior in the Cassandra implementation.

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-05-12 22:54:05 -04:00
Mark Pollack
848a3fd31f refactor: Simplify chat memory advisor hierarchy and remove deprecated API
- Remove deprecated ChatMemory.get(String conversationId, int lastN) method

- Replace AbstractChatMemoryAdvisor with BaseChatMemoryAdvisor interface in api package
- Make constructors private in all memory advisor implementations to enforce builder usage
- Rename CHAT_MEMORY_CONVERSATION_ID_KEY to CONVERSATION_ID and move to ChatMemory interface
- In VectorStoreChatMemoryAdvisor:
  - Rename DEFAULT_CHAT_MEMORY_RESPONSE_SIZE (100) to DEFAULT_TOP_K (20)
  - Rename builder method chatMemoryRetrieveSize() to topK()
  - Remove systemTextAdvise() builder method
- In PromptChatMemoryAdvisor:
  - Remove systemTextAdvise() builder method
  - Fix bug where only the last user message was stored from prompts with multiple messages
- Enhance logging in memory advisors to aid in debugging
- Add comprehensive tests for all advisor implementations:
  - Unit tests for builder behavior
  - Integration tests for the various chat memory advisors

Signed-off-by: Mark Pollack <mark.pollack@broadcom.com>
2025-05-12 19:41:18 -04:00