Commit Graph

233 Commits

Author SHA1 Message Date
Christian Tzolov
b8ca0bb876 doc: Improve Pinecone layout 2024-04-12 11:05:02 +02:00
Christian Tzolov
6c07c4cf8f doc:improve pgvector layout 2024-04-12 10:41:43 +02:00
Philipp Zehnder
d4f866ed3a Update documentation for azure open ai chat 2024-04-12 08:58:44 +02:00
omar.mahamid
bc7460b540 Update contribution-guidelines.adoc
fix broken link
2024-04-12 08:57:31 +02:00
Christian Tzolov
a0e20016a7 doc: Improve Chroma documentation 2024-04-12 08:56:13 +02:00
Christian Tzolov
c7512a00a7 Redis store: add default index and prefix values for auto-conf 2024-04-12 08:14:59 +02:00
Christian Tzolov
b82dd98985 doc: Fix Redis metdata section 2024-04-11 23:26:37 +02:00
Christian Tzolov
154fc1fb57 doc: Improve Redis Vector Store documentation 2024-04-11 23:18:58 +02:00
Christian Tzolov
abd9e327aa Add s.ai.openai.embedding.options.dimensions documentation 2024-04-11 14:42:40 +02:00
dperezcabrera
c26bc55713 Refactor filter expression for clarity and accuracy
The filter expression within the document handling logic has been updated to enhance clarity and ensure accurate author filtering. Previously, the `in` function mistakenly included names as direct arguments, potentially leading to ambiguity in filter application. This has been corrected by explicitly specifying the `author` field, ensuring the filter accurately applies to author names only. This change improves the maintainability and readability of the code, particularly in sections dealing with article filtering based on authorship and type.

- Correct the filter expression by explicitly specifying the `author` field.
- Ensure accurate and unambiguous author filtering in article management.
2024-04-11 10:20:32 +02:00
Christian Tzolov
754dab9e50 Add minimal (placeholder) MongoDB Atlas Vector Serach docs. 2024-04-10 17:56:39 +02:00
mck
656d238285 Implement Apache Cassandra vector store
The CassandraVectorStore is for managing and querying vector data in an Apache Cassandra db.
  It offers functionalities like adding, deleting, and performing similarity searches on documents.

  The store utilizes CQL to index and search vector data. It allows for custom metadata fields in
  the documents to be stored alongside the vector and content data.

  This class requires a CassandraVectorStoreConfig configuration object for initialization, which
  includes settings like connection details, index name, field names, etc. It also requires an
  EmbeddingClient to convert documents into embeddings before storing them.

  A schema matching the configuration is automatically created if it doesn't exist. Missing columns
  and indexes in existing tables will also be automatically created. Disable this with the disallowSchemaCreation.

  This class is designed to work with brand new tables that it creates for you, or on top of existing
  Cassandra tables. The latter is appropriate when wanting to keep data in place, creating embeddings
  next to it, and performing vector similarity searches in-situ.

  Instances of this class are not dynamic against server-side schema changes. If you change the schema
  server-side you need a new CassandraVectorStore instance.

 - Add auto-configure with tests.
 - reformat code style
 - Change field terminology to column (as appropriate for cassandra and cql)
 - Add doc page with an advanced example.
 - Add the dependencies to Spring AI BOM
 – add to `AutoConfiguration.imports`

 - Add @since annotation
 - Fix javadoc issue
 - Streamline the adoc content and layout
2024-04-10 16:51:47 +02:00
David Pérez Cabrera
fef1a42d20 Refactor filter expression for clarity and accuracy
The filter expression within the document handling logic has been updated to enhance clarity and ensure accurate author filtering. Previously, the `in` function mistakenly included names as direct arguments, potentially leading to ambiguity in filter application. This has been corrected by explicitly specifying the `author` field, ensuring the filter accurately applies to author names only. This change improves the maintainability and readability of the code, particularly in sections dealing with article filtering based on authorship and type.

