Commit Graph

1453 Commits

Author SHA1 Message Date
Eddú Meléndez
299cc09ab4 Cleanup starters
starters do not provide spring-boot-starter-test
2023-12-16 10:28:38 +01:00
Mark Pollack
0bdb8b9590 add @author tag 2023-12-14 17:10:30 -05:00
Mark Pollack
ce806855a6 Add native hints for openai 2023-12-14 16:55:31 -05:00
Mark Pollack
32e2a22bfb native hints for pdfbox reader and embeddings support. Fixes #161 2023-12-14 13:29:32 -05:00
Mark Pollack
72af42d0d8 remove extraneous logback.xml file. Fixes #159 2023-12-14 11:08:41 -05:00
Christian Tzolov
1f3aedac06 Remove transitive spring-boot-starter-webflux deps
Resolves #162
2023-12-13 18:55:46 +01:00
Omkar Shetkar
2209bfff96 Spring boot starters for Vector Stores
- Adds spring-boot starters for: azure-ai-search, chroma, mivlus, neo4j, pgvector, pinecone and weaviate vector stores.
- README.md update
2023-12-13 18:22:10 +01: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
Johnny Lim
3fc74f95fe Fix broken Asciidoctor syntax in aiclient.adoc 2023-12-13 16:30:04 +01:00
Johnny Lim
1f9dd960d1 Fix "FROM" group ID in README.md 2023-12-13 16:29:48 +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
jtsnr
7f151c562e Fix page links 2023-12-12 15:47:58 -05:00
jtsnr
2c0da77a5c Fix links 2023-12-12 15:47:58 -05:00
Mark Pollack
a58e1fec64 Remove chain package. Fixes #109 2023-12-12 15:43:32 -05:00
Jemin Huh
8139af468e Add OpenAI Stream Client implementation
- Add the latest Request and Response Classes of OpenAI's Chat Completion API
 - Add spring-boot-starter-webflux dependency,
 - Implement AiStreamClient interface extending AiClient,
 - Implement OpenAiStreamClient using Reactor Flux
 - AiStreamClient doesn't extend AiClient
2023-12-12 18:18:57 +01: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
11e47c07ef Add vertex ai autoconfig and spring boot
- Add Vertex AI Autoconfigurations for chat and embedding clients.
 - Factor out the embeding client dimensions() computation into an abstract parent AbstractEmbeddingClient.
 - Add ITs
 - Vertex dos.
2023-12-12 17:36:50 +01:00
Christian Tzolov
75cf8bee8c Fix Milvus dependecy issue due to Boot 3.2 upgrade 2023-12-12 13:39:13 +01:00
Christian Tzolov
69906db4f5 Add Vertex AI support
- Rename Generation#text to content and info to properties.
 - Make Generation extend the AbstractMessage and default to ASSISTANT message type.
 - Add vevertex-ai project with native api client for generation and embedding.
 - Add unit and IT tests for the vertex-ai native client.
 - Add AiClient and EmbeddingClient implementation for the the Vertex AI along with ITs.
2023-12-11 22:58:41 -05:00
Mark Pollack
5890d565aa Update README.md 2023-12-11 14:01:29 -05: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
5f7e78bd1b add prompt docs 2023-12-06 16:58:46 -05:00
siddharth Paul
76cba5833c fix: Fix milvus builder configuration setters 2023-12-06 15:41:22 +01: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
Mark Pollack
3423688908 remove uploading of old asciidoc ref docs as the no longer exist 2023-12-04 15:00:43 -05:00
Mark Pollack
27bb72999a remove unused asciidoc plugin and docs 2023-12-04 14:49:16 -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
John Blum
e3e5070256 Fix dependencies in spring-ai-test module.
* Changes dependency on spring-ai-openai to spring-ai-core as a required dependency.
* Include dependency on Jakarta Servlet API.
* Include dependency on Spring Web MVC.
* Include dependnecy on OkHttp3 MockWebServer.
* Add common AI test configuration using mock objects.

