- Updated computeRequestFilterExpression to check if the context value is already
a Filter.Expression object before attempting to parse it as a string
- Added docs for FILTER_EXPRESSION key that it accepts both String and Filter.Expression
- Added test
Fixes#3179
- 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>
GHA workflows are automatically executed on forks where they fail.
This change prevents this (only for those workflows that are
automatically triggered, e.g.: on push or schedule).
- Added a dataSource(DataSource) method to the builder
- Now, if no dialect is specified, the implementation will attempt to detect it from the effective DataSource (either set directly or obtained from the JdbcTemplate).
- Updated builder logic to default to the DataSource from the JdbcTemplate if dataSource() is not called, ensuring dialect detection works out-of-the-box.
- The builder now prefers a directly provided DataSource, but remains backwards compatible with JdbcTemplate-based configuration.
- Added tests
Fixes#3148
Signed-off-by: Mark Pollack <mark.pollack@broadcom.com>
- Fix the QdrantValueFactory to handle "java.util.List" type
- Update the integration test to use List type values
Resolves#3164
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
Fixes GH-3151
Follow-up of commit ca843e85887aa1da6300c77550c379c103500897,`includeCompletion` is renamed to `logCompletion`.
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
- The fix overrides the adviseStream method to use ChatClientMessageAggregator to properly aggregate streaming chunks before storing them in memory, similar to how PromptChatMemoryAdvisor handles streaming responses
- Added test
Signed-off-by: Mark Pollack <mark.pollack@broadcom.com>
* 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>
Changes introduced for https://github.com/spring-projects/spring-ai/issues/2954
introduced a regression in the way OpenSearch works with test containers.
Restore the retrieval of HttpHost from OpenSearchConnectionDetails insted of getting
them directly from properties.
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
Improve separation of concerns by keeping model-related functionality in the model module
while maintaining client-specific functionality in the client module.
- Move MessageAggregator class from spring-ai-client-chat to spring-ai-model module
- Create new ChatClientMessageAggregator in spring-ai-client-chat module to handle client-specific aggregation
- Extract client-specific aggregation logic from MessageAggregator to ChatClientMessageAggregator
- Update references in advisor classes to use the new ChatClientMessageAggregator
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
- 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>
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>
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>
- 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>
- Rename the artifact ID of the chat memory repository artifacts:
- `spring-ai-model-chat-memory-jdbc` -> `spring-ai-model-chat-memory-repository-jdbc`
- `spring-ai-model-chat-memory-cassandra` -> `spring-ai-model-chat-memory-repository-cassandra`
- `spring-ai-model-chat-memory-neo4j` -> `spring-ai-model-chat-memory-repository-neo4j`
- Rename the package names to include "repository". Example: org.springframework.ai.chat.memory.repository.jdbc.JdbcChatMemoryRepository
- This package renaming also requires to change the default schema location for the jdbc repository to include "repository"
- Update the docs
- Update the artifact IDs in the parent POM, BOM, autoconfiguration and starters
- Update upgrade notes and docs to describe the changes
Fix JdbcChatMemoryRepositoryPostgresqlIT
- Make sure to set the dialect via datasource
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
Such as `BatchProperties.Jdbc`, `IntegrationProperties.Jdbc`, `JdbcSessionProperties` and `QuartzProperties.Jdbc`
1. Reuse Spring Boot's `DatabaseInitializationMode`
2. Allow to customize platform
3. add `OnJdbcChatMemoryRepositoryDatasourceInitializationCondition` for `JdbcChatMemoryRepositorySchemaInitializer`
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
Introduce instrumentation for tool calling using the Micrometer Observation API.
By default, metadata about tool calling are exported as metrics and traces.
Optionally, the actual tool call input and result can be exported as well by enabling the dedicated feature flag.
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
Fixes: #1831
- Document auto-truncation configuration with high token limits
- Add integration tests for auto-truncation behavior
- Include Spring Boot and manual configuration examples
- Test large documents and batching scenarios
Enables proper use of embedding model auto-truncation while avoiding batching strategy exceptions.
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
- Removed the CassandraChatMemory class and its usages, now using CassandraChatMemoryRepository.
- Updated configuration, repository, and test classes to rely on CassandraChatMemoryRepository.
- Cleaned up related configuration and integration tests.
- Minor doc update to reflect the removal.
Fixes#3090
Signed-off-by: Mark Pollack <mark.pollack@broadcom.com>
Fixes: #2168
- Change property name from 'taskType' to 'task_type' in VertexAiEmbeddingUtils to match Google API expectations
- Add integration tests to verify task type behavior matches Google SDK
- Add missing auto truncate option copying in VertexAiTextEmbeddingOptions
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>