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
This commit is contained in:
Christian Tzolov
2024-03-15 11:55:27 +01:00
committed by Mark Pollack
parent 8503078088
commit ce2bb131e5
32 changed files with 2441 additions and 14 deletions

View File

@@ -26,6 +26,8 @@
<module>models/spring-ai-mistral-ai</module>
<module>models/spring-ai-vertex-ai-palm2</module>
<module>models/spring-ai-vertex-ai-gemini</module>
<module>models/spring-ai-anthropic</module>
<module>spring-ai-test</module>
<module>spring-ai-spring-boot-autoconfigure</module>
<module>spring-ai-spring-boot-starters/spring-ai-starter-openai</module>
@@ -63,6 +65,7 @@
<module>vector-stores/spring-ai-mongodb-atlas-store</module>
<module>spring-ai-spring-boot-starters/spring-ai-starter-mongodb-atlas-store</module>
<module>spring-ai-spring-boot-testcontainers</module>
<module>spring-ai-spring-boot-starters/spring-ai-starter-anthropic</module>
</modules>
<organization>