- Disable project-wide Checkstyle checks to unblock development
- Add documentation for enabling Checkstyle locally
- Fix remaining checkstyle violations in current codebase
Fixes#1669
Following removal of Spring Boot's ConstructorBinding, convert record types
to regular POJOs to maintain JSON serialization. Update API classes:
- Convert FunctionTool and Function records to standard Java classes with
getters/setters
- Update test assertions to use getter methods instead of record accessors
- Fix failing tests in MiniMax, OpenAi and ZhiPu API implementations
This keeps core API models independent of Spring Boot while ensuring proper
serialization through standard Java beans.
- MistralAIApi FunctionTool ConstructorBinding removal changes
- Remove @NestedConfigurationProperty and @ConstructorBinding annotations from model options classes
- Remove spring-boot dependency from spring-ai-openai module
- Add exclusion for spring-boot-autoconfigure in spring-cloud-function-context dependency
- Move configuration metadata to spring-ai-spring-boot-autoconfigure module
This change decouples the core AI model implementations from Spring Boot,
making the core modules more lightweight and allowing them to be used in
non-Spring Boot applications. Configuration properties are now handled by
the spring-ai-spring-boot-autoconfigure module instead.
Fixes#1540
- Remove unnecessary spring-web dependencies
- Update third-party library versions
- Refactor API classes to use consistent header handling
- Remove ApiUtils class and inline its functionality
- Adjust RestClient and WebClient builder usage in autoconfiguration
- Replace direct RestClient.Builder injections with ObjectProvider<RestClient.Builder>
and WebClient.Builder injections with ObjectProvider<WebClient.Builder>
- Update ChromaVectorStoreAutoConfiguration to use ObjectProvider
- Rename MongoDbAtlasLocalContainerConnectionDetailsFactoryTest to IT
- Switch spring-ai-chroma-store dependency from spring-web to spring-webflux
- Simplify ChromaApi constructor by using method reference for default headers
- Adjust import order
Resolves#1066Resolves#524
* Observation APIs for chat, embedding and image models
* Conventions based on OpenTelemetry Semantic Conventions for GenAI
* Instrumentation for OpenAI chat, embedding, and image models
* Autoconfiguration for observability for OpenAI
Fixes gh-953
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
- extend the OllamaApi with Tool, ToolCalls and Function and add Tool Role.
- make OllamaChatModel extend the AbstractToolCallSupport.
- extend the OllamaChatModel to convert the Spring AI messages to OllamaApi messages, including Tools.
- OllamaOptions implements FunctionCallingOptions.
- add OllamaApiToolFunctionCallIT for testing function calling.
- patch the AbstractToolCallSupport#isToolCall to take set of stop resons.
- add FunctionCallbackInPromptIT and FunctionCallbackWrapperIT function calling auto-configuration tests.
- extend OllamAutoConfiguration to support function calling registration.
- add function call tests to OllamChatAutoConfigurationIT.
- add OllamaWithOpenAiChatModelIT to OpenAi that uses the OpenAI API to call Ollama.
- move buildToolCallConversation and handleToolCalls to parent AbstractToolCallSupport.
- update Docs. add Ollama function call docs.
- update Ollama diagrams.
Resolves#720
* Add ChatBot and basic DefaultChatBot
* Add streaming ChatBot support.
* Add Evaluator interface and RelevancyEvaluator implementation
* Add Content data type abstraction for Document and Message
* Renaming and package refactoring
* update .gitignore to allow node package name
* Add List<Media> to node and move ai.transformer package to ai.prompt.transformer
* Add Short/Long term memory support.
* Add mixing transformers support
Docs TBD
- 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.
Add OpenAiChatOptions
- OpenAiChatOptions implements ChatOptions and exposes all OpenAi request options, except messages and stream.
- Add OpenAiChatOptions field (as defaultOptions) to OpenAiChatClient. Implement star-up/runtime options merging on chat request creation
- Add OpenAiChatOptions options field to OpenAiChatProperties. Later is set as OpenAiChatClient#defaultOptions. Use the spring.ai.openai.chat.options.* prefix to set the options.
- Add tests for properties and options merging.
- Move the OpenAiChatOptions.java out of the api package
Add OpenAiEmbeddingOptions
- Add OpenAiEmbeddingOptions class implementing the EmbeddingOptions interface.
- Add OpenAiEmbeddingClient#defaultOptions
- Add request merging with default and propmt options.
- Add OopenAiEmbeddingProperties#options field of type OpenAiEmbeddingOptions
Update OpenAI client docs
Part of the larger 'epic' issue #228
The OpenAiApi, returns the HTTP headers that can be intropsect for metadata
with the help of OpenAiResponseHeaderExtractor.
No need for http interception nor for joining by ID.