Commit Graph

696 Commits

Author SHA1 Message Date
Josh Long
b38287ad5c copy constructor for ChatClient#call incantations based on defaults. 2024-05-19 15:47:43 +02:00
Josh Long
30508e5c3e copy constructor for ChatClient#call incantations based on defaults. 2024-05-19 15:47:22 +02:00
Josh Long
9901a9ae73 copy constructor for ChatClient#call incantations based on defaults. 2024-05-19 15:42:02 +02:00
Josh Long
10fe63f658 stop the pointless copying of data around and put everything in one single well-known, mutable, carrier object. 2024-05-19 11:01:05 +02:00
Josh Long
55aab168a1 modelcall and chatclient rework 2024-05-18 21:30:51 +02:00
Christian Tzolov
09e122de5e Add Mistral AI tool_call_id to ChatCompletionMessage.
The tool call ID that this message is responding to, applicable for the TOOL role.
2024-05-18 06:07:12 +02:00
Christian Tzolov
275189970d BeanOutputConverter: fix javadoc 2024-05-18 06:05:50 +02:00
Christian Tzolov
517df45cd8 Merge ParametrizedTypeReferenceBeanOutputConverter into BeanOutputConverter
Add ParametrizedTypeReference constructoers along the Clas<T> such.
  Convert the Class into ParametrizedTypeReference internally.
  Update tests and docs.
2024-05-18 04:50:20 +02:00
Christian Tzolov
d026614316 Update README.md
Breaking changes
2024-05-17 17:31:48 +02:00
Christian Tzolov
3475f17e98 Unify the vector store module and pom names
spring-ai-qdrant -> spring-ai-qdrant-store
 spring-ai-cassandra -> spring-ai-cassandra-store
 spring-ai-pinecone -> spring-ai-pinecone-store
 spring-ai-redis -> spring-ai-redis-store
 spring-ai-qdrant -> spring-ai-qdrant-store
 spring-ai-gemfire -> spring-ai-gemfire-store
 spring-ai-azure-vector-store-spring-boot-starter -> spring-ai-azure-store-spring-boot-starter
 spring-ai-redis-spring-boot-starter -> spring-ai-redis-store-spring-boot-starter
2024-05-17 17:05:09 +02:00
Christian Tzolov
1985824fa9 clean code imports 2024-05-17 15:32:46 +02:00
Christian Tzolov
3ee04ed8da fix code style and missing dependency renaming 2024-05-17 15:31:58 +02:00
Josh Long
04d854cc49 make project names consistent 2024-05-17 15:31:58 +02:00
Josh Long
c5b7dd9c46 i ran the spring javaformat maven plugin to clean up any source code incompatabilities. 2024-05-17 15:31:57 +02:00
Josh Long
8c758617f3 moving to ApplicationListener<ApplicationReadyEvent> to avoid slowing down the application on startup. 2024-05-17 15:31:53 +02:00
Christian Tzolov
654e22be9d Add TypeReference StructuredOutputConverter
A ParameterizedTypeReference alternative of BeanOutputConverter that can cover list of beans as well.
  Based on suggestion: https://twitter.com/kisco_/status/1788862522998546440
2024-05-17 15:28:20 +02:00
Christian Tzolov
14d620e2ca minor doc fix 2024-05-17 06:47:43 +02:00
Christian Tzolov
7887159e68 Improve Gemini antora documentation and fix broken links 2024-05-17 06:43:47 +02:00
Christian Tzolov
1b1daa7ee7 Add GEMINI_PRO_1_5_PRO and GEMINI_PRO_1_5_FLASH and update geminie maven BOM to 26.39.0
Also fix few Ollama docs and  code formatting issue.
2024-05-16 15:36:14 +02:00
Mark Pollack
549c480489 Refactoring
* Put creation of EvaluationRequest in ChatServiceResponse
* Add string constructor to QuestionContextAugmentor
* change vectorStore accept() usage to write()
2024-05-16 14:01:51 +02:00
Mark Pollack
fd9c98661d API refactoring
* Added more natural method names to DocumentReader, Transformer, Writer
* Changed Content getMedia to return Collection, deprecated use of List
* Change constructor for Media to accept URL and Resource, deprecate Object constructor
* Update ETL documentation and a few tests to avoid now deprecated APIs.
2024-05-16 12:53:13 +02:00
Christian Tzolov
227f0703ec Fix: function calling not able to resolve input types
Resolves #726
2024-05-16 09:41:09 +02:00
Christian Tzolov
82f473f2bc resolve javadoc reference issue 2024-05-15 16:59:18 +02:00
Mark Pollack
867154c082 Changed ChatBot to ChatService with other related name changes
* PromptContext -> ChatServiceContext
* Added PromptChange to ChatServiceContext to capture PromptTransformer changes
* DefaultChatBot -> PromptTransformingChatService
* DefaultStreamingChatBot -> StreamingPromptTransformingChatService
* package name changes, chatbot->service and history->memory
* Added fluent builders to a few PromptTransformer implementations
* Add license headers
2024-05-15 14:01:48 +02:00
Eddú Meléndez
d610dd6f1d Add default collection name to Qdrant
Add a default collection name similar to other vector store
implementations. Currently, when using starters, qdrant requires
a collection name. Otherwise, it fails.
2024-05-15 12:02:05 +02:00
Mark Pollack
368f7bdfba Remove filter on external knowledge.
* Update question so that evaulator passes

