- 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
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
- Clean the AzureOpenAiChatClient and add support for StreamingChatClient.
- Streamline the AzureOpenAiEmbeddingClient.
- Move the AzureOpenAiChatClient and AzureOpenAiEmbeddingClient to top org.sf.ai.azure.opoenai package.
- Add ITs for AzureOpenAiChatClient and AzureOpenAiEmbeddingClient
- Fix the AzureOpenAiAutoConfiguration
- Split property file into AzureOpienAiConnectionProperties, AzureOpenAiChatProperties
and AzureOpenAiEmbeddingProperties.
- Add ITs for the auto-configuration
- Add improve package structure
- Add README docs
- fix failing test
- update to use Azure Deployment for CI
The OpenAiApi, returns the HTTP headers that can be intropsect for metadata
with the help of OpenAiResponseHeaderExtractor.
No need for http interception nor for joining by ID.
- fix all class names with AiClient or AiStreamingClient name prefixes.
- fix all variables or method name prefixes.
- fix the javadocs, readmes and refference documentation.
Add OllamOptions that can be used as a builder (withX) and spring propererites (e.g. getX/setX).
- prvides strongly typed properties.
- the 'OllamaOptsion#toMap()' converts the options into Map<String, Object>.
- Add OllamaEmbeddingAutoConfiguraiton#options property of type OllamaOptions.
- Add OllamaChatAutoConfiguraiton#options property of type OllamaOptions.
- Factor out the baseUrl property into a standalone OllamConnectionProperties shared
between the Chat and Embedding autoconfigurations.
- Fix affected unit/IT tests.
- Implement a native client (OllamaApi) to leverage chat/streaming and embedding endpoints.
- Add a OllamaChatClient implementing the ChatClinet and StreamingChatClinet interfaces.
- Add a OllamaEmbedding clinent that impl. the EmbeddingClinet interface.
- Add AutoConfiguraitons with properties for the chat and the embedding clients.
- Add unit and ITs for the OllamaApi, OllamaChatClient, OllamaEmbeddingClient, and related auto-configuraitons.
- Remove the old ollama impl. classes and tests.
- minor fixes to the bedrok test methods names.