Rebase OpenAI mock test configuration on the shared components inside spring-ai-test.

* Renames OpenAiMockTestConfiguration to MockOpenAiTestConfiguration.
* Refactor MockOpenAiTestConfiguration removing mock infrastructure beans and import MockAiTestConfiguration class.
* Declare test dependency on spring-ai-test.=
* Integrate complete AI metadata implementation for Microsoft Azure OpenAI.

This new Spring @Configuration class enables AI developers to test against the AI provider's REST API by mocking Web service endpoints and returning canned AI responses.
This allows the AI provider client (Java) library to be exercised in the same manner as the production application, or even Spring AI framework code without modification.

Closes #122
2023-11-28 18:10:59 -05:00
Harry9656
8e8be5da4a Fix link pointing to arxiv 2023-11-25 12:36:14 +01:00
Christian Tzolov
62146ae768 Update README.md
Further clarifications for cloning the repo.
2023-11-25 12:35:05 +01:00
Fabian Krüger
c831a73cd4 Add hint about cloning the repo 2023-11-25 12:23:33 +01:00
Josh Long
c520e77472 support graalvm native compilation for openai 2023-11-24 12:56:56 +01:00
Christian Tzolov
58a6735a1b Clean and fix the openai ITs 2023-11-23 12:30:28 +01:00
Christian Tzolov
c7f22f9a99 Temp disable ClientIT until huggingface endpoint is available 2023-11-23 12:04:31 +01:00
Christian Tzolov
3a0b5dfab4 Disable MilvusVectorStoreAutoConfigurationIT due to outdated milvus grpc dependecies 2023-11-23 11:58:45 +01:00
Craig Walls
ffe44e24e2 Add equals() and hashCode() for Prompt and SearchRequest 2023-11-22 15:52: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
John Blum
eadcae7702 Define API for AI provider metadata collected during an AI request.
* Define GenerationMetadata property in AiResponse.
* Add OpenAI implementations of AiMetadata, RateLimit and Usage interfaces.
* Add REST Assured JsonPath dependency to spring-ai-openai module.
* Add OkHttp dependency to spring-ai-openai module.
* Add OkHttp Interceptor to parse OpenAI rate limit metadata from HTTP headers.
* Add OkHttp MockWebServer dependency to spring-ai-openai module, test scope
* Add Jakarta Servlet API dependency to spring-ai-openai module, test scope
* Add Spring Web MVC dependency to spring-ai-open-ai module., test scope
* Define OpenAI API response headers in an Enum.
* Add OpenAI test configuration using mock objects.
* Add integration test to assert successful extraction of OpenAI API response metadata.
* Include Spring Boot auto-configuration for (conditional) OpenAI metadata collection.
* Edit documentation and include information on AI metadata collected by Spring AI.
* Provide AI metadata implementation for Microsoft Azure OpenAI Service.
* Capture optional PromptMetadata in AiResponse.
* Define metadata for an AI generation choice.
* Capture AI choice metadata in Generation.
* Integrate ChoiceMetadata into AiResponse returned by OpenAI.

Fixes #98
2023-11-21 18:16:34 -05:00
Mark Pollack
465211f832 revert back to azure open ai client 1.0.0-beta.3 2023-11-21 18:12:12 -05:00
John Blum
142e799c86 Upgrade to Azure OpenAI client library for Java 1.0.0-beta.5. 2023-11-21 17:30:08 -05:00
Janne Valkealahti
55a02f6356 Fix workflows for repo org change 2023-11-20 18:39:55 +00: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
Christian Tzolov
1ab7ceedff Fix transformers-embedding test’s cross-platform number precision 2023-11-17 12:04:57 +01:00
Tommy Ludwig
6bdea65cd5 Auto-configuration and starter for Ollama
- Adds auto-configuration and a starter for Ollama.
 - Add testconteiner orca-mini integration test.
 - Improve code style and documentation.

Resolves #68, Resolves #69
2023-11-16 22:40:52 +01:00