Commit Graph

56 Commits

Author SHA1 Message Date
Mark Pollack
67a8896422 Next development version 2024-11-20 18:03:30 -05:00
Mark Pollack
33c05c399c Release version 1.0.0-M4 2024-11-20 18:02:47 -05:00
Ilayaperumal Gopinathan
bf66415e30 Add spring-ai-coherence store boot starter to Spring AI BOM 2024-11-07 12:07:43 +00:00
Eddú Meléndez
cafcecbdcc Add spring-ai-coherence-store to bom 2024-11-06 19:53:55 -06:00
Ilayaperumal Gopinathan
d44a6aff7c GH-924 Remove PaLM API support
https://github.com/spring-projects/spring-ai/pull/1664

  - As a follow up to decommission the PaLM API, the PaLM API support is removed.
  - Remove the model and vector store classes
  - Remove the documentation entries
  - Reference: https://ai.google.dev/palm_docs/deprecation

Resolves #924
2024-11-04 15:22:50 -05:00
Christian Tzolov
0d2d4b7385 Add Bedrock Converse API chat model support
Introduces support for Amazon Bedrock Converse API through a new BedrockProxyChatModel
implementation. This enables integration with Bedrock's conversation models with features
including:
- Support for sync/async chat completions
- Stream response handling
- Tool/function calling capabilities
- System message support
- Image input support
- Observation and metrics integration
- Configurable model parameters and AWS credentials

Adds core support classes:
- BedrockUsage: Implements Usage interface for token tracking
- ConverseApiUtils: Utility class for handling Bedrock API responses including:
  - Tool use event aggregation and processing
  - Chat response transformation from stream outputs
  - Model options conversion
  - Support for metadata aggregation
- URLValidator: Utility for URL validation and normalization with support for:
  - Basic and strict URL validation
  - URL normalization
  - Multimodal input handling
- Enhanced FunctionCallingOptionsBuilder with merge capabilities for both ChatOptions
  and FunctionCallingOptions
- Added BEDROCK_CONVERSE to AiProvider enum for metrics tracking
- Extended AWS credentials support with session token capability
- Added configurable session token property to BedrockAwsConnectionProperties

Adds new auto-configuration support:
- BedrockConverseProxyChatAutoConfiguration for automatic setup of the Bedrock Converse chat model
- BedrockConverseProxyChatProperties for configuration including:
  - Model selection (defaults to Claude 3 Sonnet)
  - Timeout settings (defaults to 5 minutes)
  - Temperature and token control
  - Top-K and Top-P sampling parameters
- Integration with existing BedrockAwsConnectionConfiguration for AWS credentials

Updates to testing infrastructure:
- Adds comprehensive test suite for Bedrock Converse properties and auto-configuration
- Integration tests for chat completion and streaming scenarios
- Property validation tests for configuration options
- Temporarily disabled other Bedrock tests due to AWS quota limitations
- Added ObjectMapper configuration for proper JSON handling

Added new spring-ai-bedrock-converse-spring-boot-starter module

Updates module configuration in parent POM and BOM to include new bedrock-converse
modules and starters. Adds necessary auto-configuration imports for seamless integration
with Spring Boot applications.

Unrelated changes:
- Disabled several Bedrock model tests (Jurassic2, Llama, Titan) due to AWS quota limitations
- Disabled PaLM2 tests due to API decommissioning by Google

Resolves #809, #802

Add docs and fix configs

- Move timeout configuration from chat properties to connection properties
- Add comprehensive documentation for Bedrock Converse API usage and configuration
- Update tests to reflect configuration changes

Co-authored-by: maxjiang153 <maxjiang153@users.noreply.github.com>

Standardize AWS credential handling in integration tests

- Improve how we manage AWS credentials across our integration test
suite and ensures consistent test configuration. We're replacing individual
environment variable checks with @RequiresAwsCredentials
annotation and standardizing the use of BedrockTestUtils for context creation
in tests

