Commit Graph

1453 Commits

Author SHA1 Message Date
John Blum
820eb5f0ab Refine delineation of Embedding properties from OpenAI (client) properties.
Though the property names are different, for example 'spring.ai.openai.api-key' and 'spring.ai.openai.embedding-api-key,
by introducing an additional property namespace, 'spring.ai.openai.embedding.*', this enables the configuration of embeddings
to be properly encapsulated and related in Spring Boot fashion.

Closes #102
2023-11-16 15:51:15 -05:00
John Blum
409fa1521d Refine OpenAI and Microsoft Azure AiClient implementations.
* Apply consistent treatment to the organization of the source code.
* Fix Logger statements missing message placeholder formatting.
* Simplify logic using Java 17 syntax where applicable.

Closes #101
2023-11-16 15:25:31 -05: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
621aa7d53e Switch to BOM djl dependecies in the transformer-embedding 2023-11-16 16:14:48 +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
KathrynBrusewitz
837c4080aa Make filter expression builder Op public 2023-11-15 19:35:49 +01:00
Christian Tzolov
3ea938c4e1 Transformers-embedding client - align tokenizer with onnx's model inputs 2023-11-15 15:18:22 +01:00
Christian Tzolov
ac2a0cd8e9 Fix auto-configurations missing form the import list 2023-11-15 12:54:13 +01: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
Christian Tzolov
e0a9d4a8fe Update README.md
add java dependency to doc
2023-11-10 19:02:55 +01:00
Christian Tzolov
0a584f0dc2 Transformers embedding Readme clarifications 2023-11-10 08:05:47 +01:00
Christian Tzolov
e423c3f127 Improve transformers embedding readme 2023-11-10 00:22:14 +01:00
Gerrit Meier
e5fe8ad33d Add readme for Neo4jVectorStore. 2023-11-09 15:44:45 -05:00
Mark Pollack
49656a036f Add link to research paper on effective prompts 2023-11-09 15:43:57 -05:00
Jay Bryant
04d9683f49 Editing pass for clarity, grammar, spelling, punctuation, and usage.
Also added several anchors and links.
2023-11-09 15:40:16 -05:00
John Blum
78f6c8c6e8 Fix anchor to 'Workshop' section in project README. (#85)
Improve formatting around video references.

Closes #85
2023-11-09 15:35:57 -05:00
Mark Pollack
1666cf0845 Allow for up to 3 retries when running an integration test 2023-11-09 15:18:47 -05:00
Mark Pollack
73eae56e65 Add test support for AI programming 2023-11-09 12:21:44 +01: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
Mark Pollack
37e53900ac fix failing test 2023-11-07 21:13:13 -05:00
Mark Pollack
57fae37dec ignore failing test... for now! 2023-11-07 21:07:25 -05:00
Mark Pollack
651a998e11 add some additional educational resources 2023-11-07 21:03:41 -05:00
Mark Pollack
d514f28cd4 update vector store docs 2023-11-07 17:05:14 -05: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
Mark Pollack
bc12d4364c add reference docs for AiClient 2023-11-04 13:58:27 -04:00
Mark Pollack
6d956a6f37 Add initial support for Hugging Face Inference Endpoints
- Add maven config to attach swagger generate code to vscode java classpath.
 - Add license headers.
 - Streamline the test.
2023-11-03 18:45:34 +01:00
John Blum
a97976e434 Clean up grammatical errors and misspellings in the reference documentation. (#77)
* Fixes misspelling in concepts.adco, 'Prompts' section.
* Uses plural form of AI Models in aiclient.adoc.
* Fixes several grammatical mistakes in vectordbs.adoc.
2023-11-03 09:46:39 -04: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
Christian Tzolov
001ee990b3 Suppress pdfbox excessive logging 2023-10-31 14:21:50 +01:00
Toshiaki Maki
6aecf03059 Exclude commons-logging
that conflicts spring-jcl
2023-10-31 13:54:00 +01:00
Christian Tzolov
a53e3e9f6f Fix transformers embedding client default model uris 2023-10-31 12:29:43 +01:00
Christian Tzolov
6030cda598 Add local, Transformers EmbeddingClient
- EmbeddingClient implementation that computes, locally, sentence embeddings with SBERT transformers.
 - Uses pre-trained transformer models, serialized into Open Neural Network Exchange (ONNX) format.
 - Deep Java Library and the Microsoft ONNX Java Runtime are used to run
   the ONNX models and compute the embeddings efficiently.
 - Add default tokenizer.json and model.onnx for sentence-transformers/all-MiniLM-L6-v2.
 - Add, configurable resource caching service to allow caching
   remote (http/https) resources to the local FS.
 - README.md provides information on how to serialize ONNX models.
 - add Git LFS configuration for large onnx model files.
2023-10-31 12:24:22 +01:00
imoyb
e68bdeb9a0 Add OllamaClient implementation of AiClient 2023-10-30 18:08:38 -04:00
Sebastian Ullrich
c15663137c Add test for BeanOutputParser and support for JacksonAnnotations
Fixes #53
2023-10-30 16:50:58 -04:00
Christian Tzolov
f9ca032cb3 Apache Tika based reader for all kinds of documents
- Provides a rudimentary text extractions for multitude of document formats,
   including PDF, Word Doc/Docx PowerPoint ppt/pptx and many more.
 - Generates a single Document for the extracted text.
 - No pre or post processing and cleansing for the text.
 - Move the ExtractedTextFormatter from pdf reader to the core reader to enable reusability. Improve the tika reader
2023-10-30 16:33:26 -04:00
DOP
81e7aded94 add "List<Double>" right bracket
add "List<Double>" right bracket :
before:   List<Double   
after :     List<Double>
2023-10-30 16:55:02 +01:00
Toshiaki Maki
72dfc1b50d Fix wrong description in PdfDocumentReaderConfig javadoc (#62) 2023-10-30 16:09:46 +01:00
Mark Pollack
d824ff839d remove sections of API docs that are not yet relevant 2023-10-26 13:30:43 -04:00
Christian Tzolov
8f1826aef6 Allow the openai embedding client to use different model, key and url from the completion one 2023-10-19 16:25:41 +02:00
Christian Tzolov
90117fe504 Move the version properties from the children to the parent POM 2023-10-18 16:50:31 +02:00
Christian Tzolov
3aaa357e78 Bump open-ai-client.version from 0.12.0 to 0.16.0 2023-10-18 16:35:45 +02:00
Christian Tzolov
e5693f7e60 Convert the PdfTestUtils into a generic FileDocumentWriter 2023-10-17 11:56:29 +02:00
Christian Tzolov
1266c04b6d Add PDF Document Readers
- Add a set of PDF readers fro per-page (PagePdfDocumentReader) and per-paragraph (ParagraphPdfDocumentReader) readers.
  - Use a PDFLayoutTextStripper fork and PDFLayoutTextStripperByArea extension to preserve the structure of the extracted document.
  - PdfDocumentReaderConfig and PageExtractedTextFormatter in standalone classes.
  - Craeate a new document-readers top level model and the pdf-reader under.
2023-10-16 09:45:15 -04:00
Christian Tzolov
f74bec3662 MilvusVectorStore - reduce the SmartLifeCycle to InitializingBean 2023-10-10 08:54:03 +02:00
Christian Tzolov
f2dfe2b7df PgVectorStore - reduce the SmartLifeCycle to InitializingBean
As the LifeCycle#start() occures later in time than the InitializingBean#afterPropertySet()
  it could cose some initialization issues with the vector clients.
2023-10-10 08:41:47 +02:00
Mark Pollack
ed89e5fd9a fix docs build 2023-10-06 08:25:33 +02:00