Commit Graph

514 Commits

Author SHA1 Message Date
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
666474caff Minor improvements of the MongoDB vector store impl. 2024-03-18 19:51:54 +01:00
Christian Tzolov
73c39e3d9e Add spring-ai-mongodb-atlas-store-spring-boot-starter to the BOM 2024-03-18 15:11:29 +01:00
Eddú Meléndez
cc0d35122c Fix IT 2024-03-18 15:07:34 +01:00
Eddú Meléndez
150b268415 Add MongoDB Atlas vector store auto-configuration
It also provides a starter.
2024-03-18 15:07:34 +01:00
Eddú Meléndez
64308c4230 Cleanup imports 2024-03-18 15:04:54 +01:00
GuangxiaoLong
ea79a4fbba Update OpenAiStreamFunctionCallingHelper.java
preventing the occurrence of null pointers.
2024-03-18 14:32:07 +01:00
Eddú Meléndez
c5f35029f0 Remove withReuse in MongoDBAtlasContainer
`Reuse Container` is a Testcontainers experimental feature. It requires
`testcontainers.reuse.enable=true` in `~/.testcontainers.properties` in
order to take effect but in order to avoid surprises, this commit remove it.

See https://java.testcontainers.org/features/reuse/
2024-03-16 23:54:59 +01:00
ahmed
c036931065 Implemented Bedrock Jurassic 2 ChatClient
- 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.
2024-03-16 14:03:18 +01:00
Johnny Lim
db43fe371e Add PostgresMlAutoConfiguration to AutoConfiguration.imports
See gh-242
2024-03-16 12:55:15 +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
Christian Tzolov
9c19dc1665 Improve Antora documentation layout
- 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.
2024-03-16 11:26:19 +01:00
Christian Tzolov
49a1cc6339 Update Mistral AI function calling docs and layout 2024-03-16 10:53:11 +01:00
Christian Tzolov
933018758c Improve auto-confg condigiton on class to prevent undesired activation 2024-03-15 15:07:57 +01:00
Christian Tzolov
c45352909e Final GH doc action fixes 2024-03-15 14:17:57 +01:00
Christian Tzolov
cf463c8b4c Improve the Deploy docs steps of Docs uplaod GH action 2024-03-15 14:07:21 +01:00
Christian Tzolov
4e3bba7c0f Fix GH documenttation-upload.yml 2024-03-15 14:00:16 +01:00
Christian Tzolov
a8142b7f62 fixing GH document upload action 2024-03-15 13:03:58 +01:00
박준서
0e8b6966a8 modified ImageMessage.java line 45: mage > Image 2024-03-15 12:45:15 +01:00
Christian Tzolov
6638efe285 fix code formatting 2024-03-15 12:27:55 +01:00
Gerrit Meier
7c6bbef3ec Allow more customization for Neo4j store (id and constraint).
Unrelated to this change, the Neo4j test version increased to be current.
2024-03-15 12:26:20 +01:00
mackey0225
152420fcc4 Fix Typos and Grammatical Errors
* 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
2024-03-15 12:23:06 +01:00
Jonny Coddington
ba3e94e37e Fixed typo in 'reference' 2024-03-15 12:07:19 +01:00
pradipkhomane
be7e291860 Fixed typo in Bedrock Titan chat option exception 2024-03-15 12:05:18 +01:00
majm
73f9cb809f Fixed syntax in reference 2024-03-15 12:03:57 +01:00
Liuzh
7d44f14846 Fix typo in model name, fixed #442 2024-03-15 12:02:46 +01:00
Christian Tzolov
255e542cbe CI/CD configuration fixes 2024-03-15 11:59:03 +01:00
Mark Pollack
9e98962aba Add additional ctor for OpenAiEmbeddingClient 2024-03-14 15:56:45 -04: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
Mark Pollack
783d81b7f8 add quotes around command in github action to upload javadocs 2024-03-12 13:40:14 -04:00
Christian Tzolov
7bfe312157 Convinence StreamingChatClient stream default
Add StreamingChatClient stream default that takes String and returns stream of String
2024-03-12 17:44:16 +01:00
Mark Pollack
4fd15b11c5 Add documentation for OpenAI Transcription
Fixes #401
2024-03-12 12:23:25 -04:00
Mark Pollack
ed5eef4b0b fix failing test due to property name change of model->deployment-name in azure 2024-03-12 10:45:14 -04:00
Mark Pollack
1e98f82e03 Change Azure embedding and chat options 'model' property to 'deployment-name'
* 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
2024-03-12 10:26:32 -04:00
Bragolgirith
777b79e1c5 Fix RedisVectorStore not closing Jedis pipelines 2024-03-12 15:15:05 +01:00
Christian Tzolov
4209d5a65d Make consistent sync/stream AssistantMessage properties for OpenAI and Mistral AI 2024-03-12 11:34:56 +01:00
Mark Pollack
7f1570d722 Update javadoc for message package and docs for Gemini Multimodal support 2024-03-11 19:14:53 -04:00
Christian Tzolov
c5d9ae3648 Improve Milvus documentation 2024-03-11 16:07:41 +01:00
Christian Tzolov
0fdc6aa844 Add streaming Function Calling support of OpenAI and Mistral AI
- 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.
2024-03-10 21:01:59 +01:00
Ricken Bazolo
f8f38d6b23 Add MistralAI links to getting started doc 2024-03-09 20:52:08 +01:00
Mark Pollack
634e6d0512 Add Azure Workshop sample app to getting started doc 2024-03-08 16:43:04 -05:00
Mark Pollack
7b89341057 Add shell.log to gitignore 2024-03-08 16:36:54 -05:00
Mark Pollack
8784a59673 Add logging of page processing progress in PagePdfDocumentReader 2024-03-08 16:32:52 -05:00
Christian Tzolov
7f60e03054 Fix Bedrock Anthropic line separator handling on Windows
Resolves an issue where Bedrock Anthropic failed to handle line separators properly on Windows.

  Resolves #404
2024-03-08 18:25:02 +01:00
Yaris van Thiel
680150e9ad Use MessageType.FUNCTION for FunctionMessage 2024-03-08 16:32:20 +01:00
Christian Tzolov
8a336fb6aa Update google could bom from 26.33.0 to 26.34.0
- fix gemini and ollama chat properties documentation.
2024-03-08 15:51:11 +01:00
Christian Tzolov
8a0ad1d328 Disable outdated samples 2024-03-08 15:16:14 +01:00
Christian Tzolov
fef730301c Replace %n by System.lineSeparator() 2024-03-08 15:15:01 +01:00