- Improved the documentation in the `MCP Server Boot Starter` regarding `Starter` selection,
and added descriptions of precautions for `spring-ai-starter-mcp-server-webflux`.
Fixes: #3511
Auto-cherry-pick to 1.0.x
Signed-off-by: Sun Yuhan <sunyuhan1998@users.noreply.github.com>
* Update zhipuai-chat docs example with "produces = MediaType.TEXT_EVENT_STREAM_VALUE" ( Content-Type = "text/event-stream" ) in the "@GetMapping" annotation.
Auto-cherry-pick to 1.0.x
Signed-off-by: 老虎是条大狼狗 <494509580@qq.com>
This commit enhances MiniMaxChatOptions by:
- Updating `equals` and `hashCode` methods for proper object comparison.
- Updating `copy()` method, creating new instances of mutable collections (List, Set, Map, Metadata) to prevent shared state.
- Adding `MiniMaxChatOptionsTests` to verify `copy()`, builders, setters, and default values.
- Add more tests for objects not equal, defensive unmodifiable getters etc.
Signed-off-by: Alexandros Pappas <apappascs@gmail.com>
* Update tests that are supposed to fail to not use retry
* Upgrade ot use Ollama 0.6.7
Signed-off-by: Alexandros Pappas <alexandros.pappas@yiluhub.com>
Adds MAGISTRAL_MEDIUM, MISTRAL_MEDIUM, MAGISTRAL_SMALL, and DEVSTRAL_SMALL to the available chat models.
Fixes: #3523
Auto-cherry-pick to 1.0.x
Signed-off-by: Alexandros Pappas <apappascs@gmail.com>
- Changed the parameter name in the finishReason method from 'id' to 'finishReason' for better clarity and accuracy
Signed-off-by: Ahoo Wang <ahoowang@qq.com>
This commit introduces a new `spring-ai-elevenlabs` module to integrate ElevenLabs' TTS service into Spring AI.
Key Features:
- **New Module:** `spring-ai-elevenlabs` with a Spring Boot starter for auto-configuration.
- **Core Classes:**
- `ElevenLabsTextToSpeechModel`: Implements `TextToSpeechModel` and `StreamingTextToSpeechModel`.
- `ElevenLabsTextToSpeechOptions`: Configurable TTS options (voice, format, speed, etc.).
- `ElevenLabsApi` and `ElevenLabsVoicesApi`: Low-level REST clients for ElevenLabs APIs.
- DTOs: `Speech`, `TextToSpeechMessage`, `TextToSpeechPrompt`, `TextToSpeechResponse`.
- **Auto-configuration:**
- `ElevenLabsAutoConfiguration`, `ElevenLabsConnectionProperties`, and `ElevenLabsSpeechProperties`.
- **Functionality:**
- Text-to-speech conversion with ElevenLabs voices.
- Real-time streaming playback support.
- Flexible runtime configuration via properties and model options.
- **Documentation:** Updated Spring AI reference guide with usage examples.
- **Tests:** Includes unit and integration tests for both success and failure scenarios.
Note:
- Some `tts` package classes will be relocated to the `core` module to support shared TTS abstractions, including upcoming OpenAI Speech API support.
- Added metadata support to `TextToSpeechResponse`.
- Added tests and updated documentation.
Signed-off-by: Alexandros Pappas <apappascs@gmail.com>
- Update Spring Boot version to 3.5.0
- Enforce elasticsearch-java client to use the explicit version 8.18.1
- This is because of the incompatibility between Spring Boot 3.4.x and 3.5.0 in using the elastic search java client versions 8.15.1 vs 8.18.1
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
Add necessary types and update stream processing to handle Anthropic's 'thinking' content blocks and deltas in streaming responses. This resolves an issue where an IllegalArgumentException was thrown for unhandled thinking event types.
format
Added docs
Signed-off-by: Alexandros Pappas <apappascs@gmail.com>
- Update test to check if the exception is thrown when using the method without toolcontext as method argument but with explicit toolcontext values
- Add test to verify that exception is not thrown when toolcontext is not set even with the callback method with the toolcontext argument
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
- Change LHR <-> RHR in the ClassUtils.isAssignable
Auto-cherry-pick to 1.0.x
Fixes #GH-3355
Signed-off-by: Sun Yuhan <sunyuhan1998@users.noreply.github.com>
Currently, spring-ai-spring-boot-docker-compose module brings
auto-configuration modules plus other dependencies which are unnecessary.
Auto-cherry-pick to 1.0.x
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
Currently, spring-ai-spring-boot-testcontainers module brings
auto-configuration modules plus other dependencies which are unnecessary.
Auto-cherry-pick to 1.0.x
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
Qdrant does not support java.lang.Long as a native payload type.
Previously, passing a Long value caused the following exception:
java.lang.IllegalArgumentException: Unsupported Qdrant value type: class java.lang.Long
at org.springframework.ai.vectorstore.qdrant.QdrantValueFactory.value(QdrantValueFactory.java:85)
at org.springframework.ai.vectorstore.qdrant.QdrantValueFactory.lambda$toValueMap$1(QdrantValueFactory.java:46)
...
To resolve this, Long values are now converted to their String representation
in QdrantValueFactory. This preserves precision and avoids serialization issues.
test(qdrant): add test to verify Long metadata values are stored as String
Adds a test to ensure that Long values in document metadata are
safely converted to String before being stored in Qdrant.
The test inserts a document with a Long-type "ref_id", performs
a similarity search, and verifies that:
- the result is not empty,
- the retrieved "ref_id" is a String,
- the value matches the original Long when parsed.
Also ensures cleanup by deleting the inserted document from the store.
Auto-cherry-pick to 1.0.x
Signed-off-by: Solomon Hsu <solnone@gmail.com>
The dependency on spring-webflux was unnecessary, there was no code
inside spring-ai-retry that made use of it.
Also remove 'optional' from slf4j-api dependency (it's not optional,
if you don't have it on classpath, RetryUtils will fail to load).
Add explicit dependency on spring-webflux for modules that directly
import WebClient.
Auto-cherry-pick to 1.0.x
Fixes#3307
Signed-off-by: Piotr Kubowicz <piotr.kubowicz@gmail.com>
- Enclosed debug logging statements within an isDebugEnabled() check
- Reduced unnecessary method calls and object creations when debug logging is disabled
Auto-cherry-pick to 1.0.x
Signed-off-by: Ahoo Wang <ahoowang@qq.com>
In cases where no custom size is set, derive the size by the given
embedding model.
Had to migrate the embeddingDimension Spring Boot property from int to Integer
to introduce the null check for the fluent config. Everything else would
have been just noisy.
Auto-cherry-pick to 1.0.x
Fixes#977
Signed-off-by: Gerrit Meier <meistermeier@gmail.com>
Fixes: #3415
- Remove @Override annotation from handleError(ClientHttpResponse) method
to support compilation against both Spring 6.2.x and 7.x
- Add delegation from new handleError(URI, HttpMethod, ClientHttpResponse)
method to maintain backward compatibility
- Preserve existing error handling logic
This change allows Spring AI to work seamlessly across Spring Framework
versions 6.x and 7.x without requiring reflection or version detection at runtime.
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>