Commit Graph

218 Commits

Author SHA1 Message Date
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
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