We also align all AWS regions to US_EAST_1 for consistency and add missing
dependency versioning for Oracle Free.

These changes make our AWS tests more easier to maintain.

Key changes:
- Replace @EnabledIfEnvironmentVariable with @RequiresAwsCredentials
- Standardize context creation via BedrockTestUtils
- Set AWS region to US_EAST_1
- Add Oracle Free dependency version in pom.xml
2024-11-03 17:10:24 -05:00
jito
1e980d13b2 Azure cosmos-db vector store maven cleanup (#1631)
- Define the version for Azure Cosmos DB
- Add dependencies for the azure-cosmos-db-store module and boot starter
- Include the artifacts in spring-ai-bom

Signed-off-by: jitokim <pigberger70@gmail.com>
2024-10-30 17:07:13 -04:00
Soby Chacko
8e758dbd00 Introduce checkstyle plugin
- Based on https://github.com/spring-io/spring-javaformat
- In this iteration, checkstyles are only enabled for spring-ai-core
2024-10-24 16:43:59 -04:00
Mark Pollack
4c83fe8302 Guard against NPE in ZhiPu embedding model
- Update retry test to pass - needs investigation
2024-10-08 23:37:00 +02:00
Mark Pollack
4a892b5269 Release version 1.0.0-M3 2024-10-08 23:18:50 +02:00
Anders Swanson
ccf190c77c Add OCI GenAI embedding model support
This commit introduces support for Oracle Cloud Infrastructure (OCI)
GenAI embedding models in Spring AI. It includes:

* New OCIEmbeddingModel class for interacting with OCI GenAI API
* Auto-configuration for easy setup and integration
* Properties for configuring OCI connection and embedding options
* Documentation updates explaining usage and configuration
* Integration tests to verify functionality

Signed-off-by: Anders Swanson <anders.swanson@oracle.com>
2024-09-26 17:04:05 -04:00
Eddú Meléndez
9f33e326b1 Add spring-ai-spring-boot-docker-compose to BOM
Fixes #1314
2024-09-10 14:01:24 +02:00
Eddú Meléndez
667ef76037 Fix cassandra starter 2024-09-10 13:59:33 +02:00
Craig Walls
2a62235f73 Add Markdown document reader to Spring AI BOM 2024-09-09 18:10:33 -04:00
Mark Pollack
e1884d1d92 Next development version 2024-08-23 18:47:37 -04:00
Mark Pollack
43ad2bdb97 Release version 1.0.0-M2 2024-08-23 18:46:58 -04:00
Thomas Vitale
57e7da7646 Add Cloud Bindings module to Spring AI BOM
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2024-07-24 20:39:55 +02:00
Christian Tzolov
c70c20b79d Add VertexAI Embedding Model support
- add new spring-ai-vertex-ai-embedding project.
 - add VertexAiTextEmbeddingModel and VertexAiMultimodalEmbeddingMode with related options configuration classes.
 - add ITs
 - add auto-configuraiton and boot starters.
 - register to BOM.
 - add documentation.
 - add multimodal embedding documentation
 - extend the Embedding metdata so that it can keep references to the source document's data, Id, mediatype

 Resolves #1013
 Related to #1009
2024-07-10 15:36:13 -04:00
GR
997e01ca6b Add support for QianFan AI models
- Add chat, embeddin and image models
- Tests
- Docs
2024-06-22 13:30:38 -04:00
Eddú Meléndez
d276d17c1f Add AWS OpenSearch AutoConfiguration
Currently, in order to use an OpenSearch instance provided by AWS,
 additional steps are needed. This commit introduces the required
 configuration.

 Add new starter and update docs
2024-06-21 22:57:06 +02:00
GR
d5b8123e60 Add support for Moonshot AI model
- Docs
- Tests
2024-06-21 15:23:54 -04:00
geetrawat
067a33dbe2 Improved GemFire support
- Adds spring boot auto-configuration support for GemFireVectorStore
- Adds integration test GemFireVectorStoreAutoConfigurationIT
- Includes gemfire-testcontainers in integration tests
- Adds unit test GemFireVectorStorePropertiesTests
- Refactors GemFireVectorStore.java extracting GemFireVectorStoreConfig.java
- Renames spring-ai-gemfire to spring-ai-gemfire-store
- Adds GemFireConnectionDetails
- Adds GemFireVectorStoreProperties with default values
- Remove gemfire-release-repo maven repository

Co-authored-by: Louis Jacome <louis.jacome@broadcom.com>
Co-authored-by: Jason Huyn <jason.huynh@broadcom.com>
2024-06-20 17:17:13 -04:00
Jemin Huh
46e47849ce Add OpenSearch vector store integration
- implement OpensSearchVectorStore
 - add opensearch auto-configuration and boot starter
 - add documentation for OpenSearch VectorStore
 - add bom dependecies
 - align with to new Spirng AI API
2024-06-16 12:43:09 +02:00
PabloSanchi
3e2ed8b9bf Add Typesense vector store integration
- autoconfigure setup
 - add post bean initialization and create method
 - add embedding field
 - create collection add nested field options
 - add typesense tests
 - use embedding variable instead of word vec
 - check in runtime the number of documents in the collection
 - add typesense expression converter
 - add filter tests. add update document test and search with threshold test
 - distance threshold and add distance key into metadata
 - add typesesne boot starter
 - add typesense docs
 - add client properties in autoconfigure
 - add embedding dimension method
 - add typesense vector store autoconfiguration tests
 - add docs to nav.adoc and vectorsdb.adoc.
 - fix module name.
 - move the expression converter to the typesense project.
2024-06-15 19:55:05 +02:00
LLEFEVRE
41cf693bc0 Add Support for Oracle 23ai as vector database
- add OracleVectorStore with metadata filter expression support.
 - add ITs using oracle-free-slim testcontainers.
 - add auto-configuration and boot starter.
 - add adoc documentation.
 - Adjust javadoc references.

 Resolves #703

 Co-authored-by: Eddú Meléndez Gonzales <eddu.melendez@gmail.com>
2024-06-14 06:46:01 +02:00
Thomas Vitale
2a592d4e84 Introduce Hugging Face Starter
* Added Spring Boot Starter for Spring AI Hugging Face
* Updated documentation with instructions using the starter dependency
* Fixed naming inconsistencies in the docs for Hugging Face

Fixes gh-838

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2024-06-13 22:07:58 +02:00
yinpeng
20c6a1adcf fix: typo 2024-06-03 15:00:19 +02:00
Mark Pollack
ac91302eed Next development version 2024-05-28 13:53:04 -04:00
Mark Pollack
0670575f3e Release version 1.0.0-M1 2024-05-28 13:49:11 -04:00
GR
99c3857788 Add Support for ZhiPu AI model
* See https://www.zhipuai.cn/
2024-05-20 20:20:29 -04:00
GR
6b674014ed Add support for the MiniMax Model
* See https://minimaxi.com/
2024-05-20 15:08:20 -04:00
Christian Tzolov
3475f17e98 Unify the vector store module and pom names
spring-ai-qdrant -> spring-ai-qdrant-store
 spring-ai-cassandra -> spring-ai-cassandra-store
 spring-ai-pinecone -> spring-ai-pinecone-store
 spring-ai-redis -> spring-ai-redis-store
 spring-ai-qdrant -> spring-ai-qdrant-store
 spring-ai-gemfire -> spring-ai-gemfire-store
 spring-ai-azure-vector-store-spring-boot-starter -> spring-ai-azure-store-spring-boot-starter
 spring-ai-redis-spring-boot-starter -> spring-ai-redis-store-spring-boot-starter
2024-05-17 17:05:09 +02:00
Christian Tzolov
3ee04ed8da fix code style and missing dependency renaming 2024-05-17 15:31:58 +02:00
mck
656d238285 Implement Apache Cassandra vector store
The CassandraVectorStore is for managing and querying vector data in an Apache Cassandra db.
  It offers functionalities like adding, deleting, and performing similarity searches on documents.

  The store utilizes CQL to index and search vector data. It allows for custom metadata fields in
  the documents to be stored alongside the vector and content data.

  This class requires a CassandraVectorStoreConfig configuration object for initialization, which
  includes settings like connection details, index name, field names, etc. It also requires an
  EmbeddingClient to convert documents into embeddings before storing them.

  A schema matching the configuration is automatically created if it doesn't exist. Missing columns
  and indexes in existing tables will also be automatically created. Disable this with the disallowSchemaCreation.

  This class is designed to work with brand new tables that it creates for you, or on top of existing
  Cassandra tables. The latter is appropriate when wanting to keep data in place, creating embeddings
  next to it, and performing vector similarity searches in-situ.

  Instances of this class are not dynamic against server-side schema changes. If you change the schema
  server-side you need a new CassandraVectorStore instance.

 - Add auto-configure with tests.
 - reformat code style
 - Change field terminology to column (as appropriate for cassandra and cql)
 - Add doc page with an advanced example.
 - Add the dependencies to Spring AI BOM
 – add to `AutoConfiguration.imports`

 - Add @since annotation
 - Fix javadoc issue
 - Streamline the adoc content and layout
2024-04-10 16:51:47 +02:00
Rahul
466b824840 Add SAP HanaDB vector store integration
- Implement a HanaCloudVectorStore and tests
 - Implement Autoconfiguraiton + properties
 - Add boot starter
 - Update BOM with vector store and boot dependencies.
 - Add antora docuementation
 - added junit for HanaCloudVectorStoreProperties.java and documentation
   to create a BTP trial account and provision an instance for SAP Hana Cloud db
 - updated license, formatting and javadoc
 - IT for HanaCloudVectorStoreAutoConfiguration
 - IT for HanaCloudVectorStoreAutoConfiguration

Additional
 - add @AutoConfiguration(after = { JpaRepositoriesAutoConfiguration.class })
 - update the handa docs structure.
2024-04-09 12:36:42 +02:00
Eddú Meléndez
b3f2516b7d Add Elasticsearch vector store auto-configuration
* Add spring-ai-elasticsearch-store-spring-boot-starter
* Register spring-ai-elasticsearch-store-spring-boot-starter in bom

Fixes #475
2024-03-21 13:18:41 +01:00
Pablo Sanchidrian
52d15f5dc1 Add Watsox.AI Chat Client integration
- feat: setup watsonx ai api
 - feat: add watsonx ai model options
 - feat: setup watsonx chat client
 - feat: add watsonx records/models
 - add watsonx-ai module to pom
 - add watsonx-ai module to bom
 - feat: add connection properties watsonx
 - feat: add  WatsonxAiAutoConfiguration with api client
 - feat: add starter watsonx.ai
 - feat: add generate method in watsonx ai api
 - feat: add watsonx ai api streaming generation method
 - feat: add watsonx message to prompt converter util
 - feat: implement call and stream mehtod
 - feat: add watsonx ai runtime hints
 - fix: filter null fields
 - feat: watsonx options tests
 - feat: add test dependencies
 - feat: add runtime hints tests
 - feat: add watsonx client tests
 - fix: apply linter
 - feat: add tests for message to prompt converter
 - feat: add signature
 - fix: change deprecated IamAuthenticator
 - fix: do not keep baseUrl in a class variable
 - fix: webClient request
 - feat: add default base url to autoconfigure
 - feat: add watsonx ai integration docs
 - fix: model options json
 - feat: add watsonx-ai spring boot starter
 - feat: enable watsonx api on watsonx chat client
 - fix: remove condition
 - feat: add watsonx autoconfigure import
 - feat: add watsonx module resource aot import
 - feat: add pom for watsonx ai module

 Additional pre-merge adjustments:

 - Rename all WatsonxAIXxx classes to WatsonxAiXxx.
 - Rename WatsonxChatClient to WatsonxAiChatClient.
 - Move WatsonxAiChatOptions out of the API.
 - Implement a Builder for WatsonxAiChatOptions (replace the inline withXxx code).
 - Add a WatsonxAiChatOptions field to WatsonxAiChatClient as default options.
   Later, it is also set by the auto-configuration properties.
 - Implement merging logic for default vs runtime options in WatsonxAiChatClient.
 - In Auto-config, add WatsonxAiChatProperties with enabled and options fields.
   Options are passed to the client.
 - Update the adoc to include the .chat.options properties.
 - Add the watsonxai doc to the nav.adoc.
 - Fix license headers and javadocs.
 - Move dependency versioning to the parent POM.
2024-03-20 15:18:48 +01:00
Jemin Huh
9334d7d540 Add Elasticsearch vector store integration
- Implement ElasticsearchVectoSotore and IT.
 - Add ElasticsearchAiSearchFilterExpressionConverter.
 - Add dependency to BOM and module to parent pom.
 - Fix ElasticsearchVectorStoreIT FilterExpression with
   Date type requires the use of epoch milliseconds.
 - Add license formatting.
2024-03-20 07:41:05 +01:00
geetrawat
7634c6b780 Add Gemfire vector store
- Implement a GemFireVectorStore implementing the VectorStore interface.
 - Add unit and integration test.
 - Add antora documentation.
 - Add to BOM.
2024-03-19 07:41:17 +01:00
Christian Tzolov
ce2bb131e5 Implement Anthropic Claude3 Message API client support (direct)
This commit introduces support for the Anthropic Claude3 Message API
  (https://api.anthropic.com), enabling direct interaction with its services.
  This is not a Bedrock Anthropic Claude3 implemenation.

  Changes include:

  - Implementation of a low-level client, AnthropicApi, to interact with
    the message API endpoints specified in the Anthropic documentation
    (https://docs.anthropic.com/claude/reference/messages_post), including support for streaming.
  - Addition of AnthropicApi tests to ensure functionality and reliability.
  - Support for multimodal requests within AnthropicApi.
  - Adding the spring-ai-anthropic and boot starter into BOM and parent POM modules for streamlined usage.
  - Add Anthropic Auto-configuration and Boot Starter for seamless integration into existing projects.
  - Implementation of AnthropicChatClient with capabilities for synchronous and streaming communication,
    including support for multimodal messages.
  - Inclusion of both unit and integration tests to validate functionality across various scenarios.
  - Add Antora documentation with comprehensive guidance on using AnthropicApi and AnthropicChatClient.
  - Add of Ahead-of-Time (AOT) hints for AnthropicApi.
  - update anthropic diagram
2024-03-19 00:36:29 -04:00
Eddú Meléndez
8503078088 Add ServiceConnection support for
* ChromaDBContainer
 * MilvusContainer
 * QdrantContainer
 * RedisStackContainer
 * WeaviateContainer
 * OllamaContainer

Add docs
2024-03-18 23:29:55 -04:00
Christian Tzolov
73c39e3d9e Add spring-ai-mongodb-atlas-store-spring-boot-starter to the BOM 2024-03-18 15:11:29 +01:00
Chris Smith
5f0123cc92 Add MongoDB Atlas Vector store
- Add VectorSearchAggregation used to actually preform the search
   on a given collection with embeddings.
 - add MongoDBVectorStore
 - Add MongoDBVectorStoreIT.  Integration test runs fine given...
   - You have a mongo atlas cluster to connect to (local or remote)
   - You have the search index "spring_ai_vector_search" setup correctly
   - Need to explore getting around this
   - Need to filter results using threshold
 - Add postfilter for threshold values - While a post filter is not ideal,
   it gets the job done. The mongo team seems to be working on having
   it availible as a prefilter option, in which this implementation
   can be updated to use later.
 - implement filtering threshold
 - fix a few sonar issues
 - formatting
 - use higher default num_candidates
 - use builder for configuration
 - add documentation and some refactor
 - use consistent property in integration test
 - finish implementing filter support
 - add documentation to filter converter
 - add vector search index auto creation

 - Add to BOM.
 - Fix version to 1.0.0-SN.
 - Move expresion converter from core to models/mongodb.
 - Fix style and license headers
2024-03-16 12:13:02 +01:00
Mark Pollack
4c617e16b4 Prepare next development iteration 2024-03-12 14:33:45 -04:00
Mark Pollack
490f3cd1cb Milestone Release 0.8.1 2024-03-12 14:28:28 -04:00
Christian Tzolov
1ea851515f Fix spring-ai-retry BOM version 2024-03-08 12:52:13 +01:00
Christian Tzolov
1e3eaec7b9 Refactor and centralize Retry logic:
- Establish a new "spring-ai-retry" project, implementing a default HTTP error handler,
   RetryTemplate, and handling both Transient and Non-Transient Exceptions.
 - Streamline existing clients (e.g., OpenAI and MistralAI) to utilize "spring-ai-retry."
 - Integrate retry auto-configuration with customizable properties, extending it to OpenAI and MistralAI Auto-Configs.
 - Allow configuration of RetryTemplate and ResponseErrorHandler for various clients, including OpenAIChatClient,
   OpenAiEmbeddingClient, OpenAiAudioTranscriptionCline, OpenAiImageClient, MistralAiChatClient, and MistralAiEmbeddingClient.
 - Add tests for default RestTemplate and ResponseErrorHandler configurations in OpenAI and MistralAI.
 - Introduce new retry auto-config properties: "onClientErrors" and "onHttpCodes".
 - Implement tests for retry auto-config properties.
 - Generate missing license headers.
2024-03-07 11:27:01 -05:00
Mark Pollack
7cc2eabb90 Change flatten pom config
* root project pom now sets <dependencyManagement>remove</dependencyManagement>
* spring-ai-bom pom flatten plugin added with <dependencyManagement>keep</dependencyManagement>
2024-03-06 10:22:37 -05:00
Anush008
ea0b439dac Implement Qdrant vector store
- Implement QdrantVectorStore.
   Uses a custom parser for converting Spring AI metadata(Map<String, Object>) to Qdrant GRPC payload.
 - Implement Qdrant Expression Filter support.
   Uses a custom parser for converting Spring AI filters to Qdrant-compatible GRPC filters.
 - Add ITs using testcontainers.
 - Add antora docs adrant.adoc.
 - Add Qdrant vector store auto-configuraton and boot starter.

Additional (review) change:

 - Fix poms parent to 0.8.1-SNAPSHOT.
 - Rename ObjectFactory into QdrantObjectFactor.
 - Rename ValueFactory into QdrantValueFactory.
 - Move the org.springframework.ai.vectorstore package into org.springframework.ai.vectorstore.qdrant.
 - Add missing Autoconfigure definition.
 - Add missing license and JavaDocs.
 - Minor code style improvmentes.
 - Move the qdrant version to the main pom
 - Add QdrantVectorStoreAutoConfigurationIT
 - Remove guava dependency
 - Improve gdrant.adoc conent and structure.
 - Remove the grpc-protobuf dependency

Resolves #331
2024-02-28 19:31:54 +01:00
Christian Tzolov
e1462b86e3 Fix Vertex AI PaLM2 Boot Starter name typo
Rename spring-ai-vertex-ai-plam2-spring-boot-starter into spring-ai-vertex-ai-palm2-spring-boot-starter
2024-02-28 18:05:32 +01:00