- Rename OllamaChatClient#withOptions(...) method to OllamaChatClient#withDefaultOptions(...)
- Rename OllamaEmbeddingClient#withOptions(...) method to OllamaEmbeddingClient#withDefaultOptions(...)
- Remove the Chat/Embedding Client model field by defaultOptions.mode one.
- Correct default and runtime OllamaOptions merging implemented.
- Added support for portable ChatOptions.
- OllamaOptions a synthetic field ‘model’ not supported by Ollama API but used by the OllamaChatClient
and OllamaEbeddingClients. The model field is removed before calling the OllamaApi.
- Update the IT ollama docker image to 0.1.23
- Set Mistral as the default model.
- Extend and improve the ITs
- Add tests for testing the chat and embedding request creation and options merging logic.
- Minor code-style improvements.
- Split the ollama.adoc into embeddings/ollama-embeddings.addoc and clients/ollama-chat.adoc.
- Improve the documentation to explain how to configure and use the Ollama Chat and Embedding clients manually or with the help of the auto-configuraitons.
- Clarify the docs property sections.
- Now you can use an arbitrary ChatOption instance as Prompt options for the OpenAIChatClinet.
- Add Unit tests for OpenAiApi and ModelOptionsUtils.
- Document portable options support.
- Impove the code style.
- Merge the OpenAiImageOptions interface impl and builder into one class.
- Improve the OpenAiImageClient call implementation.
Resolves#274
Add OpenAiChatOptions
- OpenAiChatOptions implements ChatOptions and exposes all OpenAi request options, except messages and stream.
- Add OpenAiChatOptions field (as defaultOptions) to OpenAiChatClient. Implement star-up/runtime options merging on chat request creation
- Add OpenAiChatOptions options field to OpenAiChatProperties. Later is set as OpenAiChatClient#defaultOptions. Use the spring.ai.openai.chat.options.* prefix to set the options.
- Add tests for properties and options merging.
- Move the OpenAiChatOptions.java out of the api package
Add OpenAiEmbeddingOptions
- Add OpenAiEmbeddingOptions class implementing the EmbeddingOptions interface.
- Add OpenAiEmbeddingClient#defaultOptions
- Add request merging with default and propmt options.
- Add OopenAiEmbeddingProperties#options field of type OpenAiEmbeddingOptions
Update OpenAI client docs
Part of the larger 'epic' issue #228
- Fix the Ollama options merging to pervent NPE.
- Fix the Ollama handling for SYS messages.
- Fix the BeanOutputParser to support JSON Schema reponses.
- All Ollama Parsers tests pass now.
Resolves: #258 , #273
- Craete new EmbeddingOptions -> ModelOptions, EmbeddigRequest -> ModelRequest, EmbeddingResponseMetadata -> ResponseMetadata and EmbeddignResultMetadata -> ResultMetadata.
- Make the EmbeddigClient interface extend from ModelClient<EmbeddingRequest, EmbeddingResponse>, EmbeddingResponse implements ModelResponise and Embedding implements ModelResult.
- Fix affected tests.
- Steramline the EmbeddingClient interface with default method implementations based on call.
- Merge EmbeddingUtil into AbstractEmbeddingClient
* An abstract API for AI model clients
* Providing portable client request options while still allowing vendor specific options when required. Implemented only for StabilityAI/OpenAI ImageClient
* Support for text->image for openai and stabilityai.
Partial fix for #27 : Text To Image and Fixes#266 and Fixes#261
Add dedicated property classes for the Chat and the Embedding models and use a common connection properties for both:
- OpenAiConnectionProperties (baseUrl, apiKey) with prefix spring.ai.openai.*.
- OpenAiChatProperties (model, temperature) with prefix spring.ai.openai.chat.
- OpenAiEmbeddingProperties (model) with prefix spring.ai.openai.embedding.*
Additionally the OpenAiChatProperties and OpenAiEmbeddingProperties can optionally override the OpenAiConnectionProperties
so that we can use the Chat model from one Provider and the Embedding model from another.
Resolves#229
The ParagraphPdfDocumentReader relies on a PDF object called 'outline' (e.g. TOC) to be present in the document.
If the pdf was not generated with TOC, the other options in Spring AI are PagePdfDocumentReader and TikaDocumentReader.
Resolves#59
Moved up one package level the following classes
* org.springframework.ai.huggingface.client.HuggingfaceChatClient
* org.springframework.ai.openai.client.OpenAiChatClient and org.springframework.ai.openai.embedding.OpenAiEmbeddingClient
* org.springframework.ai.vertex.generation.VertexAiChatClient and org.springframework.ai.vertex.embedding.VertexAiEmbeddingClient
Fixes#211
- The HuggingfaceAutoConfiguration renamed HuggingfaceChatAutoConfiguration
- Merge OllamaChatAutoConfiguration and OllamaEmbeddingAutoConfiguration into OllamaAutoConfiguration
Fixes#210