Commit Graph

1453 Commits

Author SHA1 Message Date
Mikhail Laptev
1e4973e4ef broken links in OpenAI docs (#530)
- broken links in OpenAI docs
2024-04-02 20:13:07 -04:00
Sagar Bhat
ed68dfb00c Correct grammar for a message to be thrown as part of an exception when the document was not uploaded successfully (part of the 'add' method). 2024-03-27 09:15:08 +01:00
PabloSanchi
6030db1b9e feat: add default model to doc 2024-03-27 08:13:54 +01:00
PabloSanchi
cdf51acceb feat: add default model 2024-03-27 08:13:54 +01:00
PabloSanchi
ab4ff92c3c fix: remove typo 2024-03-27 08:13:54 +01:00
Christian Tzolov
b8c2df5aac Update getting-started.adoc
fix snapshot version
2024-03-26 10:33:36 +01:00
Christian Tzolov
ce1381ba2b Update getting-started.adoc
Fix the snapshot version to 1.0.0-SNAPSHOT
2024-03-26 10:31:25 +01:00
Christian Tzolov
d42cd60eea Fix: AbstractBedrockApi Streaming reusing of Flux Sink
Resolves: #474
2024-03-25 16:10:37 +01:00
Christian Tzolov
34c4703ea0 Allow Retry on choosen status codes (#495)
- Add a new autoconfig property spring.ai.retry.on-http-codes that list status codes (scuh as 429)
   for which the retry should be attemptd.
 - Updated the docs.

 Resolves #433
2024-03-24 22:57:53 -04:00
Christian Tzolov
c66ed36073 Allow Retry on choosen status codes
- Add a new autoconfig property spring.ai.retry.on-http-codes that list status codes (scuh as 429)
   for which the retry should be attemptd.
 - Updated the docs.

 Resolves #433
2024-03-24 15:05:31 +01:00
Christian Tzolov
7a55d66d77 Add Ollama multimodality support
- Requires LLaVa or Bakllava models.
  - Extend the Ollama chat client to support the Spring AI Medi type inputs.
  - Add OllamaChatClientMultimodalIT.java
  - Add Multimodal section in Ollama's docs.

 Resolves #421
2024-03-24 15:03:07 +01:00
Christian Tzolov
dbf0f9e9e1 Fix embedding_only related test 2024-03-24 15:01:46 +01:00
Christian Tzolov
472ac52bc9 Fix a compliation issue and docs related to 23db7cccdf 2024-03-24 14:55:41 +01:00
Thomas Vitale
23db7cccdf Ollama: remove invalid embedding_only option
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2024-03-24 14:43:43 +01:00
David Ko
0a007b4a5c Update openai-chat.adoc - replace withDefaultOptions()
I found the  .withDefaultOptions() is no longer found with new OpenAiChatClient  in the 0.8 snapshot while trying out the sample code.
thank you for the hard work!
2024-03-23 09:11:03 +01:00
Cosmin Ioniță
161a90e48d Fix typo in openai-chat-functions.adoc 2024-03-22 20:00:06 +01:00
youngmon
c757eae8bf Fix TitanChatBedrockApi.java
fix Access modifier

#490
2024-03-22 14:53:50 +01:00
Christian Tzolov
09fb5743d2 Experimental Function Calling tests for AnthropicApi low-level API 2024-03-22 14:34:37 +01:00
Christian Tzolov
50c464fd16 Exlucde, a parasite, lombok dependency 2024-03-22 09:23:35 +01:00
Christian Tzolov
5a44f854e8 Extend the PromptTemplate to support Message media content (#492) 2024-03-21 17:25:15 -04:00
Christian Tzolov
834d2d0487 Add Multi-Modality Support for OpenAI
- Implemented a MediaContent abstraction within the OpenAiApi to handle text and image inputs.
 - Response message content remains a plain String, ensuring backward compatibility.
 - Extended the OpenAiChatClient request creation process to seamlessly map Spring AI Messages with
   Media content to the low-level OpenAiApi MediaContent types.
 - Added integration tests for embedded and URL images, covering both synchronous and streaming calls.
 - Updated the OpenAI class diagram to reflect the new media content types provided by the OpenAI API.
 - Incorporated a chapter on multi-modality within the openai-chat.adoc documentation.
 - Improve the openai multimoality doc
2024-03-21 17:23:49 -04:00
Christian Tzolov
b8f773cc78 Group the Speach and the Transcription docs under commen Audio parent. 2024-03-21 14:36:00 +01:00
Eddú Meléndez
b3f2516b7d Add Elasticsearch vector store auto-configuration
* Add spring-ai-elasticsearch-store-spring-boot-starter
* Register spring-ai-elasticsearch-store-spring-boot-starter in bom

Fixes #475
2024-03-21 13:18:41 +01:00
Sagar
2fbbaa3a6b Update azure-openai-chat.adoc
In v0.8.1, the property spring.ai.azure.openai.chat.options.model does not exist anymore.
I have tried with spring.ai.azure.openai.chat.options.deployment-name and am able to connect to the Azure Open AI service.

Considering spring.ai.azure.openai.chat.options.deployment-name is the correct property name, I have updated the document to reflect this.

I have also removed this statement "In a subsequent release, Spring AI will rename the property spring.ai.azure.openai.chat.options.model to spring.ai.azure.openai.chat.options.deployment-name to avoid confusion." as this has already been renamed. I have added an appropriate note related to this.

@pivotal-cla This is an Obvious Fix.
2024-03-21 13:16:12 +01:00
Ricken Bazolo
b746195c0c Update getting-started doc 2024-03-21 12:06:09 +01:00
Sagar
f41d737f0e Update azure-openai-embeddings.adoc
Corrected the property prefix related to embeddings for Azure Open AI. The prefix had 'embeddings' in plural.
The actual prefix is spring.ai.azure.openai.embedding
2024-03-21 11:16:19 +01:00
Ricken Bazolo
8510f00520 Fix OpenAiApi tool_choice value and refactor MistralAi class 2024-03-21 11:12:19 +01:00
ahmed
766b420f98 Added support for OpenAI Text to Audio (Speech API )
* Added documentation
2024-03-20 13:03:04 -04:00
Christian Tzolov
6ba897ef76 Fix additional git case ignore issues 2024-03-20 15:57:09 +01:00
Christian Tzolov
369d945543 Fix git case ignore issue 2024-03-20 15:43:46 +01:00
Pablo Sanchidrian
52d15f5dc1 Add Watsox.AI Chat Client integration
- feat: setup watsonx ai api
 - feat: add watsonx ai model options
 - feat: setup watsonx chat client
 - feat: add watsonx records/models
 - add watsonx-ai module to pom
 - add watsonx-ai module to bom
 - feat: add connection properties watsonx
 - feat: add  WatsonxAiAutoConfiguration with api client
 - feat: add starter watsonx.ai
 - feat: add generate method in watsonx ai api
 - feat: add watsonx ai api streaming generation method
 - feat: add watsonx message to prompt converter util
 - feat: implement call and stream mehtod
 - feat: add watsonx ai runtime hints
 - fix: filter null fields
 - feat: watsonx options tests
 - feat: add test dependencies
 - feat: add runtime hints tests
 - feat: add watsonx client tests
 - fix: apply linter
 - feat: add tests for message to prompt converter
 - feat: add signature
 - fix: change deprecated IamAuthenticator
 - fix: do not keep baseUrl in a class variable
 - fix: webClient request
 - feat: add default base url to autoconfigure
 - feat: add watsonx ai integration docs
 - fix: model options json
 - feat: add watsonx-ai spring boot starter
 - feat: enable watsonx api on watsonx chat client
 - fix: remove condition
 - feat: add watsonx autoconfigure import
 - feat: add watsonx module resource aot import
 - feat: add pom for watsonx ai module

 Additional pre-merge adjustments:

 - Rename all WatsonxAIXxx classes to WatsonxAiXxx.
 - Rename WatsonxChatClient to WatsonxAiChatClient.
 - Move WatsonxAiChatOptions out of the API.
 - Implement a Builder for WatsonxAiChatOptions (replace the inline withXxx code).
 - Add a WatsonxAiChatOptions field to WatsonxAiChatClient as default options.
   Later, it is also set by the auto-configuration properties.
 - Implement merging logic for default vs runtime options in WatsonxAiChatClient.
 - In Auto-config, add WatsonxAiChatProperties with enabled and options fields.
   Options are passed to the client.
 - Update the adoc to include the .chat.options properties.
 - Add the watsonxai doc to the nav.adoc.
 - Fix license headers and javadocs.
 - Move dependency versioning to the parent POM.
2024-03-20 15:18:48 +01:00
Jemin Huh
9334d7d540 Add Elasticsearch vector store integration
- Implement ElasticsearchVectoSotore and IT.
 - Add ElasticsearchAiSearchFilterExpressionConverter.
 - Add dependency to BOM and module to parent pom.
 - Fix ElasticsearchVectorStoreIT FilterExpression with
   Date type requires the use of epoch milliseconds.
 - Add license formatting.
2024-03-20 07:41:05 +01:00
Christian Tzolov
8e50802eb8 Fix javadoc 2024-03-19 16:11:14 +01:00
Ben Middleton
e004751842 Add Bedrock Anthropic Claude 3 models support
- Created low-leverl anthropic messages API for Claude 3.
   Use the new message API.
 - Add Chat Client with tests.
 - Add bedrok anthropic 3 docs.
 - Add multibudality support + tests.
 - Add auto-configuraiton & tests.
 - Rename Athropic to Athropic3 in class names to avoid confusion with previous Bedrock Anthropic 2 impl.
2024-03-19 12:29:50 +01:00
geetrawat
7634c6b780 Add Gemfire vector store
- Implement a GemFireVectorStore implementing the VectorStore interface.
 - Add unit and integration test.
 - Add antora documentation.
 - Add to BOM.
2024-03-19 07:41:17 +01:00
Christian Tzolov
f20b76d6a7 Update README.md
add jurrasic2 and anthropic claude 3 to readme.
2024-03-19 07:27:10 +01:00
zhangqian
5925dd7b33 Update TextReader.java (#415)
Remove invalid code
2024-03-19 00:49:49 -04:00
YuLuo
08fdf28692 fix: fix comment style error (#462) 2024-03-19 00:47:49 -04:00
Jakub Kaźmierczak
19f5665522 Update the list of supported AI models in the main README.MD (#464) 2024-03-19 00:47:10 -04:00
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