Commit Graph

63 Commits

Author SHA1 Message Date
Mark Pollack
a107e313fc Fixes #219 - Remove dependency cycles 2024-02-19 12:24:16 -05:00
Christian Tzolov
fdd3fbb2f9 Revert default OpenAI embedding to text-embedding-ada-002 as some vector stores have problems with 3-small 2024-02-16 11:19:34 +01:00
Christian Tzolov
7ef49b8cef Set the default OpenAI Embedding model to text-embedding-3-small
The text-embedding-3-small has the same dimensions as previous text-embedding-ada-002.
  The text-embedding-3-large has higher dimensionality not supported by some Vector Stores.
2024-02-16 10:27:13 +01:00
Gerrit Meier
e62543c761 Use the new vector index creation syntax for Neo4j.
To make the Neo4j module more future-proof, this commit
replaces the old vector index creation syntax with the new style.
Also, the new pattern is in line with the standard Neo4j index creation
and supports the _IF NOT EXISTS_ clause to run idempotent.
This allows us to remove the preceding call to check if the index exists.

As a consequent, the module will require Neo4j to be at least on version 5.15.
2024-02-16 09:40:36 +01:00
Adam Bchouti
36278afdb3 Add Pinecone namespace support for add, search and delete operations 2024-02-14 14:55:21 +01:00
Adam Bchouti
41885a8e62 Enable updating the pinecone vector store namespace 2024-02-14 14:41:09 +01:00
Christian Tzolov
57c66b91d7 Fix a broken test 2024-02-14 09:54:20 +01:00
Gerrit Meier
408337e327 Support filter expressions in Neo4j vector store.
- Move Neo4j filter converters from core to neoj4 vector store project.
 - Update neo4j adoc.

 Resolves #318
2024-02-14 09:23:44 +01:00
Christian Tzolov
f6447f420e Clean obsolate README files 2024-02-14 06:40:35 +01:00
sunshiningsoo
c0a341c300 Remove slash according to api 2024-02-12 16:32:09 +01:00
Gerrit Meier
254b8632cd Allow configuration of vector index name.
At the moment, it is not possible to configure SpringAI
to use an existing index in the database.
This commit enables the user to provide the index name
for auto configuration or builder usage.
2024-02-11 20:35:46 +01:00
Christian Tzolov
0abf1528dd Fix for Redis NPE when using FilterExpression #265
- Part of #265
2024-01-31 11:17:29 +01:00
Christian Tzolov
8f9a1475c1 Re-align the grpc dependecies and exclusions so that Milvus and Pinecone autoconfigurations ITs work 2024-01-26 18:32:55 +01:00
Christian Tzolov
aa8c3856ed Fix Chroma API 0.4.22+ compatiblity issues
- Makes upsert a void metod.
 - Fix affected test.
 - Replac getEmebedding with complex filters test by query Embedding.

 Resolves #224
2024-01-26 12:05:25 +01:00
Christian Tzolov
7262afb14d Capitalize the enumeration names
Resolves #208
2024-01-14 20:36:14 +01:00
Mark Pollack
85e3e0015e Remove client and embedding from package name for ChatClient and EmbeddingClient implementations
Moved up one package level the following classes
* org.springframework.ai.huggingface.client.HuggingfaceChatClient
* org.springframework.ai.openai.client.OpenAiChatClient and org.springframework.ai.openai.embedding.OpenAiEmbeddingClient
* org.springframework.ai.vertex.generation.VertexAiChatClient and org.springframework.ai.vertex.embedding.VertexAiEmbeddingClient

Fixes #211
2024-01-11 12:00:36 -05:00
Mark Pollack
a48a6d9611 Change package name for PostgresML and Transformers
Fixes #133
2024-01-11 10:11:53 -05:00
Giani Segatto
2a604262d8 Use jdbcTemplate.batchUpdate for PgVectorStore add() implementation
- remove unused variable
2024-01-02 13:20:23 -05: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
Omkar Shetkar
dd64a50d2f Merge SimplePersistentVectorStore and InMemoryVector store to be SimpleVectorStore
- Doc updates

