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
- Implemented Bedrock Jurassic ChatClient
- added documentation reference
- implement auto-configuration and boot starter
- Disable the BedrockAi21Jurassic2ChatClientIT.emojiPenaltyWhenTrueByDefaultApplyPenaltyTest() test
as it fails when run in combination with the other tests.
- tename /api/clients/ into /api/chat
- move the the image from /api/clients to /api
- fix the layout inside the chat and embeddings docs. Moving the runtime options and sample controllers at top level.
- adjust all affected links.
* Fix Typo: Duplicate 'for' in documentation text
* Fix Typo: Duplicate 'to' in documentation text
* Fix broken links in documentation
* Correct grammar by deleting unnecessary 'an' in documentation
* Fix typo: Change 'tunning' to 'tuning' in documentation
* Fix typo: Change 'an' to 'can' in documentation
* Fix typo: Change 'generats' to 'generates' in documentation
* Fix grammatical error: Change 'a AI' to 'an AI' in documentation
* Fix grammatical error: Change 'a AI' to 'an AI' in code
* Fix Typo: Duplicate 'for' in code
* Azure uses 'deployment-name' when provisioning models and is what needs to
be passed in to the client, not the model name.
This is a difference with the OpenAI API that doesn't have a deployment-name
This change aligns the terminology used with Azure so that there is
less confusion when setting configuration property values
Fixes#10
- Extends the reactor logic to to allow aggregation of the chunked tool-calls messages and
leverage the exsiting fnctoin calling infrastructure.
- Seamples experience for the streaming functionality.
- Add Message ID and FinishReason to the returned Generations properties.
- 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.
- Move the OpenAiAudioTranscriptionClient and OpenAiAudioTranscriptionOptions under the org.springframework.ai.openai package.
- Rename the AudioTranscriptionRequest into AudioTranscriptionPrompt.
- Minor imports cleaning.
- Make it use the new OpenAiAudioApi.
- Remove trascription code from spring-ai-core. Too early to generalize.
Move all related code under the spring-ai-openai project.
- Fix missing licenses and javadocs.
- Add 'Audio' prefix for Transcription classes and packages.
- Add missing auto-configuraiotn and tests.
- Factor out OpenAiApiClientErrorException and OpenAiApiException out of
OpenAiApi into standalone common package.
- Move the HTTP error handling and header setup into a shared ApiUtils.
- Add ChatModel and EmbeddingModel enums to OpenAiApi.
- Add ImageModel enum ot OpenAiImageClient.
Also
- fix a MistralAiApi (and OpenAiApi) issue just introduced by Mistral API
- change the auto-config properties prefix from spring.ai.mistral.* to spring.ai.mistralai.*
- minor doc references updates.
- Make MistralAiChatClient extend the AbstractFunctionCallSupport and implement the necessary abstract classes.
- Extend the MistralAiApi to include the latest (undocumented) changes providing function calling support as well.
The Mistral AI is almost identical to the OpenAI API except it doesn't support parallel function colling (e.g. missing tool_call_id).
- Add MistralAiApi function calling tests (implement the Mistral tutorial).
- Extend the misral chat options to include the new API features and function call abstractions.
- Extend Mistral's chat auto-configration to accomodate the function callback support.
- Add ITs for testing function calling.
- Remove redundant code from MistralAiApi and OpenAiApi.
- Simplify and improve the HTTP error handling in OpenAiApi, ImageAiApi and MistralAiApi.
- Extend the Spring AI Message with getMediaData() : List<MediaData>
MediaData is a pair of MimeType and data of type Object.
Message#getContent() return text only.
- VertexAI Gemini Support
- implement VertexAiGeiminChatClient for ChatClient and StreamingChat client and support for MediaData content.
add IT tests for Chat, Streaming and Multimodality
- add Auto-configuration + ITs
- add Gemini Spring Boot starter.
- add clients and boot starters to the Spring AI BOM.
- add Anotra documentation for the Gemini chat client.
- update gemini to latest 26.33.0 BOM.
- add vertex ai gemini dependencies to the BOM.
- add Vertex AI Gemini API Function Calling support
- add Gemini API Function Calling Streaming support
- add vertex ai gemini function calling documentation
- factor out the Function Calling functionality into common abstraction used by OpenAI, Azure and Gemini.
- group the VertexAI documentation under a common parent
- add PortableFunctionCallingOption that implements FunctionCallingOptions and ChatOptions and provide builder for it.
- remove some deprecated code.
- allow authorization with GoogleCredentials form json file.
- add AOT support for VertexAI Gemini.
- move legacy Vertex AI into VertexAI PaLM2.
- better handling for empty chat responses.
- update the Gemini version to latest 26.33.0. This required lifting the protobuf-java to 3.25.2 as well.
- fix a bug for handling System messages with Gemini.
- Implement Azure OpenAI Function Calling
Uses the same the common abstractions used by OpenAI and Gemini: FunctionCallingOptions and AbstractFunctionCallSupport
- Implement MistrealAiApi as a REST client for the Mistral REST API.
- Add MistralAiChatClient implementing ChatClient and StreamingChatClient.
Add MistralAiChatOptions implementing ChatOptions.
- Add MistralAiEmbeddingClient impelementing EmbeddingClient.
Add MistralAiEmbeddingOptions implementing EmbeddingOptions.
- Add Unit and IT tests for api and clients.
- Add mistral auto-configuration and boot strarter
- update auto-config property for Mistral AI embedding client
- update auto-config property for Mistral AI embedding client
Additional, review changes:
- Add missing license headers.
- Fix the intialization of defaul options.
- Code re-formatting to improve the readabitliy.
- Many improvements
- Add missing sine annotations
- Remove stream field from MistralAiChatOptions. This handled internally.
- Add MistralAiApi ChatModel and EmbeddingModel enums.
- Add MistralChatClientIT for testeing chat, stream , parsers...
- Add MistralAiApiIT tests
- Refactor and streamline the MistralAiAutoConfiguration.
- Add MistralAiAutoConfigurationIT