fix formatting
2024-05-15 10:13:02 +02:00
Lorenzo Caenazzo
a7eb28ac17 Add real Function Calling Streaming support
- Add Java reflection merge utilities that can access  Azure private constructors and fields.
 - Azure merging, creation of flux windows.
 - Function call grouping for function processing.
 - Do not perform greedy operation on Flux.
 - Use "real" streaming on all client on function response.
 - Gerimi: fix missing method impl.
 - Mistral AI, OpenAI: fix missing stream flag in doCreateToolResponseRequest.
 - Fix code formatting. No wildcard imports.
 - Add Grogdunn to the javadoc authors.
 - Anthropic 3 API does not support streaming funciton calling yet.
2024-05-15 09:43:36 +02:00
Christian Tzolov
b0799babf4 Update Qdrant client version from 1.7.1 to 1.9.1
- Also update the qdrant/qdrant docker image version from v1.7.4 to v1.9.2
2024-05-15 06:19:46 +02:00
Christian Tzolov
db4f0b0aaf Add GPT-4o ITs and documentation updates 2024-05-14 21:12:39 +02:00
Thomas Vitale
b3cfa2b900 OpenAI: Add gpt-4o to chat model enum
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2024-05-14 20:50:56 +02:00
Eddú Meléndez
d7dad6ef61 Add GH workflow to check source code format on PRs 2024-05-11 16:14:40 +02:00
Eddú Meléndez
cdb80e83e9 Fix ChromaDB basic authentication
Currently, `username` is added as a password in `BasicAuthenticationInterceptor`.
This commit fixes the issue and also make sure the integration test
setup is correct.
2024-05-11 14:51:28 +02:00
Christian Tzolov
93bd5021a1 Improve Azure OpenAI options merging logic 2024-05-11 13:22:35 +03:00
wmz7year
220ec7f631 AWS Bedrock Titan embedding model add amazon.titan-embed-text-v2:0 support. 2024-05-10 14:26:25 +02:00
mck
cae045d52b Add the autoconfigure property for the CassandraVectorStore option to return embeddings in documents from similarity searches
ref: https://github.com/spring-projects/spring-ai/pull/673
2024-05-10 14:24:45 +02:00
Eddú Meléndez
5beef21a4e Expose QdrantClient and WeaviateClient as beans
Currently, `QdrantClient` and `WeaviateClient` are not exposed as
  beans. Having access to those would benefit to perform operations
  with an already configured client.

  - Deprecate  QdrantVectorStoreConfig.
  - Update Qdrant manual config adoc.
  - Improve Qdrant adoc.
  - Update Weaviate docs.
2024-05-10 15:15:14 +03:00
wmz7year
25f91c3297 Add AWS Bedrock Amazon Titan Text Premier model support 2024-05-10 10:54:10 +02:00
wmz7year
3497a1ec7b Fix Bedrock Cohere embedding truncate type types
- fix compilation errors and javadoc
2024-05-10 11:49:20 +03:00
Christian Tzolov
f955fd7277 Fix code style and javadoc
- update spring boot to 3.2.5.
 - fix Content's JavaDoc.
 - remove wildcard java imports.
2024-05-09 15:54:19 +03:00
Christian Tzolov
11450601ad Disable MondoDB IT due to #698 2024-05-09 14:33:17 +03:00
Christian Tzolov
6154fa663f Disable MondoDB IT due to #698 2024-05-09 13:27:57 +03:00
Mark Pollack
b774a9549d Remove assertion that depends on unreliable response from AI Model 2024-05-08 15:46:17 -04:00
Mark Pollack
ad527303ed Rename Agent classes to use ChatBot 2024-05-08 15:43:00 -04:00
Mark Pollack
dfb8bf6a44 Add a new abstraction to simplify implementation of common ChatBot use cases
* Add ChatBot and basic DefaultChatBot
* Add streaming ChatBot support.
* Add Evaluator interface and RelevancyEvaluator implementation
* Add Content data type abstraction for Document and Message
* Renaming and package refactoring
* update .gitignore to allow node package name
* Add List<Media> to node and move ai.transformer package to ai.prompt.transformer
* Add Short/Long term memory support.
* Add mixing transformers support

Docs TBD
2024-05-08 15:14:50 -04:00
Mark Pollack
012a2ad74a fix formatting 2024-05-08 14:16:52 -04:00
Christian Tzolov
a49a2d213f Replace the OutputParser by a StructuredOutputConverter API
- Old OutputParser, BeanOutputParser, ListOutputParser and MapOutputParser classes are depredated
   in favour of the new StructuredOutputConverter, BeanOutputConverter, ListOutputConverter and
   MapOutputConverter implementations.
   Later are drop-in replacements for the former ones, and provide the same functionality.
 - Keep the existing parser package and classes for backward compatibility.
 - Adjust the PromptTemplate for backward compatibility
 - Update all existing tests to use the new Structured Output API.
 - Improve the documentation for structured outputs.
2024-05-08 12:02:24 -04:00
Thomas Vitale
1c93ae50a8 OpenAI: Fix model property being overwritten by default value
Fixes gh-671

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2024-05-05 17:22:07 +02:00
Thomas Vitale
f91ccf0047 Ollama: Update APIs, Testcontainers, Documentation
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2024-05-05 17:25:51 +03:00
samzhu
70c8c5a529 docs: Fix typo in PgVectorStore dimensions property 2024-05-05 09:15:36 +02:00
Jemin Huh
fe07bfdff6 Docs: Fix filter expression reference to Elasticsearch Query string query 2024-05-05 09:13:32 +02:00