Commit Graph

44 Commits

Author SHA1 Message Date
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
Soby Chacko
368be3a04f Fixing miscellaneous checkstyle errors
Enabling checkstyle by default in the project build

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-05-16 11:08:33 +01:00
Jonatan Ivanov
3fb66928f5 Add missing observability tests
Some tests were missing from gh-3003, this change adds them

See gh-3003
2025-05-15 10:09:31 +02:00
Yanming Zhou
0bcb2e138b Fix outdated configuration key include-completion and include-query-response
Fixes GH-3151

Follow-up of commit ca843e85887aa1da6300c77550c379c103500897,`includeCompletion` is renamed to `logCompletion`.

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-05-15 09:30:45 +02: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
Soby Chacko
f346092648 HttpHost regression issues in OpenSearchVectorStoreAutoConfiguration
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>
2025-05-13 09:45:27 -04: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
Jonatan Ivanov
ca843e8588 feat(observability): refactor content observation to use logging instead of tracing
This removes the possible large amount of data that was attached
to spans and it logs the data out. This change also removes the direct
dependency on the OTel SDK. approach for content in Spring AI.

Refactors the observability approach for content in Spring AI:

- Replace content observation filters with logging handlers
- Rename configuration properties to better reflect their purpose:
  - `include-prompt` → `log-prompt`
  - `include-completion` → `log-completion`
  - `include-query-response` → `log-query-response`
- Add TracingAwareLoggingObservationHandler for trace-aware logging
- Replace micrometer-tracing-bridge-otel with micrometer-tracing
- Remove event-based tracing in favor of direct logging
- Update documentation to reflect these changes (add breaking-changes section)
- Rename includePrompt to logPrompt in observation properties. Updated in ChatClientBuilderProperties, ChatObservationProperties, and ImageObservationProperties.

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-05-10 19:36:11 +02:00
Linar Abzaltdinov
f30ab261b4 GH-2954: Opensearch vector store transport improvements
Fixes: #2954

* fixed authorization to multiple hosts
* ability to provide SSL certs via `SslBundles`
* ability to set connectTimeout/readTimeout

Signed-off-by: Linar Abzaltdinov <abzaltdinov@gmail.com>
2025-05-10 10:02:51 -04:00
mck
2450ae592e Implement CassandraChatMemoryRepository
ref: https://github.com/spring-projects/spring-ai/issues/2998
Signed-off-by: mck <mck@apache.org>
2025-05-09 16:44:29 -04:00
Temuu-jin
972eb49349 Add custom text-property and set default to previously used "text"
Add property to auto config and properties class

Signed-off-by: Temucin Damdinjamts-Kintaert <temucin.d.k@gmail.com>
2025-05-09 16:28:23 +01:00
Soby Chacko
f3b4624494 GH-3029: Remove HanaDB vector store autoconfiguration
Fixes: #3029

- Remove HanaDB vector store autoconfiguration
- Remove the corresponding starter
- Update docs
- Update maven configuration
- Remove autoconfiguration and starter entries from Spring AI BOM

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-05-08 16:55:48 +01:00
jonghoonpark
09a6a6e1e5 Upgrade chroma vector database api version to V2
- Update to use Chroma 1.0.0
 - Update Chroma vector store implementation to use V2 API

Signed-off-by: jonghoonpark <dev@jonghoonpark.com>
2025-05-07 14:11:23 +01:00
Ilayaperumal Gopinathan
61d160442b Fix OpenSearchVectorStoreAutoConfigurationIT
- Set spring.ai.vectorstore.opensearch.aws.enabled=false to enable non AWS condition to instantiate OpenSearch client

Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-05-07 14:00:30 +01:00
Mark Pollack
f329d71b7b Improve OpenSearch AWS/non-AWS auto-configuration and document fallback logic
- Add OpenSearchNonAwsCondition to robustly activate non-AWS OpenSearch auto-configuration if either:
    - AWS SDK classes are missing, OR
    - spring.ai.vectorstore.opensearch.aws.enabled=false
- Update OpenSearchVectorStoreAutoConfiguration to use the new condition for non-AWS configuration.
- Ensure AWS-specific auto-configuration is only active when AWS SDKs are present and the property is true (default).
- Add Javadoc to OpenSearchNonAwsCondition and clarify Javadoc on AWS config.
- Update integration test (OpenSearchVectorStoreNonAwsFallbackIT) to verify fallback logic works with AWS SDKs present.
- Add and refine documentation in opensearch.adoc:
    - Explain the purpose and usage of the spring.ai.vectorstore.opensearch.aws.enabled property.
    - Document the fallback logic and how to explicitly select AWS or non-AWS OpenSearch support.

Fixes #1901