Fixes  #146
2023-12-20 15:48:34 -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
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
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
Gerrit Meier
e3a1451f19 Replace Neo4j embedding storing with new function.
The old function got replaced and might get removed in future versions.
To ensure that the store is compatible with Neo4j 5.LATEST, this commit
changes the store function for embeddings to use the 5.13+ function.

The correct baseline database version is already mentioned in the README.
2023-12-13 17:55:59 +01:00
Christian Tzolov
e30be94a56 Replace the theokanning with custom OpenAi API client
- Introducing a new OpenAiApi native client for OpenAI API and get rid of the theokanning library.
   Amongst others the OpenAiApi allows:
    - easy base-url configuration (e.g. TAS-AI)
    - Flux response for streaming OpenAI results.
    - Exposes the http headers containing important metadata
    - Pure Spring ecosystem, making it easier for  Graal VM
 - Define a new  AiStreamClient interface returning Flux<AiResponse>
 - Refactor OpenAiClient and to use the new OpenAiApi and implement the AiStreamClient.
 - Use spring-retry to improve the OpenAI EmbeddingClient stability on 503 error.

 - Remove the OpenAI http header interceptor as the OpenAiApi returns ResponseEntity<T> that provides direct access to the headers.
 - Refactor the metadata headers and usage extraction.
 - Remove redundant and obsolete classes.
 - Fix dependency issue with Pinecone, netty-codec-http2 and Spring Boot 3.2
2023-12-13 15:52:03 +01:00
OğuzhanSarisakaloglu
7aad51da7f Fix typo errors in code and readme file. 2023-12-12 18:40:07 -05:00
Eddú Meléndez
f3614268b7 Fix typo 2023-12-12 15:49:49 -05:00
Christian Tzolov
6d3c429e95 remove the occurances of 'experimenta' in the git urls and docs 2023-12-12 17:48:11 +01:00
Christian Tzolov
75cf8bee8c Fix Milvus dependecy issue due to Boot 3.2 upgrade 2023-12-12 13:39:13 +01:00
Mark Pollack
79a0c97e83 update Java package names in remove 'experimental' 2023-12-11 12:25:02 -05:00
Mark Pollack
8cc941d5ad move to 0.8.0-SNAPSHOT 2023-12-11 11:53:06 -05:00
Mark Pollack
f6dc8f6bd8 Move documentation that was in README.md into Antora.
* Add minimal ETL pipeline docs

Fixes #137
2023-12-05 21:21:06 -05:00
Christian Tzolov
ac9ae589f4 Add NOT operator to VectorStore portable filter expressions
- Add NOT expression type to the portable Filter.Expression model.
 - Add NOT to the Antlr grammar and implement the related parser listener method to generate Filter NOT expressions.
 - Add NOT support to the filter programming DSL.
 - Implement FilterHelper.negation for logically transform any boolean expression with NOT statements into
   semantically equivalent one with NOT applied to the leaf expressions.
 - Add tests for paresers, converters and vectorsores ITs.
 - Move the filter IN/NIN expansion logic to the FilterHelper
 - Factor out the filter IN/NIN boolean expression expansion logic out of Weaviate up to the FilterHelper.
 - add in/nin expantion FilterHelper tests
2023-11-28 18:17:56 -05:00
Christian Tzolov
ad7af600fd improve vector-store docs 2023-11-22 01:10:14 +01:00
Christian Tzolov
b9d2add707 Fix azure store test and redundant code 2023-11-22 01:03:40 +01:00
Christian Tzolov
faee5fef6f Add support for Weaviate Vector Store
- Add Weaviate Vector Store implementation.
 - Implement a converter of portable Filter.Expressions into native, Weaviate GraphQL Were expressions.
 - Support for Weaviater schema auto-registration of filtarable metadata fields.
 - Add auto-configration, spring properties and tests.
 - WeaviateVectorStore ITs.
 - Add README.md

 Resolves #100
