* Created spring-ai-commons module that contains the document classes and Media
* Created spring-ai-document-ingestion containing ETL related classes
* Created spring-ai-chat-document-transformer module containing transformers that utilitze the ChatModel
Started to refactor package names for document ETL classes to have 'document' in their package name.
Major Changes:
- Created new module spring-ai-vector-store from spring-ai-core functionality
- Split advisor functionality into three new modules:
* advisor-memory: Memory-based chat advisors
* advisor-rag: Retrieval Augmentation Generation advisors
* advisor-vector-store: Vector store based advisors
Ollama has recently introduced native support for JSON structured output, as described in https://ollama.com/blog/structured-outputs.
This PR introduces support for it, both for directly passing a JSON schema and when using the Spring AI output conversion APIs.
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
- Refactor the builder methods to remove `with` as the prefix.
- Introduce new methods with updated naming conventions.
- Deprecate the existing `with*` methods to maintain backward compatibility.
- Update WatsonxAi documentation
- Refactor the builder methods to remove `with` as the prefix.
- Introduce new methods with updated naming conventions.
- Deprecate the existing `with*` methods to maintain backward compatibility.
- Update AnthropicChatOptions builder documentation
- Refactor the builder methods to remove `with` as the prefix.
- Introduce new methods with updated naming conventions.
- Deprecate the existing `with*` methods to maintain backward compatibility.
- Update MistralAiChatOptions builder documentation
Introduces a builder pattern for configuring QdrantVectorStore instances to
provide a more flexible and type-safe way to create and configure vector stores.
This change:
- Makes configuration more intuitive through fluent builder methods
- Improves validation by enforcing required parameters at compile time
- Deprecates old constructors in favor of the builder pattern
- Adds comprehensive builder tests to ensure reliability
- Updates reference documentation with builder usage examples
- Maintains backward compatibility while providing a clear migration path
The builder pattern simplifies QdrantVectorStore configuration by providing
clear method names, proper validation, and better IDE support through method
chaining. This makes the API more user-friendly and helps prevent configuration
errors at compile time rather than runtime.
- Refactor builder methods in `ChatResponseMetadata` to remove `with` prefixes and introduce new methods with updated naming conventions.
- Deprecate existing `with*` methods while maintaining backward compatibility.
- Ensure dependent files and tests are compatible with the updated `ChatResponseMetadata` class.
- Refactor the builder methods to remove `with` as the prefix.
- Introduce new methods with updated naming conventions.
- Deprecate the existing `with*` methods to maintain backward compatibility.
- Update the `copy()` method to use the new builder methods.
- Update MoonshotChatOptions builder documentation
Introduces a builder pattern for configuring MariaDBVectorStore instances and
improves the overall implementation. This change:
- Makes configuration more flexible and type-safe through builder methods
- Deprecates old constructors and builder in favor of the new builder pattern
- Adds comprehensive validation of configuration options
- Improves documentation with clear examples and better structure
- Updates all test classes to use the new builder pattern
- Adds comprehensive builder tests
- Updated reference documentation
The builder pattern provides a more maintainable and user-friendly way to
configure vector stores while ensuring configuration validity at compile time.
This aligns with the project's move towards using builder patterns across all
vector store implementations.
Introduces a builder pattern for configuring TypesenseVectorStore instances and
moves the implementation to the org.springframework.ai.vectorstore.typesense
package. This change:
- Makes configuration more flexible and type-safe through builder methods
- Improves code organization by moving to a dedicated vector store package
- Deprecates old constructors in favor of the builder pattern
- Adds comprehensive validation of configuration options
- Enhances documentation with clear usage examples
- Adds dedicated builder test class for better test coverage
- Add builder tests
- update reference docs
The builder pattern simplifies TypesenseVectorStore configuration while ensuring
proper validation of all settings. The package move aligns with Spring AI's
architectural patterns and improves maintainability by grouping related classes
together.
review
- Deprecate existing FunctionCallingOptionsBuilder
- Create FunctionCallingOptions.Builder which extends ChatOptions.Builder
- Create DefaultFunctionCallingOptions which extends DefaultChatOptions and implements FunctionCallingOptions to serve the default FunctionCalling options
- Create DefaultFunctionCallingOptionsBuilder to build the default functioncalling options
- Update the usage of functioncalling options builder to use the newly added builder including the tests
Improve extensibility of DefaultChatOptionsBuilder
- Enable DefaultChatOptionsBuilder to accommodate any other sub types
- Introduce generics to support sub types that extend DefaultChatOptionsBuilder
- Update builder methods to return the sub type
- Make FunctionCallingOptions' builder()'s return type to accommodate sub types which can extend FunctionCallingOptions.Builder
- Deprecate the builder methods with the prefix `with`
- Fix OCI cohere chat model options and OCI Embedding model options
- Update references and docs
- Update Moderation, Generation, Categories, CategoryScores' builder method
- deprecate the existing builder methods with the prefix `with` and replace them without the prefix
- Refactor the options builder methods to remove `with` as the suffix
- Update all the models under spring-ai-bedrock
- Deprecate the existing methods
- Update references and docs
feat(gemini) not null checks on safetySettings
feat(gemini) check safety settings not empty instead of not null
feat(gemini) Add VertexAiGeminiSafetySetting wrapper class
feat(gemini) Update documentation with new property
feat(gemini) Update equals, hashCode, and toString
- Fix Azure OpenAI chat model's functioncalling to report accumulated token usage
- Fix both call() and stream() operations
- For streaming operation, use buffering to store the usage from the last response when stream option include usage is enabled
- Add tests
- Fix the chat model's call() to calculate the cumulative usage
- Use an explicit internalCall to pass the previous chat response so that accumulation can be done
- Fix the chat model's stream() to calculate the cumulative usage
- Fix MistralAi API to include usgae in ChatCompletionChunk
- Use internalStream() to accumulate the usage
Add/update tests
Introduces a builder pattern for configuring WeaviateVectorStore instances and
moves the implementation to the org.springframework.ai.vectorstore.weaviate
package. This change:
- Makes configuration more flexible and type-safe through builder methods
- Improves code organization by moving to a dedicated vector store package
- Deprecates old constructors in favor of the builder pattern
- Adds builder tests
- Enables better IDE support through method chaining
Introduces a builder pattern for configuring CassandraVectorStore instances and
moves the implementation to the org.springframework.ai.vectorstore.cassandra
package. This change:
- Makes configuration more flexible and type-safe through builder methods
- Improves code organization by moving to a dedicated vector store package
- Deprecates old constructors in favor of the builder pattern
- Adds comprehensive validation of configuration options
- Enables better IDE support through method chaining
- The builder pattern provides a more maintainable and user-friendly way to
configure vector stores while ensuring configuration validity at compile time.
Add builder pattern to OpenSearchVectorStore
Introduces a builder pattern for OpenSearchVectorStore configuration and
refactors the package structure to org.springframework.ai.vectorstore.opensearch
for better organization and consistency with other vector stores.
The builder pattern improves usability by:
* Providing a fluent API for configuring store instances
* Making configuration options more discoverable through method names
* Enabling better validation of configuration parameters
* Supporting optional parameters with sensible defaults
* The package refactoring aligns with the project's standard package naming
conventions and improves code organization. All constructors are deprecated
in favor of the new builder pattern to guide users toward the preferred
configuration approach.
Refactors RedisVectorStore to use the builder pattern for improved
configuration and usability. The changes include:
* Move classes to org.springframework.ai.vectorstore.redis package
* Add RedisBuilder with comprehensive configuration options
* Deprecate RedisVectorStoreConfig in favor of builder pattern
* Enhance documentation with detailed usage examples
* Improve error handling and parameter validation
This change makes RedisVectorStore configuration more intuitive and
consistent with other vector stores in the project.
The Neo4j vector store implementation has been enhanced with a builder
pattern to be more intuitive than using ctors and follows spring ai builder
conventions. Current constructors have been deprecated to maintain
backward compatibility for one releaes cycle.
The change includes:
* Move classes to dedicated neo4j package for better organization
* Add comprehensive builder pattern implementation with validation
* Improve documentation with detailed usage examples
* Deprecate but maintain old configuration approach for compatibility
* Update integration tests to demonstrate new builder pattern
* Enhance code readability and maintainability
The MongoDBAtlasVectorStore implementation has been enhanced with a builder
pattern to provide a more flexible and type-safe way to configure the vector
store. This change improves the developer experience by making the API more
intuitive and less error-prone.
The old constructors and configuration classes have been deprecated in favor
of the builder pattern. This aligns with Spring's best practices for
configuration APIs.
Additionally, the package has been refactored to
org.springframework.ai.vectorstore.mongodb.atlas to avoid having
multiple vector store modules share the same package name.
Documentation has been updated to reflect these changes and provide
examples of using the new builder pattern.review
The changes introduce a fluent builder pattern for ElasticsearchVectorStore
configuration, making it easier to create and customize instances with
optional parameters. All Elasticsearch-related classes are moved to a
dedicated elasticsearch package for better organization.
Key changes:
* Add ElasticsearchVectorStore.builder() with comprehensive options
* Move classes to org.springframework.ai.vectorstore.elasticsearch package
* Deprecate old constructors in favor of builder pattern
* Add support for configurable batching strategies
* Enhance documentation with usage examples and best practices
- Move PgVectorStore and related classes to org.springframework.ai.pg.vectorstore package
- Update builder pattern to use more idiomatic method names (e.g. withSchemaName -> schemaName)
- Deprecate existing constructors and old Builder class in favor of new static builder() method
- Update tests to reflect the new builder style usage
- Update docs
Introduces a fluent builder API to improve configuration readability and
type safety when creating MilvusVectorStore instances. This replaces the
existing configuration object approach which was less intuitive and harder
to maintain.
The builder pattern provides better encapsulation of configuration logic
and validation, while maintaining backward compatibility through a
deprecated config class. This change makes the codebase more maintainable
and the API more discoverable for users.
Key changes:
- Replace configuration object with fluent builder pattern
- Move Milvus-related classes to dedicated milvus package
- Deprecate MilvusVectorStoreConfig in favor of builder
- Update constructor to use builder internally
- Maintain backward compatibility with deprecated config
- Add comprehensive builder methods with validation
- Deprecate existing ChatOptionsBuilder and its inner class DefaultChatOptions
- Create a new builder interface ChatOptions.Builder for building the Chat options
- Create an explicit DefaultChatOptions
- Create DefaultChatOptionBuilder which can create DefaultChatOptions
- Add javadoc for the deprecated Builder
Resolves#1875