Commit Graph

1453 Commits

Author SHA1 Message Date
Mark Pollack
dfe4107cca Add some ChatClient impl docs to the TOC 2024-01-10 17:29:10 -05:00
Mark Pollack
5e9e4dd233 Allow PromptTemplate keys to be set multiple times
Fixes #97
2024-01-10 11:52:19 -05:00
Omkar Shetkar
0b87df07e5 Fix Bedrock chat model enum names consistency
- doc update
 - fix code formatting

 Resolves #231
2024-01-09 12:36:17 +01:00
Christian Tzolov
2f89124350 minor README fix 2024-01-09 10:10:39 +01:00
Mark Pollack
99d391b10e Add more documentation for ChatClient implementations
* OpenAI
* Azure OpenAI
* Bedrock
* Bedrock Anthropic Claude
* Bedrock Meta Llama2
* Ollama
2024-01-07 15:51:29 -05:00
Caio Vaz
d3d1736f5c Update README.md (#205)
I was unable to download Artifactory 0.7.1 without the "experimental" option due to a typo.
2024-01-02 13:24:02 -05:00
Giani Segatto
2a604262d8 Use jdbcTemplate.batchUpdate for PgVectorStore add() implementation
- remove unused variable
2024-01-02 13:20:23 -05:00
mithunsinghtocode
a892ea961f Update redis.adoc (#201)
* Update redis.adoc

- dependency for redis is not correct.
- updated typo
2024-01-02 13:00:50 -05:00
Omkar Shetkar
9c807983ef - Doc update for breaking changes (#199) 2024-01-02 12:48:53 -05:00
Siddharth Shankar Paul
e34543ecd5 fix: copy embedding dimension (#195) 2024-01-02 12:48:17 -05:00
Christian Tzolov
0ccf327806 Refactor Azure OpenAi
- Clean the AzureOpenAiChatClient and add support  for StreamingChatClient.
 - Streamline the AzureOpenAiEmbeddingClient.
 - Move the AzureOpenAiChatClient and AzureOpenAiEmbeddingClient to top org.sf.ai.azure.opoenai package.
 - Add ITs for AzureOpenAiChatClient and AzureOpenAiEmbeddingClient
 - Fix the AzureOpenAiAutoConfiguration
   - Split property file into AzureOpienAiConnectionProperties, AzureOpenAiChatProperties
     and AzureOpenAiEmbeddingProperties.
   - Add ITs for the auto-configuration
 - Add improve package structure
 - Add README docs
 - fix failing test
 - update to use Azure Deployment for CI
2024-01-02 12:18:20 -05:00
Larry Diamond
23e5c9ff78 Issue 196 Merge Chevrons in README md 2023-12-26 14:32:37 +01:00
Sohardh Chobera
5ba78c2fea Adds Spring boot starter for Neo4j Store 2023-12-24 09:51:15 +01:00
Christian Tzolov
d7693f1ec4 Add Neo4j auto-configuraiton to the org.sf.boot.autoconfigure.AutoConfiguraiton.imports 2023-12-24 09:18:51 +01:00
oujingzhou
b625ab1c15 Add Spring Boot auto-configuration for Neo4j vector store
- resolve Neo4j auto-configuraion property expossing external API.
 - move neo4j auto-conf under the vectorstore parent package.
2023-12-24 09:11:52 +01:00
Christian Tzolov
8282ae2b74 Remove IDE medata 2023-12-23 15:21:57 +01:00
Christian Tzolov
472fadda61 Update the VecotorStore pom versions
- update boot to 3.2.1
  - update vector-stores: postgresql (42.7.1) , pgvecgor (0.1.4), pinecone (0.7.1)
    azure-search (11.6.1), weaviate (4.5.0)
  - clean the  auto-configuraito properties
  - resolve Milvus auto-conf property expossing external API.
2023-12-23 14:45:54 +01:00
Mark Pollack
b73a9ea6f9 fix prefix in configuration properties for hugging face 2023-12-22 09:02:36 -05:00
Christian Tzolov
c8de949123 update azure-openai do beta6 and resolve the compatibility issues 2023-12-22 11:55:38 +01:00
Christian Tzolov
aebfd719a7 Remove the obsolate okhttp and the related interceptor
The OpenAiApi, returns the HTTP headers that can be intropsect for metadata
 with the help of OpenAiResponseHeaderExtractor.
 No need for http interception nor for joining by ID.
2023-12-22 08:49:20 +01:00
Christian Tzolov
6cec33b4bd update the ollama chat api diagram 2023-12-21 15:41:03 +01:00
Christian Tzolov
218ef38e1f remove neo4j boot starter pom module 2023-12-21 15:08:32 +01:00
Christian Tzolov
d5234dd9e1 remove neo4j boot starter as there is NO neo4j auto-configuration 2023-12-21 15:03:52 +01:00
Christian Tzolov
98281ad1ef Rename AiClient/AiStreamingClient name prefixes to ChatClient/StreamingClient
- fix all class names with AiClient or AiStreamingClient name prefixes.
  - fix all variables or method name prefixes.
  - fix the javadocs, readmes and refference documentation.
2023-12-21 14:54:14 +01:00
Christian Tzolov
b49e84f5e2 fix javadoc issue 2023-12-21 14:22:48 +01:00
Christian Tzolov
8d112e30d8 Add flexible Ollama Options handling
Add OllamOptions that can be used as a builder (withX) and spring propererites (e.g. getX/setX).
 - prvides strongly typed properties.
 - the 'OllamaOptsion#toMap()' converts the options into Map<String, Object>.
 - Add OllamaEmbeddingAutoConfiguraiton#options property of type OllamaOptions.
 - Add OllamaChatAutoConfiguraiton#options property of type OllamaOptions.
 - Factor out the baseUrl property into a standalone OllamConnectionProperties shared
   between the Chat and Embedding autoconfigurations.
 - Fix affected unit/IT tests.
2023-12-21 13:46:11 +01:00
Mark Pollack
0657e1bab5 Set writelimit of default BodyContentHandler to unlimited in TikaDocumentReader 2023-12-20 16:13:00 -05:00
Omkar Shetkar
dd64a50d2f Merge SimplePersistentVectorStore and InMemoryVector store to be SimpleVectorStore
- Doc updates

Fixes  #146
2023-12-20 15:48:34 -05:00
Christian Tzolov
9ab857a8ab Add full support for Ollama AI models
- Implement a native client (OllamaApi) to leverage chat/streaming and embedding endpoints.
 - Add a OllamaChatClient implementing the ChatClinet and StreamingChatClinet interfaces.
 - Add a OllamaEmbedding clinent that impl. the EmbeddingClinet interface.
 - Add AutoConfiguraitons with properties for the chat and the embedding clients.
 - Add unit and ITs for the OllamaApi, OllamaChatClient, OllamaEmbeddingClient, and related auto-configuraitons.
 - Remove the old ollama impl. classes and tests.
 - minor fixes to the bedrok test methods names.
2023-12-20 14:11:17 -05:00
Mark Pollack
1a8fcac206 fix failing tests due to directory structure changes 2023-12-19 12:46:43 -05:00
Mark Pollack
82fe510b39 Moved Maven modules from top level directory and embedding-clients subdirectory to all be under a single models directory.
Rename artifact ID of

* `transformers-embedding` to `spring-ai-transformers`
2023-12-19 12:22:02 -05:00
Mark Pollack
017d2a9bfc Renaming of AiClient and related classes and packagenames
* Rename AiClient to ChatClient
* Rename AiResponse to ChatResponse
* Rename AiStreamClient to StreamingChatClient
* Rename package org.sf.ai.client to org.sf.ai.chat
* Update readme to indicate breaking changes
2023-12-19 12:00:38 -05:00
Christian Tzolov
200be26d2e Fix incorrect AutoConfiguration.impors 2023-12-19 17:44:59 +01:00
Christian Tzolov
b5224747bc Bedrock: add missing auto-config definitions for Titan and Anthropic 2023-12-19 17:38:03 +01:00
Christian Tzolov
7c8117a723 Bedrock: fix spring.ai.bedrock.aws.* refernces in the READMEs 2023-12-19 14:32:44 +01:00
Jemin Huh
b54bb8bc8a OpenAi clien improvments
- OpenAiApi's ObjectMapper is configured to DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES = false
 - Use Java Predicate for the SSE_DONE condition used by the takeUntil and filter for the Flux stream.
 - Add retryTemplate to OpenAI Chat Client. Make OpenAiApi toleratant to uknown response fields.
2023-12-19 13:35:32 +01:00
Christian Tzolov
e732018219 minor doc improvment 2023-12-19 13:06:21 +01:00
Christian Tzolov
fc6be6fe04 Update README_JURASSIC2_CHAT.md 2023-12-19 13:01:34 +01:00
Christian Tzolov
26b1ccdc57 Bedrock: Add Titan Chat support 2023-12-19 12:58:37 +01:00
Christian Tzolov
3b91c51295 Fix broken test 2023-12-19 10:52:35 +01:00
Christian Tzolov
88869f10fa Bedrock add Titan Embedding support. Minor doc and test improvments 2023-12-19 10:48:57 +01:00
Christian Tzolov
0e3192a8df Add AWS Bedrock AI support
- Add spring-ai-bedrock project with support for Cohere, Llama2, Ai21 Jurassic 2, Titan and Anthropic LLM models.
 - Add native API clients for CohereChat CohereEmbedding , Llama2Chat, JurassicChat, TitanChat and TitanEmbedding models, supporting both single shot and streaming completions (for the models that allows it)
 - Add ITs tests for the native API clients.
 - Implement Chat (AiClient) and ChatStreaming (AiStreamingClient) and EmbeddingClients (according to the models’ support for those) for Cohere, Llama2, and Anthropica. Titan and Jurassic2 are WIP.
 - Add ITs for the ChatClient, ChatStreamingClient and EmbeddingClient implementations.
 - Add Spring Boot Auto-configurations with flexible properties for the Llama2, Anthropic and Cohere modes + ITs
 - Add Spring Boot Starter configurations for all Bedrock models.
 - Add README documentations for all models.
 - Add BedrockAi APIs AOT hints
 - Add Ai21Jurassic2ChatBedrockApi, TitanEmbeddingBedrockApi, TitanChatBedrockApi
 - Add TitanChatBedrockApi

Resolves #66
2023-12-18 18:16:43 -05:00
Sohardh Chobera
5b46361373 Adds Spring boot starter for Neo4j Store 2023-12-18 12:39:23 -05:00
Jinyeong Seol
9bd9635674 Refactor toString() method in Embedding class (#173) 2023-12-18 12:36:15 -05:00
jtsnr
54f749f650 Fix Prompts documentation typos (#169)
* Fix Roles documentation

* Fix Example Usage typos
2023-12-18 12:35:27 -05:00
jruaux
a232166cf3 Add support for Redis vector store
- Added autoconfiguration for Redis vector store
- Added spring boot starter for Redis vector store
- Supports portable metadata filter expressions

Fixes #11
2023-12-18 11:50:03 -05:00
Christian Tzolov
55d748b86e Improve VertexAiApi null response handling 2023-12-18 14:38:29 +01:00
Christian Tzolov
908e292987 Add LogProbs field to OpenAI chat/chunk reponses 2023-12-18 14:31:55 +01:00
Josh Long
95cbe54bae vertex ai aot hints, plus a fix to localize the dependency on spring webflux 2023-12-18 08:26:08 +01:00
Christian Tzolov
c62fee3635 Fix OpenAiApi changes and VertexAiIT 2023-12-18 07:54:35 +01:00