2023-11-21 18:16:34 -05:00
Christian Tzolov
332c92a57a Support portable filter expressions with AzureVectorStore 2023-11-21 18:16:34 -05:00
Eddú Meléndez
91374ea1b2 Cleanup tests using testcontainers
* Specify tag images
* Use getHost() instead of hardcoded `localhost`
2023-11-17 13:05:01 -06:00
meyerg
0aa8eb651e Add Azure AI Search Vector Store
- Use Azure AI Search end point to implement the VectorStore interface.
 - Add ITs and README.
 - Create/update vector index on after properties set.
 - Add boot auto-configuration and ITs.
 - Add boot starter for the vector store.

 Resolves: #82
2023-11-16 20:38:23 +01:00
Christian Tzolov
98ca3e2a8f Add Chroma VectorStore support
- Implement ChromaApi client, based on Chroma REST API.
 - Implement ChromaVectorStore, including support for filter expression conversion.
 - Common VectorStoreUtil class to share to/from Float/Double list/array convertion as well as Json/Map convertions.
 - Add ITs including for Basic Auth and Token autheticatios.
 - Add ChromaApi security support for BasicAuth and Token.
 - Fix an issue with Text filter expression parser, related to double-quoted identifiers.
 - Add Chroma README.md.
 - Add Chroma boot autoconfiguration

Resolves# #86
2023-11-15 22:43:36 -05:00
Christian Tzolov
1746bf6b46 Add transformers-embedding boot auto-configuraiton and starter 2023-11-15 12:29:22 +01:00
Christian Tzolov
952ff6c319 Simplify VectorStore interface
- Collapses all VectorStore similiaritySearch methdos into one with SearchRequest builder.
 - Fix all affected code and tests.
 - Bump the project version to 0.7.1.
 - Add tests
 - Add autoconfigurations for milvus, pinecone and pgvecor stores.
 - Improve and unify the VectorStore ITs.
 - Make use of TrasformersEmbeddingClient for auto-configurations ITs.
2023-11-14 15:39:01 -05:00
Gerrit Meier
e5fe8ad33d Add readme for Neo4jVectorStore. 2023-11-09 15:44:45 -05:00
John Blum
0a236993e3 Fix additional grammatical mistakes and revise wording in vectordbs.adoc.
* Clean up README.md files in Milvus, PGvector, and Pinecone modules.
* Apply consistent treatment of 'model' when used as an AI concept, e.g. AI model or Embedding model.
* Apply consistent treatment of 'vector store' and 'vector database' references.
* Simplify sentence structures.

Closes #79
2023-11-08 12:24:20 -08:00
Christian Tzolov
3615667f05 Support for search with metdata filter expressions
- Extend the VectorStore with similaritySearch using metadata filters using internal DSL and external DSL using Antlr
 - Metdata support for Pinecone, Milvus, and pgvector vector stores
 - PGVectorStore uses explict ::jsonpath casting for the pgvector filter expression to avoid injections
 - Add unit tests for the filter converters, parser and DSL.
 - Add ITs for the 3 vector stores

Resolves: #75
2023-11-07 15:47:53 -05:00
Christian Tzolov
be10cc410e vectore store readmes improvements 2023-11-02 10:52:34 +01:00
Christian Tzolov
f4a4de836d Improve pgvector docs 2023-11-02 09:41:28 +01:00
Christian Tzolov
009a24a59b Minor pinecone store readme fixes 2023-11-02 09:01:12 +01:00
Christian Tzolov
81a5eaf801 Add Pinecone VectorStore
- Based on the official pinecone java library.
   Later expects that indices are created externally via Ops.
 - Map Document metadata to and from Pinecone's internal Struct.
   Later converts the metadata into pinecone json format.
 - Add integration tests and README.
2023-11-01 20:33:20 -04:00