- Correct the filter expression by explicitly specifying the `author` field.
- Ensure accurate and unambiguous author filtering in article management.
2024-04-10 13:13:01 +02:00
Christian Tzolov
ae9d3f4168 Updgrade Vertex AI Gemini to 26.37.0
- Adjust to the new, breaking, API changes.
   - Update the docs adding the transport endpoint and scopes to the connection properties.
2024-04-10 09:09:58 +02:00
Rahul
466b824840 Add SAP HanaDB vector store integration
- Implement a HanaCloudVectorStore and tests
 - Implement Autoconfiguraiton + properties
 - Add boot starter
 - Update BOM with vector store and boot dependencies.
 - Add antora docuementation
 - added junit for HanaCloudVectorStoreProperties.java and documentation
   to create a BTP trial account and provision an instance for SAP Hana Cloud db
 - updated license, formatting and javadoc
 - IT for HanaCloudVectorStoreAutoConfiguration
 - IT for HanaCloudVectorStoreAutoConfiguration

Additional
 - add @AutoConfiguration(after = { JpaRepositoriesAutoConfiguration.class })
 - update the handa docs structure.
2024-04-09 12:36:42 +02:00
sinsy
5c3ed1152a Add support of Bedrock API timeout
Configure the amount of time to allow the client to complete the execution of an API call.
 This timeout covers the entire client execution except for marshalling. This includes request handler execution,
 all HTTP requests including retries, unmarshalling, etc. This value should always be positive, if present.

  - Add timeout filed to the AbstractBedrockApi, used to initialize the BedrockRuntimeClient and the
    BedrockStreamingRuntimeClient. Update all classes that extend the AbstractBedrockApi.
  - Keep the previous constructors for backward compatibility using timeout value of 5 min.
  - Add a common AWS connection timeout auto-config property and update the documentation.
    Defaults to 5 min.

 Additional changes:
  - Fix Anthropic 3 straming response - add bedrock metrics field.
  - Increate the default timeout to 5 min. Update the docs.
  - Increase the ITs.
2024-04-09 10:28:17 +02:00
Jabez Brew
dd5757cd8c Update ollama-chat.adoc
Fix typo in API class name: OpenAiApi -> OllamaApi

This commit fixes a typo in the API class name mentioned in the documentation. The previous sentence "Low-level OpenAiApi Client" now correctly reads "Low-level OllamaApi Client."
2024-04-08 22:46:18 +02:00
Christian Tzolov
70e57a7e27 doc: Update Anthropic 3 class diagram 2024-04-08 08:53:56 +02:00
Christian Tzolov
f88d36de2e Fix anthropic func doc indentation 2024-04-08 08:43:25 +02:00
Christian Tzolov
f249e64651 Add Function Calling Support for Anthropic Features
- expanded the AnthropicApi to include Tool, facilitating request and response abstractions.
 - extended AnthropicChatClient to inherit AbstractFunctionCallSupport, with
   implementation of all necessary methods and function registration protocols.
 - implemented FunctionCallingOptions interface in AnthropicChatOptions.
 - added tools integration tests for AnthropoicApi and AnthropicChatClient.
 - extended the auto-configuration with functional calling functionality.
 - added ITs for tools auto-config.
 - updated documentation on anthropic function calling and relevant pages for comprehensive coverage.
2024-04-07 22:10:35 -04:00
Thomas Vitale
ea849d9075 Ollama: Remove unused option in chat completion
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2024-04-07 15:17:56 +02:00
Christian Tzolov
4539a41423 docs: update Ollama diagram 2024-04-06 12:49:24 +02:00
Christian Tzolov
2b8c9923eb Add docs for Ollama's template request parameter 2024-04-06 12:28:10 +02:00
Peter Keeler
aca8ffd400 Support keep-alive and format options in Ollama chat requests
- add support for the advanced parameter 'template'.
 - add docs for the advanced parameters.
2024-04-06 11:44:52 +02:00
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