Commit Graph

732 Commits

Author SHA1 Message Date
Christian Tzolov
a4e3a7b8de Streamline the OllamaEmbeddingModelIT 2024-05-26 18:32:25 +02:00
Christian Tzolov
79e2dab29a Disable ITs related to the ChatService's ChatMemory implementations
Disable ITs due to deprecation of all ChatService PromptTransformer ChatMemory implementations.
2024-05-26 17:27:59 +02:00
Christian Tzolov
99fbf013d3 Temp revert CommonVectorStoreProperties.initializeSchema to true by default 2024-05-26 17:17:55 +02:00
Josh Long
2d43e40024 Add property to initialize schema for vector stores
* Default is fale
* Update docs
2024-05-26 00:31:19 -04:00
Mark Pollack
b872c894c3 Update OpenAIAutoConfiguration to import dependent auto configurations
* Fixes breaking change introduced in commit 377b5ff
2024-05-24 13:17:04 -04:00
JoeHitHard
dea7ab67c3 #690 choices can be null look at OpenAiApi.java:606
Signed-off-by: JoeHitHard <josephmeghanath@gmail.com>
2024-05-24 11:51:18 -04:00
skewgod
593e5fd747 docs(qdrant): added additional info to setup api key for qdrant (#736) 2024-05-24 11:36:26 -04:00
devholic22
0e0d453e2b Add javadoc and clean up method names in OpenAiImageModel
* remove getDefaultOptions method as it is not used.
2024-05-24 11:27:46 -04:00
devholic22
df12e17385 Modify RetryTemplate access level in OpenAiChatModel
* Modify RetryTemplate access level (public - private) in OpenAiChatModel
2024-05-24 11:27:09 -04:00
devholic22
d6c1b033ad Add comments in OpenAiImageModel
* Add comments in OpenAiImageModel like OpenAiChatModel
2024-05-24 11:27:09 -04:00
Alexander Hewer
c26d5f624c Added support for response format in chat options for Azure OpenAI
- Added new enum class AzureOpenAiResponseFormat
- Modified merge methods in AzureOpenAiChatModel to use new parameter
- Modfied AzureOpenAiChatOptions to include the responseFormat parameter
- Modified Azure ChatCompletionsOptionsTests to verify that new parameter is working as expected
- Added docs
2024-05-24 11:20:40 -04:00
Swapnil Jain
14a4fbefaf Update concepts.adoc documentation for clarity and accuracy (#762) 2024-05-24 11:06:46 -04:00
Thomas Vitale
312156e2cb Introduce autoconfiguration for Cloud Bindings
Fixes gh-499

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2024-05-24 10:59:52 -04:00
Mark Pollack
ac518df4db Rename method 'created' to 'getCreated' in OpenAiImageResponseMetadata
In the ImageResponseMetadata interfaces and its implementations, the method 'created' has been renamed to 'getCreated' to support JSON ser/deser

Fixes #625
2024-05-24 10:50:14 -04:00
deepak
377b5ffa61 Use WebClient.Builder and RestClient.Builder as ctor args in OpenAiAutoConfiguration
Fixes #609
2024-05-24 10:23:55 -04:00
Christian Tzolov
8257c0dc43 Improve ChatClient impl. parameter cohesion 2024-05-24 15:00:03 +02:00
Christian Tzolov
cd3b374dab Extend ChatClient API
- add support for custom StructuredOutputConverters usng entity(outputConverterInstance)
  - add mutate() method that returns ChatClient.Builder to create a new ChatClient whose
    settings are replicated from the ChatClient's default settings.
  - add prompt().mutate() method that returns ChatClient.Builder to create a new ChatClient
    whose settings are replicated from the current default and prompt settings.
2024-05-24 14:33:26 +02:00
Christian Tzolov
c49a5c84ff Improve model's POM name consistency 2024-05-24 09:16:39 +02:00
Christian Tzolov
5bcefae67c Minor docs improvements 2024-05-24 07:57:13 +02:00
Christian Tzolov
d6f4b71e1f Improve ChatClient API docs 2024-05-24 07:29:42 +02:00
Mark Pollack
a8fa1867d3 Partial ChatClient docs 2024-05-24 00:05:57 -04:00
Christian Tzolov
b425b0460c Fix README new ChatClient migration snippet 2024-05-24 05:51:33 +02:00
Mark Pollack
4a2ad60059 Package refactoring
* Move ChatClient and related classes into the chat.client package
* Move ChatModel and related class into the chat.model package
* Smaller refactorings to remove DSM cycles
* Update README.md
2024-05-23 17:52:27 -04:00
Christian Tzolov
0571aac44c Add ChatClient.Builder auto-configuraiton support
- add ChatClinetCustomizer support.
  - add enable/disable property - enabled by default.
  - add ITs.

* Update README.md
2024-05-23 17:01:48 -04:00
Christian Tzolov
5f887b3eb6 Rename ChatClient.ChatClientBuilder to ChatClient.Builder 2024-05-23 16:33:33 +02:00
Christian Tzolov
d04f0694ed fix test 2024-05-23 15:39:34 +02:00
Christian Tzolov
6c9c766da6 Improve PrompTemplate paramters handling 2024-05-23 14:55:29 +02:00
Christian Tzolov
b3445b45f4 doc: improve the Spring AI landing page. 2024-05-23 12:44:15 +02:00
Christian Tzolov
47c9fcea27 Add overload Resourse constructors for fluent API.
Fix issue with PromptTemplate failing on trailing parameters not used in the system/user text.
2024-05-23 11:18:15 +02:00
Christian Tzolov
5add8f0b68 Rename ChatClient#ChatClientBuilder#defaultFunctionWrappers() to defaultFunction()
This change aligns the method name with the ChatClientRequest#function(...) syntax,
  improving code readability and consistency.
2024-05-23 07:19:25 +02:00
Josh Long
fbfc87e814 Refactoring of ChatClient to add fluent API and introduce Model as dependent object
* Rename the ModelClient class hierarchy into Model:
  - Rename ModelClient into Model. Update all code and doc references.
  - Rename ChatClient to ChatModel. Update all ChatClient suffixes and chatClient fields and variables in code and doc.
  - Rename EmbeddingClient into EmbeddingModel. Update the XxxEmbeddingClient class and variable suffixes and embeddingClient variables and fields in code and docs.
  - Rename ImageClient into ImageModel.
  - Rename SpeechClient into SpeechModel.
  - Rename TranscriptionClient into TranscriptionModel.
  - Update all javadocs and antora pages. Update the related diagrams.

* Create fluent API in ChatClient interface that now includes streaming support
* Add OpenAI FunctionCallbackWrapper2IT auto-config tests.
* Add ChatClientTest mockito testing.
* Add ChatModel#getDefaultOptions(), and remove @FunctionalInterface

* ChatModel enums extend the new ModelDescription interface.
* Implement fromOptions copy method in every ChatOptions implementation.
* Extend ChatClient to use the model default options if not provided explicitly.

* Update readme to provide guidance on how to adapt to breaking changes.

Co-authored-by: Christian Tzolov <ctzolov@vmware.com>
Co-authored-by: Mark Pollack <mpollack@vmware.com>
2024-05-22 16:07:12 -04:00
Dimitrios Begnis
bce45c2d2f Use <> for inequality operator in Neo4j filter expression implementation 2024-05-21 17:17:32 -04:00
GR
8389913999 Implemented the doChatCompletionStream in ZhiPuAiChatClient 2024-05-21 17:11:35 -04:00
devholic22
a46e014413 Add comments and prevent IndexOutOfBounds in ImageResponse
* Add comments in ImageResponse like ChatResponse
* Prevent IndexOutOfBounds in getResult function
* Update toString for formatting like ChatResponse
2024-05-21 17:07:24 -04:00
Christian Tzolov
ef5a3fa9fa MiniMax model improvements
* Fix javadoc issue. Remove wildcard imports
* In MiniMaxChatClient, remove unused method, unused fromMedia method, dedicated exception and rename inappropriate method.
2024-05-21 09:06:31 -04:00
Christian Tzolov
2abf10dbf9 Fix javadoc issue. Remove wildcard imports 2024-05-21 09:49:57 +02:00
Craig Walls
83c997d18e Add spring-ai-retry dependency to Ollama model pom.xml 2024-05-21 09:05:27 +02:00
GR
99c3857788 Add Support for ZhiPu AI model
* See https://www.zhipuai.cn/
2024-05-20 20:20:29 -04:00
GR
6b674014ed Add support for the MiniMax Model
* See https://minimaxi.com/
2024-05-20 15:08:20 -04:00
Ashif Ismail
6f4ab64f92 Update README.md
fixed typo :)
2024-05-19 11:49:14 +02:00
Pablo Sanchidrian
e8f663d0c8 Fix: watsonx.ai | refresh token issue and implement retry mechanism (#735)
* fix: refresh token only when needed and apply retry policy

* fix: remove unused import
2024-05-19 11:48:09 +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