Commit Graph

201 Commits

Author SHA1 Message Date
messo
9236913696 Fixed typo in ollama-chat.adoc (#522) 2024-04-02 20:13:44 -04:00
Mikhail Laptev
1e4973e4ef broken links in OpenAI docs (#530)
- broken links in OpenAI docs
2024-04-02 20:13:07 -04:00
PabloSanchi
6030db1b9e feat: add default model to doc 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
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
472ac52bc9 Fix a compliation issue and docs related to 23db7cccdf 2024-03-24 14:55:41 +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
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
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
ahmed
766b420f98 Added support for OpenAI Text to Audio (Speech API )
* Added documentation
2024-03-20 13:03:04 -04: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
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
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
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
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
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
Liuzh
7d44f14846 Fix typo in model name, fixed #442 2024-03-15 12:02:46 +01:00
Mark Pollack
4fd15b11c5 Add documentation for OpenAI Transcription
Fixes #401
2024-03-12 12:23:25 -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
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
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
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
af957b9e9b Add ETL pipeline diagrams
Also update the embeding and chat api diagrams
2024-03-08 11:37:34 +01:00
Christian Tzolov
e535c0e4f1 Adjust the retry properties names and documentation 2024-03-08 07:08:30 +01:00
Christian Tzolov
1e3eaec7b9 Refactor and centralize Retry logic:
- 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.
2024-03-07 11:27:01 -05:00
Jiafu Tang
3a59587357 fix openapi-chat description in upgrade-notes 2024-03-03 11:47:32 +01:00
Christian Tzolov
cbb59ce616 Improve readability of the PgVector Store code
Related to #461
2024-03-03 08:54:21 +01:00
Christian Tzolov
811d048965 Clarify the PGVector store documenatation 2024-03-03 01:40:54 +01:00
Christian Tzolov
5b96965200 Update mistralai-chat.adoc
Mistral-ai: fix chat doc broken links
2024-03-02 11:53:38 +01:00
Ricken Bazolo
5206b85f13 update mistralai-chat doc 2024-03-02 11:36:40 +01:00
Christian Tzolov
50547188f7 Rename legacy Vertex AI into Vertx AI PaLM2 classes 2024-03-01 14:51:02 +01:00
Christian Tzolov
aa55a96c95 Docs: add Mistral AI Function Calling doc 2024-03-01 12:34:06 +01:00
Ricken Bazolo
31d6194d9d Add mistralai support documentations
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.
2024-03-01 11:28:45 +01:00
Christian Tzolov
a8110bb3da Qdrant improvements
- Update docs
 - Allow colleciton auto-creation if missing
 - Add cloud IT : QdrantVectorStoreCloudAutoConfigurationIT
 - Add auto-configuration properties tests: PgVectorStorePropertiesTests
2024-02-29 09:27:19 +01:00
Christian Tzolov
41a256cb60 Simplify the doc catalog. Add 0.8.1 update notes 2024-02-28 21:41:34 +01:00
Anush008
ea0b439dac Implement Qdrant vector store
- Implement QdrantVectorStore.
   Uses a custom parser for converting Spring AI metadata(Map<String, Object>) to Qdrant GRPC payload.
 - Implement Qdrant Expression Filter support.
   Uses a custom parser for converting Spring AI filters to Qdrant-compatible GRPC filters.
 - Add ITs using testcontainers.
 - Add antora docs adrant.adoc.
 - Add Qdrant vector store auto-configuraton and boot starter.

Additional (review) change:

 - Fix poms parent to 0.8.1-SNAPSHOT.
 - Rename ObjectFactory into QdrantObjectFactor.
 - Rename ValueFactory into QdrantValueFactory.
 - Move the org.springframework.ai.vectorstore package into org.springframework.ai.vectorstore.qdrant.
 - Add missing Autoconfigure definition.
 - Add missing license and JavaDocs.
 - Minor code style improvmentes.
 - Move the qdrant version to the main pom
 - Add QdrantVectorStoreAutoConfigurationIT
 - Remove guava dependency
 - Improve gdrant.adoc conent and structure.
 - Remove the grpc-protobuf dependency

Resolves #331
2024-02-28 19:31:54 +01:00
Christian Tzolov
e1462b86e3 Fix Vertex AI PaLM2 Boot Starter name typo
Rename spring-ai-vertex-ai-plam2-spring-boot-starter into spring-ai-vertex-ai-palm2-spring-boot-starter
2024-02-28 18:05:32 +01:00