Signed-off-by: Mark Pollack <mark.pollack@broadcom.com>
2025-05-06 18:18:47 -04:00
Mark Heckler
3dc86d33ce Added Entra ID identity management for Azure OpenAI, clean autoconfiguration, and updated docs to reflect changes.
Signed-off-by: Mark Heckler <mark.heckler@gmail.com>
2025-05-05 21:03:43 -04:00
Ilayaperumal Gopinathan
3acc206eb2 Next development version 2025-04-30 17:51:20 +01:00
Ilayaperumal Gopinathan
b657cf3bae Release version 1.0.0-M8 2025-04-30 17:51:07 +01:00
Eddú Meléndez Gonzales
22c778f8cc Switch CassandraContainer implementation (#2663)
`org.testcontainers.containers.CassandraContainer` is deprecated.

Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
2025-04-28 17:08:27 +01:00
Łukasz Jernaś
c726005a5b Add autoconfiguration processor for autoconfigure modules
Signed-off-by: Łukasz Jernaś <lukasz.jernas@allegro.com>
2025-04-28 12:49:53 +01: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
Soby Chacko
53a7af500b Addressing the remaining checkstyle failures
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-04-15 11:04:03 +01:00
Soby Chacko
d9e7ace996 Miscellaneous checkstyle fixes
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-04-14 09:48:03 +01: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
Eddú Meléndez
5127662f2c Use PropertyMapper in vector store auto-configurations
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
2025-04-07 16:48:43 -04: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
Ilayaperumal Gopinathan
b4fa31188a Refactoring cleanup
- Update Spring AI BOM with the newly added modules
 - Remove unnecessary dependencies from the modules' POM file
2025-04-04 12:43:22 -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
Soby Chacko
d94a3c9f40 Moving LoggingMarkers and ResourceUtils from spring-ai-client-chat to spring-ai-commons
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-04-04 12:43:22 -04:00
Mark Pollack
e3f9b7c16b rename spring-ai-core to spring-ai-client-chat 2025-04-04 11:44:38 -04: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
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
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
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
Soby Chacko
8a1dcfc225 Conditionally enable invidividual vector store implementations
- Introduce top level properties to support conditional logic
- The properties will have the format like "spring.ai.vectorstore.type=<vectorstore provider>" to enable specific vectore store implementation
- By default, these will be enabled when no specific properties are set. To disable, set any value other than the provider name for example, none"

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-03-24 15:34:22 -04:00
Ilayaperumal Gopinathan
6b12ff5ae1 Refactor autoconfigurations for models
- Conditionally enable invidividual models within the provider
     - Introduce top level properties to support conditional logic
        - The properties will have the format like "spring.ai.model.<chat/embedding/image etc.,>=<provider>" to enable specific chat/embedding/image/audio/moderation models by the provider. By default, these will be enabled when no specific properties are set. To disable, set any value other than the provider name for example, "none"

    - For the auto configurations where the provider has multiple models, split the autoconfiguration into per model auto-configuration classes. This will enable the isolated auto-configurations for each provider and its model.
      - This PR addresses this for OpenAI and others will follow in subsequent PRs

Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
2025-03-24 15:34:22 -04:00
Soby Chacko
31bc8c470d Migrate vector store observation autoconfiguration to dedicated module
Update the vector store starters with the new observation autoconfig dependency

Other maven configuraiton changes

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-03-24 15:34:22 -04:00
Soby Chacko
fd1f0d9431 Migrate Azure and CosmosDB vector store auto-configurations to dedicated modules
Update dependencies and module names in maven pom.xml files

Update corresponding starter modules

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-03-24 15:34:22 -04:00
Soby Chacko
505046749f Migrate vector store auto-configurations to dedicated modules
Move vector store auto-configuration classes to dedicated modules under auto-configurations/vector-stores/:
- Creates separate modules for Cassandra, Chroma, Elasticsearch, GemFire, HanaDB, MariaDB, MongoDB Atlas, Neo4j, OpenSearch, Oracle, PGVector, and Redis vector stores
- Updates package names to follow the pattern org.springframework.ai.vectorstore.<implementation>.autoconfigure
- Renames corresponding starter modules to follow the pattern spring-ai-starter-vector-store-<implementation>
- Updates import paths in affected classes
- Relocates test resources alongside their respective implementations
- Updates imports in spring-ai-spring-boot-docker-compose and spring-ai-spring-boot-testcontainers

This change improves modularity by allowing each vector store implementation to be
independently versioned and maintained, following the migration pattern established
with previous vector store autoconfiguraiton and starters .

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-03-24 15:34:22 -04:00
Soby Chacko
7f24740690 Migrate vector store auto-configurations to dedicated modules
Move vector store auto-configuration classes to dedicated modules under auto-configurations/vector-stores/:

- Creates separate modules for Milvus, Pinecone, Qdrant, and Typesense vector stores
- Moves CommonVectorStoreProperties to spring-ai-core for better reusability
- Updates pom.xml dependencies to maintain proper relationships between modules
- Name the artifacts based on the pattern spring-ai-autoconfigure-vector-store-<implementation>.
  For example - spring-ai-autoconfigure-vectore-store-milvus
- Package names follow the pattern org.springframework.ai.vectorstore.<implementation>.autoconfigure
- Naming the correspondinbg starter modules accordingly (spring-ai-starter-vector-store-milvus for example).

This change improves modularity by allowing each vector store implementation to be
independently versioned and maintained, continuing the migration pattern established
with previous vector stores.

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-03-24 15:34:22 -04:00
Soby Chacko
413ab9692d Migrate weaviate store auto-config to its own module
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>

Fixing typo, adding new autoconfig module to starter module

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-02-20 15:37:41 +00:00